/* ===== ホイールバトル（リアルタイム・3対3）の見た目 ===== */
@property --rot { syntax: "<angle>"; inherits: true; initial-value: 0deg; }

.f-btn.wbmode { left: 50%; transform: translateX(-50%); top: 94px; }

.wb { position: absolute; inset: 0; z-index: 9; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; font-family: var(--head);
  --wb-navy: #141039; --wb-navy2: #2e2878; --wb-cyan: #7fe9ff; --wb-yel: #ffd23f; --wb-org: #ff9f1c; }
.wb-bg { position: absolute; inset: 0; background: linear-gradient(#1d1760 0%, #5b2fa8 14%, #ff6fa5 25%, #ffc470 30%, #6cbc57 31.5%, #55a746 56%, #2b2570 56.2%, #141039 100%); }
.wb-bg::before { content: ""; position: absolute; left: 0; right: 0; top: 31%; height: 25%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 38px, transparent 38px 76px); }
.wb-bg::after { content: ""; position: absolute; right: 18%; top: 9%; width: 46px; height: 46px; border-radius: 50%; background: #fff7cf; box-shadow: 0 0 36px 16px rgba(255, 238, 150, .7); }
.wb-in { position: absolute; inset: 0; margin: 0 auto; max-width: 640px; }

/* ----- 舞台 ----- */
.wb-scene { position: absolute; left: 0; right: 0; top: 0; height: 56%; }
.wb-unit { position: absolute; width: 26%; height: 28%; transform: translate(-50%, -100%); transition: left .35s, top .35s; }
.wb-unit.p { height: 33%; width: 27%; }
.wb-unit .wb-ring { position: absolute; left: 50%; bottom: -6%; width: 92%; height: 18%; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .3) 0 55%, transparent 58%); box-shadow: 0 0 0 4px var(--rc), 0 0 0 7px rgba(255, 255, 255, .55), 0 0 20px 8px var(--rc); }
.wb-unit.e { --rc: #ff7a45; cursor: pointer; }
.wb-unit.p { --rc: #47e3ff; }
.wb-img { position: absolute; left: 50%; bottom: 2%; height: 100%; max-width: 130%; transform: translateX(-50%); object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35)); transition: filter .2s, opacity .4s, transform .4s; }
.wb-unit.dead .wb-img { filter: grayscale(1) brightness(.55); opacity: .75; }
.wb-unit.gone .wb-img { opacity: 0; transform: translateX(-50%) scale(.4) translateY(30%); }
.wb-unit.gone .wb-ring, .wb-unit.gone .wb-plate { opacity: 0; transition: opacity .4s; }
.wb-unit.empty { visibility: hidden; }
.wb-unit.hit .wb-img { animation: wb-hit .38s; }
@keyframes wb-hit { 0%, 100% { translate: 0 0; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .35)); } 15% { translate: -9px 0; filter: brightness(2.2) drop-shadow(0 0 8px #fff); } 45% { translate: 8px 0; filter: brightness(1.6); } 75% { translate: -4px 0; } }
.wb-unit.pop .wb-img { animation: wb-pop .45s; }
@keyframes wb-pop { 0% { scale: .3; opacity: 0; } 70% { scale: 1.1; opacity: 1; } 100% { scale: 1; } }
.wb-unit.focus::before { content: "▼"; position: absolute; left: 50%; top: -14px; transform: translateX(-50%); color: var(--wb-yel); font-size: 20px; text-shadow: 0 2px 0 #0b0826, 0 0 10px var(--wb-yel); animation: wb-bob .7s ease-in-out infinite alternate; z-index: 3; }
@keyframes wb-bob { to { top: -6px; } }

.wb-plate { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 8px); width: 104%; min-width: 92px; padding: 3px 6px 5px; border: 2px solid var(--wb-cyan); border-radius: 10px; color: #fff;
  background: linear-gradient(var(--wb-navy2), #15113d); box-shadow: 0 0 0 2px var(--wb-navy), 0 3px 8px rgba(0, 0, 0, .4); }
.wb-unit.e .wb-plate { border-color: #ffb089; }
.wb-nm { display: block; font: 700 11px/1.2 var(--head); text-shadow: 0 1px 0 #0b0826; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 30px; }
.wb-lv { position: absolute; right: 5px; top: 3px; padding: 0 6px; border: 1.5px solid #fff; border-radius: 999px; background: linear-gradient(#ffe27a, #ffa41c); color: #3a1d00; font: 700 9px/1.5 var(--body); }
.wb-bar { position: relative; height: 9px; margin-top: 2px; border: 1.5px solid #fff; border-radius: 999px; background: #0b0826; overflow: hidden; }
.wb-bar s { position: absolute; inset: 0 auto 0 0; background: #ffe27a; text-decoration: none; transition: width .5s ease .3s; }
.wb-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#9af58a 0 45%, #2fc04a 50%); transition: width .25s; }
.wb-bar i.mid { background: linear-gradient(#ffe88a 0 45%, #f0b020 50%); }
.wb-bar i.low { background: linear-gradient(#ff9a8a 0 45%, #e0423b 50%); }
.wb-atb { height: 4px; margin-top: 3px; border-radius: 999px; background: rgba(0, 0, 0, .55); overflow: hidden; }
.wb-atb i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #47e3ff, #bff5ff); }
.wb-bdg { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 2px; min-height: 0; }
.wb-bdg span { padding: 0 4px; border-radius: 6px; color: #fff; font: 700 9px/1.4 var(--body); }
.wb-bdg span.up { background: #1fa34d; } .wb-bdg span.dn { background: #d6463e; }
.wb-fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.wb-num { position: absolute; transform: translate(-50%, -50%); font: 700 26px var(--head); color: #fff; -webkit-text-stroke: 5px #141039; paint-order: stroke fill; white-space: nowrap; animation: wb-num 1s ease-out forwards; }
.wb-num.crit { color: #ffd23f; font-size: 32px; } .wb-num.good { color: #ffb089; } .wb-num.weak { color: #b9c6ff; font-size: 20px; } .wb-num.heal { color: #7dff9a; } .wb-num.txt { font-size: 16px; -webkit-text-stroke: 4px #141039; }
@keyframes wb-num { 0% { opacity: 0; scale: .4; translate: 0 10px; } 15% { opacity: 1; scale: 1.25; } 30% { scale: 1; } 100% { opacity: 0; translate: 0 -46px; } }
.wb-proj { position: absolute; font-size: 28px; transform: translate(-50%, -50%); filter: drop-shadow(0 0 8px var(--tc, #fff)); }
.wb-burst { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 4px solid var(--tc, #fff); background: radial-gradient(circle, #fff, transparent 70%); animation: wb-burst .45s ease-out forwards; }
@keyframes wb-burst { to { transform: scale(6); opacity: 0; } }

.wb-log { position: absolute; left: 8px; top: 8px; right: 90px; z-index: 7; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.wb-log div { align-self: flex-start; max-width: 100%; padding: 3px 10px; border-radius: 10px; background: rgba(20, 16, 57, .82); color: #fff; font: 12px/1.4 var(--body); animation: wb-logfade 2.8s forwards; }
@keyframes wb-logfade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.wb-banner { position: absolute; left: 0; right: 0; top: 38%; z-index: 8; text-align: center; pointer-events: none; font: 700 clamp(26px, 8vw, 44px) var(--head); color: #fff; text-shadow: 0 3px 0 #0b0826, 0 0 18px var(--wb-cyan); opacity: 0; }
.wb-banner.show { animation: wb-ban 1.3s ease both; }
@keyframes wb-ban { 0% { opacity: 0; scale: .5; } 15% { opacity: 1; scale: 1.15; } 25% { scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.wb-hint { position: absolute; left: 50%; bottom: calc(44% + 6px); transform: translateX(-50%); z-index: 7; padding: 4px 12px; border-radius: 12px; background: rgba(255, 159, 28, .95); color: #2a1100; font: 700 12px var(--head); white-space: nowrap; animation: wb-bob2 .8s ease-in-out infinite alternate; }
@keyframes wb-bob2 { to { translate: 0 -4px; } }
.wb-hint[hidden] { display: none; }

/* ----- ホイール ----- */
.wb-hud { position: absolute; left: 0; right: 0; bottom: 0; height: 44%; }
.wb-wheel { position: absolute; left: 50%; bottom: 26px; width: min(90%, 320px, 36vh); aspect-ratio: 1; transform: translateX(-50%); }
.wb-disc { position: absolute; inset: 6%; border-radius: 50%; border: 5px solid #f5c04a; background: radial-gradient(circle, #2f7bc4 0, #1b4a9a 52%, #12255a 100%); box-shadow: 0 0 0 4px #5a3b0a, 0 0 26px rgba(255, 190, 60, .55), inset 0 0 30px rgba(0, 0, 0, .55); touch-action: none; }
.wb-disc::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from -90deg, rgba(255, 230, 120, .26) 0 180deg, transparent 180deg); }   /* 上の半分＝たたかう席 */
.wb-disc::after { content: ""; position: absolute; inset: 24%; border-radius: 50%; border: 2px dashed rgba(255, 220, 140, .5); }
.wb-ring2 { position: absolute; inset: 0; transform: rotate(var(--rot)); transition: --rot .34s cubic-bezier(.3, .8, .3, 1); }
.wb-slot { position: absolute; left: 50%; top: 50%; width: 27%; aspect-ratio: 1; margin: -13.5% 0 0 -13.5%; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--head);
  transform: rotate(var(--a)) translateY(-133%) rotate(calc(var(--a) * -1 - var(--rot))); }
.wb-slot.empty { visibility: hidden; }
.wb-slot:not(.front) { opacity: .72; }
.wb-slot.dead img { filter: grayscale(1) brightness(.55); }
.wb-slot .wb-sl { position: absolute; right: -6%; top: -4%; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; background: linear-gradient(#ffe27a, #ffa41c); color: #3a1d00; font: 700 10px var(--body); }
.wb-slot .wb-sn { position: absolute; left: -12%; right: -12%; bottom: -7px; padding: 1px 0; border-radius: 8px; background: rgba(10, 8, 40, .9); color: #fff; font: 700 10px/1.3 var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-slot.ready::after { content: "ひっさつ・" attr(data-sk); position: absolute; left: 50%; top: -17px; transform: translateX(-50%); padding: 0 6px; border-radius: 8px; background: var(--wb-org); color: #fff; font: 700 10px var(--head); white-space: nowrap; }
@keyframes wb-ready { to { box-shadow: 0 0 0 3px #fff, 0 0 26px 10px var(--wb-yel); } }
.wb-center { position: absolute; left: 50%; top: 50%; width: 24%; aspect-ratio: 1; margin: -12% 0 0 -12%; border-radius: 50%; border: 3px solid #f5c04a; background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .5), transparent 40%), #1b4a9a; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; font: 700 10px/1.2 var(--head); box-shadow: 0 0 0 3px var(--wb-navy); overflow: hidden; }
.wb-center img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.wb-center span { padding: 2px; }
.wb-turn { position: absolute; top: 46%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; border: 3px solid #fff; background: #3b82d6; color: #fff; font: 700 14px var(--head); cursor: pointer; z-index: 3; box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.wb-turn.l { left: -1%; } .wb-turn.r { right: -1%; }
.wb-side { position: absolute; bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.wb-side.l { left: 10px; } .wb-side.r { right: 10px; }
.wb-btn { width: 66px; height: 66px; border-radius: 50%; border: 4px solid #fff; color: #fff; font: 700 13px/1.1 var(--head); text-shadow: 0 2px 0 rgba(0, 0, 0, .45); cursor: pointer;
  background: radial-gradient(circle at 32% 22%, rgba(255, 255, 255, .8) 0 9%, transparent 32%), var(--c); box-shadow: 0 5px 0 rgba(0, 0, 0, .35), 0 0 0 3px var(--wb-navy); }
.wb-btn:active { transform: translateY(3px); }
.wb-btn:disabled { filter: grayscale(.8); opacity: .6; }
.wb-btn.run { --c: #3b82d6; } .wb-btn.spd { --c: #8a5be0; font-size: 12px; }

/* ----- ひっさつのタイミングゲーム ----- */
.wb-sou { position: absolute; inset: 0; z-index: 10; background: rgba(10, 6, 40, .72); display: flex; align-items: center; justify-content: center; flex-direction: column; touch-action: manipulation; }
.wb-sou-t { position: absolute; top: 22%; font: 700 22px var(--head); color: #fff; text-shadow: 0 3px 0 #0b0826; }
.wb-sou-c { position: relative; width: 300px; height: 300px; }
.wb-sou-c div { position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.wb-sou-target { width: 88px; height: 88px; border: 5px solid var(--wb-yel); box-shadow: 0 0 20px var(--wb-yel), inset 0 0 20px rgba(255, 210, 63, .5); }
.wb-sou-ring { width: 300px; height: 300px; border: 6px solid var(--wb-cyan); box-shadow: 0 0 18px var(--wb-cyan); }
.wb-sou-res { position: absolute; top: 64%; font: 700 34px var(--head); color: var(--wb-yel); text-shadow: 0 3px 0 #0b0826; }

/* ----- けっか ----- */
.wb-result { position: absolute; inset: 0; z-index: 11; background: rgba(10, 6, 40, .8); display: flex; align-items: center; justify-content: center; }
.wb-rcard { width: min(92%, 400px); padding: 16px; border: 4px solid var(--wb-cyan); border-radius: 18px; background: linear-gradient(var(--wb-navy2), #15113d); color: #fff; box-shadow: 0 0 0 4px var(--wb-navy), 0 0 26px rgba(71, 227, 255, .6); text-align: center; }
.wb-rcard h2 { margin: 0 0 10px; font: 700 26px var(--head); color: var(--wb-yel); text-shadow: 0 3px 0 #0b0826; }
.wb-rrow { display: flex; align-items: center; gap: 10px; padding: 5px 4px; border-bottom: 1px solid rgba(127, 233, 255, .25); text-align: left; font: 13px var(--body); }
.wb-rrow img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; background: #dbe6ff; border: 2px solid #fff; }
.wb-rrow b { flex: 1; font-family: var(--head); }
.wb-rrow em { font-style: normal; color: #ffd23f; font-weight: 700; }
.wb-rok { margin-top: 14px; padding: 10px 40px; border: 4px solid #fff; border-radius: 999px; background: #3fae58; color: #fff; font: 700 18px var(--head); cursor: pointer; box-shadow: 0 5px 0 rgba(0, 0, 0, .35); }


@media (prefers-reduced-motion: reduce) { .wb-ring2 { transition: none; } .wb-unit.focus::before, .wb-hint, .wb-slot.ready .wb-soul { animation: none; } }


/* ----- ホイールの席：ひっさつゲージ＝顔のまわりの輪 ／ HP＝顔の下のバー ----- */
.wb-soul { position: absolute; inset: 0; border-radius: 50%; padding: 6px; background: conic-gradient(#ffb02e calc(var(--s, 0) * 1%), #1d1a52 0); box-shadow: 0 0 0 3px #fff, 0 4px 8px rgba(0, 0, 0, .55); }
.wb-face { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #dbe6ff; border: 2px solid #0b0826; }
.wb-face img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.wb-slot:not(.front) .wb-soul { box-shadow: 0 0 0 3px #8d8bb8, 0 4px 8px rgba(0, 0, 0, .55); }
.wb-hb { position: absolute; left: 6%; right: 6%; bottom: -17px; height: 8px; border-radius: 999px; background: #0b0826; border: 1.5px solid #fff; overflow: hidden; }
.wb-hb i { display: block; height: 100%; width: 100%; background: #3fd35a; transition: width .25s; }
.wb-slot.ready .wb-soul { box-shadow: 0 0 0 3px var(--wb-yel), 0 0 18px 6px var(--wb-yel); animation: wb-ready .7s ease-in-out infinite alternate; }
.wb-unit.focus { --rc: #ff3b3b; }
.wb-banner { white-space: pre-line; line-height: 1.25; }

/* ----- 登場 ----- */
.wb-unit.e.enter .wb-img { animation: wb-in-e .8s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes wb-in-e { from { translate: 0 -60px; opacity: 0; scale: .5; } }
.wb-wheel { animation: wb-wheel-in .7s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes wb-wheel-in { from { transform: translateX(-50%) translateY(120%) scale(.6); opacity: 0; } }

/* ----- ひっさつのミニゲーム（れんだ・まる） ----- */
.wb-sou { touch-action: none; }
.wb-sou-tap { font-size: 120px; line-height: 1; transition: transform .05s; filter: drop-shadow(0 0 16px #ffd23f); }
.wb-sou-gauge { width: 70%; max-width: 300px; height: 22px; margin-top: 22px; border: 3px solid #fff; border-radius: 999px; background: #0b0826; overflow: hidden; }
.wb-sou-gauge i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff9f1c, #ffd23f); }
.wb-sou-draw { position: absolute; inset: 0; touch-action: none; }

/* ----- なかまになりたそうに こちらを みている ----- */
.wb-friend .wb-fcard { position: relative; width: min(88%, 340px); padding: 22px 16px 18px; border: 4px solid #ffd23f; border-radius: 20px; background: linear-gradient(var(--wb-navy2), #15113d); box-shadow: 0 0 0 4px var(--wb-navy), 0 0 34px rgba(255, 210, 63, .7); text-align: center; color: #fff; overflow: hidden; }
.wb-fglow { position: absolute; inset: -40%; background: conic-gradient(rgba(255, 210, 63, 0), rgba(255, 210, 63, .35), rgba(255, 210, 63, 0) 25%, rgba(255, 210, 63, .35) 50%, rgba(255, 210, 63, 0) 75%, rgba(255, 210, 63, .35), rgba(255, 210, 63, 0)); animation: wb-spin 6s linear infinite; }
@keyframes wb-spin { to { transform: rotate(360deg); } }
.wb-fcard img { position: relative; width: 150px; height: 150px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 4px solid #fff; background: #dbe6ff; animation: wb-float 1.4s ease-in-out infinite alternate; }
@keyframes wb-float { to { transform: translateY(-8px); } }
.wb-fcard p { position: relative; margin: 12px 0 14px; font: 700 16px/1.6 var(--head); white-space: pre-line; text-shadow: 0 2px 0 #0b0826; }
.wb-fcard p.big { font-size: 24px; padding: 60px 0; color: #ffd23f; }
.wb-fbtns { position: relative; display: flex; gap: 10px; justify-content: center; }
.wb-fbtns .wb-rok { margin-top: 0; padding: 10px 18px; font-size: 16px; }
.wb-fbtns .no { background: #566274; }
