/* =========================================================
   SBS Home — layout kiểu kituhay + palette logo (cyan→violet→coral)
   ========================================================= */
:root {
    --sbs-cyan: #00D2FF;
    --sbs-violet: #9D50BB;
    --sbs-magenta: #E02DFF;
    --sbs-coral: #FF5E62;
    --sbs-orange: #FF9966;
    --sbs-mint: #43e97b;
    --sbs-brand: #8B00FF;
    --sbs-grad: linear-gradient(135deg, #00D2FF 0%, #9D50BB 45%, #FF5E62 100%);
    --sbs-grad-btn: linear-gradient(135deg, #8B00FF 0%, #E91E63 55%, #FF6F00 100%);
    --sbs-bg: #f6f3fb;
    --sbs-surface: #ffffff;
    --sbs-ink: #1a1228;
    --sbs-muted: #5c5368;
    --sbs-line: rgba(139, 0, 255, 0.14);
    --sbs-radius: 14px;
    --sbs-shadow: none;
    --sbs-font: "Inter", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif,
        "Noto Sans JP", "Microsoft YaHei", "Yu Gothic", "Malgun Gothic",
        "Noto Sans Math", "Cambria Math",
        "Noto Sans Symbols 2", "Noto Sans Egyptian Hieroglyphs", "Segoe UI Symbol", "Segoe UI Historic",
        "Noto Sans Myanmar", "Myanmar Text",
        "Noto Sans Thai", "Leelawadee UI",
        "Noto Sans Tai Tham", "Noto Sans Tai Le",
        "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", "Noto Emoji",
        sans-serif;
    --font-family-sans-serif: var(--sbs-font);
}

html,
body,
button,
input,
select,
textarea,
.btn,
.form-control,
.nav,
.dropdown-menu {
    font-family: var(--sbs-font);
}

.sbs-body {
    color: var(--sbs-ink);
    font-family: var(--sbs-font);
}

/* ----- Header (chip nav như kituhay) ----- */
.sbs-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: #fff;
    border-bottom: 1px solid #eee8f5;
}

.sbs-header__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding-top: 8px;
    padding-bottom: 8px;
    position: relative;
}

.sbs-header__brand {
    flex-shrink: 0;
    line-height: 0;
}

.sbs-header .header-logo {
    width: auto;
    max-height: 56px;
    height: auto;
    object-fit: contain;
}

.sbs-header__burger {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #eee0f5;
    border-radius: 10px;
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.sbs-header__burger-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #8B00FF;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sbs-header.is-nav-open .sbs-header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.sbs-header.is-nav-open .sbs-header__burger-line:nth-child(2) {
    opacity: 0;
}

.sbs-header.is-nav-open .sbs-header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.sbs-header__nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin-left: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0;
}

.sbs-header__nav::-webkit-scrollbar {
    display: none;
}

.sbs-nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    white-space: nowrap;
}

.sbs-nav-chip__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sbs-nav-chip:hover {
    transform: translateY(-1px);
    filter: brightness(0.98);
    text-decoration: none !important;
}

.sbs-nav-chip.is-active {
    box-shadow: inset 0 0 0 1.5px currentColor;
}

.sbs-nav-chip--home {
    background: #ffe6ef;
    color: #e91e63;
}

.sbs-nav-chip--game {
    background: #ffe8d6;
    color: #f08700;
}

.sbs-nav-chip--social {
    background: #e3f2ff;
    color: #1e88e5;
}

.sbs-nav-chip--mkt {
    background: #f3e8ff;
    color: #7c3aed;
}

.sbs-nav-chip--font {
    background: #efe5ff;
    color: #8B00FF;
}

.sbs-nav-chip--library {
    background: #e6faf3;
    color: #0d9f6e;
}

/* Mobile: chỉ logo + icon menu */
@media (max-width: 991.98px) {
    .sbs-header__burger {
        display: inline-flex;
        border-radius: 0;
    }

    .sbs-header__inner {
        gap: 8px;
        min-height: 60px;
        position: static;
    }

    .sbs-header__nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 15px;
        overflow: visible;
        background: #fff;
        border: 0;
        border-bottom: 1px solid #eee8f5;
        border-radius: 0;
        box-shadow: none;
        z-index: 1050;
    }

    .sbs-header.is-nav-open .sbs-header__nav {
        display: flex;
    }

    .sbs-header__nav .sbs-nav-chip {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
        font-size: 15px;
        border-radius: 0;
    }

    .sbs-header__nav .sbs-nav-chip__icon {
        width: 18px;
        height: 18px;
    }

    .sbs-header .header-logo {
        max-height: 46px;
    }
}

@media (min-width: 992px) {
    .sbs-header__burger {
        display: none !important;
    }

    .sbs-header__nav {
        display: flex !important;
        position: static;
        flex-direction: row;
        box-shadow: none;
        border: 0;
        padding: 2px 0;
        background: transparent;
    }
}

/* ----- Home hero ----- */
.sbs-home {
    padding-bottom: 40px;
}

/* ----- Intro hero (Bootstrap container) ----- */
.sbs-intro {
    padding: 28px 15px 8px;
    text-align: center;
}

.sbs-intro__inner {
    width: 100%;
    margin: 0 auto;
}

.sbs-intro__title {
    margin: 0 0 12px;
    font-family: var(--sbs-font);
    font-size: clamp(1.35rem, 2.8vw, 1.85rem);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: #6d28d9;
}

.sbs-intro__live {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 8px;
    margin: 0 auto 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--sbs-line);
    box-shadow: 0 4px 14px rgba(80, 30, 140, 0.06);
    font-size: 13px;
    color: var(--sbs-muted);
    line-height: 1.4;
}

.sbs-intro__live time {
    font-variant-numeric: tabular-nums;
    color: #6b6280;
}

.sbs-intro__count,
.sbs-intro__live .highlight {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(139, 0, 255, 0.1);
    color: var(--sbs-brand) !important;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.sbs-intro__sapo {
    width: 100%;
    margin: 0 auto;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--sbs-line);
    box-shadow: 0 6px 20px rgba(80, 30, 140, 0.05);
    font-size: 14.5px;
    line-height: 1.7;
    color: #4a4258;
    text-align: center;
}

.sbs-intro__sapo p {
    margin: 0;
}

.sbs-intro__sapo p + p {
    margin-top: 0.65em;
}

@media (max-width: 767.98px) {
    .sbs-intro,
    .sbs-intro__title,
    .sbs-intro__live,
    .sbs-intro__sapo {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
        font-kerning: normal;
        font-feature-settings: normal;
        word-spacing: normal;
    }

    .sbs-intro__title {
        letter-spacing: -0.015em;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
    }

    .sbs-intro__live time,
    .sbs-intro__count {
        white-space: nowrap;
        letter-spacing: 0;
        word-spacing: 0;
    }

    .sbs-intro__sapo {
        border: 0;
    }

    .home-page .sbs-generator__card,
    .home-page .sbs-generated,
    .home-page .sbs-collection__card,
    .home-page .sbs-home-board,
    .home-page .sbs-allinone > .alert,
    .home-page .sbs-allinone__card,
    .home-page .sbs-cms-wrap,
    .home-page #sbsPageContent {
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .home-page .sbs-generator__card,
    .home-page .sbs-generated,
    .home-page .sbs-collection__card,
    .home-page .sbs-home-board,
    .home-page .sbs-allinone > .alert,
    .home-page .sbs-allinone__card,
    .home-page #sbsPageContent {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }
}

@media (min-width: 768px) {
    .sbs-intro {
        padding: 36px 15px 12px;
    }

    .sbs-intro__sapo {
        padding: 16px 20px;
        font-size: 15px;
    }
}

.sbs-hero {
    text-align: center;
    padding: 28px 15px 8px;
}

.sbs-hero__title {
    font-size: clamp(1.45rem, 3.2vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    background: var(--sbs-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sbs-hero__live {
    font-size: 13px;
    color: var(--sbs-muted);
    margin-bottom: 10px;
}

.sbs-hero__live .highlight {
    color: var(--sbs-brand);
    font-weight: 700;
}

.sbs-hero__sapo {
    margin: 0 auto 18px;
    font-size: 14px;
    color: var(--sbs-muted);
    line-height: 1.55;
}

.sbs-mode-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    margin: 0 auto 12px;
}

.sbs-mode-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    padding: 14px 14px;
    border-radius: 16px;
    text-decoration: none !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sbs-mode-btn:hover,
.sbs-mode-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
    filter: brightness(1.05);
    color: #fff !important;
    text-decoration: none !important;
}

.sbs-mode-btn:active {
    transform: scale(0.99);
}

.sbs-mode-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.sbs-mode-btn__text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
    flex: 1 1 auto;
    min-width: 0;
}

.sbs-mode-btn__text strong {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.sbs-mode-btn__text small {
    display: block;
    font-size: 12px;
    opacity: 0.92;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sbs-mode-btn__arrow {
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    opacity: 0.85;
    font-weight: 300;
}

.sbs-mode-btn--game {
    background: linear-gradient(135deg, #6f42c1 0%, #8B00FF 100%);
}

.sbs-mode-btn--bio {
    background: linear-gradient(135deg, #e83e8c 0%, #fd7e14 100%);
}

.sbs-mode-btn--mkt {
    background: linear-gradient(135deg, #00b4d8 0%, #20c997 100%);
}

@media (min-width: 768px) {
    .sbs-mode-buttons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .sbs-mode-btn {
        min-height: 72px;
        padding: 16px;
        border-radius: 14px;
    }

    .sbs-mode-btn__arrow {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .sbs-mode-buttons {
        gap: 10px;
        padding: 0;
    }

    .sbs-mode-btn {
        min-height: 68px;
        padding: 12px 14px;
        border-radius: 16px;
        box-shadow: 0 8px 18px rgba(80, 30, 140, 0.14);
    }

    .sbs-mode-btn__icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
        border-radius: 13px;
    }

    .sbs-mode-btn__text strong {
        font-size: 15px;
    }

    .sbs-mode-btn__text small {
        font-size: 12.5px;
    }
}

/* ----- Generator card ----- */
.sbs-generator {
    margin-top: 12px;
}

.sbs-generator__card {
    background: var(--sbs-surface);
    border: 1px solid var(--sbs-line);
    border-radius: 18px;
    box-shadow: var(--sbs-shadow);
    padding: 22px 18px 20px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.sbs-generator__card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--sbs-grad-btn);
}

.sbs-generator__head {
    text-align: center;
    margin-bottom: 18px;
}

.sbs-generator__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sbs-brand);
    background: rgba(139, 0, 255, 0.08);
    margin-bottom: 8px;
}

.sbs-generator__title {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sbs-ink);
}

.sbs-generator__lead {
    margin: 0 auto;
    max-width: 520px;
    font-size: 13px;
    color: var(--sbs-muted);
    line-height: 1.5;
}

.sbs-generator__block {
    margin-bottom: 16px;
}

.sbs-generator__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 8px;
    color: var(--sbs-ink);
}

