.stars-play-wrap {
    --sb-shell-grad-start: #ffffff;
    --sb-shell-grad-end: #f3f7fd;
    --sb-shell-shadow: rgba(15, 23, 42, 0.09);
    --sb-shell-border: rgba(148, 163, 184, 0.34);
    --sb-grid-bg: var(--color-bg-card, #ffffff);
    --sb-grid-inset: rgba(51, 65, 85, 0.13);
    --sb-region-fallback: #f8fafc;
    --sb-cell-text: #334155;
    --sb-focus: rgba(2, 132, 199, 0.45);
    --sb-cell-inset: rgba(71, 85, 105, 0.12);
    --sb-muted: var(--color-text-muted, #64748b);
    --sb-legend-bg: #ffffff;
    --sb-legend-border: rgba(148, 163, 184, 0.3);
    --sb-legend-text: #475569;
    --sb-chip-bg: #f8fbff;
    --sb-chip-border: rgba(100, 116, 139, 0.28);
    --sb-star-fill: #facc15;
    --sb-star-stroke: #a16207;
    --sb-blocked: rgba(71, 85, 105, 0.72);
    --sb-helper-start: #ffffff;
    --sb-helper-end: #f1f6ff;
    --sb-helper-border: rgba(148, 163, 184, 0.32);
    --sb-region-border: #334155;
}

.stars-play-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.stars-board-shell {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, var(--sb-shell-grad-start) 0%, var(--sb-shell-grad-end) 100%);
    box-shadow: 0 18px 40px var(--sb-shell-shadow);
    border: 1px solid var(--sb-shell-border);
}

.stars-board-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 9% 14%, rgba(250, 204, 21, 0.2) 0 1px, transparent 2px),
        radial-gradient(circle at 20% 78%, rgba(250, 204, 21, 0.18) 0 1px, transparent 2px),
        radial-gradient(circle at 34% 30%, rgba(148, 163, 184, 0.18) 0 1px, transparent 2px),
        radial-gradient(circle at 58% 12%, rgba(250, 204, 21, 0.16) 0 1px, transparent 2px),
        radial-gradient(circle at 72% 64%, rgba(148, 163, 184, 0.18) 0 1px, transparent 2px),
        radial-gradient(circle at 91% 24%, rgba(250, 204, 21, 0.2) 0 1px, transparent 2px),
        radial-gradient(circle at 82% 88%, rgba(148, 163, 184, 0.18) 0 1px, transparent 2px);
    opacity: 0.75;
}

.stars-board-shell > * {
    position: relative;
    z-index: 1;
}

.stars-board {
    display: grid;
    width: min(100%, 34rem);
    aspect-ratio: 1 / 1;
    border-radius: 0.1rem;
    overflow: hidden;
    background: var(--sb-grid-bg);
    box-shadow: inset 0 0 0 1px var(--sb-grid-inset);
}

.stars-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--region-color, var(--sb-region-fallback));
    color: var(--sb-cell-text);
    font-size: clamp(1rem, 2vw, 1.55rem);
    font-weight: 700;
    user-select: none;
    transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
}

.stars-cell:hover {
    transform: scale(0.98);
    background: color-mix(in srgb, var(--region-color, var(--sb-region-fallback)) 84%, #ffffff 16%);
}

.stars-cell:focus-visible {
    outline: 3px solid var(--sb-focus);
    outline-offset: -3px;
    z-index: 2;
}

.stars-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px var(--sb-cell-inset);
    pointer-events: none;
}

.stars-cell.is-star {
    color: inherit;
}

.stars-cell.is-blocked {
    color: inherit;
}

.stars-cell-content {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;
    height: 1.5em;
    z-index: 1;
    line-height: 1;
}

.stars-star-svg {
    display: block;
    width: 1.5em;
    height: 1.5em;
    color: var(--sb-star-fill);
}

.stars-status {
    text-align: center;
    font-size: 0.92rem;
    color: var(--sb-muted);
}

.stars-legend {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: var(--sb-legend-bg);
    border: 1px solid var(--sb-legend-border);
}

.stars-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--sb-legend-text);
    font-size: 0.86rem;
    font-weight: 600;
}

.stars-legend-chip {
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--sb-chip-bg);
    border: 1px solid var(--sb-chip-border);
}

.stars-legend-chip.star::before {
    content: '★';
    font-size: 0.78rem;
    color: var(--sb-star-fill);
}

.stars-legend-chip.blocked::before {
    content: '×';
    font-size: 0.86rem;
    color: var(--sb-blocked);
}

.stars-helper-card {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, var(--sb-helper-start) 0%, var(--sb-helper-end) 100%);
    border: 1px solid var(--sb-helper-border);
}

.stars-helper-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sb-cell-text);
    margin: 0 0 0.3rem;
}

.stars-helper-text {
    margin: 0;
    color: var(--sb-muted);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .stars-board-shell {
        padding: 0.65rem;
        border-radius: 1.1rem;
    }
}