.sbs-module-stage {
    width: 100%;
    min-height: calc(100vh - 150px);
}

.sbs-app {
    --sbs-accent: #4f46e5;
    --sbs-surface: #eef2ff;
    --sbs-text: #0f172a;
    --sbs-glow: #c7d2fe;
    --sbs-soft: rgba(255, 255, 255, 0.82);
    --sbs-border: rgba(15, 23, 42, 0.08);
    --sbs-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
    min-height: calc(100vh - 150px);
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.95), rgba(255,255,255,0) 28%),
        linear-gradient(180deg, #f6fbff 0%, #e9f0fb 48%, #dfe8f5 100%);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--sbs-shadow);
    border: 1px solid rgba(255,255,255,0.55);
    color: var(--sbs-text);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.sbs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--sbs-border);
    position: sticky;
    top: 0;
    z-index: 20;
}

.sbs-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.sbs-brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    color: #fff;
    background: linear-gradient(145deg, var(--sbs-accent), color-mix(in srgb, var(--sbs-accent) 65%, #111827 35%));
    box-shadow: 0 14px 26px color-mix(in srgb, var(--sbs-accent) 36%, transparent 64%);
}

.sbs-brand-copy {
    min-width: 0;
}

.sbs-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.sbs-subtitle {
    margin: 4px 0 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}

.sbs-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.sbs-chip,
.sbs-icon-btn,
.sbs-theme-btn,
.sbs-segment-btn,
.sbs-answer-btn,
.sbs-primary-btn,
.sbs-secondary-btn,
.sbs-ghost-btn,
.sbs-avatar-btn,
.sbs-color-btn,
.sbs-upload-label {
    border: 0;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.sbs-chip,
.sbs-icon-btn,
.sbs-ghost-btn {
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
    text-decoration: none;
}

.sbs-chip,
.sbs-ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
}

.sbs-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.sbs-chip:hover,
.sbs-icon-btn:hover,
.sbs-ghost-btn:hover,
.sbs-theme-btn:hover,
.sbs-segment-btn:hover,
.sbs-answer-btn:hover,
.sbs-primary-btn:hover,
.sbs-secondary-btn:hover,
.sbs-avatar-btn:hover,
.sbs-color-btn:hover,
.sbs-upload-label:hover {
    transform: translateY(-2px);
}

.sbs-level-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(15,23,42,0.08);
}

.sbs-level-pill strong {
    font-size: 0.85rem;
}

.sbs-progress {
    width: 92px;
    height: 10px;
    border-radius: 999px;
    background: rgba(15,23,42,0.08);
    overflow: hidden;
}

.sbs-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sbs-accent), color-mix(in srgb, var(--sbs-accent) 55%, white 45%));
}

.sbs-main {
    padding: 24px;
}

.sbs-menu-grid,
.sbs-game-grid {
    display: grid;
    gap: 16px;
}

.sbs-menu-grid {
    grid-template-columns: minmax(280px, 1.02fr) minmax(320px, 0.98fr);
}

.sbs-game-grid {
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
}

.sbs-card,
.sbs-panel,
.sbs-modal,
.sbs-history-card {
    background: var(--sbs-soft);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.56);
    box-shadow: 0 20px 44px rgba(15,23,42,0.08);
    border-radius: 26px;
}

.sbs-card,
.sbs-panel {
    padding: 22px;
}

.sbs-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.sbs-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
}

.sbs-card-note {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.85rem;
}

.sbs-field,
.sbs-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sbs-stack + .sbs-stack,
.sbs-field + .sbs-field {
    margin-top: 16px;
}

.sbs-label {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.sbs-input,
.sbs-select {
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,0.08);
    background: rgba(255,255,255,0.96);
    padding: 12px 14px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    outline: none;
}

.sbs-input:focus,
.sbs-select:focus {
    border-color: color-mix(in srgb, var(--sbs-accent) 60%, white 40%);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--sbs-accent) 18%, transparent 82%);
}

.sbs-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sbs-avatar-grid,
.sbs-color-grid,
.sbs-theme-grid,
.sbs-options-grid {
    display: grid;
    gap: 10px;
}

.sbs-avatar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sbs-color-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sbs-theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sbs-options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.sbs-avatar-btn {
    min-height: 60px;
    border-radius: 18px;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(15,23,42,0.08);
    font-size: 1.6rem;
}