.sbs-generator__num {
    display: inline-flex;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    background: var(--sbs-grad-btn);
    flex-shrink: 0;
}

.sbs-generator__hint {
    font-size: 13px;
    color: var(--sbs-muted);
    margin: -2px 0 12px;
    text-align: left;
}

.sbs-generator__name {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--sbs-line);
    border-radius: 12px;
    background: #faf8ff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sbs-generator__name:focus-within {
    border-color: var(--sbs-brand);
    box-shadow: 0 0 0 3px rgba(139, 0, 255, 0.12);
    background: #fff;
}

.sbs-generator__name-icon {
    padding: 0 4px 0 14px;
    font-size: 18px;
    line-height: 1;
}

.sbs-generator__name .form-control {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    height: 52px;
    font-size: 16px;
}

.sbs-generator__fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 4px;
}

@media (min-width: 768px) {
    .sbs-generator__fields {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sbs-picker__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--sbs-muted);
    margin-bottom: 5px;
}

.sbs-picker__control {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    padding: 4px 8px 4px 10px;
    border: 1.5px solid var(--sbs-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
    user-select: none;
}

.sbs-picker__control:hover,
.sbs-picker__control:focus {
    border-color: var(--sbs-brand);
    box-shadow: 0 0 0 3px rgba(139, 0, 255, 0.12);
    outline: none;
}

.sbs-picker__control:active {
    transform: scale(0.99);
}

.sbs-picker__icon {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}

.sbs-picker__control .form-control {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 6px 4px;
    height: auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--sbs-ink);
    cursor: pointer;
    pointer-events: none;
}

.sbs-picker__chev {
    margin-left: auto;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    background: var(--sbs-grad-btn);
}

.sbs-generator__cta {
    background: var(--sbs-grad-btn) !important;
    border: 0 !important;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 12px !important;
    min-height: 52px;
    margin-top: 8px;
    box-shadow: 0 8px 20px rgba(139, 0, 255, 0.22);
}

.sbs-generator__cta:hover {
    filter: brightness(1.04);
}

/* ----- Live preview ----- */
.sbs-preview {
    margin: 4px 0 14px;
    animation: sbsFadeUp 0.35s ease both;
}

.sbs-preview__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 14px;
    background: #fff5f9;
    border: 1px dashed #f48fb1;
}

.sbs-preview__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #ffe4ef;
    color: #c2185b;
    font-size: 1.05rem;
    font-weight: 700;
    word-break: break-word;
    text-align: center;
}

.sbs-generated {
    margin: 16px 0 8px;
    padding: 16px 16px 8px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f0e6ee;
    text-align: left;
    animation: sbsFadeUp 0.35s ease both;
}

.sbs-generated__head {
    margin-bottom: 12px;
}

.sbs-generated__title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: #1a1324;
}

.sbs-generated__hint {
    margin: 0;
    color: #888;
    font-size: 0.9rem;
}

.sbs-generated__more {
    display: flex;
    justify-content: center;
    margin: 16px 0 8px;
    grid-column: 1 / -1;
}

.sbs-generated__more-btn {
    min-width: 220px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    background: #6d28d9;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.22);
}

.sbs-generated__more-btn:hover {
    background: #5b21b6;
}

.sbs-generated__more-btn:disabled {
    opacity: 0.55;
    cursor: default;
    box-shadow: none;
}

.sbs-generated__list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.sbs-generated__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 8px;
}

.sbs-generated__kicker {
    grid-column: 1 / -1;
    margin: 10px 0 2px;
    padding: 2px 2px 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7c6b89;
}

.sbs-generated__kicker:first-child {
    margin-top: 0;
}

.sbs-generated .boxnames,
.sbs-generated .boxnames.vt_df_bg {
    float: none !important;
    display: block;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 12px;
    overflow: visible;
    background: transparent;
    color: #111;
}

.sbs-generated .boxnames--xs { grid-column: span 3; }
.sbs-generated .boxnames--sm { grid-column: span 4; }
.sbs-generated .boxnames--md { grid-column: span 6; }
.sbs-generated .boxnames--lg,
.sbs-generated .boxnames--featured {
    grid-column: 1 / -1;
}

.sbs-generated .boxnames p,
.sbs-generated .one_generated_variant {
    float: none !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100% !important;
    min-height: 58px;
    margin: 0;
    padding: 22px 10px 10px;
    border: 1px solid #eadff3;
    border-radius: 12px;
    background: #fff;
    font-family: var(--sbs-font);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: break-word;
    cursor: pointer;
    color: #111 !important;
    -webkit-font-smoothing: antialiased;
}

.sbs-generated .boxnames span,
.sbs-generated .boxnames small,
.sbs-generated .boxnames strong,
.sbs-generated .boxnames__label,
.sbs-generated .boxnames__text {
    float: none !important;
    display: block !important;
    width: auto !important;
    max-width: none;
    background: transparent !important;
    position: static;
}

.sbs-generated .boxnames__label {
    position: absolute !important;
    top: 6px;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    color: #8a7a96 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sbs-generated .boxnames__text {
    flex: 1 1 auto;
    min-width: 0;
    color: #111 !important;
    font-weight: 800;
    font-size: inherit;
    line-height: 1.45;
}

.sbs-generated .boxnames--xs .one_generated_variant,
.sbs-generated .boxnames--sm .one_generated_variant {
    min-height: 68px;
    font-size: 1.16rem;
    justify-content: center;
    text-align: center;
}

.sbs-generated .boxnames--xs .boxnames__text,
.sbs-generated .boxnames--sm .boxnames__text {
    text-align: center;
}

.sbs-generated .boxnames--xs .icopytext,
.sbs-generated .boxnames--sm .icopytext {
    display: none;
}

.sbs-generated .boxnames--md .one_generated_variant {
    font-size: 1.1rem;
}

.sbs-generated .boxnames--lg .one_generated_variant {
    font-size: 1.05rem;
    align-items: flex-start;
}

.sbs-generated .boxnames--featured .one_generated_variant {
    min-height: 76px;
    padding: 26px 14px 12px;
    background: #fff;
    font-size: 1.28rem;
    font-weight: 800;
    border: 1px solid #e0d4ef;
    color: #111 !important;
}

.sbs-generated .boxnames--featured .boxnames__text {
    color: #111 !important;
}

.sbs-generated .boxnames--featured .boxnames__label {
    color: #6d28d9 !important;
}

.sbs-generated .one_generated_variant:hover,
.sbs-generated .one_generated_variant:active {
    border-color: #c4a6de;
    background: #fff;
    box-shadow: 0 4px 12px rgba(17, 17, 17, 0.06);
}

.sbs-generated .icopytext {
    float: none !important;
    flex: 0 0 auto;
    margin: 0;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3eef8;
    box-shadow: none;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    color: #6d28d9;
}

@media (max-width: 991px) {
    .sbs-generated .boxnames--xs { grid-column: span 4; }
    .sbs-generated .boxnames--sm { grid-column: span 6; }
}

@media (max-width: 767px) {
    .sbs-generated {
        padding: 12px 10px 10px;
        margin: 12px 0;
    }

    .sbs-generated__grid {
        gap: 8px;
    }

    .sbs-generated .boxnames--xs {
        grid-column: span 6;
    }

    .sbs-generated .boxnames--sm,
    .sbs-generated .boxnames--md,
    .sbs-generated .boxnames--lg,
    .sbs-generated .boxnames--featured {
        grid-column: 1 / -1;
    }

    .sbs-generated .boxnames p,
    .sbs-generated .one_generated_variant {
        min-height: 56px;
        padding: 24px 12px 12px;
        font-size: 1.18rem;
        font-weight: 800;
        color: #111 !important;
        background: #fff;
        justify-content: flex-start;
        text-align: left;
    }

    .sbs-generated .boxnames--xs .one_generated_variant,
    .sbs-generated .boxnames--sm .one_generated_variant,
    .sbs-generated .boxnames--md .one_generated_variant,
    .sbs-generated .boxnames--lg .one_generated_variant,
    .sbs-generated .boxnames--featured .one_generated_variant {
        font-size: 1.18rem;
        justify-content: flex-start;
        text-align: left;
        align-items: center;
    }

    .sbs-generated .boxnames span,
    .sbs-generated .boxnames small,
    .sbs-generated .boxnames strong,
    .sbs-generated .boxnames__label,
    .sbs-generated .boxnames__text {
        display: block !important;
        width: auto !important;
        color: inherit;
        background: transparent !important;
        text-align: left !important;
    }

    .sbs-generated .boxnames__label {
        position: absolute !important;
        color: #8a7a96 !important;
        width: auto !important;
        max-width: calc(100% - 24px);
    }

    .sbs-generated .boxnames__text {
        color: #111 !important;
        font-weight: 800;
        -webkit-text-stroke: 0.15px #111;
        text-align: left !important;
    }

    .sbs-generated .boxnames--xs .icopytext,
    .sbs-generated .boxnames--sm .icopytext {
        display: none;
    }

    .sbs-generated .boxnames--md .icopytext,
    .sbs-generated .boxnames--lg .icopytext,
    .sbs-generated .boxnames--featured .icopytext {
        display: inline-block;
    }
}

/* ----- Symbol picker modal (tabs + search) ----- */
/* Khóa scroll nền + chặn Bootstrap .modal-open .modal { overflow-y: auto } */
html.sbs-symbol-lock,
body.sbs-symbol-lock {
    overflow: hidden !important;
    overscroll-behavior: none;
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
}

.modal-open .sbs-symbol-modal.modal,
.sbs-symbol-modal.modal {
    overflow: hidden !important;
    padding: 0 !important;
}

