.bjscc,
.bjscc * {
    box-sizing: border-box;
}

.bjscc[hidden],
.bjscc [hidden],
.bjscc__reopen[hidden] {
    display: none !important;
}

html.bjscc-modal-open,
body.bjscc-modal-open {
    overflow: hidden !important;
}

.bjscc {
    --bjscc-accent: var(--bjscc-accent-override, var(--site-accent, var(--bjs-cyan, var(--tarban-gold, var(--orange, var(--cyan, #16b8d4))))));
    --bjscc-on-accent: #ffffff;
    --bjscc-text: var(--site-ink, var(--bjs-ink, var(--tarban-ink, var(--ink, #17222a))));
    --bjscc-muted: var(--site-muted, var(--bjs-muted, var(--tarban-muted, var(--muted, #5c6870))));
    --bjscc-border: var(--site-line, var(--bjs-line, var(--tarban-line, var(--line, #dfe6ea))));
    --bjscc-panel: var(--site-panel, var(--bjs-paper, var(--tarban-white, var(--white, #ffffff))));
    --bjscc-deep: var(--site-deep, var(--bjs-navy, var(--tarban-navy, var(--navy, #082837))));
    --bjscc-link: var(--site-link, var(--bjs-cyan-dark, var(--tarban-blue, var(--orange-dark, var(--cyan, #087d95)))));
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    color: var(--bjscc-text);
    position: relative;
    z-index: 2147483000;
}

.bjscc__banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    background: var(--bjscc-panel);
    border: 1px solid var(--bjscc-border);
    border-radius: 18px;
    box-shadow: 0 14px 50px rgba(0,0,0,.18);
}

.bjscc__copy { min-width: 0; }

.bjscc__title,
.bjscc__modal-title {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--bjscc-text);
}

.bjscc__text,
.bjscc__category p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--bjscc-muted);
}

.bjscc__policy {
    display: inline-block;
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--bjscc-link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bjscc__actions,
.bjscc__modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.bjscc__button,
.bjscc__link-button,
.bjscc__close,
.bjscc__reopen { font: inherit; }

.bjscc__button {
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid var(--bjscc-border);
    border-radius: 11px;
    background: var(--bjscc-panel);
    color: var(--bjscc-text);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 650;
    cursor: pointer;
}

.bjscc__button--primary {
    border-color: var(--bjscc-accent);
    background: var(--bjscc-accent);
    color: var(--bjscc-on-accent);
}

.bjscc__button:hover,
.bjscc__button:focus-visible,
.bjscc__link-button:hover,
.bjscc__link-button:focus-visible,
.bjscc__close:focus-visible,
.bjscc__reopen:focus-visible {
    outline: 3px solid var(--bjscc-accent);
    outline-offset: 2px;
}

.bjscc__link-button {
    min-height: 44px;
    padding: 9px 4px;
    border: 0;
    background: transparent;
    color: var(--bjscc-link);
    font-size: 14px;
    line-height: 1.2;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.bjscc__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.48);
    z-index: 2147483001;
}

.bjscc__modal {
    position: fixed;
    left: 50%;
    top: 50%;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    transform: translate(-50%, -50%);
    padding: 20px;
    background: var(--bjscc-panel);
    border: 1px solid var(--bjscc-border);
    border-radius: 18px;
    box-shadow: 0 20px 70px rgba(0,0,0,.28);
    z-index: 2147483002;
}

.bjscc__modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.bjscc__close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid var(--bjscc-border);
    border-radius: 50%;
    background: var(--bjscc-panel);
    color: var(--bjscc-text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.bjscc__category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid var(--bjscc-border);
}

.bjscc__category strong,
.bjscc__always,
.bjscc__switch-label {
    font-size: 15px;
    line-height: 1.4;
    color: var(--bjscc-text);
}

.bjscc__always {
    color: var(--bjscc-muted);
    white-space: nowrap;
}

.bjscc__modal-actions {
    justify-content: flex-start;
    padding-top: 16px;
    border-top: 1px solid var(--bjscc-border);
}

.bjscc__switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 50px;
    height: 30px;
    flex: 0 0 50px;
}

.bjscc__switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bjscc__switch > span[aria-hidden="true"] {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--bjscc-border);
    transition: background .18s ease;
    cursor: pointer;
}

.bjscc__switch > span[aria-hidden="true"]::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bjscc-panel);
    box-shadow: 0 1px 4px rgba(0,0,0,.22);
    transition: transform .18s ease;
}

.bjscc__switch input:checked + span[aria-hidden="true"] {
    background: var(--bjscc-accent);
}

.bjscc__switch input:checked + span[aria-hidden="true"]::after {
    transform: translateX(20px);
}

.bjscc__switch input:focus-visible + span[aria-hidden="true"] {
    outline: 3px solid var(--bjscc-accent);
    outline-offset: 2px;
}

#bjscc-root.bjscc > #bjscc-reopen.bjscc__reopen {
    all: unset;
    -webkit-appearance: none;
    appearance: none;
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 2147482999;
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bjscc-border);
    border-radius: 999px;
    background: var(--bjscc-panel);
    color: var(--bjscc-deep);
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0,0,0,.18);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

#bjscc-root.bjscc > #bjscc-reopen.bjscc__reopen[hidden] { display: none !important; }

#bjscc-root.bjscc > #bjscc-reopen.bjscc__reopen:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 26px rgba(0,0,0,.22);
}

#bjscc-root.bjscc > #bjscc-reopen.bjscc__reopen:focus-visible {
    outline: 3px solid var(--bjscc-accent);
    outline-offset: 2px;
}

#bjscc-root.bjscc > #bjscc-reopen.bjscc__reopen .bjscc__reopen-icon {
    display: block;
    width: 30px;
    height: 30px;
    max-width: none;
    max-height: none;
    overflow: visible;
    pointer-events: none;
}

#bjscc-root.bjscc > #bjscc-reopen.bjscc__reopen .bjscc__cookie-body {
    fill: var(--bjscc-accent);
    stroke: var(--bjscc-deep);
}

#bjscc-root.bjscc > #bjscc-reopen.bjscc__reopen .bjscc__cookie-chip {
    fill: var(--bjscc-deep);
}

.bjscc__sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 720px) {
    .bjscc { font-size: 16px; }

    .bjscc__banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 16px;
        grid-template-columns: 1fr;
        gap: 14px;
        border-radius: 15px;
    }

    .bjscc__title,
    .bjscc__modal-title { font-size: 18px; }

    .bjscc__text,
    .bjscc__category p,
    .bjscc__category strong,
    .bjscc__always,
    .bjscc__switch-label { font-size: 15px; }

    .bjscc__policy,
    .bjscc__button,
    .bjscc__link-button { font-size: 14px; }

    #bjscc-root.bjscc > #bjscc-reopen.bjscc__reopen {
        left: calc(10px + env(safe-area-inset-left, 0px));
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
    }

    #bjscc-root.bjscc > #bjscc-reopen.bjscc__reopen .bjscc__reopen-icon {
        width: 28px;
        height: 28px;
    }

    .bjscc__actions,
    .bjscc__modal-actions { justify-content: stretch; }

    .bjscc__button { flex: 1 1 180px; }

    .bjscc__link-button {
        flex: 1 1 100%;
        text-align: left;
    }

    .bjscc__modal {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        padding: 16px;
        border-radius: 15px;
    }

    .bjscc__category { gap: 12px; }
}

@media (max-width: 380px) {
    .bjscc__banner {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 14px;
    }

    .bjscc__button { flex-basis: 100%; }

    .bjscc__always {
        white-space: normal;
        text-align: right;
    }
}
