/* 単語バスターズ（Web）2026-11-22 */
.bs {
  --ink: #173A5E; --brand: #42D4FA; --bear: #35C2F2; --gold: #FFD44D; --red: #FF5A5F; --green: #2DBE6C; --plus: #7CF59A; --minus: #FF6B70;
  --night: #0a1230; --night2: #16245a; --card: #13204d; --line: rgba(255,255,255,.12);
  --font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --round: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", system-ui, -apple-system, sans-serif;
  margin: 0; min-height: 100vh; background: linear-gradient(180deg, #0a1230 0, #16245a 520px, #0f1a42 100%); color: #fff; font-family: var(--font);
  -webkit-text-size-adjust: 100%;
}
.bs *, .bs *::before, .bs *::after { box-sizing: border-box; }
.bs kbd { display: inline-block; min-width: 1.7em; padding: 1px 6px; margin: 0 1px; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); border-bottom-width: 3px; background: rgba(255,255,255,.08); font: 700 12px/1.5 var(--font); color: #fff; text-align: center; }
.bs a { color: inherit; }

/* ================= 始める前 ================= */
.bi { max-width: 1080px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-left)) 48px max(16px, env(safe-area-inset-right)); display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .bi { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 28px; } .bi-how { grid-column: 1 / -1; } }
.bi-hero { position: relative; text-align: center; padding: 22px 16px 20px; border-radius: 22px; background: radial-gradient(120% 80% at 50% 0, #27408d 0, #142154 60%, #0f1a42 100%); border: 1px solid var(--line); overflow: hidden; }
.bi-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1.5px 1.5px at 12% 18%, #fff 60%, transparent), radial-gradient(1px 1px at 72% 12%, #fff 60%, transparent), radial-gradient(1.5px 1.5px at 88% 40%, #cfe8ff 60%, transparent), radial-gradient(1px 1px at 30% 52%, #fff 60%, transparent), radial-gradient(1px 1px at 55% 30%, #fff 60%, transparent); opacity: .7; pointer-events: none; }
.bi-name { position: relative; margin: 2px auto 6px; max-width: 420px; }
.bi-name img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); }
.bi-lead { position: relative; margin: 0 0 14px; font: 800 18px/1.4 var(--round); }
.bi-lead small { display: block; font: 500 13px/1.5 var(--font); color: #bcd2f5; margin-top: 2px; }
.bi-vs { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 auto 16px; padding: 8px 10px; border-radius: 16px; background: rgba(0,0,0,.22); max-width: 520px; }
.bi-vs__me img { display: block; width: 46px; height: 56px; object-fit: contain; }
.bi-vs__vs { font: 900 20px/1 var(--round); color: var(--gold); -webkit-text-stroke: 4px #5a2a00; paint-order: stroke fill; }
.bi-vs__bosses { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 0; padding: 0; list-style: none; flex: 1; min-width: 0; }
.bi-vs__bosses img { display: block; width: 40px; height: 40px; object-fit: contain; transition: transform .15s; }
.bi-vs__bosses li:hover img { transform: translateY(-3px) scale(1.12); }
@media (max-width: 400px) { .bi-vs__bosses img { width: 31px; height: 31px; } .bi-vs__me img { width: 36px; height: 44px; } }

.bi-meta { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.bi-lvnav { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.bi-arrow { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.1); text-decoration: none; font: 800 26px/1 var(--font); color: #fff; flex: none; }
.bi-arrow:hover { background: rgba(255,255,255,.2); }
.bi-arrow.is-off { opacity: .3; pointer-events: none; cursor: default; }
.bi-course { display: flex; flex-direction: column; min-width: 0; padding: 0 6px; line-height: 1.25; }
.bi-course > span:first-child { font-size: 12px; color: #bcd2f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.bi-lv { font: 800 20px/1.2 var(--round); }
.bi-lv small { font-size: 13px; color: #bcd2f5; }
.bi-best { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: rgba(0,0,0,.22); }
.bi-stars i, .br-stars i { font-style: normal; color: rgba(255,255,255,.22); font-size: 20px; }
.bi-stars i.on { color: var(--gold); text-shadow: 0 0 8px rgba(255,212,77,.6); }
.bi-bestn { display: inline-flex; align-items: baseline; gap: 3px; }
.bi-bestn b { font: 900 20px/1 var(--round); font-variant-numeric: tabular-nums; }
.bi-bestn small { font-size: 12px; color: #bcd2f5; }

.bi-diff { position: relative; display: flex; gap: 8px; justify-content: center; border: 0; margin: 0 auto 16px; padding: 0; max-width: 420px; }
.bi-diff legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bi-diff label { flex: 1; cursor: pointer; }
.bi-diff input { position: absolute; opacity: 0; pointer-events: none; }
.bi-diff span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 8px; border-radius: 14px; border: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); transition: background .15s, border-color .15s, transform .1s; }
.bi-diff b { font: 800 16px/1.2 var(--round); }
.bi-diff i { font-style: normal; font-size: 12px; color: var(--gold); letter-spacing: 1px; }
.bi-diff label:hover span { background: rgba(255,255,255,.1); }
.bi-diff input:checked + span { border-color: var(--gold); background: rgba(255,212,77,.16); box-shadow: 0 0 0 3px rgba(255,212,77,.12); }
.bi-diff input[value="oni"]:checked + span { border-color: #ff7a7f; background: rgba(255,90,95,.18); box-shadow: 0 0 0 3px rgba(255,90,95,.14); }
.bi-diff input:focus-visible + span { outline: 3px solid #ffb400; outline-offset: 2px; }

.bi-start { position: relative; display: block; width: min(100%, 340px); margin: 0 auto; padding: 0; border: 0; border-radius: 18px; cursor: pointer; background: linear-gradient(180deg, #ffe27a, #ffb020); box-shadow: 0 6px 0 #c77a00, 0 12px 28px rgba(255,176,32,.35); color: #4a2600; font: 900 24px/1 var(--round); transition: transform .08s, box-shadow .08s, filter .15s; }
.bi-start span { display: block; padding: 18px 0; letter-spacing: .08em; }
.bi-start:not(:disabled) { animation: bi-pulse 1.8s ease-in-out infinite; }
.bi-start:hover { filter: brightness(1.05); }
.bi-start:active { transform: translateY(4px); box-shadow: 0 2px 0 #c77a00; }
.bi-start:disabled { filter: grayscale(.6) brightness(.8); cursor: default; animation: none; }
.bi-start:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes bi-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.bi-keys { position: relative; margin: 14px 0 0; font-size: 12px; color: #bcd2f5; line-height: 2; }
.bi-msg { position: relative; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255,90,95,.16); color: #ffd7d8; font-size: 14px; }
.bi-change { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px; margin-top: 4px; font-size: 13px; color: #bcd2f5; }

.bi-words, .bi-how { padding: 18px 16px; border-radius: 22px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.bi-h2row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bi h2 { margin: 0; font: 800 17px/1.3 var(--round); }
.bi-playall { min-height: 44px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; border-radius: 10px; padding: 7px 14px; font: 700 13px/1 var(--font); cursor: pointer; }
.bi-playall:hover { background: rgba(255,255,255,.1); }
.bi-playall:disabled { opacity: .5; }
.bi-wlist, .br-words ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
@media (min-width: 560px) and (max-width: 959px) { .bi-wlist { grid-template-columns: 1fr 1fr; column-gap: 12px; } }
.bi-wlist .sk { height: 46px; border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.11), rgba(255,255,255,.05)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.bw { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 10px; min-height: 46px; }
.bw:nth-child(odd) { background: rgba(255,255,255,.035); }
.bw.is-playing { background: rgba(66,212,250,.18); }
.bw__snd { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(66,212,250,.16); color: var(--brand); cursor: pointer; }
.bw__snd svg { width: 20px; height: 20px; }
.bw__snd:hover { background: rgba(66,212,250,.3); }
.bw__t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bw__en { font: 800 16px/1.3 var(--round); overflow-wrap: anywhere; }
.bw__ja { font-size: 13px; line-height: 1.45; color: #c8d8f2; overflow-wrap: anywhere; }
.bw__m { flex: none; display: flex; gap: 3px; align-items: center; }
.bw__m i, .bs-sw__m i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 900 11px/1 var(--font); font-style: normal; color: #fff; }
.bw__m i.ok, .bs-sw__m i.ok { background: var(--green); }
.bw__m i.ng, .bs-sw__m i.ng { background: var(--red); }
.bw__m em { font-style: normal; font-size: 11px; font-weight: 800; color: #3a2a00; background: var(--gold); border-radius: 6px; padding: 2px 6px; margin-left: 2px; }
.bw__more { flex: none; display: grid; place-items: center; width: 44px; height: 44px; text-decoration: none; font-size: 22px; color: #9fb6dd; }
.bw.is-ng { background: rgba(255,90,95,.12); }

.bi-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.bi-steps li { display: flex; flex-direction: column; gap: 8px; }
.bi-steps img { width: 100%; height: auto; aspect-ratio: 300 / 564; object-fit: cover; border-radius: 14px; background: #0d173c; border: 1px solid var(--line); }
.bi-steps p { margin: 0; font-size: 13px; line-height: 1.55; color: #c8d8f2; }
.bi-steps b { display: block; font: 800 15px/1.4 var(--round); color: #fff; margin-bottom: 2px; }
@media (max-width: 520px) { .bi-steps { grid-template-columns: 1fr 1fr; gap: 12px; } }
.bi-tips { margin: 16px 0 0; padding: 12px 14px 12px 30px; border-radius: 14px; background: rgba(255,212,77,.08); font-size: 13px; line-height: 1.8; color: #ffe9a8; }

/* ================= 遊ぶ ================= */
.bs.is-play { overflow: hidden; overscroll-behavior: none; }
.bs.is-play .mtp-bar, .bs.is-play .bi { display: none; }
.bs-stage[hidden] { display: none !important; }
.bs-stage { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 1fr auto 1fr; background: #050817; overscroll-behavior: none; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.bs-col { position: relative; grid-column: 2; width: min(100vw, calc(100dvh * .62)); height: 100vh; height: 100dvh; overflow: hidden; touch-action: none; background: #0a1230; contain: layout paint; outline: none; }
.bs-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bs-col.is-grey .bs-cv { filter: grayscale(.85) brightness(.75); transition: filter .3s; }
.bs-vig { position: absolute; inset: 0; pointer-events: none; z-index: 3; box-shadow: inset 0 0 90px 18px rgba(3,6,20,.45); }
.bs-col.is-danger .bs-vig { box-shadow: inset 0 0 130px 50px rgba(255,30,50,.6); animation: bs-danger .6s infinite alternate; }
@keyframes bs-danger { from { opacity: .5; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bs-col.is-danger .bs-vig { animation: none; opacity: .8; } }

.bs-hud { position: absolute; left: 0; right: 0; top: 0; z-index: 9; display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 10px 0; pointer-events: none; }
.bs-rb { pointer-events: auto; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: rgba(255,255,255,.94); cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.25); padding: 0; transition: transform .08s; }
.bs-rb:active { transform: scale(.9); }
.bs-rb svg { width: 22px; height: 22px; fill: var(--ink); stroke: var(--ink); }
.bs-rb .bs-snd-off { display: none; }
.bs-rb.is-off .bs-snd-on { display: none; }
.bs-rb.is-off .bs-snd-off { display: inline; }
.bs-rb.is-off { opacity: .7; }
.bs-rb:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.bs-prog { position: relative; flex: 1; height: 10px; border-radius: 6px; background: rgba(255,255,255,.22); margin: 0 18px 0 8px; }
.bs-prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: var(--brand); }
.bs-prog__me { position: absolute; top: 50%; left: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--bear); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.bs-prog__boss { position: absolute; right: -20px; top: 50%; width: 34px; height: 34px; margin-top: -19px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }

.bs-bossbar { position: absolute; left: 12px; right: 12px; top: calc(max(10px, env(safe-area-inset-top)) + 50px); z-index: 8; height: 18px; border-radius: 9px; background: rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.75); display: none; gap: 3px; padding: 2px 3px; }
.bs-bossbar.is-on { display: flex; }
.bs-bossbar i { flex: 1; border-radius: 5px; background: linear-gradient(180deg, #ff8a5b, #ff3b47); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.bs-bossbar i.is-broken { background: #3a2a40; opacity: .45; animation: bs-seg .5s ease-out; }
.bs-bossbar.is-last i:not(.is-broken) { animation: bs-lastseg .5s ease-in-out infinite alternate; }
@keyframes bs-seg { 0% { transform: scale(1.6); background: #fff; opacity: 1; } 100% { transform: scale(1); opacity: .45; } }
@keyframes bs-lastseg { from { filter: brightness(1); } to { filter: brightness(1.8); } }
.bs-bossname { position: absolute; left: 14px; top: calc(max(10px, env(safe-area-inset-top)) + 72px); z-index: 8; display: none; font: 900 14px/1 var(--round); color: #fff; -webkit-text-stroke: 4px #3a0a3a; paint-order: stroke fill; pointer-events: none; }
.bs-bossname.is-on { display: block; }

/* 問いの札 */
.bs-prompt { position: absolute; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 54px); z-index: 7; transform: translate(-50%, -12px) scale(.94); opacity: 0; pointer-events: none;
  width: min(88%, 420px); padding: 8px 14px 10px; border-radius: 16px; background: rgba(23,58,94,.94); border: 4px solid var(--brand); box-shadow: 0 8px 20px rgba(0,0,0,.35);
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; transition: opacity .18s, transform .22s cubic-bezier(.2,1.4,.4,1); }
.bs-prompt.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.bs-prompt.is-gold { border-color: var(--gold); top: calc(max(10px, env(safe-area-inset-top)) + 96px); background: rgba(40,20,60,.94); }
.bs-prompt__q { font: 700 11px/1.2 var(--font); color: #9fe6ff; letter-spacing: .1em; }
.bs-prompt.is-gold .bs-prompt__q { color: var(--gold); }
.bs-prompt__ja { font: 800 clamp(18px, 5.6cqw, 26px)/1.3 var(--round); color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.bs-prompt__ja--s { font-size: clamp(14px, 4.2cqw, 18px); -webkit-line-clamp: 1; }
.bs-prompt__en { font: 900 clamp(22px, 7cqw, 32px)/1.2 var(--round); color: #fff; overflow-wrap: anywhere; }
.bs-prompt img { display: block; height: clamp(64px, 18cqw, 96px); width: auto; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #fff; }
.bs-col { container-type: size; }

.bs-combo { position: absolute; right: 12px; top: calc(max(10px, env(safe-area-inset-top)) + 54px); z-index: 6; font: 900 18px/1 var(--round); color: var(--gold); -webkit-text-stroke: 4px #7a3b00; paint-order: stroke fill; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; pointer-events: none; }
.bs-combo b { font-size: 28px; }
.bs-combo.is-on { opacity: 1; transform: scale(1); }
.bs-bossbar.is-on ~ .bs-combo { top: calc(max(10px, env(safe-area-inset-top)) + 72px); }
.bs-prompt.is-on ~ .bs-combo.is-on { top: auto; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 4px); }
.bs-combo.is-bump { animation: bs-bump .3s; }
@keyframes bs-bump { 40% { transform: scale(1.35); } }

.bs-count, .bs-weap { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; will-change: transform; }
.bs-count b { display: block; transform: translate(-50%, -100%); min-width: 44px; padding: 3px 10px; border-radius: 10px; background: #1E9BF0; border: 3px solid #fff; color: #fff; font: 900 22px/1.1 var(--round); text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.bs-count.is-fever b { background: linear-gradient(180deg, #ffd44d, #ff9f1a); color: #4a2600; }
.bs-count.is-gain b { animation: bs-gain .38s ease-out; }
.bs-count.is-hurt b { animation: bs-hurt .45s ease-out; }
@keyframes bs-gain { 35% { transform: translate(-50%, -112%) scale(1.35); } }
@keyframes bs-hurt { 0%, 60% { background: #ff5a5f; } 20% { transform: translate(-62%, -100%) scale(1.3); } 40% { transform: translate(-38%, -100%) scale(1.25); } 60% { transform: translate(-58%, -100%) scale(1.15); } }
.bs-weap[hidden] { display: none; }
.bs-weap { --beam: #8CF4FF; translate: 0 -175%; padding: 3px 8px; border-radius: 9px; background: linear-gradient(180deg, #ffe27a, #ff9f1a); border: 3px solid #fff; color: #4a2600; font: 900 16px/1.1 var(--round); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 0 0 2px var(--beam), 0 3px 0 rgba(0,0,0,.25); }
.bs-weap.is-bump { animation: bs-wbump .35s ease-out; }
@keyframes bs-wbump { 40% { scale: 1.4; } }

/* 浮かぶ数字・意味 */
.bs-fl { position: absolute; left: 0; top: 0; z-index: 6; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap; font: 900 30px/1 var(--round); color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; animation: bs-fl 1.3s ease-out forwards; }
.bs-fl.is-plus { color: var(--plus); -webkit-text-stroke-color: #0d4a23; }
.bs-fl.is-big { font-size: 40px; }
.bs-fl.is-minus { color: var(--minus); -webkit-text-stroke-color: #5a0a10; font-size: 38px; animation: bs-flm 1.1s ease-out forwards; }
.bs-fl.is-minus.is-small { font-size: 26px; }
.bs-fl.is-gold { color: var(--gold); -webkit-text-stroke-color: #6b3a00; font-size: 42px; }
.bs-fl.is-jp { font: 800 20px/1.15 var(--round); -webkit-text-stroke: 5px var(--ink); opacity: .95; animation: bs-flj 2.2s ease-out forwards; text-align: center; max-width: 92%; white-space: normal; width: max-content; }
.bs-fl.is-jp small { display: block; font: 900 14px/1.1 var(--round); color: var(--brand); -webkit-text-stroke: 4px var(--ink); margin-bottom: 3px; }
@keyframes bs-fl { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -180%) scale(1); } }
@keyframes bs-flm { 0% { opacity: 0; transform: translate(-50%, -40%) scale(1.8); } 12% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } 25% { transform: translate(-56%, -62%) scale(1.15); } 38% { transform: translate(-44%, -64%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -150%) scale(1); } }
@keyframes bs-flj { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 12% { opacity: 1; transform: translate(-50%, -70%) scale(1.08); } 70% { opacity: 1; transform: translate(-50%, -110%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1); } }

.bs-flash { position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: 0; transition: opacity .35s; }
.bs-flash.is-red { box-shadow: inset 0 0 120px 40px rgba(255,40,60,.8); opacity: 1; transition: none; }
.bs-flash.is-graze { box-shadow: inset 0 0 80px 20px rgba(255,40,60,.5); opacity: 1; transition: none; }
.bs-flash.is-green { box-shadow: inset 0 0 120px 40px rgba(60,230,120,.65); opacity: 1; transition: none; }
.bs-flash.is-gold { box-shadow: inset 0 0 140px 50px rgba(255,210,70,.7); opacity: 1; transition: none; }
.bs-flash.is-blue { box-shadow: inset 0 0 140px 50px rgba(80,200,255,.6); opacity: 1; transition: none; }

.bs-banner { position: absolute; left: 0; right: 0; top: 36%; z-index: 8; text-align: center; pointer-events: none; opacity: 0; padding: 18px 0; }
.bs-banner::before { content: ""; position: absolute; left: -10%; right: -10%; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, rgba(255,40,70,.78) 0 26px, rgba(120,0,30,.78) 26px 52px); transform: rotate(-3deg); }
.bs-banner b { position: relative; display: inline-block; font: 900 clamp(28px, 10cqw, 44px)/1.1 var(--round); color: #fff; -webkit-text-stroke: 9px #3a0a3a; paint-order: stroke fill; white-space: nowrap; filter: drop-shadow(0 5px 0 rgba(0,0,0,.45)); }
.bs-banner.is-on { animation: bs-banner 2.6s ease-out forwards; }
.bs-banner.is-clear::before { background: repeating-linear-gradient(-45deg, rgba(255,200,40,.85) 0 26px, rgba(255,140,0,.85) 26px 52px); }
.bs-banner.is-clear b { color: #fff6c8; -webkit-text-stroke-color: #6b3a00; font-size: clamp(40px, 15cqw, 64px); }
.bs-banner.is-clear.is-on { animation: bs-banner 3s ease-out forwards; }
@keyframes bs-banner { 0% { opacity: 0; transform: scale(3) rotate(-8deg); } 10% { opacity: 1; transform: scale(1) rotate(2deg); } 18% { transform: scale(1.08) rotate(-1deg); } 24% { transform: scale(1); } 82% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: translateY(-50px) scale(.9); } }

.bs-cd { position: absolute; left: 0; right: 0; top: 40%; z-index: 8; text-align: center; pointer-events: none; opacity: 0; font: 900 clamp(56px, 22cqw, 96px)/1 var(--round); color: #fff; -webkit-text-stroke: 10px var(--ink); paint-order: stroke fill; }
.bs-cd.is-on { animation: bs-cd .9s ease-out forwards; }
@keyframes bs-cd { 0% { opacity: 0; transform: scale(2.2); } 20% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(.9); } }
.bs-hand { position: absolute; left: 50%; top: 80%; width: 60px; height: 60px; margin-left: -30px; z-index: 6; pointer-events: none; opacity: 0; transition: opacity .3s; }
.bs-hand.is-on { opacity: 1; animation: bs-hand 1.6s ease-in-out infinite; }
@keyframes bs-hand { 0%, 100% { transform: translateX(-60px); } 50% { transform: translateX(60px); } }

/* 復活ルーレット */
.bs-roul { position: absolute; inset: 0; z-index: 12; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(5,8,23,.55); padding: 20px; }
.bs-roul[hidden] { display: none; }
.bs-roul__call { margin: 0; font: 900 clamp(24px, 8cqw, 34px)/1.2 var(--round); color: #fff; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-align: center; animation: bs-bump .5s; }
.bs-roul__wheel-wrap { position: relative; width: min(66cqw, 280px); aspect-ratio: 1; }
.bs-roul__pin { position: absolute; left: 50%; top: -14px; z-index: 2; width: 0; height: 0; margin-left: -14px; border: 14px solid transparent; border-top: 24px solid #fff; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.bs-roul__wheel { position: relative; width: 100%; height: 100%; border-radius: 50%; border: 8px solid #fff; box-shadow: 0 0 0 4px var(--ink), 0 10px 30px rgba(0,0,0,.5);
  background: conic-gradient(#ffc531 0 90deg, #5b6478 90deg 180deg, #ffc531 180deg 270deg, #5b6478 270deg 360deg); }
.bs-roul__wheel span { position: absolute; left: 50%; top: 50%; font: 900 clamp(26px, 10cqw, 42px)/1 var(--round); color: #fff; transform: translate(-50%, -50%) rotate(var(--a)) translateY(-30%) translateY(-9cqw) rotate(calc(-1 * var(--a))); text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.bs-roul__res { margin: 0; min-height: 1.3em; font: 900 28px/1.2 var(--round); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.bs-roul__res.is-win { color: var(--gold); animation: bs-bump .4s; }
.bs-roul__res.is-lose { color: #c9d2e6; }
.bs-roul__stop { min-width: 180px; padding: 14px 28px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #ff7a7f, #ff3b47); color: #fff; font: 900 24px/1 var(--round); letter-spacing: .1em; box-shadow: 0 6px 0 #a11a22; cursor: pointer; }
.bs-roul__stop:active { transform: translateY(4px); box-shadow: 0 2px 0 #a11a22; }
.bs-roul__stop:disabled { opacity: .5; }
.bs-roul__hint { margin: 0; font-size: 12px; color: #dbe6ff; }

/* 一時停止 */
.bs-pausebox { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(5,8,23,.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.bs-pausebox[hidden] { display: none; }
.bs-pausebox__h { margin: 0 0 8px; font: 900 24px/1 var(--round); }
.b-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 200px; min-height: 52px; padding: 12px 22px; border-radius: 14px; border: 2px solid transparent; font: 800 17px/1.2 var(--round); text-decoration: none; cursor: pointer; transition: transform .08s, filter .15s; }
.b-btn:active { transform: translateY(2px); }
.b-btn:hover { filter: brightness(1.06); }
.b-btn--main { background: linear-gradient(180deg, #ffe27a, #ffb020); color: #4a2600; box-shadow: 0 4px 0 #c77a00; }
.b-btn--next { background: linear-gradient(180deg, #6fe0ff, #1E9BF0); color: #fff; box-shadow: 0 4px 0 #0f6fb5; }
.b-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.b-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.bs-err { position: absolute; left: 16px; right: 16px; top: 40%; z-index: 30; padding: 14px; border-radius: 14px; background: #fff; color: var(--ink); text-align: center; }

/* PC の横の欄 */
.bs-side { display: none; min-width: 0; padding: 22px 20px; overflow: auto; color: #dbe6ff; font-size: 13px; }
.bs-side--l { justify-self: end; width: min(100%, 300px); }
.bs-side--r { justify-self: start; width: min(100%, 280px); }
@media (min-width: 900px) and (min-aspect-ratio: 5/4) { .bs-side { display: block; } }
.bs-side__h { margin: 14px 0 6px; font: 700 12px/1.2 var(--font); color: #8ea6d6; letter-spacing: .08em; }
.bs-side__h:first-child { margin-top: 0; }
.bs-side__v { margin: 0; font: 800 18px/1.3 var(--round); color: #fff; }
.bs-side__box { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); }
.bs-sw { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bs-sw__i { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; padding: 6px 8px; border-radius: 8px; opacity: .45; transition: opacity .3s, background .3s; }
.bs-sw__i.is-seen { opacity: 1; background: rgba(255,255,255,.05); }
.bs-sw__i.is-boss { border: 1px dashed rgba(255,212,77,.5); }
.bs-sw__en { font: 800 14px/1.3 var(--round); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-sw__ja { grid-column: 1; font-size: 12px; color: #b6c6e6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-sw__m { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 2px; align-items: center; }
.bs-keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; margin: 0; align-items: center; }
.bs-keys dt { white-space: nowrap; }
.bs-keys dd { margin: 0; }
/* タッチの端末（指で動かす）には指の案内を出す。マウス・キーの案内は隠す */
.bs-keys--touch { display: none; }
@media (hover: none), (pointer: coarse) { .bs-keys--mouse { display: none; } .bs-keys--touch { display: grid; } }

/* 横長のスマホ: 縦がおすすめ */
@media (orientation: landscape) and (max-height: 500px) {
  .bs-stage::before { content: "縦向きにすると、大きく遊べます"; position: absolute; left: 12px; bottom: 12px; max-width: calc((100vw - 100dvh * .62) / 2 - 24px); font-size: 12px; color: #8ea6d6; line-height: 1.5; }
}

/* ================= 結果 ================= */
.bs.is-result .bi { display: none; }
.br { padding: 22px max(16px, env(safe-area-inset-left)) 48px max(16px, env(safe-area-inset-right)); }
.br-in { position: relative; max-width: 560px; margin: 0 auto; text-align: center; }
.br.go .br-in > * { animation: br-in .45s both; }
.br.go .br-in > :nth-child(2) { animation-delay: .05s; } .br.go .br-in > :nth-child(3) { animation-delay: .1s; } .br.go .br-in > :nth-child(5) { animation-delay: .18s; } .br.go .br-in > :nth-child(6) { animation-delay: .24s; }
@keyframes br-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .br.go .br-in > * { animation: none; } }
.br-lv { margin: 0 0 4px; font-size: 13px; color: #bcd2f5; }
.br-head { margin: 0; font: 900 clamp(40px, 12vw, 60px)/1.1 var(--round); letter-spacing: .02em; }
.br-head.is-win { background: linear-gradient(180deg, #fff6c8, #ffd44d 55%, #ff9f1a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #7a3b00); }
.br-head.is-lose { color: #7fe3d8; font-size: clamp(32px, 9vw, 44px); }
.br-stars { margin: 6px 0 0; }
.br-stars[hidden] { display: none; }
.br-stars i { font-size: 34px; display: inline-block; }
.br-stars i.on { color: var(--gold); text-shadow: 0 0 12px rgba(255,212,77,.7); animation: br-star .5s both cubic-bezier(.2,1.6,.4,1); }
@keyframes br-star { from { transform: scale(0) rotate(-90deg); } to { transform: scale(1); } }
.br-sub { margin: 6px 0 0; min-height: 1.4em; font: 800 16px/1.4 var(--round); color: #bcd2f5; }
.br-sub.is-gold { color: var(--gold); }
.br-board { margin: 16px 0 0; padding: 16px; border-radius: 20px; background: rgba(0,0,0,.28); border: 1px solid var(--line); display: grid; gap: 10px; }
.br-big { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.br-big small { font-size: 14px; color: #bcd2f5; }
.br-big b { font: 900 52px/1 var(--round); font-variant-numeric: tabular-nums; color: #fff; }
.br-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.br-stats > div { padding: 8px 4px; border-radius: 12px; background: rgba(255,255,255,.05); min-width: 0; }
.br-stats dt { font-size: 11px; color: #8ea6d6; margin-bottom: 2px; }
.br-stats dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.br-stats dd b { font: 900 18px/1.2 var(--round); }
.br-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 0; }
.br-btns .b-btn { flex: 1 1 150px; min-width: 0; }
.br-lives { margin: 14px auto 0; justify-content: center; color: #fff; }
.br-lives .mtp-lives__n small, .br-lives .mtp-lives__sub { color: #bcd2f5; }
.br-words { margin: 22px 0 0; text-align: left; padding: 14px 12px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.br-words h2 { margin: 0 0 8px; font: 800 16px/1.3 var(--round); }
.br-words h2 small { font: 600 12px/1 var(--font); color: #ffb3b5; margin-left: 6px; }
.br-app { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; padding: 12px 14px; border-radius: 16px; background: rgba(66,212,250,.1); border: 1px solid rgba(66,212,250,.3); text-decoration: none; text-align: left; }
.br-app img { flex: none; border-radius: 10px; }
.br-app span { display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.br-app b { font: 800 15px/1.4 var(--round); color: #fff; }
.br-app small { font-size: 12px; color: #bcd2f5; }
.br-app:hover { background: rgba(66,212,250,.18); }

/* hidden を付けた部品は、どの指定よりも優先して隠す（つぎのレベル・音のボタンなど） */
.bs [hidden] { display: none !important; }
.bs-err { display: grid; gap: 10px; justify-items: center; }
.bs-err__msg { margin: 0; font-weight: 700; }
.bs-err__btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bs-err .b-btn { min-width: 140px; }
.bs-err .b-btn--ghost { color: var(--ink); border-color: rgba(23,58,94,.35); }
/* 結果の画面の音のボタン（右上。曲を止めたいとき） */
.br-snd { position: absolute; top: -6px; right: 0; z-index: 2; }
/* 始める前の画面の音のボタン（遊ぶ画面・結果と同じ設定） */
.bi-snd { position: absolute; top: 10px; right: 10px; z-index: 2; }
.bi-name { max-width: min(420px, calc(100% - 80px)); }   /* 右上の音のボタンとロゴが重ならないよう、左右に同じ余白 */