.sbs-symbol-modal .modal-dialog {
    width: calc(100% - 24px);
    max-width: 1000px;
    margin: 1.25rem auto;
    box-sizing: border-box;
}

.sbs-symbol-modal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden !important;
    box-shadow: 0 20px 50px rgba(40, 10, 80, 0.22);
    max-height: calc(100vh - 2.5rem);
    max-height: calc(100dvh - 2.5rem);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sbs-symbol-modal .modal-header {
    border-bottom: 1px solid #eee;
    background: #fff;
    padding: 14px 18px;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.sbs-symbol-modal .modal-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: #111;
    text-align: center;
    margin: 0;
}

.sbs-symbol-modal .close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 4px 10px;
    font-size: 1.6rem;
    font-weight: 400;
    opacity: 0.55;
}

/* Override style.css .modal-body { max-height; overflow-y } */
.sbs-symbol-modal .modal-body {
    padding: 12px 16px 16px !important;
    overflow: hidden !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    flex: 1 1 0%;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sbs-symbol-sources {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    flex-shrink: 0;
}

.sbs-symbol-source {
    border: 1.5px solid #ececec;
    background: #fafafa;
    color: #333;
    border-radius: 10px;
    padding: 10px 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sbs-symbol-source:hover {
    border-color: #f48fb1;
    color: #c2185b;
    background: #fff;
}

.sbs-symbol-source.is-active {
    background: linear-gradient(90deg, #7b2ff7 0%, #f06292 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(123, 47, 247, 0.22);
}

.sbs-symbol-item__meta {
    display: block;
    width: 100%;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #999;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    text-align: center;
}

.sbs-symbol-item.is-selected .sbs-symbol-item__meta {
    color: #c2185b;
}

.sbs-symbol-search {
    position: relative;
    flex-shrink: 0;
}

.sbs-symbol-search__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.55;
    pointer-events: none;
}

.sbs-symbol-search .form-control {
    height: 42px;
    padding-left: 36px;
    border-radius: 10px;
    border: 1.5px solid #e5e5e5;
    font-size: 14px;
}

.sbs-symbol-search .form-control:focus {
    border-color: #f06292;
    box-shadow: 0 0 0 3px rgba(240, 98, 146, 0.15);
}

.sbs-symbol-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.sbs-symbol-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #222;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sbs-symbol-tab:hover {
    border-color: #f48fb1;
    color: #c2185b;
}

.sbs-symbol-tab.is-active {
    background: #f06292;
    border-color: #f06292;
    color: #fff;
}

.sbs-symbol-panels {
    flex: 1 1 0%;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    max-height: min(58vh, 560px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    box-sizing: border-box;
}

.sbs-symbol-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-items: stretch;
    align-items: stretch;
}

.sbs-symbol-loading,
.sbs-symbol-empty {
    text-align: center;
    padding: 36px 12px;
    color: #888;
    font-size: 14px;
}

.sbs-symbol-modal .one_generated_variant,
.sbs-symbol-item {
    position: relative;
    margin: 0 !important;
    padding: 14px 8px !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #222 !important;
    font-size: 16px !important;
    line-height: 1.25;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.sbs-symbol-item__text {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
    text-align: center;
    line-height: 1.15;
}

.sbs-symbol-modal .one_generated_variant:hover,
.sbs-symbol-item:hover {
    border-color: #f48fb1 !important;
    background: #fff5f8 !important;
}

.sbs-symbol-item.is-selected {
    border-color: #f06292 !important;
    background: #fff0f5 !important;
    box-shadow: 0 0 0 1px #f06292;
}

.sbs-symbol-item.is-selected::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f06292;
}

.sbs-symbol-modal .one_generated_variant[data-value=""],
#symbolTextModal .one_generated_variant[data-value=""] {
    background: #f06292 !important;
    color: #fff !important;
    border-color: #f06292 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* Mobile: ~80% chiều cao, full width gần sát mép, căn giữa */
@media (max-width: 767.98px) {
    .modal-open .sbs-symbol-modal.modal,
    .sbs-symbol-modal.modal.show {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 12px !important;
        overflow: hidden !important;
    }

    .sbs-symbol-modal .modal-dialog,
    .sbs-symbol-modal .modal-dialog-centered,
    .modal-open .sbs-symbol-modal .modal-dialog {
        position: relative !important;
        inset: auto !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 90vh !important;
        height: 90% !important;
        max-height: 90vh !important;
        max-height: 90dvh !important;
        margin: 0 auto !important;
        padding: 0 !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        pointer-events: auto !important;
        box-sizing: border-box !important;
    }

    .sbs-symbol-modal.fade .modal-dialog {
        transform: none !important;
    }

    .sbs-symbol-modal .modal-content {
        border-radius: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        box-shadow: 0 20px 50px rgba(40, 10, 80, 0.28);
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto;
    }

    .sbs-symbol-modal .modal-header {
        flex: 0 0 auto;
        padding: 12px 14px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .sbs-symbol-modal .modal-body {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        padding: 10px 12px 12px !important;
        overflow: hidden !important;
        max-height: none !important;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
    }

    .sbs-symbol-search,
    .sbs-symbol-tabs,
    .sbs-symbol-sources {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .sbs-symbol-source {
        font-size: 12px;
        padding: 9px 6px;
    }

    .sbs-symbol-panels {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        overscroll-behavior: contain;
    }

    .sbs-symbol-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        padding-bottom: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .sbs-symbol-item,
    .sbs-symbol-modal .one_generated_variant {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        word-break: break-all !important;
        overflow-wrap: anywhere !important;
        min-height: 52px;
        padding: 10px 4px !important;
        font-size: 14px !important;
        transform: none !important;
    }

    .sbs-symbol-tab {
        padding: 6px 10px;
        font-size: 12px;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 399.98px) {
    .sbs-symbol-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ----- Boards ----- */
.sbs-boards {
    margin-top: 28px;
}

.sbs-section-title {
    text-align: center;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--sbs-ink);
}

.sbs-section-desc {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 18px;
    font-size: 14px;
    color: var(--sbs-muted);
}

.sbs-board {
    background: var(--sbs-surface);
    border: 1px solid var(--sbs-line);
    border-radius: var(--sbs-radius);
    box-shadow: var(--sbs-shadow);
    padding: 16px;
    margin-bottom: 14px;
    text-align: left;
}

.sbs-board__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sbs-board__head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
}

.sbs-board__desc {
    font-size: 13px;
    color: var(--sbs-muted);
    margin-bottom: 12px;
}

.sbs-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--sbs-brand);
}

.sbs-badge--hot {
    background: linear-gradient(135deg, #FF5E62, #FF9966);
}

.sbs-badge--new {
    background: linear-gradient(135deg, #00D2FF, #43e97b);
}

.sbs-board-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 768px) {
    .sbs-board-row {
        grid-template-columns: 1fr 1fr;
    }
}

.sbs-board--details > summary {
    list-style: none;
    cursor: pointer;
}

.sbs-board--details > summary::-webkit-details-marker {
    display: none;
}

.sbs-board--details > summary::after {
    content: "▾";
    margin-left: auto;
    color: var(--sbs-brand);
}

.sbs-board--details[open] > summary::after {
    content: "▴";
}

.sbs-sym-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sbs-sym-grid--wide {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

@media (min-width: 768px) {
    .sbs-sym-grid--wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.sbs-sym-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-width: 44px;
    min-height: 40px;
    padding: 6px 8px;
    border: 1px solid var(--sbs-line);
    border-radius: 10px;
    background: #faf7ff;
    font-size: 15px;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
    color: var(--sbs-ink);
    font-family: var(--sbs-font);
    box-sizing: border-box;
    transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

button.sbs-sym-chip {
    appearance: none;
}

.sbs-sym-chip:hover {
    background: #efe5ff;
    border-color: var(--sbs-brand);
    transform: translateY(-1px);
}

.sbs-sym-chip--wide {
    min-height: 48px;
    font-size: 14px;
    word-break: break-word;
    text-align: center;
    white-space: pre-wrap;
    line-height: 1.25;
}

.sbs-sym-chip .copied-text {
    display: none;
    position: absolute;
    top: -8px;
    right: 6px;
    background: var(--sbs-brand);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.sbs-alpha {
    font-size: 13px;
    line-height: 1.65;
    color: var(--sbs-ink);
}

.sbs-alpha p {
    margin-bottom: 8px;
    word-break: break-word;
}

.sbs-best-img {
    max-width: 320px;
    border-radius: 12px;
    cursor: pointer;
}

.sbs-content {
    background: var(--sbs-surface);
    border: 1px solid var(--sbs-line);
    border-radius: var(--sbs-radius);
    box-shadow: var(--sbs-shadow);
    padding: 18px 16px;
    margin-top: 8px;
    margin-bottom: 18px;
    text-align: left;
    font-size: 14px;
}

/* SBS mode page leftovers */
.sbs-live-preview {
    background: #fff;
    border: 2px dashed #8B00FF;
    border-radius: 12px;
    padding: 16px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.sbs-live-preview__label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8B00FF;
    font-weight: 700;
    margin-bottom: 6px;
}

.sbs-live-preview__value {
    font-size: 1.5rem;
    font-weight: 700;
    word-break: break-word;
    min-height: 2rem;
    color: #222;
}

.blinking {
    animation: blinker 1s linear 2;
}

@keyframes blinker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Không fade-in khung đầu trang — animation both + opacity:0 làm LCP trắng. */

@keyframes sbsFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- CMS content từ admin (ảnh / table không phá layout) ----- */
.sbs-cms-wrap {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--sbs-line);
    box-shadow: var(--sbs-shadow);
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

.sbs-cms-content {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    text-align: left;
    font-size: 15px;
    line-height: 1.7;
    color: #3d3548;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sbs-cms-content > *:first-child {
    margin-top: 0;
}

.sbs-cms-content img,
.sbs-cms-content video,
.sbs-cms-content iframe,
.sbs-cms-content embed,
.sbs-cms-content object,
.sbs-cms-content svg {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
}

.sbs-cms-content iframe[width],
.sbs-cms-content embed,
.sbs-cms-content object {
    width: 100% !important;
}

.sbs-cms-content figure {
    max-width: 100%;
    margin: 1rem auto;
}

.sbs-cms-content figure img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.sbs-cms-content .sbs-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border: 1px solid #eee4f8;
    border-radius: 10px;
}

.sbs-cms-content table {
    width: 100% !important;
    max-width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 14px;
    margin: 0;
}

.sbs-cms-content .sbs-table-scroll table {
    margin: 0;
}

.sbs-cms-content table td,
.sbs-cms-content table th {
    word-break: break-word;
    overflow-wrap: anywhere;
    padding: 8px 10px;
    vertical-align: top;
    border: 1px solid #e8e0f2;
}

.sbs-cms-content table img {
    max-width: 100% !important;
    height: auto !important;
}

.sbs-cms-content pre,
.sbs-cms-content code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.sbs-cms-content .wp-caption,
.sbs-cms-content .alignnone,
.sbs-cms-content .aligncenter,
.sbs-cms-content .alignleft,
.sbs-cms-content .alignright {
    max-width: 100% !important;
}

.sbs-cms-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Chỉ nội dung biên tập ở cuối trang chủ; không thay đổi container chung. */
.home-page #sbsPageContent {
    margin-top: 32px;
    padding: clamp(22px, 4vw, 42px);
    overflow-x: visible;
    border: 1px solid #eadff3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(72, 42, 94, .07);
    color: #443b4e;
    font-size: 17px;
    line-height: 1.82;
}

.home-page #sbsPageContent p,
.home-page #sbsPageContent ul,
.home-page #sbsPageContent ol,
.home-page #sbsPageContent blockquote {
    margin-bottom: 1.25em;
}

.home-page #sbsPageContent h2,
.home-page #sbsPageContent h3,
.home-page #sbsPageContent h4 {
    color: #30243a;
    font-weight: 800;
    letter-spacing: -.015em;
    scroll-margin-top: 90px;
}

.home-page #sbsPageContent h2 {
    margin: 1.75em 0 .7em;
    padding-bottom: .45em;
    border-bottom: 2px solid #f1e8f7;
    font-size: clamp(25px, 3vw, 32px);
    line-height: 1.3;
}

