.swatter-cabinet {
    padding: clamp(14px, 3vw, 24px);
    border: 3px solid #d7488b;
    border-radius: 12px;
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px),
        linear-gradient(145deg, rgba(37, 25, 69, .98), rgba(13, 12, 30, .98));
    box-shadow: 0 0 20px rgba(215, 72, 139, .28), inset 0 0 24px rgba(5, 4, 16, .7);
}

.swatter-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.swatter-cabinet .sound-toggle {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #8066bf;
    border-radius: 7px;
    color: #f7f0ff;
    background: #21183b;
    font: 700 .95rem/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
    cursor: pointer;
}

.swatter-cabinet h1 {
    margin: 16px 0 10px;
    color: #ffe17b;
    font-family: "ADJMN Arcade Display", monospace;
    font-size: clamp(1rem, 3.5vw, 1.35rem);
    line-height: 1.5;
    text-align: center;
    text-shadow: 2px 2px #9b294d;
}

.swatter-hud {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.swatter-hud > div:nth-child(2) { text-align: center; }
.swatter-hud > div:last-child { text-align: right; }

.swatter-hud #lives-display {
    min-height: 1.2em;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    letter-spacing: -.1em;
    white-space: nowrap;
}

.swatter-stage {
    position: relative;
    width: min(100%, 420px);
    margin-inline: auto;
    border-style: dashed;
    touch-action: none;
}

.swatter-stage canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    touch-action: none;
}

.swatter-instructions { max-width: 520px; }

.game-scoreboards.swatter-scoreboards { margin-top: 22px; }

.swatter-result-panel .game-result-score {
    color: #4ce8ff;
}

@media (max-width: 480px) {
    .swatter-cabinet { padding: 12px; border-width: 2px; }
    .swatter-cabinet .sound-toggle { min-height: 40px; padding: 7px 9px; font-size: .85rem; }
    .swatter-hud { gap: 6px; padding: 8px; }
    .swatter-hud > div > span { font-size: .67rem; }
    .swatter-hud strong { font-size: .95rem; }
    .swatter-hud #lives-display { font-size: .85rem; }
}

@media (max-width: 520px) and (max-height: 760px) {
    .swatter-stage {
        width: min(100%, 420px, max(220px, calc((100vh - 280px) * .75)));
        width: min(100%, 420px, max(220px, calc((100dvh - 280px) * .75)));
    }
}