.sbs-avatar-btn.is-active,
.sbs-theme-btn.is-active,
.sbs-segment-btn.is-active {
    background: linear-gradient(145deg, color-mix(in srgb, var(--sbs-accent) 18%, white 82%), rgba(255,255,255,0.98));
    border-color: color-mix(in srgb, var(--sbs-accent) 62%, white 38%);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--sbs-accent) 18%, transparent 82%);
}

.sbs-color-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: inset 0 2px 6px rgba(255,255,255,0.3), 0 8px 16px rgba(15,23,42,0.08);
}

.sbs-color-btn.is-active {
    outline: 3px solid color-mix(in srgb, var(--sbs-accent) 32%, transparent 68%);
    outline-offset: 2px;
}

.sbs-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.96);
    border: 1px dashed rgba(15,23,42,0.18);
    font-weight: 800;
}

.sbs-segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.sbs-segment-btn,
.sbs-theme-btn {
    min-height: 70px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(15,23,42,0.08);
    color: #0f172a;
    text-align: left;
}

.sbs-segment-btn strong,
.sbs-theme-btn strong {
    display: block;
    font-size: 0.95rem;
}

.sbs-segment-btn span,
.sbs-theme-btn span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.8rem;
}

.sbs-primary-btn,
.sbs-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 54px;
    padding: 14px 20px;
    border-radius: 18px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 900;
}

.sbs-primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--sbs-accent), color-mix(in srgb, var(--sbs-accent) 62%, #111827 38%));
    box-shadow: 0 18px 30px color-mix(in srgb, var(--sbs-accent) 28%, transparent 72%);
}

.sbs-secondary-btn {
    color: #0f172a;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(15,23,42,0.08);
}

.sbs-micro-note {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.55;
}

.sbs-panel-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sbs-player-card {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(15,23,42,0.08);
    box-shadow: 0 16px 28px rgba(15,23,42,0.06);
}

.sbs-player-card.is-current {
    border-color: color-mix(in srgb, var(--sbs-accent) 55%, white 45%);
    box-shadow: 0 20px 34px color-mix(in srgb, var(--sbs-accent) 18%, transparent 82%);
}

.sbs-player-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sbs-avatar-bubble {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 10px 18px rgba(15,23,42,0.12);
    overflow: hidden;
}

.sbs-avatar-bubble img,
.sbs-token img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sbs-player-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 900;
}

.sbs-player-role {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
}

.sbs-player-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(15,23,42,0.08);
}

.sbs-stat-box strong {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.08em;
}

.sbs-stat-box span {
    display: block;
    margin-top: 4px;
    font-size: 1.4rem;
    font-weight: 900;
}

.sbs-turn-card {
    padding: 18px;
    text-align: center;
}

.sbs-turn-card h3,
.sbs-turn-card p,
.sbs-history-title {
    margin: 0;
}

.sbs-turn-card h3 {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sbs-dice {
    width: 86px;
    height: 86px;
    margin: 16px auto;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(145deg, var(--sbs-accent), color-mix(in srgb, var(--sbs-accent) 64%, #0f172a 36%));
    box-shadow: 0 18px 30px color-mix(in srgb, var(--sbs-accent) 28%, transparent 72%);
}

.sbs-turn-note {
    margin-top: 12px !important;
    color: #475569;
    font-size: 0.88rem;
}

.sbs-board-shell {
    padding: 18px;
    background: rgba(255,255,255,0.88);
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.58);
    box-shadow: 0 24px 40px rgba(15,23,42,0.08);
}

.sbs-board-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sbs-board-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
}

.sbs-board-note {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.84rem;
}

.sbs-board {
    position: relative;
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    padding: 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.1),
        inset 0 0 20px rgba(255,255,255,0.5);
}

.sbs-board-grid {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 0;
}

.sbs-cell {
    position: relative;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: inset 0 0 12px rgba(255,255,255,0.2);
    overflow: hidden;
}

.sbs-cell-number {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.72rem;
    font-weight: 900;
    color: rgba(0,0,0,0.45);
    z-index: 2;
}

.sbs-cell-trap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    opacity: 0.65;
    pointer-events: none;
    z-index: 1;
    animation: sbs-trap-float 4s ease-in-out infinite;
}

@keyframes sbs-trap-float {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15) rotate(5deg); }
}

.sbs-board-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    filter: drop-shadow(0 12px 18px rgba(15,23,42,0.15));
}

