/* 버블 슈터 — 게임 화면 */
#bs-game {
    --bs-bg: #101a2c;
    --bs-panel: #17243b;
    --bs-line: #27364f;
    --bs-text: #f4f7fb;
    --bs-muted: #9fb0c8;
    --bs-accent: #45e0d2;
    position: relative;
    width: 100%;
    margin: 0 auto;
    background: var(--bs-bg);
    color: var(--bs-text);
    border: 1px solid var(--bs-line);
    border-radius: 22px;
    overflow: hidden;
    font-family: inherit;
    text-align: left;
    box-shadow: 0 16px 40px rgba(8, 18, 34, .18);
}
#bs-game * { box-sizing: border-box; }
#bs-game [hidden] { display: none !important; }
#bs-game button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#bs-game button:focus-visible { outline: 3px solid #ffd76b; outline-offset: -3px; }

.bs-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--bs-line); background: linear-gradient(180deg, #16223a, #121c30); }
.bs-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; }
.bs-brand i { width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #fff 8%, var(--bs-accent) 45%, #128f8a 100%); box-shadow: 0 0 10px rgba(69, 224, 210, .45); }
.bs-brand small { display: block; font-size: 11px; font-weight: 600; color: var(--bs-muted); letter-spacing: 0; }
.bs-tools { display: flex; gap: 8px; }
.bs-tools button { border: 1px solid var(--bs-line); background: #1b2942; color: var(--bs-muted); border-radius: 10px; padding: 7px 11px; font-size: 12px; font-weight: 700; }
.bs-tools button[aria-pressed="true"] { color: #0d1626; background: var(--bs-accent); border-color: var(--bs-accent); }

.bs-layout { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 14px 16px 18px; }
.bs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bs-stats > div { background: var(--bs-panel); border: 1px solid var(--bs-line); border-radius: 14px; padding: 9px 10px; text-align: center; }
.bs-stats span { display: block; font-size: 11px; color: var(--bs-muted); font-weight: 600; margin-bottom: 3px; }
.bs-stats strong { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bs-stats .bs-stat-main strong { color: var(--bs-accent); }

.bs-stage { position: relative; width: 100%; max-width: 420px; margin: 0 auto; border-radius: 18px; overflow: hidden; background: #0b1322; border: 1px solid var(--bs-line); }
#bs-canvas { display: block; width: 100%; height: auto; touch-action: none; }
.bs-toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(9, 17, 30, .86); border: 1px solid var(--bs-line); color: var(--bs-text); font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap; }
.bs-toast.on { opacity: 1; }

.bs-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(8, 15, 27, .88); backdrop-filter: blur(3px); }
.bs-overlay[hidden] { display: none; }
.bs-panel { width: 100%; max-width: 320px; text-align: center; }
.bs-eyebrow { display: inline-block; font-size: 11px; letter-spacing: .12em; font-weight: 800; color: var(--bs-accent); margin-bottom: 8px; }
.bs-panel h2 { font-size: 22px; font-weight: 800; line-height: 1.4; margin: 0 0 10px; color: #fff; }
.bs-panel p { font-size: 13px; line-height: 1.7; color: var(--bs-muted); margin: 0 0 14px; }
.bs-panel .bs-note { font-size: 12px; color: #7f92ad; margin: -6px 0 14px; }
.bs-final { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin-bottom: 10px; }
.bs-final strong { font-size: 40px; font-weight: 800; color: var(--bs-accent); font-variant-numeric: tabular-nums; }
.bs-final span { font-size: 14px; color: var(--bs-muted); }
.bs-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.bs-details div { background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 7px 4px; }
.bs-details b { display: block; font-size: 15px; font-weight: 800; }
.bs-details small { font-size: 10px; color: var(--bs-muted); }
.bs-primary { width: 100%; border: 0; border-radius: 14px; padding: 13px 16px; font-size: 15px; font-weight: 800; color: #08131f; background: linear-gradient(135deg, #63f0dd, #35b9d8); box-shadow: 0 8px 20px rgba(53, 185, 216, .3); }
.bs-secondary { width: 100%; margin-top: 8px; border: 1px solid var(--bs-line); border-radius: 14px; padding: 11px 16px; font-size: 13px; font-weight: 700; color: var(--bs-muted); background: transparent; }

.bs-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 420px; margin: 0 auto; width: 100%; }
.bs-actions button { border: 1px solid var(--bs-line); background: var(--bs-panel); color: var(--bs-text); border-radius: 14px; padding: 12px 10px; font-size: 14px; font-weight: 700; }
.bs-actions button:disabled { opacity: .45; cursor: default; }
.bs-hint { max-width: 420px; margin: 0 auto; width: 100%; font-size: 12px; color: var(--bs-muted); line-height: 1.7; text-align: center; }
.bs-hint kbd { background: #1b2942; border: 1px solid var(--bs-line); border-radius: 5px; padding: 1px 5px; font-size: 11px; }

.answer_shadow.bs-guide { text-align: left; line-height: 1.7; margin-top: 16px; }
.answer_shadow.bs-guide h3 { font-size: 1rem; font-weight: 800; margin: 0 0 8px; }
.answer_shadow.bs-guide p { font-size: .88rem; margin: 0 0 8px; }
.answer_shadow.bs-guide small { display: block; font-size: .78rem; color: #888; line-height: 1.7; }

@media (min-width: 760px) {
    .bs-layout { grid-template-columns: 1fr; }
    .bs-stage { max-width: 440px; }
    .bs-actions, .bs-hint { max-width: 440px; }
}