.home-page #sbsPageContent h3 {
    margin: 1.45em 0 .55em;
    font-size: clamp(21px, 2.3vw, 25px);
    line-height: 1.38;
}

.home-page #sbsPageContent h4 {
    margin: 1.3em 0 .5em;
    font-size: 19px;
}

.home-page #sbsPageContent ul,
.home-page #sbsPageContent ol {
    padding-left: 1.4em;
}

.home-page #sbsPageContent li {
    margin-bottom: .55em;
    padding-left: .2em;
}

.home-page #sbsPageContent a {
    color: #9d3db0;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: rgba(157, 61, 176, .32);
    text-underline-offset: 3px;
}

.home-page #sbsPageContent blockquote {
    margin-left: 0;
    padding: 16px 20px;
    border-left: 4px solid #c764d5;
    border-radius: 0 12px 12px 0;
    background: #fbf6fd;
}

/* Khối khác trên home cũng không để ảnh/table tràn */
.home-page .leaf-fieldset,
.home-page .alert {
    max-width: 100%;
    overflow-x: auto;
}

.home-page .leaf-fieldset img,
.home-page .alert img,
.home-page .sbs-best-img,
.home-page img.pointer {
    max-width: 100% !important;
    height: auto !important;
}

.home-page .leaf-fieldset table,
.home-page .alert table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
}

@media (max-width: 767.98px) {
    .sbs-cms-content {
        font-size: 14px;
    }

    .sbs-cms-content table {
        font-size: 13px;
        min-width: 360px;
    }

    .sbs-cms-content table td,
    .sbs-cms-content table th {
        padding: 6px 8px;
    }

    .home-page #sbsPageContent {
        margin-top: 24px;
        padding: 22px 18px;
        border-radius: 14px;
        font-size: 16px;
        line-height: 1.76;
    }

    .home-page #sbsPageContent h2 {
        font-size: 24px;
    }

    .home-page #sbsPageContent h3 {
        font-size: 20px;
    }
}

/* ----- Homepage EmotionX board (admin-driven) ----- */
.sbs-home-board__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    content-visibility: auto;
    contain-intrinsic-size: 1px 420px;
}

.sbs-home-board__cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    min-width: 0;
}

.sbs-home-board__cell:nth-child(2n) {
    border-right: 0;
}

.sbs-home-board__glyph {
    display: inline-block;
    min-width: 0;
    font-size: 1.25rem;
    line-height: 1.3;
    word-break: break-all;
    font-family: var(--sbs-font);
}

.sbs-home-board .icopytext {
    flex-shrink: 0;
    float: none;
}