.sbs-token-wrap {
    position: absolute;
    width: 8.5%;
    height: 8.5%;
    z-index: 10;
    pointer-events: none;
    transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sbs-token {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: clamp(1rem, 1.9vw, 1.45rem);
    font-weight: 900;
    border: 3px solid rgba(255,255,255,0.72);
    box-shadow: 0 10px 18px rgba(15,23,42,0.24);
    overflow: hidden;
    transform-origin: center;
}

.sbs-token.is-active {
    animation: sbs-pulse 1.15s ease-in-out infinite;
}

.sbs-token.is-rolling {
    animation: sbs-wiggle 0.32s linear infinite;
}

.sbs-modal-backdrop,
.sbs-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15,23,42,0.52);
    backdrop-filter: blur(12px);
}

.sbs-modal,
.sbs-overlay-card {
    width: min(100%, 560px);
    padding: 24px;
    position: relative;
}

.sbs-modal-title,
.sbs-overlay-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
}

.sbs-modal-copy,
.sbs-overlay-copy {
    margin: 8px 0 0;
    color: #475569;
    line-height: 1.65;
}

.sbs-rule-list,
.sbs-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.sbs-rule-card,
.sbs-history-card {
    padding: 16px;
}

.sbs-rule-card strong,
.sbs-history-card strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 900;
    color: #0f172a;
}

.sbs-rule-card span,
.sbs-history-card span {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.55;
}

.sbs-options-grid .sbs-answer-btn {
    padding: 14px;
    min-height: 60px;
    border-radius: 18px;
    text-align: left;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(15,23,42,0.08);
    font-weight: 800;
    color: #0f172a;
}

.sbs-answer-btn:hover {
    box-shadow: 0 14px 24px color-mix(in srgb, var(--sbs-accent) 18%, transparent 82%);
}

.sbs-question-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--sbs-accent) 12%, white 88%);
    color: color-mix(in srgb, var(--sbs-accent) 68%, #0f172a 32%);
    font-size: 0.78rem;
    font-weight: 900;
}

.sbs-question-title {
    margin: 18px 0 0;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.5;
}

.sbs-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.sbs-history-title {
    font-size: 1.5rem;
    font-weight: 900;
}

.sbs-history-meta {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 4px;
}

.sbs-history-scores {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.sbs-history-score {
    padding: 8px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.76rem;
    font-weight: 800;
}

.sbs-empty {
    padding: 40px 24px;
    text-align: center;
    color: #64748b;
}

.sbs-confetti {
    position: fixed;
    top: -12px;
    width: 10px;
    height: 16px;
    border-radius: 4px;
    z-index: 9999;
    opacity: 0.95;
    animation: sbs-confetti-fall 1.8s linear forwards;
}

@keyframes sbs-confetti-fall {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--sbs-x, 0px), 110vh, 0) rotate(720deg);
        opacity: 0;
    }
}

@keyframes sbs-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes sbs-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