.sbs-home-board__cell { cursor: pointer; }
.icopytext.is-copied { color: #4b26bb !important; font-weight: 700; }
.sbs-copy-toast {
    position: fixed; left: 50%; z-index: 99999;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box; max-width: calc(100vw - 48px);
    transform: translate(-50%, 20px) scale(.94); opacity: 0; pointer-events: none;
    padding: 13px 26px; border: 1px solid rgba(255,255,255,.45);
    border-radius: 18px; background: linear-gradient(135deg, #ec4899, #db2777); color: #fff;
    font-size: 14px; line-height: 1.5; font-weight: 700; text-align: center;
    box-shadow: 0 10px 32px rgba(219,39,119,.28), inset 0 1px 0 rgba(255,255,255,.2);
    transition: opacity .2s ease, transform .3s cubic-bezier(.2,.8,.2,1);
}
.sbs-copy-toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
/* Two lightweight, decorative fireworks; no overlay blocks the copy controls. */
.sbs-copy-toast::before, .sbs-copy-toast::after {
    content: ''; position: absolute; top: 30%; left: 12%;
    width: 5px; height: 5px; border-radius: 50%; opacity: 0;
    box-shadow: 0 -34px #f9a8d4, 24px -24px #f472b6, 34px 0 #fbbf24,
        24px 24px #fb7185, 0 34px #f9a8d4, -24px 24px #c084fc,
        -34px 0 #f472b6, -24px -24px #fbbf24;
}
.sbs-copy-toast::after { left: auto; right: 12%; top: 45%; }
.sbs-copy-toast.is-celebrating::before { animation: sbs-copy-firework .75s ease-out both; }
.sbs-copy-toast.is-celebrating::after { animation: sbs-copy-firework .75s .1s ease-out both; }
@keyframes sbs-copy-firework {
    0% { opacity: 0; transform: scale(.08) rotate(-15deg); }
    15% { opacity: 1; }
    65% { opacity: .8; }
    100% { opacity: 0; transform: scale(1.25) rotate(15deg); }
}
.sbs-copy-toast.is-error { background: #991b1b; box-shadow: 0 10px 28px rgba(153,27,27,.2); }
@media (prefers-reduced-motion: reduce) {
    .sbs-copy-toast { transition: none; transform: translate(-50%, 0); }
    .sbs-copy-toast.is-celebrating::before, .sbs-copy-toast.is-celebrating::after { animation: none; }
}

/* Footer parity with Laravel. */
.bgfooter{background:#fff;color:#334155;border-top:1px solid #e8edf3}.sbs-footer-grid{padding-top:8px;padding-bottom:8px}.sbs-footer-title{font-size:18px;font-weight:700;color:#334155;margin-bottom:16px}.sbs-footer-logo{display:inline-block;margin:0 0 14px;line-height:0}.sbs-footer-logo img{width:auto;max-width:280px;height:auto;max-height:64px;object-fit:contain}.sbs-footer-about,.sbs-footer-connect{font-size:14px;line-height:1.7;color:#475569;margin:0}.sbs-footer-info,.sbs-footer-links{list-style:none;padding:0;margin:0 0 16px}.sbs-footer-info li,.sbs-footer-links li{margin:0 0 10px;font-size:14px;line-height:1.6;color:#475569}.sbs-footer-info strong{color:#1e293b;font-weight:700}.sbs-footer-info a,.sbs-footer-links a{color:#475569;text-decoration:none}.sbs-footer-info a:hover,.sbs-footer-links a:hover{color:#8b00ff}.sbs-footer-social{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}.sbs-footer-social a{width:42px;height:42px;border-radius:50%;background:#f3f4f6;color:#334155;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;transition:background .2s ease,color .2s ease,transform .2s ease}.sbs-footer-social a svg{width:18px;height:18px}.sbs-footer-social a:hover{background:#efe5ff;color:#8b00ff;transform:translateY(-2px)}.sbs-footer-copy{margin-top:12px;padding:18px 0 4px;border-top:1px solid #e8edf3;text-align:center}.sbs-footer-copy p{margin:0;font-size:14px;color:#475569}.sbs-footer-copy a{color:#e11d74;font-weight:700;text-decoration:none}.sbs-footer-copy a:hover{color:#be185d}@media(max-width:767.98px){.sbs-footer-logo img{max-width:240px}}

@media (min-width: 768px) {
    .sbs-home-board__grid--cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sbs-home-board__grid--cols-3 .sbs-home-board__cell:nth-child(2n) {
        border-right: 1px solid #dee2e6;
    }

    .sbs-home-board__grid--cols-3 .sbs-home-board__cell:nth-child(3n) {
        border-right: 0;
    }

    .sbs-home-board__grid--cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sbs-home-board--leaf.leaf-fieldset {
    border: 3px solid #2ecc71 !important;
    border-radius: 8px;
    padding: 28px 16px 16px;
    position: relative;
    box-sizing: border-box;
    overflow: visible;
    max-width: 100%;
}

.sbs-home-board--leaf .leaf-legend {
    position: static !important;
    display: inline-block;
    max-width: 100%;
    margin: 0 0 10px;
    background: #2ecc71 !important;
    border-radius: 4px;
    color: #fff !important;
    font-size: clamp(14px, 2.4vw, 18px);
    line-height: 1.35;
    padding: 6px 10px;
    white-space: normal;
    word-break: break-word;
}

.sbs-home-board--leaf .sbs-home-board__grid {
    margin-top: 8px;
}

.sbs-home-board--quantum {
    border-left: 0;
}

/* ----- SBS All-In-One Text Studio ----- */
.sbs-allinone {
    margin: 0;
    content-visibility: auto;
    contain-intrinsic-size: 1px 640px;
}

.sbs-allinone__card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 0.5rem;
    padding: 14px;
}

.sbs-allinone__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.sbs-allinone__tab {
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #333;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.sbs-allinone__tab:hover {
    border-color: #c4b5fd;
    color: #6d28d9;
}

.sbs-allinone__tab.is-active {
    background: #8B00FF;
    border-color: #8B00FF;
    color: #fff;
}

.sbs-allinone__panel[hidden] {
    display: none !important;
}

.sbs-allinone__h3 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: inherit;
    text-align: left;
    margin-bottom: 0px;
}

.sbs-allinone__desc {
    margin: 0 0 12px;
    color: inherit;
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
}

.sbs-allinone__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.sbs-allinone__item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 6px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #222;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    word-break: break-all;
}

.sbs-allinone__item:hover {
    background: #ebe4ff;
}

.sbs-allinone__item.is-copied {
    background: #8B00FF;
    color: #fff;
}

@media (min-width: 576px) {
    .sbs-allinone__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .sbs-allinone__card {
        padding: 16px;
    }

    .sbs-allinone__grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 10px;
    }
}



/* =========================================================
   SBS Studio — 3 trang chuyên biệt (Game / Bio / Font)
   ========================================================= */
.sbs-studio {
    --studio-accent: #6d28d9;
    --studio-accent-soft: #f4efff;
    --studio-ink: #14121c;
    --studio-muted: #667085;
    --studio-line: #ece8f3;
    --studio-bg: #f6f4fa;
    text-align: left;
    padding: 8px 0 64px;
    color: var(--studio-ink);
    background: var(--studio-bg);
}

.sbs-studio--game,
.sbs-studio-overlay--game {
    --studio-accent: #0e7490;
    --studio-accent-soft: #eef8fb;
    --studio-bg: #f3f6f8;
    --studio-line: #e2eaef;
}

.sbs-studio--bio,
.sbs-studio-overlay--bio {
    --studio-accent: #be185d;
    --studio-accent-soft: #fdf2f8;
    --studio-bg: #fbf7f8;
    --studio-line: #f1e4ea;
}

.sbs-studio--font,
.sbs-studio-overlay--font {
    --studio-accent: #1f2937;
    --studio-accent-soft: #f3f4f6;
    --studio-bg: #f5f5f4;
    --studio-line: #e7e5e4;
}

.sbs-studio,
.sbs-studio-overlay,
.sbs-studio button,
.sbs-studio input,
.sbs-studio-overlay button,
.sbs-studio-overlay input {
    font-family: var(--sbs-font);
}

.sbs-studio button.sbs-collection__item,
.sbs-studio button.sbs-collection__tab,
.sbs-studio button.sbs-sym-chip,
.sbs-studio button.sbs-studio-vault__item,
.sbs-studio .sbs-fontx__value,
.sbs-studio .sbs-alpha__item,
.sbs-collection__item,
.sbs-collection__tab,
.sbs-sym-chip,
.sbs-studio-vault__item,
.sbs-studio__nameplate-text,
.sbs-studio input,
.sbs-studio-overlay input,
.sbs-symbol-item,
.sbs-symbol-item__text,
.sbs-home-board__glyph {
    font-family: var(--sbs-font);
}

.sbs-studio__body {
    padding-top: 20px;
}

.sbs-studio__input-desc {
    margin: 0;
    color: var(--studio-muted);
    font-size: 0.94rem;
    line-height: 1.65;
}

.sbs-studio__slot-field {
    display: flex;
    align-items: stretch;
    position: relative;
    border: 1px solid var(--studio-line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.sbs-studio__slot-field::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #9aa0a6;
    border-bottom: 2px solid #9aa0a6;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.sbs-studio__slot.is-filled .sbs-studio__slot-field {
    border-color: var(--studio-accent);
    background: var(--studio-accent-soft);
}

.sbs-studio__slot.is-filled .sbs-studio__slot-field::after {
    display: none;
}

.sbs-studio__slot .form-control {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    background: transparent !important;
    font-weight: 700;
    min-height: 48px;
    min-width: 0;
    padding-left: 40px;
    padding-right: 40px;
    text-align: center;
    pointer-events: none;
}

.sbs-studio-clear {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sbs-studio__slot.is-filled .sbs-studio-clear:not([hidden]) {
    display: inline-flex;
}

.sbs-studio-clear:hover {
    color: #dc2626;
    background: #fef2f2;
}

.sbs-studio__crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    font-size: 0.84rem;
    color: var(--studio-muted);
    background: none;
    border: 0;
    padding: 0;
}

.sbs-studio__crumb a {
    color: var(--studio-accent);
    font-weight: 600;
    text-decoration: none !important;
}

.sbs-studio__crumb a:hover { text-decoration: underline !important; }
.sbs-studio__crumb-sep { color: #c9c5d1; }
.sbs-studio__crumb-current { color: var(--studio-ink); font-weight: 700; }

.sbs-studio__input-card,
.sbs-studio__preview-card {
    background: #fff;
    border: 1px solid var(--studio-line);
    border-radius: 18px;
    padding: 22px 22px 20px;
    margin-bottom: 16px;
    box-shadow: 0 10px 30px rgba(20, 18, 28, 0.05);
}

.sbs-studio__kicker {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--studio-accent);
}

.sbs-studio__input-head {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--studio-line);
}

.sbs-studio__input-title {
    margin: 0 0 8px;
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.sbs-studio__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--studio-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sbs-studio__name-input {
    border: 1px solid var(--studio-line) !important;
    border-radius: 12px !important;
    margin-bottom: 18px;
    font-weight: 600;
    min-height: 52px;
    padding: 12px 16px;
    background: #fbfbfe !important;
}

.sbs-studio__name-input:focus {
    border-color: var(--studio-accent) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px var(--studio-accent-soft) !important;
}

.sbs-studio__slots {
    display: grid;
    gap: 12px;
}

.sbs-studio__slot {
    min-width: 0;
}

.sbs-studio__slot-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--studio-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sbs-studio__preview-card { text-align: center; }

.sbs-studio__preview-tag {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--studio-accent-soft);
    color: var(--studio-accent);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sbs-studio__nameplate-frame {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 18px;
    border: 1px solid var(--studio-line);
    border-radius: 16px;
    background: var(--studio-accent-soft);
}

.sbs-studio__nameplate-text {
    font-size: clamp(1.25rem, 3.2vw, 1.75rem);
    font-weight: 800;
    word-break: break-word;
    line-height: 1.4;
}

.sbs-studio__copy {
    margin-top: 14px;
    border: 0;
    border-radius: 12px;
    background: var(--studio-accent);
    color: #fff;
    font-weight: 700;
    padding: 11px 22px;
    cursor: pointer;
    min-width: 180px;
}
.sbs-studio__copy:hover { filter: brightness(1.06); }
.sbs-studio__copy.is-copied,
.sbs-studio__copy.is-created { background: #059669; }
.sbs-studio__copy:disabled { opacity: 0.7; cursor: wait; }

.sbs-studio--game .sbs-studio__nameplate-frame {
    border-color: #155e75;
    background: linear-gradient(180deg, #0f172a, #111827);
}
.sbs-studio--game .sbs-studio__nameplate-text {
    color: #e2e8f0;
}
.sbs-studio--game .sbs-studio__preview-tag { background: #0f172a; color: #67e8f9; }

.sbs-studio--bio .sbs-studio__nameplate-frame {
    border-color: #f9a8d4;
    background: linear-gradient(135deg, #fff7fb, #fdf2f8);
}
.sbs-studio--bio .sbs-studio__nameplate-text {
    color: #9d174d;
}
.sbs-studio--bio .sbs-studio__preview-tag { background: #fce7f3; color: #be185d; }

.sbs-studio--font .sbs-studio__nameplate-frame {
    border-color: #111827;
    background: #111827;
}
.sbs-studio--font .sbs-studio__nameplate-text {
    color: #fbbf24;
}
.sbs-studio--font .sbs-studio__preview-tag { background: #111827; color: #fbbf24; }

.sbs-studio-overlay .sbs-studio-vault__head {
    display: none;
}

.sbs-studio-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(15, 18, 24, 0.55);
}

.sbs-studio-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.sbs-studio-overlay.is-open { display: flex !important; }
.sbs-studio-overlay[hidden] { display: none !important; }

body.sbs-studio-lock { overflow: hidden; }

.sbs-studio-overlay__panel {
    width: 80%;
    max-width: 80%;
    height: min(88vh, 920px);
    margin: 0;
    background: #fff;
    border: 1px solid var(--studio-line, #ece8f3);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(15, 18, 24, 0.22);
    overflow: hidden;
}

.sbs-studio-overlay__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #eeeaf3;
    background: #fcfbfd;
}

.sbs-studio-overlay__title {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sbs-studio-modal__close {
    border: 0;
    background: #f3f4f6;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.sbs-studio-modal__close:hover { background: #e5e7eb; }

.sbs-studio-overlay__body {
    padding: 16px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

.sbs-studio-vault { border: 0; background: transparent; padding: 0; }

.sbs-studio-vault__sources {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.sbs-studio-vault__source {
    border: 1px solid #e8e4ef;
    background: #fff;
    border-radius: 14px;
    padding: 13px 14px;
    text-align: left;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
    color: #14121c;
    line-height: 1.35;
}

.sbs-studio-vault__topic-desc {
    margin: 0 0 12px;
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.45;
}

.sbs-studio-vault__source small {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
}

.sbs-studio-vault__source.is-active {
    border-color: var(--studio-accent, #6d28d9);
    background: var(--studio-accent-soft, #f4efff);
    color: var(--studio-accent, #6d28d9);
    box-shadow: inset 0 0 0 1px var(--studio-accent, #6d28d9);
}

.sbs-studio-vault__tabs-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sbs-studio-vault__tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    padding: 2px 0;
}

.sbs-studio-vault__tabs::-webkit-scrollbar { display: none; }

.sbs-studio-vault__tab {
    flex: 0 0 auto;
    border: 1px solid #ebe7f1;
    background: #fff;
    color: #14121c;
    padding: 7px 14px;
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 999px;
}

.sbs-studio-vault__tab.is-active {
    background: var(--studio-accent, #6d28d9);
    border-color: var(--studio-accent, #6d28d9);
    color: #fff;
}

.sbs-studio-vault__nav {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid #e8e4ef;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
}

.sbs-studio-vault__search { margin-bottom: 14px; }
.sbs-studio-vault__search-input {
    border-radius: 12px !important;
    min-height: 44px;
    border-color: #e8e4ef !important;
}

.sbs-studio-vault__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    justify-items: stretch;
    align-items: stretch;
}

.sbs-studio-vault__grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sbs-studio-overlay .sbs-studio-vault__item,
.sbs-studio-overlay .sbs-sym-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    border-radius: 12px;
    min-height: 52px;
    padding: 8px 6px;
    background: #faf8fd;
    border: 1px solid #eee8f5;
    line-height: 1.1;
    box-sizing: border-box;
}

.sbs-studio-overlay .sbs-studio-vault__item > *,
.sbs-studio-overlay .sbs-sym-chip > * {
    max-width: 100%;
    text-align: center;
}

.sbs-studio-overlay .sbs-studio-vault__item:hover {
    border-color: var(--studio-accent, #6d28d9);
    background: var(--studio-accent-soft, #f4efff);
}

.sbs-studio-overlay .sbs-studio-vault__item.is-current,
.sbs-studio-overlay .sbs-sym-chip.is-current {
    background: var(--studio-accent, #6d28d9);
    color: #fff;
    border-color: var(--studio-accent, #6d28d9);
}

.sbs-studio-overlay .sbs-sym-chip.is-copied,
.sbs-studio-overlay .sbs-studio-vault__item:active {
    background: var(--studio-accent, #6d28d9);
    color: #fff;
    border-color: var(--studio-accent, #6d28d9);
}

.sbs-studio-vault__meta {
    display: block;
    width: 100%;
    margin-top: 2px;
    font-size: 0.68rem;
    color: #888;
    font-weight: 600;
    text-align: center;
}

.sbs-studio-overlay .sbs-studio-vault__item.is-current .sbs-studio-vault__meta {
    color: rgba(255, 255, 255, 0.8);
}

.sbs-studio-vault__empty,
.sbs-studio-vault__empty-static {
    margin: 18px 0 6px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 575.98px) {
    .sbs-studio-vault__sources { grid-template-columns: 1fr; }
}

@media (min-width: 576px) {
    .sbs-studio-vault__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .sbs-studio-vault__grid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .sbs-studio__slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sbs-studio-vault__grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .sbs-studio-vault__grid--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .sbs-studio-vault__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .sbs-studio-vault__grid--wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Bộ sưu tập kiểu kituhay.io/ff */
.sbs-collection {
    margin: 8px 0 12px;
}

.sbs-collection__intro {
    background: #fff;
    border: 1px solid var(--studio-line, #ece8f3);
    border-radius: 18px;
    padding: 20px 22px 16px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(20, 18, 28, 0.05);
}

.sbs-collection__title {
    margin: 8px 0 8px;
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sbs-collection__lead {
    margin: 0 0 8px;
    color: var(--studio-muted, #667085);
    font-size: 0.94rem;
    line-height: 1.65;
}

.sbs-collection__hint {
    margin: 0;
    color: #888;
    font-size: 0.82rem;
}

.sbs-collection__card {
    background: #fff;
    border: 1px solid var(--studio-line, #ece8f3);
    border-radius: 18px;
    padding: 16px 18px 18px;
    box-shadow: 0 10px 30px rgba(20, 18, 28, 0.05);
}

.sbs-collection__tabs-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.sbs-collection__tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    padding: 2px 0;
}

.sbs-collection__tabs::-webkit-scrollbar { display: none; }

.sbs-collection__tab {
    flex: 0 0 auto;
    border: 1px solid #ebe7f1;
    background: #fff;
    color: #14121c;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 999px;
}

.sbs-collection__tab.is-active {
    background: var(--studio-accent, #6d28d9);
    border-color: var(--studio-accent, #6d28d9);
    color: #fff;
}

.sbs-collection__nav {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid #e8e4ef;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
}

.sbs-collection__panel[hidden] { display: none !important; }

.sbs-collection--home .sbs-collection__panel {
    margin-bottom: 12px;
}

.sbs-collection__desc {
    margin: 0 0 12px;
    color: var(--studio-muted, #667085);
    font-size: 0.9rem;
    line-height: 1.65;
}

.sbs-collection__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    justify-items: stretch;
    align-items: stretch;
}

.sbs-collection__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 8px 6px;
    border: 1px solid #eee8f5;
    border-radius: 12px;
    background: #faf8fd;
    color: #14121c;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: center;
    box-sizing: border-box;
}

.sbs-collection__item:hover {
    border-color: var(--studio-accent, #6d28d9);
    background: var(--studio-accent-soft, #f4efff);
}

.sbs-collection__item.is-copied {
    background: var(--studio-accent, #6d28d9);
    border-color: var(--studio-accent, #6d28d9);
    color: #fff;
}

@media (min-width: 576px) {
    .sbs-collection__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .sbs-collection__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .sbs-collection__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

.sbs-studio--bio .sbs-collection__item {
    min-height: 52px;
    font-size: 15px;
    padding: 8px 6px;
}

.sbs-studio--font .sbs-collection__item {
    min-height: 64px;
    font-size: 17px;
    padding: 10px 8px;
}

@media (min-width: 768px) {
    .sbs-studio--font .sbs-collection__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .sbs-studio--font .sbs-collection__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.sbs-collection--home {
    margin: 18px 0 8px;
    text-align: left;
}

.sbs-collection--home .sbs-collection__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 12px;
    align-items: stretch;
}

.sbs-collection--home .sbs-collection__item {
    min-height: 58px;
    padding: 11px 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #111;
    background: #fff;
}

@media (min-width: 576px) {
    .sbs-collection--home .sbs-collection__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .sbs-collection--home .sbs-collection__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .sbs-studio-overlay {
        align-items: stretch;
        padding: 0;
    }

    .sbs-studio-overlay__panel {
        width: 100%;
        max-width: 100%;
        height: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .sbs-studio-overlay__head {
        padding: 12px;
    }

    .sbs-studio-overlay__body { padding: 12px; }
}

/* flat home: no elevation shadows */
.home-page,
.home-page * {
    box-shadow: none !important;
}

/* --- Font converter (P0) --- */
.sbs-fontx { margin: 0 0 18px; text-align: left; }
.sbs-fontx__card {
    background: #fff;
    border: 1px solid #efeaf6;
    border-radius: 20px;
    padding: 20px;
}
.sbs-fontx__tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 12px;
    padding-bottom: 2px;
}
.sbs-fontx__tabs::-webkit-scrollbar { display: none; }
.sbs-fontx__tab {
    flex: 0 0 auto;
    border: 1px solid #ebe7f1;
    background: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}
.sbs-fontx__tab.is-active {
    background: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
}
.sbs-fontx__label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}
.sbs-fontx__input {
    min-height: 72px;
    border-radius: 12px !important;
    font-size: 1.05rem;
}
.sbs-fontx__spaces { margin-top: 14px; }
.sbs-fontx__spaces-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 8px;
}
.sbs-space-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sbs-space-chip {
    border: 1px solid #e8e4ef;
    background: #faf8fd;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.sbs-space-chip:hover,
.sbs-space-chip.is-copied {
    border-color: #6d28d9;
    background: #f4efff;
    color: #6d28d9;
}
.sbs-fontx__list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sbs-fontx__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    background: #fff;
    border: 1px solid #efeaf6;
    border-radius: 14px;
    padding: 12px 14px;
    text-align: left;
}
.sbs-fontx__name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.sbs-fontx__value {
    font-family: var(--sbs-font);
    font-size: 1.15rem;
    word-break: break-word;
    line-height: 1.45;
}
.sbs-fontx__copy {
    justify-self: start;
    border: 0;
    background: #6d28d9;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
}
.sbs-fontx__copy.is-copied { background: #16a34a; }
.sbs-fontx__hint { color: #888; font-size: 0.9rem; margin: 12px 0 0; }
.sbs-fontx.is-spaces .sbs-fontx__hint { display: none; }
.sbs-fontx__h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 800;
}
.sbs-fontx__intro { margin-bottom: 14px; }
.sbs-fontx__intro-lead {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}
.sbs-fontx__actions {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 0;
}
.sbs-fontx__clear {
    border: 1px solid #ebe7f1;
    background: #fff;
    color: #555;
    border-radius: 10px;
    padding: 6px 14px;
    font-weight: 700;
    cursor: pointer;
}
.sbs-fontx__clear:hover { border-color: #6d28d9; color: #6d28d9; }
.sbs-fontx__size {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0 4px;
    color: #444;
    font-size: 0.9rem;
    font-weight: 600;
}
.sbs-fontx__size input[type="range"] {
    width: 100%;
    max-width: 420px;
    accent-color: #6d28d9;
}
.sbs-fontx__preview-head {
    margin: 22px 0 10px;
}
.sbs-fontx--compact .sbs-fontx__size,
.sbs-fontx--compact .sbs-fontx__preview-head,
.sbs-fontx--compact .sbs-fontx__intro {
    display: none;
}
.sbs-fontx__row { cursor: pointer; }
.sbs-fontx__row:hover { border-color: #d8c8f0; background: #fcfaff; }
.sbs-fontx__iam {
    margin-top: 16px;
    padding: 14px;
    border: 2px dashed #d8c8f0;
    border-radius: 14px;
    background: #faf7ff;
}
.sbs-fontx__iam-title {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 800;
}
.sbs-fontx__iam-lead {
    margin: 0 0 10px;
    color: #555;
    font-size: 0.88rem;
    line-height: 1.5;
}
.sbs-fontx__iam-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 12px;
}
.sbs-fontx__iam-key {
    min-width: 40px;
    height: 36px;
    border: 1px solid #d8c8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
}
.sbs-fontx__iam-key:hover { border-color: #6d28d9; }

.sbs-font-hub .sbs-studio__body { max-width: 960px; }
.sbs-font-hub__hero { text-align: left; margin: 4px 0 14px; }
.sbs-font-hub__h1 { margin: 12px 0 8px; font-size: clamp(1.7rem, 4vw, 2.35rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.sbs-font-hub__lead { color: #444; margin-bottom: 8px; font-size: 1.05rem; line-height: 1.65; max-width: 46rem; }
.sbs-font-hub__h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 12px; }
.sbs-font-hub__features { margin: 40px 0 12px; }
.sbs-font-hub__feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.sbs-font-hub__feature {
    background: #fff;
    border: 1px solid #efeaf6;
    border-radius: 18px;
    padding: 22px 18px;
    text-align: center;
}
.sbs-font-hub__feature-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.sbs-font-hub__feature h3 { font-size: 1.08rem; font-weight: 800; margin: 0 0 6px; }
.sbs-font-hub__feature p { margin: 0; color: #555; font-size: 0.92rem; line-height: 1.55; }
.sbs-font-hub__tools { margin: 36px 0 8px; }
.sbs-font-hub__tools-lead { color: #666; margin: -4px 0 14px; }
.sbs-font-hub__tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.sbs-font-hub__tool {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    background: #fff;
    border: 1px solid #efeaf6;
    border-radius: 16px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
}
.sbs-font-hub__tool:hover { border-color: #6d28d9; background: #faf7ff; }
.sbs-font-hub__tool-tag {
    display: inline-flex;
    align-self: flex-start;
    background: #f4efff;
    color: #6d28d9;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 8px;
    margin-bottom: 4px;
}
.sbs-font-hub__tool-tag--hot {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff1f2;
    color: #e11d48;
}
.sbs-font-hub__tool strong { font-size: 1rem; padding-right: 48px; }
.sbs-font-hub__tool span:last-child { color: #666; font-size: 0.88rem; line-height: 1.5; }
.sbs-font-hub__seo { text-align: left; margin: 32px 0 48px; }
.sbs-font-hub__seo h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.sbs-font-hub__seo p { color: #444; line-height: 1.7; }

@media (min-width: 768px) {
    .sbs-font-hub__feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sbs-font-hub__tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sbs-fontx__card { padding: 24px; }
}

@media (min-width: 768px) {
    .sbs-fontx__row {
        grid-template-columns: 140px 1fr auto;
        align-items: center;
    }
}

/* --- Inline vault (P1) --- */
.sbs-studio-vault--inline {
    background: #fff;
    border: 1px solid #efeaf6;
    border-radius: 18px;
    padding: 16px;
    margin: 16px 0 8px;
}
.sbs-studio-vault__head { margin-bottom: 12px; }
.sbs-studio-vault__title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 4px;
}
.sbs-studio-vault__lead {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}
.sbs-studio__slot.is-active .sbs-studio__slot-field {
    outline: 2px solid var(--studio-accent, #6d28d9);
    outline-offset: 1px;
}
.sbs-studio-vault--inline .sbs-studio-vault__item {
    border-radius: 10px;
    min-height: 40px;
    font-size: 0.92rem;
    background: #faf8fd;
    border: 1px solid #eee8f5;
    padding: 4px 6px;
}
.sbs-studio-vault--inline .sbs-studio-vault__item:hover,
.sbs-studio-vault--inline .sbs-studio-vault__item.is-current {
    border-color: var(--studio-accent, #6d28d9);
    background: var(--studio-accent-soft, #f4efff);
}
@media (min-width: 768px) {
    .sbs-studio-vault--inline .sbs-studio-vault__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
    .sbs-studio-vault--inline .sbs-studio-vault__grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}

/* --- All-In-One AlphaTech / DigiCode (P2) --- */
.sbs-allinone__insert {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 12px;
}
.sbs-allinone__insert-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #666;
    margin-right: 4px;
}
.sbs-allinone__insert-btn {
    border: 1px solid #e8e4ef;
    background: #fff;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}
.sbs-allinone__insert-btn.is-active {
    background: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
}
.sbs-allinone__caption {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 12px;
}
.sbs-alpha { display: flex; flex-direction: column; gap: 8px; }
.sbs-alpha__row {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 8px;
    align-items: start;
}
.sbs-alpha__key {
    font-weight: 800;
    font-size: 1rem;
    line-height: 36px;
    color: #6d28d9;
}
.sbs-alpha__cells {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sbs-alpha__item {
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 4px 8px !important;
}
.sbs-digi__group { margin-bottom: 16px; }
.sbs-digi__label {
    font-size: 0.92rem;
    font-weight: 800;
    margin: 0 0 8px;
}

.sbs-generator__spaces { margin-top: 8px; }

/* ===== SBS PRO TOOLS (SYNAPSE + PREVIEW MATRIX) ===== */
.sbs-pro-launchers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 1.25rem 15px 0;
    padding-bottom: 0.5rem;
}

.sbs-pro-launcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 78px;
    padding: 14px 16px;
    border: 1px solid rgba(139, 0, 255, 0.14);
    border-radius: 16px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 8px 24px rgba(109, 40, 217, 0.08);
}

.sbs-pro-launcher__glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.sbs-pro-launcher--synapse .sbs-pro-launcher__glow {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(139, 0, 255, 0.08));
}

.sbs-pro-launcher--matrix .sbs-pro-launcher__glow {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(233, 30, 99, 0.08));
}

.sbs-pro-launcher:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(109, 40, 217, 0.14);
    border-color: rgba(139, 0, 255, 0.28);
}

.sbs-pro-launcher:hover .sbs-pro-launcher__glow,
.sbs-pro-launcher.is-open .sbs-pro-launcher__glow {
    opacity: 1;
}

.sbs-pro-launcher.is-open {
    border-color: #8B00FF;
    box-shadow: inset 0 0 0 1.5px rgba(139, 0, 255, 0.35);
}

.sbs-pro-launcher.is-loading {
    cursor: wait;
}

.sbs-pro-launcher__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.35rem;
    background: #f6f3fb;
}

.sbs-pro-launcher--synapse .sbs-pro-launcher__icon { background: #ecfdf5; }
.sbs-pro-launcher--matrix .sbs-pro-launcher__icon { background: #f3e8ff; }

.sbs-pro-launcher__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sbs-pro-launcher__body strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1a1228;
    line-height: 1.25;
}

.sbs-pro-launcher__body small {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.35;
}

.sbs-pro-launcher__arrow {
    flex-shrink: 0;
    font-size: 1.4rem;
    line-height: 1;
    color: #8B00FF;
    opacity: 0.75;
}

/* Modal overlay */
.sbs-pro-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sbs-pro-overlay[hidden] { display: none !important; }

body.sbs-pro-lock { overflow: hidden; }

.sbs-pro-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 24, 0.58);
    backdrop-filter: blur(2px);
}

.sbs-pro-overlay__panel {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(92vh, 920px);
    background: #fff;
    border-radius: 20px;
    border: 1px solid #ece8f3;
    box-shadow: 0 24px 64px rgba(15, 18, 24, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: sbsProPanelIn 0.28s ease;
}

.sbs-pro-overlay__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #eeeaf3;
    background: linear-gradient(180deg, #fcfbfd 0%, #fff 100%);
}

.sbs-pro-overlay__kicker {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8B00FF;
}

.sbs-pro-overlay__title {
    margin: 0;
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    font-weight: 800;
    line-height: 1.35;
    color: #1a1228;
}

.sbs-pro-overlay__close {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #f6f3fb;
    color: #6d28d9;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.sbs-pro-overlay__close:hover {
    background: #ede9fe;
}

.sbs-pro-overlay__boot,
.sbs-pro-overlay__body {
    padding: 18px;
    overflow: auto;
}

.sbs-pro-overlay__boot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    text-align: center;
}

.sbs-pro-overlay__boot[hidden],
.sbs-pro-overlay__body[hidden] { display: none !important; }

.sbs-pro-overlay__boot strong {
    font-size: 0.95rem;
    color: #1a1228;
}

.sbs-pro-overlay__boot span {
    font-size: 0.82rem;
    color: #6b7280;
}

.sbs-pro-overlay__boot-spinner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid #ede9fe;
    border-top-color: #8B00FF;
    animation: sbsProSpin 0.8s linear infinite;
}

.sbs-pro-overlay__boot-progress {
    width: min(280px, 100%);
    margin-top: 4px;
}

.sbs-pro-panel { animation: sbsProPanelIn 0.25s ease; }
.sbs-pro-panel[hidden] { display: none !important; }

.sbs-pro-sub-desc {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #5c5368;
}
.sbs-pro-sub-desc p { margin: 0; }
.sbs-pro-sub-desc p + p { margin-top: 0.65em; }

.sbs-pro-tool {
    background: #fff;
    border: 1px solid #ece8f3;
    border-radius: 16px;
    padding: 1.1rem 1.15rem 1.25rem;
    box-shadow: 0 10px 30px rgba(20, 18, 28, 0.05);
}

.sbs-pro-tool-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sbs-pro-tool-head h3 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1228;
}

.sbs-pro-tool-head p {
    margin: 0;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.5;
}

.sbs-pro-tool-badge {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #be185d;
    background: #fdf2f8;
    border: 1px solid #f9a8d4;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
}

.sbs-pro-tool-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a1228;
    margin-bottom: 0.4rem;
}

.sbs-pro-tool-input {
    width: 100%;
    border: 1px solid #ece8f3;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1a1228;
    background: #fff;
    resize: vertical;
    min-height: 88px;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.sbs-pro-tool-input:focus {
    outline: none;
    border-color: #8B00FF;
    box-shadow: 0 0 0 3px rgba(139, 0, 255, 0.12);
}

.sbs-pro-tool-input.is-invalid {
    border-color: #ef4444;
    animation: sbsProShake 0.35s ease;
}

.sbs-pro-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.sbs-pro-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.55rem 1.05rem;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.sbs-pro-tool-btn:disabled { opacity: 0.65; cursor: wait; }

.sbs-pro-tool-btn--primary {
    background: linear-gradient(135deg, #E91E63, #8B00FF);
    color: #fff;
    box-shadow: 0 6px 16px rgba(139, 0, 255, 0.25);
}

.sbs-pro-tool-btn--primary:hover:not(:disabled) { transform: translateY(-1px); }

.sbs-pro-tool-btn--ghost {
    background: #fff;
    border-color: #ece8f3;
    color: #6b7280;
}

.sbs-pro-tool-btn--ghost:hover {
    border-color: #8B00FF;
    color: #8B00FF;
}

.sbs-pro-tool-btn--sm {
    margin-top: 0.75rem;
    background: #059669;
    color: #fff;
    font-size: 0.78rem;
    padding: 0.4rem 0.85rem;
}

.sbs-pro-tool-loading {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px dashed #f9a8d4;
    background: linear-gradient(180deg, #fdf2f8 0%, #fff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-align: center;
}

.sbs-pro-tool-loading[hidden] { display: none !important; }

.sbs-pro-tool-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid #ede9fe;
    border-top-color: #8B00FF;
    animation: sbsProSpin 0.8s linear infinite;
}

.sbs-pro-tool-spinner--synapse {
    border-top-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.sbs-pro-tool-spinner--matrix {
    border-top-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.sbs-pro-tool-loading-text strong {
    display: block;
    font-size: 0.9rem;
    color: #1a1228;
}

.sbs-pro-tool-loading-text span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: #6b7280;
}

.sbs-pro-tool-progress {
    width: min(320px, 100%);
    height: 6px;
    border-radius: 999px;
    background: #f3f4f6;
    overflow: hidden;
}

.sbs-pro-tool-progress i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #E91E63, #8B00FF);
    transition: width 0.08s linear;
}

.sbs-pro-tool-result {
    margin-top: 1rem;
    animation: sbsProPanelIn 0.3s ease;
}

.sbs-pro-tool-result[hidden] { display: none !important; }

.sbs-pro-synapse-score-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.sbs-pro-synapse-score {
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    border: 1px solid #ece8f3;
    background: #f9fafb;
}

.sbs-pro-synapse-score.is-good { background: #ecfdf5; border-color: #a7f3d0; }
.sbs-pro-synapse-score.is-warn { background: #fffbeb; border-color: #fde68a; }
.sbs-pro-synapse-score.is-bad { background: #fef2f2; border-color: #fecaca; }

.sbs-pro-synapse-score-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #1a1228;
}

.sbs-pro-synapse-score.is-good .sbs-pro-synapse-score-num { color: #047857; }
.sbs-pro-synapse-score.is-warn .sbs-pro-synapse-score-num { color: #b45309; }
.sbs-pro-synapse-score.is-bad .sbs-pro-synapse-score-num { color: #b91c1c; }

.sbs-pro-synapse-score-label {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
}

.sbs-pro-synapse-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.5rem;
}

.sbs-pro-synapse-stats > div {
    background: #fff;
    border: 1px solid #ece8f3;
    border-radius: 12px;
    padding: 0.65rem 0.55rem;
    text-align: center;
}

.sbs-pro-synapse-stats b {
    display: block;
    font-size: 1.1rem;
    color: #1a1228;
}

.sbs-pro-synapse-stats span {
    font-size: 0.68rem;
    color: #6b7280;
}

.sbs-pro-synapse-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.sbs-pro-synapse-plat {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #ece8f3;
    background: #fff;
    color: #6b7280;
}

.sbs-pro-synapse-plat.is-on {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.sbs-pro-synapse-plat.is-off {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.sbs-pro-synapse-preview-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.sbs-pro-synapse-card {
    background: #fff;
    border: 1px solid #ece8f3;
    border-radius: 12px;
    padding: 0.9rem;
}

.sbs-pro-synapse-card header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.sbs-pro-synapse-badge {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.sbs-pro-synapse-badge--bad { background: #fee2e2; color: #b91c1c; }
.sbs-pro-synapse-badge--good { background: #d1fae5; color: #047857; }

.sbs-pro-synapse-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
}

.sbs-pro-synapse-card--bad {
    border-top: 3px solid #ef4444;
    background: linear-gradient(180deg, #fef2f2 0%, #fff 48px);
}

.sbs-pro-synapse-card--good {
    border-top: 3px solid #10b981;
    background: linear-gradient(180deg, #ecfdf5 0%, #fff 48px);
}

.sbs-pro-synapse-risk,
.sbs-pro-synapse-ok-text {
    min-height: 48px;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-all;
    line-height: 1.45;
    color: #1a1228;
}

.sbs-pro-risk-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    padding: 0.15rem 0.35rem;
    margin: 0.15rem;
    border-radius: 6px;
    border: 1px solid #fecaca;
    background: #fff;
    font-size: 1rem;
}

.sbs-pro-risk-chip--high { border-color: #ef4444; background: #fee2e2; }
.sbs-pro-risk-chip--med { border-color: #f59e0b; background: #fffbeb; }
.sbs-pro-risk-chip--low { border-color: #93c5fd; background: #eff6ff; }

.sbs-pro-synapse-chars {
    border: 1px solid #ece8f3;
    border-radius: 12px;
    padding: 0.85rem;
    background: #fafafa;
}

.sbs-pro-synapse-chars-head {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
    color: #1a1228;
}

.sbs-pro-synapse-chars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.4rem;
}

.sbs-pro-char-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.45rem 0.25rem;
    border-radius: 8px;
    border: 1px solid #ece8f3;
    background: #fff;
}

.sbs-pro-char-cell.is-risk {
    border-color: #fca5a5;
    background: #fef2f2;
}

.sbs-pro-char-cell b {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.sbs-pro-char-cell small {
    font-size: 0.58rem;
    color: #6b7280;
}

.sbs-pro-cat-tabs-wrap { margin-bottom: 0.85rem; }

.sbs-pro-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.sbs-pro-cat-tab {
    border: 1px solid #ece8f3;
    background: #fff;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.sbs-pro-cat-tab.is-active,
.sbs-pro-cat-tab:hover {
    border-color: #8B00FF;
    background: #f6f3fb;
    color: #6d28d9;
}

.sbs-pro-matrix-stage { margin: 0.85rem 0 1rem; }

.sbs-pro-matrix-pane { display: none; }
.sbs-pro-matrix-pane.is-active {
    display: block;
    animation: sbsProPanelIn 0.28s ease;
}

.sbs-pro-sim {
    max-width: 420px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    animation: sbsProFloat 3.2s ease-in-out infinite;
}

.sbs-pro-sim-game {
    background: linear-gradient(160deg, #111827 0%, #1f2937 55%, #0f172a 100%);
    border: 1px solid #374151;
    padding: 12px;
    color: #e5e7eb;
}

.sbs-pro-sim-game--pubg {
    background: linear-gradient(160deg, #0c4a6e 0%, #164e63 50%, #083344 100%);
    border-color: #0891b2;
}

.sbs-pro-sim-game-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sbs-pro-sim-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8B00FF, #E91E63);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.sbs-pro-sim-avatar--pubg {
    background: linear-gradient(135deg, #06b6d4, #0369a1);
    border-color: #67e8f9;
}

.sbs-pro-sim-avatar--mkt {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.sbs-pro-sim-avatar--social {
    background: linear-gradient(135deg, #db2777, #7c3aed);
}

.sbs-pro-sim-game-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sbs-pro-sim-level {
    font-size: 0.68rem;
    color: #9ca3af;
}

.sbs-pro-sim-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    word-break: break-all;
    line-height: 1.25;
}

.sbs-pro-sim-rank { font-size: 1rem; flex-shrink: 0; }

.sbs-pro-sim-hp {
    margin-top: 10px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.sbs-pro-sim-hp i {
    display: block;
    height: 100%;
    width: 78%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: inherit;
}

.sbs-pro-sim-mkt {
    background: #fff;
    border: 1px solid #ece8f3;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(20, 18, 28, 0.06);
}

.sbs-pro-sim-mkt-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sbs-pro-sim-mkt-head strong {
    display: block;
    font-size: 0.9rem;
    color: #1a1228;
}

.sbs-pro-sim-mkt-head small {
    display: block;
    font-size: 0.72rem;
    color: #6b7280;
}

.sbs-pro-sim-mkt-text {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1228;
    word-break: break-all;
    line-height: 1.4;
}

.sbs-pro-sim-mkt-actions {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: #6b7280;
    border-top: 1px solid #ece8f3;
    padding-top: 10px;
}

.sbs-pro-sim-social {
    background: #fff;
    border: 1px solid #ece8f3;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(20, 18, 28, 0.06);
}

.sbs-pro-sim-social-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sbs-pro-sim-social-top strong {
    display: block;
    font-size: 0.9rem;
    color: #1a1228;
}

.sbs-pro-sim-social-top small {
    display: block;
    font-size: 0.72rem;
    color: #6b7280;
}

.sbs-pro-sim-bio {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1228;
    word-break: break-all;
    line-height: 1.45;
}

.sbs-pro-sim-social-stats {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: #6b7280;
}

.sbs-pro-sim-social-stats b {
    display: block;
    font-size: 0.95rem;
    color: #1a1228;
}

.sbs-pro-matrix-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sbs-pro-matrix-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #6b7280;
}

.sbs-pro-matrix-copy {
    border: none;
    background: linear-gradient(135deg, #E91E63, #8B00FF);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 6px 16px rgba(139, 0, 255, 0.25);
}

.sbs-pro-matrix-copy.copied {
    background: #059669;
    box-shadow: none;
}

@keyframes sbsProSpin { to { transform: rotate(360deg); } }
@keyframes sbsProPanelIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
@keyframes sbsProFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes sbsProShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@media (max-width: 768px) {
    .sbs-pro-launchers { grid-template-columns: 1fr; }
    .sbs-pro-synapse-score-row,
    .sbs-pro-synapse-preview-row { grid-template-columns: 1fr; }
    .sbs-pro-tool-head { flex-direction: column; }
    .sbs-pro-matrix-tools { flex-direction: column; align-items: stretch; }
    .sbs-pro-matrix-copy,
    .sbs-pro-tool-btn--primary { width: 100%; }
}

/* Mobile: remove decorative outer frames while preserving interactive controls. */
@media (max-width: 767.98px) {
    .sbs-collection--home .sbs-collection__grid {
        column-gap: 8px;
        row-gap: 12px;
        align-items: stretch;
    }

    .sbs-collection--home .sbs-collection__item {
        min-height: 58px;
        padding: 11px 8px;
        line-height: 1.35;
    }

    .home-page .sbs-collection__intro {
        padding-right: 16px;
        padding-left: 16px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .home-page .sbs-generator__card,
    .home-page .sbs-generated,
    .home-page .sbs-collection__card,
    .home-page .sbs-home-board,
    .home-page .sbs-allinone > .alert,
    .home-page .sbs-allinone__card,
    .home-page .sbs-cms-wrap,
    .home-page #sbsPageContent {
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .home-page .sbs-generator__card,
    .home-page .sbs-generated,
    .home-page .sbs-collection__card,
    .home-page .sbs-home-board,
    .home-page .sbs-allinone > .alert,
    .home-page .sbs-allinone__card,
    .home-page #sbsPageContent {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }
}