@media (max-width: 1200px) {
    .sbs-menu-grid,
    .sbs-game-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .sbs-app {
        border-radius: 18px;
    }

    .sbs-header,
    .sbs-main {
        padding: 12px;
    }

    .sbs-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sbs-brand {
        gap: 10px;
    }

    .sbs-brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 1.25rem;
    }

    .sbs-title {
        font-size: 1.05rem;
    }

    .sbs-subtitle {
        font-size: 0.74rem;
        line-height: 1.35;
    }

    .sbs-toolbar {
        justify-content: flex-start;
        gap: 6px;
    }

    .sbs-chip {
        padding: 7px 10px;
        font-size: 0.72rem;
        gap: 5px;
    }

    .sbs-icon-btn {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 0.85rem;
    }

    .sbs-level-pill {
        padding: 7px 10px;
        gap: 7px;
        width: 100%;
    }

    .sbs-level-pill strong {
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .sbs-progress {
        width: 100%;
        min-width: 40px;
    }

    .sbs-theme-grid,
    .sbs-options-grid,
    .sbs-avatar-grid {
        grid-template-columns: 1fr;
    }

    .sbs-color-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sbs-token-wrap {
        width: 13.5%;
        height: 13.5%;
    }

    .sbs-token {
        width: 100%;
        height: 100%;
        font-size: 1.05rem;
        border-width: 2px;
    }

    /* Board first, controls below — playing the board matters more than stats on a phone */
    .sbs-game-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .sbs-board-shell {
        order: -1;
        padding: 12px;
        border-radius: 20px;
        margin-bottom: 2px;
    }

    .sbs-board-hero {
        margin-bottom: 10px;
    }

    .sbs-board-title {
        font-size: 0.9rem;
    }

    .sbs-board-note {
        font-size: 0.78rem;
    }

    .sbs-board {
        border-radius: 10px;
        padding: 5px;
    }

    .sbs-cell-number {
        font-size: 0.58rem;
        top: 2px;
        left: 3px;
    }

    /* Player cards side by side; dice/roll bar pulled to top of the stack via order */
    .sbs-panel-stack {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .sbs-turn-card {
        order: -1;
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 10px 14px;
        border-radius: 20px;
        background: linear-gradient(135deg, color-mix(in srgb, var(--sbs-accent) 14%, white 86%), rgba(255,255,255,0.97));
        border: 1px solid color-mix(in srgb, var(--sbs-accent) 22%, white 78%);
        box-shadow: 0 10px 22px color-mix(in srgb, var(--sbs-accent) 12%, transparent 88%);
    }

    .sbs-turn-card h3 {
        flex: 0 0 auto;
        writing-mode: horizontal-tb;
        font-size: 0.66rem;
        max-width: 54px;
        line-height: 1.2;
    }

    .sbs-dice {
        width: 42px;
        height: 42px;
        margin: 0;
        border-radius: 13px;
        font-size: 1.2rem;
        flex: 0 0 auto;
    }

    .sbs-turn-card .sbs-primary-btn,
    .sbs-turn-card .sbs-secondary-btn {
        flex: 1 1 auto;
        min-height: 44px;
        width: auto;
        border-radius: 14px;
        font-size: 0.88rem;
    }

    .sbs-turn-card .sbs-turn-note {
        flex-basis: 100%;
        margin-top: 2px !important;
        font-size: 0.74rem;
    }

    .sbs-primary-btn,
    .sbs-secondary-btn {
        min-height: 46px;
    }

    .sbs-player-card {
        padding: 10px;
        border-radius: 16px;
    }

    .sbs-player-top {
        gap: 8px;
        margin-bottom: 8px;
    }

    .sbs-avatar-bubble {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 0.95rem;
    }

    .sbs-player-name {
        font-size: 0.8rem;
    }

    .sbs-player-role {
        font-size: 0.62rem;
    }

    .sbs-player-stats {
        gap: 6px;
        padding-top: 8px;
    }

    .sbs-stat-box strong {
        font-size: 0.58rem;
    }

    .sbs-stat-box span {
        font-size: 0.98rem;
        margin-top: 2px;
    }

    .sbs-menu-grid {
        gap: 12px;
    }

    .sbs-card,
    .sbs-panel {
        padding: 14px;
        border-radius: 18px;
    }

    .sbs-modal,
    .sbs-overlay-card {
        padding: 18px;
        border-radius: 20px;
    }

    .sbs-modal-title,
    .sbs-overlay-title {
        font-size: 1.1rem;
    }

    .sbs-question-title {
        font-size: 0.95rem;
    }

    .sbs-options-grid .sbs-answer-btn {
        padding: 12px;
        min-height: 52px;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .sbs-title {
        font-size: 1.05rem;
    }

    .sbs-brand-mark {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .sbs-dice {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }

    .sbs-cell-number {
        display: none;
    }

    .sbs-color-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sbs-avatar-btn {
        min-height: 50px;
        font-size: 1.3rem;
    }

    .sbs-token-wrap {
        width: 15%;
        height: 15%;
    }

    .sbs-token {
        font-size: 0.95rem;
        border-width: 1.5px;
    }
}

/* AI turn blocker */
.sbs-ai-blocker-modal {
    text-align: center;
    max-width: 320px;
    padding: 32px 28px;
}

.sbs-ai-blocker-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7c3aed, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto;
    box-shadow: 0 16px 28px rgba(124,58,237,0.35);
    overflow: hidden;
    color: #fff;
}

.sbs-ai-progress {
    margin: 22px auto 0;
    width: 80%;
    height: 6px;
    border-radius: 999px;
    background: rgba(15,23,42,0.1);
    overflow: hidden;
}

.sbs-ai-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sbs-accent), color-mix(in srgb, var(--sbs-accent) 55%, white 45%));
    animation: sbs-ai-slide 1.5s ease-in-out infinite;
    width: 40%;
}

@keyframes sbs-ai-slide {
    0%   { transform: translateX(-250%); }
    100% { transform: translateX(400%); }
}