:root {
  --bg: #14112b;
  --ink: #fff;
  --pink: #ff3d8b;
  --cyan: #2ee6ff;
  --yellow: #ffd23f;
  --green: #7cff6b;
  --panel: rgba(20, 16, 48, .92);
  --font: 'M PLUS Rounded 1c', system-ui, sans-serif;
  --display: 'Dela Gothic One', 'M PLUS Rounded 1c', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; font-family: var(--font); user-select: none; -webkit-user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
canvas { display: block; position: fixed; inset: 0; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#xpbar { position: absolute; top: var(--safe-t); left: 0; right: 0; height: 14px; background: rgba(0,0,0,.55); border-bottom: 2px solid rgba(255,255,255,.15); }
#xpbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2ee6ff, #7cff6b); box-shadow: 0 0 12px #2ee6ff; transition: width .12s; }
#xpbar span { position: absolute; right: 8px; top: -1px; font-size: 12px; font-weight: 900; text-shadow: 0 1px 2px #000; }
#hudTop { position: absolute; top: calc(var(--safe-t) + 20px); left: 8px; right: 8px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 6px; }
#slots { display: flex; flex-wrap: wrap; gap: 3px; max-width: 46vw; }
#slots span { width: 26px; height: 26px; border-radius: 7px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: 15px; position: relative; }
#slots span.evo { border-color: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
#slots span em { position: absolute; right: -2px; bottom: -4px; font-style: normal; font-size: 9px; font-weight: 900; background: #000; border-radius: 4px; padding: 0 2px; }
#slots .br { flex-basis: 100%; height: 0; width: 0; border: none; background: none; }
#timer { font-family: var(--display); font-size: clamp(26px, 6vw, 40px); text-shadow: 0 0 10px var(--pink), 0 2px 0 #000; letter-spacing: .04em; }
#counts { justify-self: end; text-align: right; font-weight: 900; font-size: clamp(15px, 3.6vw, 20px); text-shadow: 0 2px 0 #000; line-height: 1.25; }
#fans { color: #fff; display: inline-block; transform-origin: right center; }
#fans.bump { animation: bump .45s ease-out; }
@keyframes bump { 30% { transform: scale(1.45); color: var(--yellow); text-shadow: 0 0 14px var(--yellow); } }
#gala { color: var(--yellow); font-size: .85em; }
#fever { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 14px); width: min(70vw, 420px); display: flex; align-items: center; gap: 8px; }
#fever b { font-family: var(--display); font-size: 14px; color: var(--pink); text-shadow: 0 0 8px var(--pink); }
#fever .gauge { flex: 1; height: 12px; border-radius: 6px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.3); overflow: hidden; }
#fever .gauge i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff3d8b, #ffd23f); transition: width .15s; }
#fever.full .gauge i { animation: rainbow .4s linear infinite; }
#fever.on b { animation: blink .25s steps(2) infinite; }
@keyframes rainbow { 0% { filter: hue-rotate(0); } 100% { filter: hue-rotate(360deg); } }
@keyframes blink { 50% { opacity: .3; } }
#hint { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 150px); transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: rgba(0,0,0,.65); font-weight: 900; font-size: 15px; white-space: nowrap; animation: hintPulse 1.2s ease-in-out infinite alternate; }
@keyframes hintPulse { to { transform: translateX(-50%) scale(1.06); } }
#hpbar { position: absolute; width: 56px; height: 7px; margin-left: -28px; border-radius: 4px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.5); overflow: hidden; }
#hpbar i { display: block; height: 100%; width: 100%; background: #ff4d6d; }
#boss { position: absolute; top: calc(var(--safe-t) + 164px); left: 50%; transform: translateX(-50%); width: min(80vw, 480px); text-align: center; }
#boss b { font-family: var(--display); font-size: 15px; text-shadow: 0 0 8px #a06bff, 0 2px 0 #000; }
#boss .gauge { height: 10px; border-radius: 5px; background: rgba(0,0,0,.6); border: 1px solid #a06bff; overflow: hidden; margin-top: 2px; }
#boss .gauge i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #a06bff, #ff3d8b); }
#pauseBtn { pointer-events: auto; position: absolute; top: calc(var(--safe-t) + 66px); right: 8px; width: 40px; height: 40px; border-radius: 12px; border: 2px solid rgba(255,255,255,.4); background: rgba(0,0,0,.45); color: #fff; font-size: 16px; font-weight: 900; }
#dashBtn { pointer-events: auto; position: absolute; right: 18px; bottom: calc(var(--safe-b) + 48px); width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--cyan); background: rgba(46,230,255,.18); color: #fff; font-family: var(--display); font-size: 15px; box-shadow: 0 0 16px rgba(46,230,255,.5); display: none; }
#dashBtn.cool { opacity: .4; }
#dashBtn.onbeat { background: rgba(255,61,139,.45); border-color: var(--pink); }
.touch #dashBtn { display: block; }
#stick { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); background: rgba(255,255,255,.07); }
#stick i { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: rgba(255,255,255,.55); }

#announce { position: fixed; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; font-family: var(--display); font-size: clamp(28px, 8vw, 64px); line-height: 1.15; text-shadow: 0 0 18px var(--pink), 0 4px 0 #000; opacity: 0; transform: scale(.8); transition: opacity .2s, transform .25s; padding: 0 12px; }
#announce small { display: block; font-family: var(--font); font-weight: 900; font-size: clamp(14px, 3.6vw, 22px); text-shadow: 0 2px 0 #000; margin-top: 6px; }
#announce.show { opacity: 1; transform: scale(1); }
#vignette { position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px 40px rgba(255,0,60,.0); transition: box-shadow .25s; }
#vignette.hurt { box-shadow: inset 0 0 120px 40px rgba(255,0,60,.55); transition: none; }
#beatflash { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 55%, rgba(255,61,139,0) 40%, rgba(255,61,139,.18)); opacity: 0; }

/* ---------- 画面（パネル） ---------- */
#screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center; padding: calc(var(--safe-t) + 16px) 16px calc(var(--safe-b) + 28px); overflow-y: auto; touch-action: pan-y; background: radial-gradient(ellipse at 50% 30%, rgba(40,20,90,.55), rgba(10,8,25,.82)); }
#screen.clear { background: transparent; pointer-events: none; }
#screen.titlescreen { justify-content: space-between; background: linear-gradient(180deg, rgba(20,17,43,.75), rgba(20,17,43,0) 30%, rgba(20,17,43,0) 50%, rgba(20,17,43,.85) 75%); }
.title-top, .title-bottom { display: flex; flex-direction: column; align-items: center; width: 100%; }
.title-bottom .btns { margin-top: 0; }
#screen.clear > * { pointer-events: auto; }
.logo { font-family: var(--display); font-size: clamp(44px, 12vw, 96px); line-height: 1; text-align: center; color: #fff; text-shadow: 0 0 22px var(--pink), 0 0 4px #fff, 0 6px 0 #6b1340; letter-spacing: .02em; }
.logo small { display: block; font-size: .42em; color: var(--cyan); text-shadow: 0 0 14px var(--cyan), 0 3px 0 #0b4b57; letter-spacing: .12em; }
.subtitle { margin: 10px 0 0; font-weight: 900; font-size: clamp(16px, 4.2vw, 24px); color: var(--yellow); text-shadow: 0 2px 0 #000; text-align: center; }
.panel { background: var(--panel); border: 2px solid rgba(255,255,255,.18); border-radius: 22px; padding: 18px; width: min(560px, 100%); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.panel h2 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: clamp(22px, 6vw, 32px); text-align: center; text-shadow: 0 0 12px var(--pink); }
.panel p { margin: 6px 0; line-height: 1.6; color: #dcd8ff; font-size: 14px; }
.btns { display: flex; flex-direction: column; gap: 10px; width: min(380px, 100%); margin-top: 18px; }
.btn { border: none; border-radius: 16px; padding: 14px 18px; font-size: 19px; font-weight: 900; color: #fff; background: linear-gradient(180deg, #ff5ea0, #e01e6c); box-shadow: 0 5px 0 #8a0f40, 0 0 20px rgba(255,61,139,.45); text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.btn small { display: block; font-size: 12px; font-weight: 800; opacity: .9; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #8a0f40; }
.btn.cyan { background: linear-gradient(180deg, #4ff0ff, #08a9c9); box-shadow: 0 5px 0 #05607a, 0 0 18px rgba(46,230,255,.4); color: #06222b; text-shadow: none; }
.btn.gold { background: linear-gradient(180deg, #ffe680, #f0a91c); box-shadow: 0 5px 0 #8a5a05, 0 0 18px rgba(255,210,63,.5); color: #3a2400; text-shadow: none; }
.btn.hard { background: linear-gradient(180deg, #ff8a3d, #d9230f); box-shadow: 0 5px 0 #7a1405, 0 0 20px rgba(255,90,20,.5); }
.btn.ghost { background: rgba(255,255,255,.1); box-shadow: 0 4px 0 rgba(0,0,0,.4); border: 2px solid rgba(255,255,255,.25); font-size: 16px; }
.btn.x { background: #000; box-shadow: 0 5px 0 #444; border: 2px solid #555; }
.btn[disabled] { opacity: .45; filter: grayscale(.7); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.small-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 16px; font-size: 13px; }
.small-links a, .small-links button { color: #b8b2ff; background: none; border: none; font-size: 13px; font-weight: 800; text-decoration: underline; padding: 4px; }
.best { margin-top: 10px; font-size: 13px; color: #b8b2ff; font-weight: 800; text-align: center; }
.wallet { position: absolute; top: calc(var(--safe-t) + 12px); right: 14px; font-weight: 900; color: var(--yellow); text-shadow: 0 2px 0 #000; font-size: 18px; }

/* レベルアップのカード */
.lvtitle { font-family: var(--display); font-size: clamp(30px, 8vw, 52px); color: var(--yellow); text-shadow: 0 0 18px #ff9d00, 0 4px 0 #000; text-align: center; }
.lvline { font-weight: 900; color: #fff; text-shadow: 0 2px 0 #000; margin: 4px 0 12px; text-align: center; font-size: 15px; }
.cards { display: flex; flex-direction: column; gap: 10px; width: min(520px, 100%); }
.card { display: grid; grid-template-columns: 54px 1fr; gap: 4px 12px; align-items: center; text-align: left; border: 2px solid rgba(255,255,255,.25); border-radius: 18px; padding: 12px 14px; background: linear-gradient(180deg, rgba(60,40,140,.95), rgba(30,20,80,.95)); color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.45); animation: cardIn .25s backwards; }
.card:nth-child(2) { animation-delay: .06s; } .card:nth-child(3) { animation-delay: .12s; } .card:nth-child(4) { animation-delay: .18s; }
@keyframes cardIn { from { transform: translateY(20px) scale(.95); opacity: 0; } }
.card:hover, .card:focus-visible { border-color: var(--cyan); outline: none; transform: translateY(-2px); }
.card .ic { grid-row: span 2; font-size: 36px; width: 54px; height: 54px; display: grid; place-items: center; background: rgba(0,0,0,.35); border-radius: 14px; }
.card b { font-size: 18px; }
.card b em { font-style: normal; font-size: 12px; color: var(--cyan); margin-left: 6px; }
.card b .new { color: var(--green); }
.card small { font-size: 13px; color: #d6d0ff; line-height: 1.45; }
.card.evo { background: linear-gradient(180deg, #8a5a05, #3a2400); border-color: var(--yellow); box-shadow: 0 5px 0 #000, 0 0 24px rgba(255,210,63,.6); }
.card.evo b em { color: var(--yellow); }
.card kbd { font-family: inherit; font-size: 11px; opacity: .6; margin-left: 4px; }

/* 結果 */
.result-rank { font-family: var(--display); font-size: clamp(30px, 9vw, 56px); text-align: center; color: var(--yellow); text-shadow: 0 0 18px #ff9d00, 0 4px 0 #000; line-height: 1.1; }
.result-rank small { display: block; font-family: var(--font); font-size: 15px; color: #fff; font-weight: 900; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 4px; }
.stats div { background: rgba(0,0,0,.35); border-radius: 12px; padding: 8px 10px; }
.stats small { display: block; font-size: 12px; color: #b8b2ff; font-weight: 800; }
.stats b { font-size: 22px; }
.stats .big { grid-column: span 2; text-align: center; }
.stats .big b { font-size: 36px; color: var(--yellow); }
.build { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; }
.build span { font-size: 20px; background: rgba(0,0,0,.35); border-radius: 8px; padding: 2px 6px; }
.build span.evo { box-shadow: 0 0 0 2px var(--yellow); }
.joyman-cta { margin-top: 14px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,61,139,.25), rgba(46,230,255,.18)); border: 1px solid rgba(255,255,255,.25); text-align: center; font-size: 13px; line-height: 1.55; }
.joyman-cta b { color: var(--yellow); }
.joyman-cta .row { margin-top: 8px; }
.joyman-cta a { display: block; padding: 9px 6px; border-radius: 12px; background: rgba(0,0,0,.45); color: #fff; font-weight: 900; text-decoration: none; font-size: 13px; }

/* 楽屋（強化ショップ） */
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; width: 100%; padding: 2px; }
.shop button { display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 14px; border: 2px solid rgba(255,255,255,.2); background: rgba(40,28,100,.9); color: #fff; padding: 10px 6px; }
.shop button .ic { font-size: 26px; }
.shop button b { font-size: 14px; }
.shop button small { font-size: 11px; color: #cfc8ff; line-height: 1.35; min-height: 2.7em; }
.shop button .pips { letter-spacing: 2px; color: var(--cyan); font-size: 11px; }
.shop button .cost { font-weight: 900; color: var(--yellow); }
.shop button.max .cost { color: var(--green); }
.shop button[disabled] { opacity: .5; }

.toggle { display: flex; flex-wrap: wrap; gap: 6px 8px; justify-content: space-between; align-items: center; padding: 10px 4px; border-bottom: 1px solid rgba(255,255,255,.1); font-weight: 800; }
.toggle button { min-width: 92px; border-radius: 999px; border: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; padding: 6px 14px; font-weight: 900; }
.toggle button.on { background: var(--cyan); color: #06222b; border-color: var(--cyan); }
.toggle input[type=range] { width: 140px; accent-color: var(--pink); }
.toggle input:not([type]) { width: 150px; padding: 6px 10px; border-radius: 10px; border: 2px solid rgba(255,255,255,.3); background: rgba(0,0,0,.3); color: #fff; font: inherit; font-weight: 800; user-select: text; -webkit-user-select: text; }

.weapons-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 10px; }
.weapons-pick button { border-radius: 14px; border: 2px solid rgba(255,255,255,.2); background: rgba(40,28,100,.9); color: #fff; padding: 8px 4px; font-weight: 900; font-size: 12px; }
.weapons-pick button .ic { display: block; font-size: 26px; }
.weapons-pick button.sel { border-color: var(--yellow); box-shadow: 0 0 12px rgba(255,210,63,.6); }
.weapons-pick button[disabled] { opacity: .35; }

.daily-tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--pink); color: #fff; font-weight: 900; margin-bottom: 4px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 90px); transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 900; z-index: 20; pointer-events: none; animation: toastIn 2.2s forwards; white-space: nowrap; }
@keyframes toastIn { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

#loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: radial-gradient(ellipse at 50% 30%, #2a1660, #14112b); z-index: 10; transition: opacity .4s; }
#loading .bar { width: min(70vw, 320px); height: 12px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
#loading .bar i { display: block; width: 5%; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width .2s; }
#loading p { margin: 0; color: #b8b2ff; font-weight: 800; font-size: 14px; text-align: center; padding: 0 20px; }
#loading.done { opacity: 0; pointer-events: none; }
#credit { position: fixed; right: 8px; bottom: calc(var(--safe-b) + 2px); font-size: 10px; color: rgba(255,255,255,.5); pointer-events: none; z-index: 30; }
/* プレイ中は、画面のいちばん下の端（FEVER ゲージの下のすき間）に小さく。常に出すが、遊びのじゃまにならないように */
.playing #credit { top: auto; bottom: calc(var(--safe-b) + 1px); right: auto; left: 50%; transform: translateX(-50%); font-size: 8px; color: rgba(255,255,255,.4); white-space: nowrap; }

@media (min-width: 900px) {
  .cards { flex-direction: row; width: min(900px, 100%); }
  .card { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 18px 14px; flex: 1; }
  .card .ic { grid-row: auto; }
}

.unlocks { margin-top: 10px; display: grid; gap: 6px; }
.unlocks div { background: linear-gradient(90deg, rgba(255,210,63,.25), rgba(255,210,63,.05)); border: 1px solid rgba(255,210,63,.5); border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.unlocks span { color: var(--yellow); font-weight: 900; }
.achv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.achv div { background: rgba(0,0,0,.3); border-radius: 10px; padding: 6px 10px; font-size: 13px; opacity: .55; }
.achv div.got { opacity: 1; border: 1px solid rgba(255,210,63,.5); }
.achv small { display: block; font-size: 11px; color: #cfc8ff; }

@media (orientation: landscape) and (min-width: 700px) {
  #screen.titlescreen { align-items: flex-end; justify-content: center; gap: 18px; padding-right: max(4vw, 16px); background: linear-gradient(90deg, rgba(20,17,43,0) 35%, rgba(20,17,43,.85) 70%); }
  .title-top, .title-bottom { width: min(460px, 52vw); }
  .titlescreen .logo { font-size: clamp(40px, 6.4vw, 84px); }
  .titlescreen .subtitle { font-size: clamp(14px, 1.6vw, 20px); }
}

.challenge { width: min(380px, 100%); margin-bottom: 10px; border: 2px dashed var(--yellow); border-radius: 16px; padding: 10px 14px; background: rgba(255,210,63,.15); color: #fff; text-align: center; animation: pulse2 1s ease-in-out infinite alternate; }
@keyframes pulse2 { to { transform: scale(1.04); } }
.challenge b { display: block; font-size: 18px; color: var(--yellow); }
.challenge span { font-size: 13px; font-weight: 800; }
.vs { text-align: center; margin: 8px 0; padding: 8px; border-radius: 12px; background: rgba(0,0,0,.35); font-weight: 800; }
.vs.won { background: linear-gradient(90deg, rgba(255,210,63,.35), rgba(255,61,139,.3)); }
.vs b { color: var(--yellow); }

.slots { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: min(720px, 100%); }
.slot { flex: 1 1 180px; max-width: 240px; display: grid; justify-items: center; gap: 4px; padding: 16px 12px; border-radius: 18px; border: 2px solid rgba(255,255,255,.25); background: linear-gradient(180deg, rgba(60,40,140,.95), rgba(30,20,80,.95)); text-align: center; min-height: 160px; }
.slot .ic { font-size: 44px; width: 64px; height: 64px; display: grid; place-items: center; background: rgba(0,0,0,.35); border-radius: 16px; }
.slot b { font-size: 16px; }
.slot small { font-size: 12px; color: #d6d0ff; line-height: 1.4; }
.slot.done { border-color: var(--cyan); box-shadow: 0 0 18px rgba(46,230,255,.4); animation: pop .3s; }
.slot.done.evo { border-color: var(--yellow); background: linear-gradient(180deg, #8a5a05, #3a2400); box-shadow: 0 0 24px rgba(255,210,63,.6); }
@keyframes pop { 50% { transform: scale(1.08); } }

/* ゲームパッドで操作しているときだけ、選ばれているボタンを光らせる */
.pad #screen button:focus { outline: 3px solid var(--yellow); outline-offset: 3px; }
.btn:focus-visible, .shop button:focus-visible, .weapons-pick button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* 英語のロゴは横に長いので小さめに */
html[lang=en] .logo { font-size: clamp(34px, 10vw, 84px); }
html[lang=en] .titlescreen .logo { font-size: clamp(34px, 10vw, 84px); }
/* 縦長のスマホ：所持ギャラとロゴが重ならないように少し下げ、ボタンを詰めて高木を見せる */
@media (orientation: portrait) {
  .titlescreen .title-top { margin-top: 22px; }
  .titlescreen .btn { padding: 10px 14px; font-size: 17px; }
  .titlescreen .btn small { font-size: 11px; }
  .titlescreen .btns { gap: 8px; }
}

/* ---------- 高木スロット（パチンコ風）---------- */
#slot { position: absolute; left: 50%; top: calc(var(--safe-t) + 66px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform .25s, top .25s; pointer-events: none; }
#slot .reels { display: flex; gap: 4px; padding: 4px 6px; border-radius: 12px; background: linear-gradient(180deg, #1b1240, #090616); border: 2px solid rgba(255,255,255,.3); box-shadow: 0 0 12px rgba(46,230,255,.3); }
#slot .reels b { width: 34px; height: 34px; display: grid; place-items: center; font-size: 22px; font-family: var(--display); font-weight: 400; color: var(--yellow); background: rgba(255,255,255,.08); border-radius: 8px; }
#slot .reels b.stop { animation: reelStop .18s; }
@keyframes reelStop { 50% { transform: translateY(4px) scale(1.1); } }
#slot .holds { display: flex; gap: 5px; height: 10px; }
#slot .holds i { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.7); }
#slot .holds i.empty { background: rgba(255,255,255,.12); box-shadow: none; }
#slot .holds i.blue { background: #3d8bff; box-shadow: 0 0 8px #3d8bff; }
#slot .holds i.green { background: #39e75f; box-shadow: 0 0 8px #39e75f; }
#slot .holds i.red { background: #ff2a4a; box-shadow: 0 0 10px #ff2a4a; animation: blink .3s steps(2) infinite; }
#slot .holds i.rainbow { background: linear-gradient(90deg, #f55, #fd5, #5f5, #5df, #a5f); box-shadow: 0 0 12px #fff; animation: rainbow .5s linear infinite; }
#slot .slotmsg { font-family: var(--display); font-size: 14px; color: #fff; text-shadow: 0 0 8px var(--pink), 0 2px 0 #000; min-height: 1em; white-space: nowrap; }
#slot.st .reels { border-color: #ff2a4a; box-shadow: 0 0 16px #ff2a4a; }
#slot.reach { top: 15%; transform: translateX(-50%) scale(2.1); }
#slot.reach .reels { border-color: var(--yellow); box-shadow: 0 0 24px var(--yellow); }
#slot.hot .reels { border-color: #ff2a4a; box-shadow: 0 0 30px #ff2a4a, 0 0 60px rgba(255,42,74,.5); animation: shake .12s infinite; }
#slot.hot .slotmsg { color: var(--yellow); }
#slot.win { top: 14%; transform: translateX(-50%) scale(2.5); }
#slot.win .reels { animation: rainbow .4s linear infinite; border-color: #fff; box-shadow: 0 0 40px #fff; }
@keyframes shake { 50% { transform: translateX(2px); } }

/* ラップのカットイン：画面を横切る大きな文字 */
#rapcut { position: fixed; left: 0; right: 0; bottom: calc(var(--safe-b) + 196px); pointer-events: none; overflow: hidden; height: 0; transition: height .15s; z-index: 3; }   /* カード選びなどの画面（z 4）より下に。帯がカードを隠さないように */
#rapcut.show { height: clamp(64px, 12vw, 110px); }
#rapcut div { position: absolute; inset: 0; display: grid; place-items: center; white-space: nowrap; font-family: var(--display); font-size: clamp(24px, 6.4vw, 54px); color: #fff; background: linear-gradient(90deg, rgba(255,61,139,.92), rgba(110,40,200,.92), rgba(46,230,255,.92)); text-shadow: 0 3px 0 #000; border-top: 3px solid #fff; border-bottom: 3px solid #fff; padding: 0 12px; }
#rapcut.show div { animation: rapIn .35s cubic-bezier(.2,1.4,.4,1); }
#rapcut.gold div { background: linear-gradient(90deg, #ffb300, #ff3d8b, #ffd23f); color: #fff; }
@keyframes rapIn { from { transform: translateX(-100%) skewX(-20deg); } }
/* 虹色の全画面フラッシュ（大当たり・虹演出） */
#rainbow { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(120deg, rgba(255,80,80,.28), rgba(255,220,80,.28), rgba(80,255,120,.28), rgba(80,200,255,.28), rgba(180,80,255,.28)); mix-blend-mode: screen; z-index: 4; }
#rainbow.flash { animation: rainbowFlash 1.2s ease-out; }
@keyframes rainbowFlash { 0% { opacity: 1; filter: hue-rotate(0); } 100% { opacity: 0; filter: hue-rotate(300deg); } }
.calm #rainbow.flash { animation-duration: 0s; }

.rap { margin: 10px 0; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,61,139,.22), rgba(110,40,200,.22)); border: 1px solid rgba(255,255,255,.25); display: grid; gap: 4px; }
.rap small { font-size: 12px; color: var(--yellow); font-weight: 900; }
.rap div { font-weight: 900; font-size: 16px; line-height: 1.5; }
.rap .btn { justify-self: start; font-size: 13px; padding: 6px 14px; margin-top: 4px; }

/* カードのレア度 */
.card .ic { position: relative; }
.card .rar { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); font-style: normal; font-family: var(--display); font-size: 11px; padding: 0 6px; border-radius: 6px; background: #556; color: #fff; letter-spacing: .05em; }
.card.rar-R .rar { background: #2d6fff; }
.card.rar-SR .rar { background: linear-gradient(90deg, #f0a91c, #ffe680); color: #3a2400; }
.card.rar-SR { border-color: var(--yellow); box-shadow: 0 5px 0 rgba(0,0,0,.45), 0 0 16px rgba(255,210,63,.45); }
.card.rar-SSR .rar { background: linear-gradient(90deg, #f55, #fd5, #5f5, #5df, #a5f); color: #000; animation: rainbow .6s linear infinite; }
.card.rar-SSR { border-color: #fff; animation: cardIn .25s backwards, ssrGlow 1s ease-in-out infinite alternate; }
@keyframes ssrGlow { from { box-shadow: 0 0 18px rgba(255,80,200,.7); } to { box-shadow: 0 0 32px rgba(80,220,255,.9); } }

.missionchip { margin-top: 8px; border: 2px solid rgba(255,255,255,.3); background: rgba(0,0,0,.45); color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 900; font-size: 13px; }
.missionchip b { color: var(--yellow); }
.missions { display: grid; gap: 8px; }
.mission { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.3); font-size: 13px; font-weight: 800; }
.mission small { color: var(--yellow); font-weight: 900; }
.mission .mbar { grid-column: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.mission .mbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); }
.mission .mnum { color: #cfc8ff; font-size: 11px; }
.mission.done { border: 1px solid var(--green); }
.mdetails { margin-top: 8px; font-weight: 900; font-size: 13px; }
.mdetails summary { cursor: pointer; padding: 6px 0; }
.stamps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.stamps div { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.15); }
.stamps small { font-size: 10px; color: #cfc8ff; }
.stamps b { font-size: 11px; color: var(--yellow); }
.stamps .got { opacity: .45; }
.stamps .today { border: 2px solid var(--yellow); box-shadow: 0 0 14px rgba(255,210,63,.6); animation: pop .6s ease-in-out infinite alternate; }

.titles { display: flex; flex-wrap: wrap; gap: 6px; }
.titles button { border-radius: 999px; border: 2px solid rgba(255,255,255,.25); background: rgba(40,28,100,.9); color: #fff; padding: 6px 12px; font-weight: 900; font-size: 12px; }
.titles button.sel { border-color: var(--yellow); box-shadow: 0 0 10px rgba(255,210,63,.6); }
.gacha { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; width: min(720px, 100%); }
.gcard { position: relative; display: grid; justify-items: center; gap: 4px; padding: 18px 8px 10px; border-radius: 14px; border: 2px solid rgba(255,255,255,.25); background: linear-gradient(180deg, rgba(60,40,140,.95), rgba(30,20,80,.95)); text-align: center; animation: flipIn .45s backwards; }
@keyframes flipIn { from { transform: rotateY(90deg) scale(.8); opacity: 0; } }
.gcard b { font-size: 13px; }
.gcard small { font-size: 11px; color: var(--yellow); font-weight: 900; }
.gcard .rar { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-style: normal; font-family: var(--display); font-size: 12px; padding: 0 8px; border-radius: 6px; background: #556; }
.gcard.rar-R .rar { background: #2d6fff; }
.gcard.rar-SR { border-color: var(--yellow); box-shadow: 0 0 16px rgba(255,210,63,.5); }
.gcard.rar-SR .rar { background: linear-gradient(90deg, #f0a91c, #ffe680); color: #3a2400; }
.gcard.rar-SSR { border-color: #fff; animation: flipIn .45s backwards, ssrGlow 1s ease-in-out infinite alternate; }
.gcard.rar-SSR .rar { background: linear-gradient(90deg, #f55, #fd5, #5f5, #5df, #a5f); color: #000; }

#rush { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 60px); transform: translateX(-50%); text-align: center; font-family: var(--display); font-size: 13px; color: #fff; padding: 4px 14px; border-radius: 999px; background: linear-gradient(90deg, #ff3d8b, #ffb300); box-shadow: 0 0 18px rgba(255,180,0,.7); white-space: nowrap; animation: pop .5s ease-in-out infinite alternate; }
#rush b { display: block; font-size: 20px; color: #fff8b0; text-shadow: 0 2px 0 #7a1d00; }

.quiz { display: grid; justify-items: center; gap: 6px; width: min(640px, 100%); padding: 16px; border-radius: 22px; background: rgba(20,16,48,.88); border: 2px solid var(--yellow); box-shadow: 0 0 30px rgba(255,210,63,.4); }
.quiz.boss { border-color: #a06bff; box-shadow: 0 0 34px rgba(160,107,255,.6); }
.qsub { display: grid; justify-items: center; }
.qsub small { font-size: 12px; color: #cfc8ff; font-weight: 900; }
.qsub b { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 8vw, 52px); text-shadow: 0 0 14px var(--pink), 0 3px 0 #000; }
.qsub i { font-style: normal; font-size: 14px; color: var(--cyan); font-weight: 900; }
.qopts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.qopts .card { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 14px 6px; }
.qopts .card b { font-size: clamp(15px, 4vw, 20px); }
.qopts .card small { font-size: 11px; color: var(--cyan); }
.qopts .card.right { border-color: var(--green); background: linear-gradient(180deg, #1f7a3a, #0c3a1a); box-shadow: 0 0 20px rgba(124,255,107,.7); }
.qopts .card.wrong { opacity: .45; }
.qtime { width: 100%; height: 8px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.qtime i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--pink), var(--yellow)); }

/* ---------- パチンコ演出 ---------- */
/* 確変中：画面のふちが赤く脈打つ */
#stborder { position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 0 rgba(255,30,60,0); transition: box-shadow .3s; z-index: 3; }
#stborder.on { animation: stPulse .9s ease-in-out infinite alternate; }
@keyframes stPulse { from { box-shadow: inset 0 0 30px 6px rgba(255,30,60,.55); } to { box-shadow: inset 0 0 70px 18px rgba(255,30,60,.85); } }
/* スーパーリーチ：暗転＋斜めストライプ＋タイトル＋PUSH ボタン */
#sp { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
#hud { z-index: 2; }
#screen { z-index: 4; }
#announce { z-index: 3; }
#sp .spbg { position: absolute; inset: 0; -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 55%, transparent 40%, #000 85%); mask-image: radial-gradient(ellipse 60% 50% at 50% 55%, transparent 40%, #000 85%); background: repeating-linear-gradient(-45deg, rgba(120,0,30,.55) 0 40px, rgba(10,0,10,.6) 40px 80px); animation: spSlide .6s linear infinite; }
#sp.hot .spbg { background: repeating-linear-gradient(-45deg, rgba(200,0,40,.6) 0 40px, rgba(40,0,0,.65) 40px 80px); }
#sp.gold .spbg { background: repeating-linear-gradient(-45deg, rgba(255,170,0,.5) 0 40px, rgba(60,20,0,.6) 40px 80px); }
@keyframes spSlide { to { background-position: 113px 0; } }
#sp .sptitle { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 2%); text-align: center; font-family: var(--display); font-size: clamp(30px, 9vw, 72px); color: #fff; text-shadow: 0 0 20px #ff2a4a, 0 5px 0 #000; animation: spTitle .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes spTitle { from { transform: scale(3); opacity: 0; } }
#push { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 7%); transform: translateX(-50%); pointer-events: auto; width: clamp(130px, 34vw, 190px); height: clamp(130px, 34vw, 190px); border-radius: 50%; border: 8px solid #fff; background: radial-gradient(circle at 35% 30%, #ff8a8a, #e0001e 60%, #7a0010); color: #fff; font-family: var(--display); font-size: clamp(28px, 8vw, 44px); text-shadow: 0 3px 0 #000; box-shadow: 0 10px 0 #4a000a, 0 0 40px rgba(255,40,60,.8); animation: pushPulse .35s ease-in-out infinite alternate; }
#push.gold { background: radial-gradient(circle at 35% 30%, #fff3a0, #ffb300 60%, #7a4a00); box-shadow: 0 10px 0 #4a2a00, 0 0 50px rgba(255,200,0,.9); }
#push.rainbow { background: conic-gradient(#f55, #fd5, #5f5, #5df, #a5f, #f55); animation: pushPulse .3s ease-in-out infinite alternate, rainbow .8s linear infinite; }
#push.hidden { display: none; }
#push.blue { background: radial-gradient(circle at 35% 30%, #9ad0ff, #1f6bff 60%, #0a2a7a); box-shadow: 0 10px 0 #061a4a, 0 0 30px rgba(40,120,255,.8); }
#push.green { background: radial-gradient(circle at 35% 30%, #c8ffb0, #2fd34a 60%, #0a5a1a); box-shadow: 0 10px 0 #053a10, 0 0 36px rgba(60,255,90,.8); }
#push.red { background: radial-gradient(circle at 35% 30%, #ff8a8a, #e0001e 60%, #7a0010); box-shadow: 0 10px 0 #4a000a, 0 0 46px rgba(255,40,60,.95); }
#push.mash { font-size: clamp(22px, 6.4vw, 36px); animation: pushPulse .12s ease-in-out infinite alternate; }
#push.up { animation: pushUp .35s cubic-bezier(.2,1.8,.4,1); }
#push.rainbow.up { animation: pushUp .35s cubic-bezier(.2,1.8,.4,1), rainbow .8s linear infinite; }
@keyframes pushUp { from { transform: translateX(-50%) scale(1.6); filter: brightness(2.5); } }
#sp .spmeter { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 7% + clamp(150px, 38vw, 215px)); transform: translateX(-50%); width: min(70vw, 360px); height: 16px; border-radius: 9px; background: rgba(0,0,0,.6); border: 3px solid #fff; overflow: hidden; opacity: 0; transition: opacity .2s; }
#sp.mashing .spmeter { opacity: 1; }
#sp .spmeter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2d6fff, #39e75f, #ff2a4a, #ffd23f); transition: width .06s; }
#push:active { transform: translateX(-50%) translateY(8px); box-shadow: 0 2px 0 #4a000a; }
@keyframes pushPulse { to { transform: translateX(-50%) scale(1.08); } }
/* ステップアップ予告 */
#stepup { position: fixed; left: 0; right: 0; top: 47%; text-align: center; pointer-events: none; z-index: 6; }
#stepup div { display: inline-block; font-family: var(--display); font-size: clamp(26px, 7.5vw, 60px); padding: 6px 24px; border-radius: 14px; color: #fff; text-shadow: 0 3px 0 #000; animation: stepIn .45s cubic-bezier(.2,1.6,.4,1); }
#stepup .s1 { background: linear-gradient(90deg, #2d6fff, #2ee6ff); }
#stepup .s2 { background: linear-gradient(90deg, #39e75f, #c4ff3d); color: #102000; text-shadow: none; }
#stepup .s3 { background: linear-gradient(90deg, #ff2a4a, #ff8a00); box-shadow: 0 0 30px #ff2a4a; }
#stepup .s4 { background: linear-gradient(90deg, #f55, #fd5, #5f5, #5df, #a5f); color: #000; text-shadow: none; animation: stepIn .45s cubic-bezier(.2,1.6,.4,1), rainbow .6s linear infinite; }
@keyframes stepIn { from { transform: scale(2.4) rotate(-6deg); opacity: 0; } }
/* 群予告：ファンの大群が画面を横切る */
#parade { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
#parade span { position: absolute; font-size: clamp(30px, 8vw, 54px); animation: paradeRun 1.4s linear forwards; }
@keyframes paradeRun { from { transform: translateX(-20vw); } to { transform: translateX(120vw); } }
#parade b { position: absolute; left: 0; right: 0; top: 18%; text-align: center; font-family: var(--display); font-size: clamp(30px, 9vw, 70px); color: var(--yellow); text-shadow: 0 0 20px #ff9d00, 0 4px 0 #000; animation: spTitle .5s; }
/* 大当たりの V */
#vflash { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(0); font-family: var(--display); font-size: clamp(160px, 50vw, 380px); color: #fff; text-shadow: 0 0 40px #ffd23f, 0 0 80px #ff3d8b, 0 10px 0 #b3001b; pointer-events: none; z-index: 7; opacity: 0; }
#vflash.show { animation: vIn 1.1s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes vIn { 0% { transform: translate(-50%, -50%) scale(4) rotate(-20deg); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; } }
/* フリーズ：画面が真っ暗になって止まる（プレミアム） */
#freeze { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 8; transition: opacity .08s; display: grid; place-items: center; color: #fff; font-family: var(--display); font-size: 40px; }
#freeze.on { opacity: 1; }
/* スロットの特大表示（スーパーリーチ・全回転） */
#slot.sp { top: 13%; transform: translateX(-50%) scale(2.3); }
#slot.zenkaiten .reels { animation: rainbow .3s linear infinite; border-color: #fff; box-shadow: 0 0 40px #fff; }
#slot.zenkaiten { top: 20%; transform: translateX(-50%) scale(3); }
.calm #stborder.on, .calm #parade span { animation: none; }
#sp .sptitle small { display: block; font-size: .42em; color: var(--yellow); margin-top: 4px; }
#slot .holds em { font-style: normal; font-size: 9px; font-weight: 900; color: #ffb3c8; margin-left: 4px; line-height: 10px; white-space: nowrap; }

/* とどめの連打（ラスボス） */
#mash { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding-bottom: calc(var(--safe-b) + 6%); pointer-events: none; background: radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(80,0,40,.55) 90%); }
#mash.hidden { display: none; }
#mash .mtitle { position: absolute; top: calc(var(--safe-t) + 10%); font-family: var(--display); font-size: clamp(34px, 10vw, 80px); color: var(--yellow); text-shadow: 0 0 24px #ff3d8b, 0 5px 0 #000; animation: spTitle .5s cubic-bezier(.2,1.6,.4,1), pulse2 .25s ease-in-out infinite alternate; }
#mash .mcount { font-family: var(--display); font-size: clamp(54px, 16vw, 120px); color: #fff; text-shadow: 0 0 20px #ff3d8b, 0 6px 0 #000; line-height: 1; }
#mash .mcount.bump { animation: bump .12s; }
#mash .mbar { width: min(76vw, 420px); height: 18px; border: 3px solid #fff; border-radius: 10px; background: rgba(0,0,0,.6); overflow: hidden; }
#mash .mbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff3d8b, #ffd23f, #7cff6b); transition: width .06s; }
#mash.full .mbar i { animation: rainbow .5s linear infinite; }
#mashBtn { pointer-events: auto; width: clamp(140px, 38vw, 200px); height: clamp(140px, 38vw, 200px); border-radius: 50%; border: 8px solid #fff; background: radial-gradient(circle at 35% 30%, #fff3a0, #ffb300 60%, #7a4a00); color: #fff; font-family: var(--display); font-size: clamp(24px, 7vw, 40px); text-shadow: 0 3px 0 #000; box-shadow: 0 10px 0 #4a2a00, 0 0 50px rgba(255,200,0,.9); animation: pulse2 .12s ease-in-out infinite alternate; touch-action: manipulation; }
#mashBtn:active { transform: translateY(8px); box-shadow: 0 2px 0 #4a2a00; }
/* 転調!! */
#modulate { position: fixed; left: 0; right: 0; top: calc(var(--safe-t) + 26%); text-align: center; pointer-events: none; z-index: 6; }
#modulate div { display: inline-block; font-family: var(--display); font-size: clamp(28px, 8vw, 62px); color: #fff; padding: 4px 26px; border-radius: 40px; background: linear-gradient(90deg, #b07cff, #2ee6ff, #7cff6b, #ffd23f, #ff3d8b); text-shadow: 0 3px 0 #000, 0 0 16px #000; animation: modIn 1.6s cubic-bezier(.2,1.5,.4,1) forwards, rainbow .9s linear infinite; }
#modulate small { display: block; font-size: .42em; }
@keyframes modIn { 0% { transform: translateY(40px) scale(.6); opacity: 0; } 15% { transform: translateY(0) scale(1.08); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-30px) scale(1); opacity: 0; } }
.tval { display: inline-flex; align-items: center; gap: 6px; }
.tval small { min-width: 52px; text-align: right; font-weight: 900; }
.thelp { margin: -4px 0 8px; font-size: 11px; opacity: .7; text-align: left; }
.keyhint { display: block; font-size: 11px; font-weight: 900; opacity: .75; letter-spacing: .05em; text-shadow: none; }
#push .keyhint, #mashBtn .keyhint { font-size: .36em; margin-top: 2px; }
.touch .keyhint { display: none; }
/* やり込み：段位・芸歴・図鑑 */
.heatbadge { display: inline-block; padding: 0 7px; border-radius: 9px; background: #ff6a00; color: #fff; font-size: .8em; font-weight: 900; vertical-align: middle; }
.career { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px auto 0; font-weight: 900; font-size: 13px; color: #fff; text-shadow: 0 2px 0 #000; }
.cbar { display: inline-block; width: 110px; height: 8px; border-radius: 5px; background: rgba(255,255,255,.2); overflow: hidden; vertical-align: middle; }
.cbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--pink)); transition: width 1.2s cubic-bezier(.2,.8,.3,1); }
.careerres { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: rgba(255,210,63,.1); text-align: center; font-size: 14px; }
.careerres em { font-style: normal; color: var(--yellow); font-weight: 900; animation: pulse2 .4s ease-in-out infinite alternate; display: inline-block; }
.careerres .cbar { display: block; width: auto; margin: 6px 0 2px; height: 10px; }
.careerres small { opacity: .8; }
.heats { display: grid; gap: 6px; max-height: 56vh; overflow-y: auto; }
.heats button { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px; text-align: left; padding: 8px 12px; border-radius: 12px; border: 2px solid rgba(255,106,0,.6); background: rgba(255,106,0,.12); color: #fff; font: inherit; cursor: pointer; }
.heats button b { font-size: 18px; }
.heats button small { font-size: 11px; opacity: .85; }
.heats button span { font-size: 11px; white-space: nowrap; }
.heats button.done { border-color: #7cff6b; }
.heats button:disabled { opacity: .35; cursor: default; }
.dextabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0 10px; }
.dextabs button { padding: 6px 10px; border-radius: 10px; border: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.06); color: #fff; font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; }
.dextabs button small { display: block; font-size: 10px; opacity: .8; }
.dextabs button.sel { border-color: var(--yellow); background: rgba(255,210,63,.18); }
.dexgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; max-height: 50vh; overflow-y: auto; }
.dx { padding: 8px 6px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px dashed rgba(255,255,255,.2); text-align: center; font-size: 12px; }
.dx span { display: block; font-size: 26px; filter: grayscale(1) opacity(.5); }
.dx b { display: block; }
.dx small { display: block; font-size: 10px; opacity: .65; margin-top: 2px; }
.dx.got { border: 1px solid var(--yellow); background: rgba(255,210,63,.1); }
.dx.got span { filter: none; }
.words { display: flex; flex-wrap: wrap; gap: 5px; max-height: 46vh; overflow-y: auto; justify-content: center; }
.words span { padding: 3px 9px; border-radius: 12px; background: rgba(255,61,139,.18); border: 1px solid rgba(255,61,139,.5); font-size: 13px; font-weight: 700; }

/* 目押しのゲージ（ビタ押し・とどめのツッコミ）：針が左右に往復し、まん中で止める */
#gauge { position: fixed; left: 50%; top: 50%; transform: translateX(-50%); width: min(80vw, 440px); z-index: 6; pointer-events: none; text-align: center; }
#gauge.hidden { display: none; }
#gauge .glabel { display: block; font-family: var(--display); font-size: clamp(16px, 4.6vw, 24px); color: #fff; text-shadow: 0 3px 0 #000; margin-bottom: 6px; }
#gauge .gbar { position: relative; height: 30px; border-radius: 16px; border: 3px solid #fff; background: linear-gradient(90deg, #3a1030, #6a1a50 30%, #6a1a50 70%, #3a1030); overflow: hidden; box-shadow: 0 0 20px rgba(0,0,0,.6); }
#gauge .gz { position: absolute; top: 0; bottom: 0; }
#gauge .gz.good { left: 34%; right: 34%; background: rgba(124,255,107,.55); }
#gauge .gz.bita { left: 44%; right: 44%; background: linear-gradient(90deg, #ffd23f, #fff6c0, #ffd23f); box-shadow: 0 0 14px #ffd23f; }
#gauge .needle { position: absolute; top: -4px; bottom: -4px; width: 6px; margin-left: -3px; left: 0; background: #fff; border-radius: 3px; box-shadow: 0 0 10px #fff, 0 0 4px #000; will-change: left; }
#gauge.bita .gbar { animation: rainbow .4s linear infinite; }
#gauge.bita .glabel, #gauge.good .glabel { animation: bump .3s; }
/* カット割りの白フラッシュ */
#cutflash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 7; }
#cutflash.on { animation: cutFlash .22s ease-out; }
@keyframes cutFlash { from { opacity: .55; } to { opacity: 0; } }
#mash.aim .mcount, #mash.aim .mbar { opacity: .35; }
#mash.aim #mashBtn { background: radial-gradient(circle at 35% 30%, #fff, #ff3d8b 60%, #7a0030); }

/* 大当たりの見せ場：回る後光＋特大の文字 */
#jpshow { position: fixed; inset: 0; z-index: 6; pointer-events: none; display: grid; place-items: center; overflow: hidden; }
#jpshow.hidden { display: none; }
#jpshow .rays { position: absolute; left: 50%; top: 42%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax; background: repeating-conic-gradient(rgba(255,210,63,.55) 0 8deg, rgba(255,61,139,.08) 8deg 20deg); animation: jpRays 4s linear infinite, jpFade .4s ease-out; -webkit-mask-image: radial-gradient(circle, transparent 3%, #000 18%, transparent 55%); mask-image: radial-gradient(circle, transparent 3%, #000 18%, transparent 55%); }
#jpshow.kakuhen .rays { background: repeating-conic-gradient(rgba(255,40,70,.4) 0 8deg, rgba(255,210,63,.15) 8deg 20deg); }
#jpshow.big .rays { animation: jpRays 1.6s linear infinite, rainbow 1s linear infinite; }
@keyframes jpRays { to { transform: rotate(360deg); } }
@keyframes jpFade { from { opacity: 0; transform: scale(.3); } }
#jpshow .jpbox { position: relative; top: 3%; text-align: center; animation: jpIn .55s cubic-bezier(.2,1.7,.4,1) .75s both; }   /* V が消えるころに出る */
#jpshow .jpt { display: block; font-family: var(--display); font-size: clamp(54px, 17vw, 150px); line-height: 1; color: #fff; -webkit-text-stroke: 3px #b3001b; text-shadow: 0 0 30px #ffd23f, 0 0 60px #ff3d8b, 0 10px 0 #7a0010; animation: jpPulse .25s ease-in-out infinite alternate; }
#jpshow.kakuhen .jpt { color: #ffe14a; }
#jpshow .jpsym { display: block; font-size: clamp(40px, 12vw, 96px); letter-spacing: .1em; margin-top: 6px; filter: drop-shadow(0 0 16px #fff); animation: jpSym .9s ease-in-out infinite; }
#jpshow .jpsub { display: block; font-style: normal; font-family: var(--display); font-size: clamp(24px, 7vw, 54px); color: var(--yellow); text-shadow: 0 4px 0 #000, 0 0 18px #ff3d8b; margin-top: 4px; }
#jpshow .jpskip { display: block; margin-top: 10px; font-size: 12px; font-weight: 900; color: rgba(255,255,255,.7); text-shadow: 0 2px 0 #000; }
@keyframes jpIn { from { transform: scale(4) rotate(-12deg); opacity: 0; } }
@keyframes jpPulse { to { transform: scale(1.06); } }
@keyframes jpSym { 50% { transform: translateY(-8px) scale(1.08); } }

/* 確変中の帯：リールの下で燃える。最後の 1 回は点滅 */
#kakuban { position: fixed; left: 50%; top: calc(var(--safe-t) + 160px); transform: translateX(-50%); z-index: 3; pointer-events: none; text-align: center; padding: 4px 18px 5px; border-radius: 14px; background: linear-gradient(90deg, #7a0010, #ff2a4a, #ffb300, #ff2a4a, #7a0010); background-size: 200% 100%; box-shadow: 0 0 22px rgba(255,40,60,.85), inset 0 0 0 2px rgba(255,240,180,.8); animation: kakuFlow 1.2s linear infinite, kakuIn .5s cubic-bezier(.2,1.6,.4,1); white-space: nowrap; }
#kakuban.hidden { display: none; }
#kakuban b { display: block; font-family: var(--display); font-size: clamp(18px, 5vw, 26px); color: #fff; text-shadow: 0 2px 0 #7a0010, 0 0 10px #ffd23f; letter-spacing: .05em; }
#kakuban em { display: block; font-style: normal; font-weight: 900; font-size: 13px; color: #fff6c0; text-shadow: 0 2px 0 #000; }
#kakuban em i { font-style: normal; font-family: var(--display); font-size: 22px; color: #fff; margin: 0 2px; }
#kakuban.last { animation: kakuFlow .5s linear infinite, kakuLast .25s ease-in-out infinite alternate; }
#kakuban.bump em i { display: inline-block; animation: bump .35s; }
@keyframes kakuFlow { to { background-position: 200% 0; } }
@keyframes kakuIn { from { transform: translateX(-50%) scale(2.2); opacity: 0; } }
@keyframes kakuLast { to { transform: translateX(-50%) scale(1.12); box-shadow: 0 0 40px #ff2a4a, inset 0 0 0 2px #fff; } }
.calm #kakuban { animation: none; }
/* フィーバーの帯：虹色の FEVER!! と残り時間・増えたファン */
#feverban { position: fixed; left: 12px; bottom: calc(var(--safe-b) + 40px); z-index: 3; pointer-events: none; text-align: left; transform-origin: left center; animation: kakuIn .4s cubic-bezier(.2,1.6,.4,1); }
#feverban.hidden { display: none; }
#feverban b { display: block; font-family: var(--display); font-size: clamp(22px, 6vw, 34px); line-height: 1; background: linear-gradient(90deg, #ff3d8b, #ffd23f, #7cff6b, #2ee6ff, #b07cff, #ff3d8b); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1px rgba(0,0,0,.5); filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 8px rgba(255,61,139,.7)); animation: kakuFlow .8s linear infinite, jpPulse .23s ease-in-out infinite alternate; }
#feverban .fbar { display: block; width: 120px; height: 6px; margin: 3px 0; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
#feverban .fbar i { display: block; height: 100%; background: linear-gradient(90deg, #ff3d8b, #ffd23f, #2ee6ff); transition: width .1s linear; }
#feverban em { font-style: normal; font-weight: 900; font-size: 15px; color: #fff; text-shadow: 0 2px 0 #000; }
.calm #feverban b { animation: none; }
/* 目押しの前の「まって」：灰色で押せない見た目に */
#push.wait { filter: brightness(.55) saturate(.7); animation: none; }   /* 色（結果のヒント）は見せたまま、暗くして押せない感じに */
#mash.wait #mashBtn { background: radial-gradient(circle at 35% 30%, #ddd, #777 60%, #333); box-shadow: 0 6px 0 #222; animation: none; }
#push.wait small, #mash.wait #mashBtn small { display: block; font-size: .45em; }

/* チュートリアル：上部のカード（ステップ・説明・進み具合） */
#tut { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 66px); transform: translateX(-50%); width: min(92vw, 520px); z-index: 4; pointer-events: none; }
.touch #tut { bottom: calc(var(--safe-b) + 146px); }
@keyframes tutIn { from { transform: translateY(16px) scale(.94); opacity: 0; } }
#tut.hidden { display: none; }
#tut .tcard { background: rgba(20,12,40,.86); border: 2px solid rgba(255,210,63,.75); border-radius: 16px; padding: 10px 14px 12px; color: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.45); animation: tutIn .35s cubic-bezier(.2,1.5,.4,1); text-align: left; }
#tut .tstep { display: block; font-size: 11px; font-weight: 900; letter-spacing: .08em; color: var(--yellow); }
#tut .ttitle { display: block; font-family: var(--display); font-size: clamp(18px, 5vw, 24px); margin: 2px 0 4px; }
#tut .ttext { margin: 0; font-size: 14px; line-height: 1.55; }
#tut .tprog { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
#tut .tprog i { flex: 1; height: 8px; border-radius: 5px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; }
#tut .tprog i::after { content: ''; position: absolute; inset: 0; width: var(--k, 0%); background: linear-gradient(90deg, #ff3d8b, #ffd23f); transition: width .25s; }
#tut .tprog em { font-style: normal; font-weight: 900; font-size: 13px; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
#tut .tprog.none { display: none; }
#tut .tbtns { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
#tut .tbtns button { pointer-events: auto; font: inherit; cursor: pointer; }
#tut .tnext { padding: 6px 16px; border-radius: 999px; border: 0; background: var(--pink); color: #fff; font-weight: 900; }
#tut .tnext[hidden] { display: none; }
#tut .tskip { margin-left: auto; background: none; border: 0; color: rgba(255,255,255,.6); font-size: 12px; text-decoration: underline; }
#tut.done .tcard { text-align: center; border-color: var(--pink); }
#tut .tbig { display: block; font-family: var(--display); font-size: clamp(30px, 9vw, 48px); line-height: 1.1; margin: 4px 0; color: var(--yellow); text-shadow: 0 3px 0 #7a1d00; }
#tut .tbig s { color: #9aa0c0; text-decoration-thickness: 3px; margin-right: 6px; }
#tut.done .tbtns { justify-content: center; flex-wrap: wrap; }
#tut .tplay { padding: 10px 22px; border-radius: 999px; border: 0; background: linear-gradient(90deg, #ff3d8b, #ffb300); color: #fff; font-weight: 900; font-size: 16px; }
#tut .ttitlebtn { padding: 10px 16px; border-radius: 999px; border: 2px solid rgba(255,255,255,.4); background: none; color: #fff; font-weight: 900; }
/* チュートリアルのリザルト：あの日 0 人 → 今日 N 人 */
.tutres { text-align: center; }
.tr-rows { display: grid; gap: 4px; margin: 10px auto 6px; max-width: 360px; }
.tr-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label num" "tag num"; align-items: center; padding: 10px 16px; border-radius: 14px; text-align: left; }
.tr-row small { grid-area: label; font-weight: 900; font-size: 13px; }
.tr-row em { grid-area: tag; font-style: normal; font-size: 12px; font-weight: 900; }
.tr-row b { grid-area: num; font-family: var(--display); font-size: clamp(40px, 12vw, 64px); line-height: 1; font-variant-numeric: tabular-nums; }
.tr-row b span { font-size: .4em; margin-left: 2px; }
.tr-row.past { background: rgba(140,150,190,.14); color: #9aa0c0; }
.tr-row.past b { text-decoration: line-through; text-decoration-thickness: 4px; text-decoration-color: rgba(255,61,139,.8); }
.tr-row.now { background: linear-gradient(90deg, rgba(255,61,139,.22), rgba(255,210,63,.22)); border: 2px solid var(--yellow); }
.tr-row.now b { color: var(--yellow); text-shadow: 0 3px 0 #7a1d00, 0 0 18px rgba(255,210,63,.6); }
.tr-row.now b i { font-style: normal; display: inline-block; }
.tr-row.now b i.done { animation: bump .4s; }
.tr-row.now em { color: #ff3d8b; font-size: 15px; }
.tr-arrow { color: var(--yellow); font-size: 14px; opacity: .8; }
.fanwall { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 420px; margin: 6px auto; min-height: 30px; }
.fanwall span { font-size: 22px; line-height: 1; animation: fanPop .35s cubic-bezier(.2,1.8,.4,1); }
@keyframes fanPop { from { transform: scale(0) translateY(10px); opacity: 0; } }
.tr-msg { font-size: 14px; line-height: 1.6; margin: 8px 0 0; }
/* 最後のリールの「止めろ!」：3 つ目が光って、STOP の札が脈打つ。スロット自体もタップで止められる */
#slot.waitstop { pointer-events: auto; cursor: pointer; }
#slot.waitstop .reels b:nth-child(3) { box-shadow: 0 0 0 3px var(--pink), 0 0 18px var(--pink); animation: stopGlow .3s ease-in-out infinite alternate; }
#slot.waitstop .slotmsg { color: #fff; background: var(--pink); padding: 1px 10px; border-radius: 999px; font-weight: 900; animation: pulse2 .25s ease-in-out infinite alternate; }
@keyframes stopGlow { to { background: rgba(255,61,139,.35); } }
/* チュートリアル：読む段は画面を少し暗くして、カードを読みやすく。クリアしたら次へボタンが脈打つ */
#tut.reading::before { content: ''; position: fixed; inset: -100vh -100vw; background: rgba(5,3,15,.35); z-index: -1; }
#tut .tnext .keyhint { display: inline; margin-left: 6px; font-size: 10px; opacity: .8; }
#tut.cleared .tcard { border-color: #7cff6b; }
#tut.cleared .tnext { background: #39c95a; animation: pulse2 .35s ease-in-out infinite alternate; }

/* いま SPACE（STEP）で何が起きるか：高木の足もとに小さく。いつもと違う役割のときはピンクで目立たせる */
#actHint { position: absolute; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 900; color: rgba(255,255,255,.75); text-shadow: 0 1px 0 #000, 0 0 4px #000; pointer-events: none; }
#actHint kbd { font: inherit; padding: 0 5px; margin-right: 4px; border-radius: 4px; border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.4); }
#actHint.hot { color: #fff; font-size: 13px; }
#actHint.hot kbd { background: var(--pink); border-color: #fff; }
#actHint.hot span { animation: pulse2 .3s ease-in-out infinite alternate; display: inline-block; }
.touch #actHint { display: none; }
#dashBtn.hot { background: rgba(255,61,139,.55); border-color: #fff; box-shadow: 0 0 22px rgba(255,61,139,.9); font-size: 14px; }

/* 画面の段組み：確変の帯があるときは、ボスの体力をその下へ */
body.kaku #boss { top: calc(var(--safe-t) + 214px); }
/* アナウンスの小さい版（転調など、優先度の低いお知らせ） */
#announce.mod { font-size: clamp(22px, 6vw, 40px); background: linear-gradient(90deg, #b07cff, #2ee6ff, #7cff6b, #ffd23f, #ff3d8b); -webkit-background-clip: text; background-clip: text; color: transparent; }
#announce.mod small { color: #fff; }

/* ピンチ：体力 30% 以下で、画面のふちが赤く脈打つ */
#vignette.low { animation: lowPulse .9s ease-in-out infinite; }
@keyframes lowPulse { 0%, 100% { box-shadow: inset 0 0 90px 20px rgba(255,0,60,.25); } 50% { box-shadow: inset 0 0 140px 50px rgba(255,0,60,.55); } }
.calm #vignette.low { animation: none; box-shadow: inset 0 0 110px 30px rgba(255,0,60,.35); }
/* 当たった方向：画面のふちに、敵のいる方向へ赤い弧 */
#hitdir { position: fixed; left: 50%; top: 50%; width: 86vmin; height: 86vmin; margin: -43vmin 0 0 -43vmin; border-radius: 50%; pointer-events: none; opacity: 0; border-top: 10px solid rgba(255,40,70,.9); filter: drop-shadow(0 0 10px #ff2846); -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000 45%, #000 55%, transparent 75%); mask-image: linear-gradient(90deg, transparent 25%, #000 45%, #000 55%, transparent 75%); z-index: 2; }
#hitdir.show { animation: hitDir .55s ease-out forwards; }
@keyframes hitDir { 0% { opacity: 1; } 100% { opacity: 0; } }
#hpbar.low { border-color: #ff4d6d; box-shadow: 0 0 8px #ff2846; animation: blink .5s infinite; }

/* はじめての仕組みの説明：下のほうに数秒だけ。操作の邪魔にならないよう、押せない */
#tip { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 270px); transform: translateX(-50%); width: min(90vw, 460px); z-index: 4; pointer-events: none; padding: 8px 14px; border-radius: 14px; background: rgba(20,12,40,.88); border: 2px solid #2ee6ff; box-shadow: 0 6px 24px rgba(0,0,0,.4); text-align: left; animation: tutIn .35s cubic-bezier(.2,1.5,.4,1); }
#tip.hidden { display: none; }
#tip b { display: block; font-size: 12px; font-weight: 900; color: #2ee6ff; letter-spacing: .05em; }
#tip span { display: block; font-size: 14px; line-height: 1.5; color: #fff; }
/* 強化カードの「進化までの道のり」 */
.card .evopath { display: block; margin-top: 4px; padding-top: 3px; border-top: 1px dashed rgba(255,255,255,.25); font-size: 11px; font-weight: 900; color: #ffd23f; }
.card .evopath .ok { color: #7cff6b; }
.card .evopath .ng { color: rgba(255,255,255,.4); }
.card.pairhint { box-shadow: 0 0 0 2px rgba(255,210,63,.6); }
/* 結果画面：ファン数を大きく、ボタンはその直下 */
.res-hero { display: grid; justify-items: center; gap: 2px; margin: 4px 0 2px; }
.res-hero > b { font-family: var(--display); font-size: clamp(40px, 12vw, 60px); line-height: 1.05; color: #fff; text-shadow: 0 0 18px var(--pink), 0 4px 0 #000; font-variant-numeric: tabular-nums; }
.res-hero > b small { font-size: .38em; }
.res-hero span { font-size: 14px; font-weight: 900; }
.res-hero em { font-style: normal; color: #ff3d8b; }
.res-hero #galaEarned { color: #ffd23f; font-size: 18px; }
.panel.result #bRetry { flex: 1.4; }

#muteBtn { pointer-events: auto; position: absolute; top: calc(var(--safe-t) + 112px); right: 8px; width: 40px; height: 40px; border-radius: 12px; border: 2px solid rgba(255,255,255,.4); background: rgba(0,0,0,.45); color: #fff; font-size: 17px; }
#muteBtn.off { border-color: #ff4d6d; }
/* タイミング自動調整 */
.calib { text-align: center; }
.calib-pad { margin: 14px auto 0; width: min(70vw, 260px); height: 150px; border-radius: 20px; border: 3px dashed rgba(255,255,255,.4); display: grid; place-items: center; font-size: 22px; cursor: pointer; user-select: none; touch-action: manipulation; }
.calib-pad.hit { animation: calibHit .18s; }
@keyframes calibHit { 0% { background: rgba(255,61,139,.5); transform: scale(.96); } }
#sCalib { margin-left: 6px; font-size: 12px; padding: 4px 8px; border-radius: 8px; }
/* 保留：色だけでなく形でも見分けられるように（白＝丸、青＝ひし形、緑＝三角、赤＝星、虹＝大きな星） */
#slot .holds i { width: 12px; height: 12px; }
#slot .holds i.blue { border-radius: 2px; transform: rotate(45deg) scale(.82); }
#slot .holds i.green { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
#slot .holds i.red, #slot .holds i.rainbow { border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
#slot .holds i.rainbow { width: 15px; height: 15px; }
.subtitle, .lvline, .tr-msg, #tip span, .ttext { text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
/* キーボード・ゲームパッドで選んでいるボタンが分かるように */
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #2ee6ff; outline-offset: 2px; }
/* ボス戦の 3 連ラップ：お題 → ？ → ？ が、当てるたびに埋まっていく */
.battle .bline { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 6px 0 4px; font-family: var(--display); font-size: clamp(20px, 5.6vw, 30px); }
.battle .bline b { display: grid; justify-items: center; padding: 4px 14px; border-radius: 12px; background: rgba(255,255,255,.08); line-height: 1.15; text-shadow: none; }
.battle .bline b small { font-family: var(--font); font-size: 12px; font-weight: 800; opacity: .8; letter-spacing: .02em; }
/* お題と、そろえた言葉：はっきり読めるように、明るい板に濃い字 */
.battle .bline b.w0 { color: #1a0b2e; background: #fff; box-shadow: 0 0 0 3px #a06bff, 0 4px 0 rgba(0,0,0,.5); }
.battle .bline b.got { color: #1a0b2e; background: #ffd23f; box-shadow: 0 4px 0 rgba(0,0,0,.5); animation: bump .35s; }
.battle .bline b.q { color: rgba(255,255,255,.55); border: 2px dashed rgba(255,255,255,.45); }
.battle .lvline { font-size: 17px; background: rgba(0,0,0,.45); padding: 4px 12px; border-radius: 10px; }
.battle .lvline em { font-style: normal; color: #ffd23f; }
.quiz.battle { background: rgba(14,10,36,.95); }
.battle .bline span { color: #ff3d8b; font-size: .8em; }

/* 客席の空気（FEVER ゲージの左） */
#mood { font-size: 18px; line-height: 1; filter: drop-shadow(0 2px 0 #000); display: inline-block; }
#mood.bump { animation: bump .4s; }
/* 停電：高木のまわりだけ明るい */
body.blackout #vignette { box-shadow: none; background: radial-gradient(circle at 50% 55%, transparent 16%, rgba(0,0,0,.82) 42%); transition: background .4s; }
/* 結果画面のライブレポ */
.report { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(46,230,255,.08); border: 1px solid rgba(46,230,255,.35); text-align: left; }
.report small { display: block; font-weight: 900; color: #2ee6ff; font-size: 12px; margin-bottom: 4px; }
.report p { margin: 0; font-size: 14px; line-height: 1.7; }

/* ---- コンボ（続けて笑わせた数）---- */
#combo { position: absolute; right: calc(var(--safe-r, 0px) + 14px); top: 38%; text-align: right; pointer-events: none; opacity: 0; transform: scale(calc(var(--s, 1) * .9)); transform-origin: right center; transition: opacity .25s, transform .2s; font-family: var(--display); }
#combo.on, #combo.end { opacity: 1; transform: scale(var(--s, 1)); }
#combo.end { opacity: 0; transition: opacity 1.2s .5s; }
#combo b { display: block; font-size: 44px; line-height: 1; color: #fff; -webkit-text-stroke: 2px #1b1530; paint-order: stroke; text-shadow: 0 3px 0 #1b1530, 0 0 14px rgba(255,255,255,.35); }
#combo b.bump { animation: comboBump .18s ease-out; }
#combo span { display: block; font-size: 13px; letter-spacing: .08em; color: #fff; text-shadow: 0 2px 0 #1b1530; }
#combo.t1 b { color: #ffd23f; text-shadow: 0 3px 0 #1b1530, 0 0 16px #ffd23f; }
#combo.t2 b { color: #ff3d8b; text-shadow: 0 3px 0 #1b1530, 0 0 18px #ff3d8b; }
#combo.t3 b { color: #2ee6ff; text-shadow: 0 3px 0 #1b1530, 0 0 20px #2ee6ff; }
#combo.t4 b { background: linear-gradient(90deg, #ff3d8b, #ffd23f, #7cff6b, #2ee6ff, #b07cff); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; text-shadow: none; filter: drop-shadow(0 3px 0 #1b1530) drop-shadow(0 0 10px rgba(255,255,255,.5)); }
@keyframes comboBump { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (max-width: 600px) { #combo { top: calc(env(safe-area-inset-top, 0px) + 92px); right: auto; left: 12px; text-align: left; transform-origin: left top; } #combo b { font-size: 28px; } #combo span { font-size: 11px; } }

/* ---- 図鑑：ジョイマン年表 ---- */
ol.hist { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 3px solid rgba(255,255,255,.18); display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; }
ol.hist li { position: relative; display: grid; grid-template-columns: 64px 30px 1fr; align-items: start; gap: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.05); opacity: .6; }
ol.hist li::before { content: ''; position: absolute; left: -22px; top: 14px; width: 11px; height: 11px; border-radius: 50%; background: #3a3456; border: 2px solid #14112b; }
ol.hist li.got { opacity: 1; background: rgba(255,210,63,.09); }
ol.hist li.got::before { background: var(--yellow, #ffd23f); box-shadow: 0 0 8px #ffd23f; }
ol.hist em { font-style: normal; font-family: var(--display); color: var(--yellow, #ffd23f); font-size: 14px; padding-top: 2px; }
ol.hist span { font-size: 20px; line-height: 1; }
ol.hist b { display: block; font-size: 15px; }
ol.hist small { display: block; font-size: 12px; opacity: .85; line-height: 1.5; margin-top: 2px; }
@media (max-width: 480px) { ol.hist li { grid-template-columns: 52px 26px 1fr; } }
.unlocks.hist-new small { opacity: .85; }

/* ---- Wアンコールの確認 ---- */
.panel.encore { text-align: center; width: min(560px, 100%); }
.panel.encore .enc-claps { font-size: 34px; animation: encClap .5s ease-in-out infinite alternate; }
.panel.encore p { line-height: 1.7; }
@keyframes encClap { from { transform: scale(1) rotate(-4deg); } to { transform: scale(1.15) rotate(4deg); } }
.calm .panel.encore .enc-claps { animation: none; }

/* ---- レベルアップ：おまかせ ---- */
.lvbtns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.autoalways { display: block; margin: 8px auto 0; background: none; border: 0; color: rgba(255,255,255,.7); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.autoalways:hover { color: #fff; }

/* ---- グルーヴ（ジャストの連続）---- */
#groove { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-b) + 34px); display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 12px; color: rgba(255,255,255,.55); pointer-events: none; text-shadow: 0 2px 0 #000; }
#groove span { display: flex; gap: 3px; }
#groove i { width: 14px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); }
#groove em { font-style: normal; min-width: 34px; }
#groove.g1 { color: #7cff6b; } #groove.g1 i.on { background: #7cff6b; box-shadow: 0 0 6px #7cff6b; }
#groove.g2 { color: #2ee6ff; } #groove.g2 i.on { background: #2ee6ff; box-shadow: 0 0 8px #2ee6ff; }
#groove.g3 { color: #ffd23f; } #groove.g3 i.on { background: #ffd23f; box-shadow: 0 0 10px #ffd23f; }
#groove.g3 b { animation: grooveGlow .5s ease-in-out infinite alternate; }
#groove.bump em { animation: bump .35s; }
@keyframes grooveGlow { to { text-shadow: 0 0 12px #ffd23f, 0 2px 0 #000; } }
.calm #groove.g3 b { animation: none; }

/* ---- 運命のルーレット ---- */
#roulette { --rr: 44px; position: absolute; left: 14px; top: 34%; width: 132px; text-align: center; pointer-events: none; transition: opacity .3s, transform .3s; }
#roulette.hidden { display: block; opacity: 0; transform: scale(.6); }
#roulette .rwheel { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 4px solid #ffd23f; box-shadow: 0 0 18px rgba(255,210,63,.6), inset 0 0 0 3px #14112b; }
#roulette .rwheel span { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; display: grid; place-items: center; font-size: 17px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; transform-origin: 50% 50%; }
#roulette .rptr { position: absolute; left: 50%; top: -10px; margin-left: -9px; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 16px solid #fff; filter: drop-shadow(0 2px 0 #000); }
#roulette .rlabel { display: block; margin-top: 6px; font-family: var(--display); font-size: 14px; color: #ffd23f; text-shadow: 0 2px 0 #000; min-height: 18px; }
#roulette.win .rwheel { animation: rWin .4s ease-in-out 3 alternate; }
#roulette.miss .rlabel { color: #c9cfe2; }
@keyframes rWin { to { box-shadow: 0 0 34px #ffd23f, inset 0 0 0 3px #14112b; } }
@media (max-width: 600px) { #roulette { --rr: 34px; left: auto; right: 10px; top: 196px; width: 104px; } #roulette .rwheel { width: 104px; height: 104px; } #roulette .rwheel span { font-size: 14px; } }
.calm #roulette.win .rwheel { animation: none; }

/* ---- 結果のラップ：読んでいる行を光らせる ---- */
.rap [data-rl] { transition: color .2s, transform .2s, text-shadow .2s; transform-origin: left center; }
.rap [data-rl].sing { color: #ffd23f; transform: scale(1.06); text-shadow: 0 0 12px rgba(255,210,63,.7); }

/* ======== 高木ガチャの演出 ======== */
#screen.gxwrap { padding: 0; background: transparent; overflow: hidden; justify-content: center; }   /* 後ろの 3D（本物の高木）を見せる */
.gx { --gc: #6fb6ff; position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.gx.t2 { --gc: #ffd23f; }
.gx.t3 { --gc: #ff5fd2; }
.gx.shake { animation: gxShake .42s; }
@keyframes gxShake { 0%, 100% { transform: none; } 20% { transform: translate(var(--sk), calc(var(--sk) * -.6)); } 40% { transform: translate(calc(var(--sk) * -1), calc(var(--sk) * .5)); } 60% { transform: translate(calc(var(--sk) * .6), var(--sk)); } 80% { transform: translate(calc(var(--sk) * -.4), calc(var(--sk) * -.3)); } }
/* ステージ */
.gx-stage { position: absolute; inset: 0; transition: opacity .6s; }
.gx.dealt .gx-stage { opacity: .7; }
/* カードを配ったら下へ。上のあいた所に、本物の高木が立つ */
.gx.dealt { justify-content: flex-end; padding-bottom: calc(var(--safe-b) + 30px); }
@media (min-width: 700px) { .gx-cards:not(.single) { grid-template-columns: repeat(10, minmax(0, 1fr)); width: min(1000px, 96vw); } }
.gx.dealt .gx-cards.single { grid-template-columns: minmax(0, 150px); }
.gx-cur { position: absolute; top: 0; bottom: 0; width: 50.5%; z-index: 2; transition: transform .8s cubic-bezier(.65,0,.25,1);
  background: repeating-linear-gradient(90deg, #6a0919 0 10px, #a5122c 10px 26px, #c81b3a 26px 32px, #8a0f24 32px 44px); box-shadow: inset 0 -40px 60px rgba(0,0,0,.55); }
.gx-cur.l { left: 0; } .gx-cur.r { right: 0; }
.gx.open .gx-cur.l { transform: translateX(-104%); }
.gx.open .gx-cur.r { transform: translateX(104%); }
.gx-val { position: absolute; top: 0; left: 0; right: 0; height: 12%; z-index: 3; transition: transform .7s .25s cubic-bezier(.65,0,.25,1); background: linear-gradient(#4a0612, #8f1029); border-bottom: 5px solid #ffd23f; box-shadow: 0 8px 24px rgba(0,0,0,.6); }
.gx-gap { position: absolute; top: 0; bottom: 0; left: 50%; width: 8px; margin-left: -4px; z-index: 3; background: var(--gc); box-shadow: 0 0 40px 16px var(--gc), 0 0 120px 40px var(--gc); animation: gxGap .35s ease-in-out infinite alternate; transition: background .3s, box-shadow .3s, opacity .4s; }
.gx.t3 .gx-gap { animation-name: gxGap, rainbow; animation-duration: .35s, .8s; animation-iteration-count: infinite; animation-timing-function: ease-in-out, linear; animation-direction: alternate, normal; }
.gx.open .gx-gap { display: none; }
/* 幕が開いたあとのステージ：床の照り返しと、期待度の色の光。金以上は後ろで放射線が回る */
.gx.open .gx-stage { background: radial-gradient(ellipse 70% 40% at 50% 105%, rgba(255,210,63,.22), transparent 70%), radial-gradient(ellipse 30% 50% at 50% 40%, color-mix(in srgb, var(--gc) 22%, transparent), transparent 70%), radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(7,4,15,.75) 100%); }
.gx-bgr { position: absolute; inset: -50%; opacity: 0; -webkit-mask-image: radial-gradient(ellipse 18% 26% at 50% 45%, transparent 55%, #000 100%); mask-image: radial-gradient(ellipse 18% 26% at 50% 45%, transparent 55%, #000 100%); background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--gc) 30%, transparent) 0 6deg, transparent 6deg 14deg); animation: gxRays 14s linear infinite; transition: opacity .8s; }
.gx.open.t2 .gx-bgr, .gx.open.t3 .gx-bgr { opacity: .8; }
.gx.open.t3 .gx-bgr { animation: gxRays 10s linear infinite, rainbow 3s linear infinite; }
@keyframes gxGap { from { opacity: .6; } to { opacity: 1; } }
.gx-spot { position: absolute; top: -20%; left: 50%; width: 70vmin; height: 140%; margin-left: -35vmin; z-index: 4; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(ellipse 40% 60% at 50% 0%, rgba(255,250,220,.45), transparent 70%); transform-origin: 50% 0; animation: gxSpot 1.6s ease-in-out infinite alternate; }
@keyframes gxSpot { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
.gx.open .gx-spot { animation-duration: .5s; }
/* 予告の文字 */
.gx-step { position: absolute; top: 24%; left: 0; right: 0; z-index: 5; text-align: center; pointer-events: none; }
.gx-step div { display: inline-block; font-family: var(--display); font-size: clamp(30px, 9vw, 72px); color: #fff; -webkit-text-stroke: 3px #14112b; paint-order: stroke; text-shadow: 0 5px 0 #14112b; animation: gxStep .45s cubic-bezier(.2,1.8,.4,1); }
.gx-step .s1 { color: #6fb6ff; } .gx-step .s2 { color: #ffd23f; } .gx-step .s3 { color: #ff3d8b; }
.gx-step .s4 { background: linear-gradient(90deg, #f55, #fd5, #5f5, #5df, #a5f, #f55); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; text-shadow: none; filter: drop-shadow(0 5px 0 #14112b) drop-shadow(0 0 18px #fff); animation: gxStep .45s cubic-bezier(.2,1.8,.4,1), gxShine 1s linear infinite; }
.gx-step .q { font-size: clamp(60px, 18vw, 150px); color: #fff; }
@keyframes gxStep { from { transform: scale(2.6) rotate(-6deg); opacity: 0; } }
@keyframes gxShine { to { background-position: 200% 0; } }
.gx-hwg { position: absolute; top: 40%; left: 0; right: 0; z-index: 5; text-align: center; font-family: var(--display); font-size: clamp(40px, 12vw, 110px); color: #fff; -webkit-text-stroke: 3px #14112b; paint-order: stroke; text-shadow: 0 6px 0 #14112b, 0 0 30px var(--gc); opacity: 0; pointer-events: none; }
.gx.open .gx-hwg { animation: gxHwg 1.1s ease-out forwards; }
@keyframes gxHwg { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: 1; transform: scale(1.25); } 40% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.05); } }
.gx.open .gx-stage::after { content: ''; position: absolute; inset: 0; z-index: 4; background: radial-gradient(circle at 50% 45%, var(--gc), transparent 60%); animation: gxBurst .9s ease-out forwards; pointer-events: none; }
@keyframes gxBurst { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.6); } }
.gx.freeze { background: #000; }
.gx.freeze > * { visibility: hidden; }
/* カード */
.gx-cards { position: relative; z-index: 6; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, 1.6vw, 14px); width: min(780px, 94vw); perspective: 1100px; }
.gx-cards.single { grid-template-columns: minmax(0, 230px); justify-content: center; }
.gc { aspect-ratio: 3 / 4.2; animation: gDeal .5s cubic-bezier(.2,1.4,.4,1) backwards; }
@keyframes gDeal { from { transform: translateY(-80px) scale(.4) rotate(-14deg); opacity: 0; } }
.gci { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.3,1.5,.5,1); }
.gc.up .gci { transform: rotateY(180deg); }
.gc.shake .gci { animation: gShake .07s linear infinite; }
@keyframes gShake { 0% { transform: translate(-3px, 1px) rotate(-2deg); } 50% { transform: translate(3px, -1px) rotate(2deg); } 100% { transform: translate(-3px, 1px) rotate(-2deg); } }
.bk, .fr { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.bk { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #241a4a 0 8px, #2c2058 8px 16px); border: 2px solid #4a3d8f; transition: box-shadow .3s, border-color .3s; }
.bk span { font-family: var(--display); font-size: clamp(18px, 4vw, 36px); color: rgba(255,255,255,.22); }
.bk.b1 { border-color: #4fa3ff; box-shadow: 0 0 14px rgba(79,163,255,.6); }
.bk.b2 { border-color: #ffd23f; box-shadow: 0 0 18px rgba(255,210,63,.75); animation: gGold .6s ease-in-out infinite alternate; }
.bk.b3 { border-color: #fff; box-shadow: 0 0 24px #ff5fd2, 0 0 40px #5df; animation: rainbow .7s linear infinite; }
.gc.glow .bk { box-shadow: 0 0 30px 8px #ffd23f; }
@keyframes gGold { to { box-shadow: 0 0 28px rgba(255,210,63,1); } }
.fr { transform: rotateY(180deg); display: grid; justify-items: center; align-content: center; gap: 3px; padding: 18px 4px 6px; text-align: center; background: linear-gradient(180deg, #3c2a8c, #1e1450); border: 2px solid rgba(255,255,255,.25); overflow: hidden; }
.fr b { font-size: clamp(9px, 2.1vw, 14px); line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; }
.fr em { font-style: normal; font-size: clamp(8px, 1.6vw, 11px); opacity: .7; }
.fr small { font-size: clamp(8px, 1.6vw, 11px); color: var(--yellow); font-weight: 900; }
.single .fr b { font-size: 18px; } .single .fr em, .single .fr small { font-size: 13px; }
.fr.rar-SR { border-color: #ffd23f; background: linear-gradient(180deg, #6a4a10, #2a1a40); box-shadow: 0 0 22px rgba(255,210,63,.7); }
.fr.rar-SSR { border-color: #fff; background: linear-gradient(160deg, #ff5fd2, #5f8bff 45%, #5df 70%, #ffd23f); box-shadow: 0 0 30px #fff; }
.fr.rar-SSR::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.65) 50%, transparent 60%); animation: gSheen 1.6s linear infinite; }
@keyframes gSheen { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
.gx .rar { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); z-index: 1; font-style: normal; font-family: var(--display); font-size: clamp(9px, 1.8vw, 13px); padding: 0 7px; border-radius: 6px; background: #556; }
.gx .rar-R .rar { background: #2d6fff; }
.gx .rar-SR .rar { background: linear-gradient(90deg, #f0a91c, #ffe680); color: #3a2400; }
.gx .rar-SSR .rar { background: #fff; color: #000; }
.gsw { display: block; width: clamp(22px, 5vw, 40px); height: clamp(22px, 5vw, 40px); border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 10px rgba(255,255,255,.5); }
.gsw.tl { border: 0; box-shadow: none; display: grid; place-items: center; font-size: clamp(18px, 4vw, 32px); }
/* SSR の確定演出 */
.gx-cut { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; align-content: space-between; padding: calc(var(--safe-t) + 4vh) 0 calc(var(--safe-b) + 5vh); background: radial-gradient(ellipse 30% 46% at 50% 48%, transparent 58%, rgba(255,95,210,.16) 78%, rgba(10,5,25,.92) 100%); overflow: hidden; }   /* まん中は透かして、寄りの高木を見せる */
.gx-cut.hidden { display: none; }
.gx-rays { position: absolute; inset: -60%; -webkit-mask-image: radial-gradient(ellipse 16% 24% at 50% 50%, transparent 50%, #000 100%); mask-image: radial-gradient(ellipse 16% 24% at 50% 50%, transparent 50%, #000 100%); background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.22) 0 7deg, transparent 7deg 15deg); animation: gxRays 5s linear infinite, rainbow 2s linear infinite; }
@keyframes gxRays { to { transform: rotate(360deg); } }
.gx-big { position: relative; font-family: var(--display); font-size: clamp(80px, 22vw, 170px); line-height: .9; background: linear-gradient(90deg, #f55, #fd5, #5f5, #5df, #a5f, #f55); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 8px 0 #14112b) drop-shadow(0 0 30px #fff); }
.gx-cut.on .gx-big { animation: gxBig .7s cubic-bezier(.2,1.7,.4,1), gxShine 1s linear infinite; }
@keyframes gxBig { from { transform: scale(4) rotate(-12deg); opacity: 0; } }
.gx-item { position: relative; display: grid; justify-items: center; gap: 6px; padding: 16px 30px; border-radius: 16px; border: 3px solid #fff; background: rgba(20,12,50,.85); box-shadow: 0 0 40px rgba(255,255,255,.6); }
.gx-item b { font-size: clamp(20px, 5.5vw, 34px); font-weight: 900; } .gx-item em { font-style: normal; opacity: .75; } .gx-item small { color: var(--yellow); font-weight: 900; font-size: 16px; }
.gx-item .gsw { width: 54px; height: 54px; } .gx-item .gsw.tl { font-size: 44px; }
.gx-cut.on .gx-item { animation: gxItem .55s .35s cubic-bezier(.2,1.5,.4,1) backwards; }
@keyframes gxItem { from { transform: translateY(40px) scale(.5); opacity: 0; } }
.gx-bot { position: relative; display: grid; justify-items: center; gap: 8px; }
.gx-bot small { opacity: .7; }
/* まとめ */
.gx-sum { position: relative; z-index: 7; margin-top: 16px; text-align: center; animation: gxItem .35s backwards; }
.gx-sum.hidden { display: none; }
.gs-line { display: flex; gap: 10px; justify-content: center; font-family: var(--display); font-size: 20px; }
.gs-line .rar-SSR { background: linear-gradient(90deg, #f55, #fd5, #5f5, #5df, #a5f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gs-line .rar-SR { color: #ffd23f; } .gs-line .rar-R { color: #6fb6ff; } .gs-line .rar-N { color: #c9cfe2; }
.gs-sub { margin: 4px 0 10px; font-size: 13px; opacity: .85; }
.gx-conf { position: absolute; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.gx-conf i { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px; animation: gxFall linear forwards; }
@keyframes gxFall { to { transform: translateY(110vh) rotate(760deg); } }
.gx-skip { position: absolute; bottom: calc(var(--safe-b) + 12px); z-index: 9; opacity: .55; font-size: 12px; pointer-events: none; }
.gx.done .gx-skip { display: none; }
.calm .gx-rays, .calm .gx-gap, .calm .bk.b3, .calm .gx-spot { animation: none; }
.gx-sum .btn { white-space: nowrap; }
.gx.done .gx-cur, .gx.done .gx-val { visibility: hidden; }

.gx.open .gx-val { transform: translateY(-110%); }   /* 幕が開いたら、上の飾りも引っ込めて高木を見せる */

/* ---- ガチャ：ド派手な予告たち ---- */
.gx-flash { position: absolute; inset: 0; z-index: 20; pointer-events: none; animation: gxFlash .45s ease-out forwards; }
@keyframes gxFlash { from { opacity: .95; } to { opacity: 0; } }
/* 群予告：笑顔のシーンが駆け抜ける */
.gx-gun { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.gx-gun i { position: absolute; left: -16vmin; width: calc(11vmin * var(--s)); height: calc(13vmin * var(--s)); border-radius: 50% 50% 22% 22%; background: var(--c); box-shadow: inset -6px -8px 0 rgba(0,0,0,.18), 0 0 18px var(--c); animation: ghRun 1.2s cubic-bezier(.3,0,.7,1) forwards, ghHop .18s ease-in-out infinite alternate; }
.gx-gun i b { position: absolute; top: 28%; left: 0; right: 0; text-align: center; font: 900 calc(3.4vmin * var(--s)) var(--display); color: #1b1530; letter-spacing: .3em; }
@keyframes ghRun { to { left: 110vw; } }
@keyframes ghHop { to { margin-bottom: 2.4vmin; } }
/* カットイン：斜めの帯 */
.gx-ban { position: absolute; left: -10%; right: -10%; top: 38%; z-index: 7; height: clamp(70px, 16vh, 140px); display: grid; place-items: center; transform: rotate(-8deg); pointer-events: none; background: linear-gradient(90deg, transparent, #ff3d8b 12%, #ff3d8b 88%, transparent); border-top: 5px solid #fff; border-bottom: 5px solid #fff; animation: banIn .95s cubic-bezier(.2,.9,.3,1) forwards; }
.gx-ban.t2 { background: linear-gradient(90deg, transparent, #f0a91c 12%, #ffd23f 50%, #f0a91c 88%, transparent); }
.gx-ban.t3 { background: linear-gradient(90deg, #f55, #fd5, #5f5, #5df, #a5f, #f55); animation: banIn .95s cubic-bezier(.2,.9,.3,1) forwards, rainbow .5s linear infinite; }
.gx-ban b { font-family: var(--display); font-size: clamp(40px, 11vw, 100px); color: #fff; -webkit-text-stroke: 4px #14112b; paint-order: stroke; text-shadow: 0 6px 0 #14112b; }
@keyframes banIn { 0% { transform: rotate(-8deg) translateX(110%); } 22% { transform: rotate(-8deg) translateX(0); } 78% { transform: rotate(-8deg) translateX(-3%); } 100% { transform: rotate(-8deg) translateX(-120%); } }
/* 稲妻 */
.gx-bolt { position: absolute; inset: 0; z-index: 7; pointer-events: none; animation: gxFlash .8s ease-out forwards; }
.gx-bolt svg { width: 100%; height: 100%; }
.gx-bolt polyline { fill: none; stroke: #fff; stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-width: 7px; filter: drop-shadow(0 0 10px #9fd8ff) drop-shadow(0 0 30px #5df); }
/* ガラスが割れる */
.gx-shards { position: absolute; inset: 0; z-index: 9; pointer-events: none; }
.gx-shards i { position: absolute; left: 50%; top: 45%; width: 34vmin; height: 34vmin; margin: -17vmin; background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(160,220,255,.55) 60%, rgba(255,95,210,.6)); animation: shard .65s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes shard { from { transform: translate(0, 0) rotate(0) scale(.6); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1.3); opacity: 0; } }
/* PUSH ボタン */
.gx-push { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 12%); z-index: 8; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; width: clamp(180px, 46vmin, 300px); padding: 18px 10px 14px; border-radius: 999px; cursor: pointer; text-align: center; background: radial-gradient(circle at 50% 30%, #fff 0%, #6fb6ff 35%, #2d5bd9 100%); border: 5px solid #fff; box-shadow: 0 10px 0 #14112b, 0 0 40px #6fb6ff; animation: pushIn .4s cubic-bezier(.2,1.6,.4,1), pushPulse .5s ease-in-out .4s infinite alternate; }
.gx-push.t2 { background: radial-gradient(circle at 50% 30%, #fff 0%, #ffd23f 35%, #e08a00 100%); box-shadow: 0 10px 0 #14112b, 0 0 50px #ffd23f; }
.gx-push.t3 { background: radial-gradient(circle at 50% 30%, #fff 0%, #ff5fd2 35%, #6a3dff 100%); box-shadow: 0 10px 0 #14112b, 0 0 60px #ff5fd2; }
.gx-push.t3 { animation: pushIn .4s cubic-bezier(.2,1.6,.4,1), pushPulse .5s ease-in-out .4s infinite alternate, rainbow 1s linear infinite; }
.gx-push.vib { animation: pushIn .4s cubic-bezier(.2,1.6,.4,1), pushVib .06s linear .4s infinite; }
.gx-push b { font-family: var(--display); font-size: clamp(34px, 9vmin, 58px); color: #fff; -webkit-text-stroke: 3px #14112b; paint-order: stroke; text-shadow: 0 4px 0 #14112b; line-height: 1; }
.gx-push b.pop { animation: bump .15s; }
.gx-push small { font-weight: 900; color: #14112b; font-size: 13px; }
.gx-push em { font-style: normal; font-size: 11px; color: rgba(20,17,43,.7); font-weight: 900; }
.gx-push .gm { display: block; width: 80%; height: 10px; margin: 4px 0 2px; border-radius: 6px; background: rgba(20,17,43,.45); overflow: hidden; }
.gx-push .gm i { display: block; height: 100%; width: 0; background: #fff; box-shadow: 0 0 10px #fff; transition: width .08s; }
.gx-push.pressed { animation: pushHit .26s ease-out forwards; }
@keyframes pushIn { from { transform: translateX(-50%) scale(0); } }
@keyframes pushPulse { to { transform: translateX(-50%) scale(1.07); } }
@keyframes pushVib { 0% { transform: translateX(calc(-50% - 4px)) rotate(-2deg); } 50% { transform: translateX(calc(-50% + 4px)) rotate(2deg); } 100% { transform: translateX(calc(-50% - 4px)) rotate(-2deg); } }
@keyframes pushHit { to { transform: translateX(-50%) scale(1.6); opacity: 0; } }
.calm .gx-push, .calm .gx-ban.t3 { animation: none; }
.calm .gx-flash, .calm .gx-bolt { display: none; }
.pity { width: min(420px, 100%); margin: 0 auto 8px; text-align: center; font-size: 13px; }
.pity b { color: var(--yellow); font-size: 16px; }
.pity .pbar { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.pity .pbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd23f, #ff3d8b, #b07cff); }

/* ---- ガチャ：激アツ演出の追加分 ---- */
/* 映画の黒帯（幕が開いてから、カードを配るまで） */
.gx-bars i { position: absolute; left: 0; right: 0; z-index: 12; height: 0; background: #000; transition: height .45s cubic-bezier(.6,0,.2,1); pointer-events: none; }
.gx-bars i:first-child { top: 0; } .gx-bars i:last-child { bottom: 0; }
.gx.cine .gx-bars i { height: 11vh; }
/* 確定スタンプ（ハンコ） */
.gx-stamp { position: absolute; left: 50%; top: 42%; z-index: 13; pointer-events: none; transform: translate(-50%, -50%) rotate(-14deg); animation: stampHit .38s cubic-bezier(.2,1.8,.4,1) both; }
.gx-stamp b { display: grid; place-items: center; width: clamp(180px, 46vmin, 320px); aspect-ratio: 1; border-radius: 50%; border: 10px double #ff2a4a; color: #ff2a4a; background: rgba(255,240,240,.92); font-family: var(--display); font-size: clamp(34px, 10vmin, 64px); line-height: 1; text-align: center; box-shadow: 0 0 0 6px rgba(255,42,74,.25), 0 10px 40px rgba(0,0,0,.6); }
.gx-stamp b small { display: block; font-size: .5em; margin-top: 4px; }
.gx-stamp.ssr b, .gx-stamp.pity b { border-color: #ffd23f; color: transparent; background: radial-gradient(circle, #fff 0%, #ffe9a8 70%); -webkit-text-stroke: 0; }
.gx-stamp.ssr b, .gx-stamp.pity b { background-clip: padding-box; }
.gx-stamp.ssr b { color: #e0218a; } .gx-stamp.pity b { color: #b0005a; }
.gx-stamp.ssr, .gx-stamp.pity { filter: drop-shadow(0 0 24px #ff5fd2); }
@keyframes stampHit { 0% { transform: translate(-50%, -50%) rotate(-14deg) scale(3.2); opacity: 0; } 70% { transform: translate(-50%, -50%) rotate(-14deg) scale(.92); opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-14deg) scale(1); } }
/* ★（確定演出・カード） */
.gx-stars { position: relative; display: flex; gap: 6px; justify-content: center; min-height: clamp(36px, 8vmin, 56px); }
.gx-stars i { font-style: normal; font-size: clamp(32px, 8vmin, 54px); line-height: 1; color: #ffd23f; text-shadow: 0 3px 0 #14112b, 0 0 14px #ffd23f; animation: starIn .3s cubic-bezier(.2,1.8,.4,1) both; }
.gx-stars i.rb { background: linear-gradient(90deg, #f55, #fd5, #5f5, #5df, #a5f); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 3px 0 #14112b) drop-shadow(0 0 16px #fff); font-size: clamp(40px, 10vmin, 68px); animation: starIn .4s cubic-bezier(.2,1.8,.4,1) both, rainbow .8s linear infinite; }
@keyframes starIn { from { transform: scale(3) rotate(-90deg); opacity: 0; } }
.fr .gst { font-style: normal; font-size: clamp(7px, 1.5vw, 11px); letter-spacing: -1px; color: #ffd23f; }
.fr.rar-SSR .gst { color: #fff; text-shadow: 0 0 6px #ff5fd2; }
.single .fr .gst { font-size: 14px; }
/* のこり○枚：見ているカードを大きく、ほかを暗く */
.gc { transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .3s, filter .3s; }
.gc.focus { transform: scale(1.28) translateY(-14%); transform-origin: 50% 100%; z-index: 3; position: relative; }
.gc.focus .bk { box-shadow: 0 0 34px 8px var(--gc, #ffd23f); }
.gc.dim { opacity: .35; filter: grayscale(.6); }
.gx-step .small { font-size: clamp(24px, 6.5vw, 48px); }
.gx.dealt .gx-step { top: 6%; }
/* スローモーション：画面のふちが暗く、色が抜ける */
.gx.slowmo::after { content: ''; position: absolute; inset: 0; z-index: 11; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 30%, rgba(0,0,0,.75) 100%); animation: slowIn .25s ease-out both; }
@keyframes slowIn { from { opacity: 0; } }
.gshare { margin: 0 auto 8px; }
.gx-stamp b { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; padding: 0 12px; }
.gx-stamp.pity b { font-size: clamp(26px, 7.2vmin, 46px); }
/* 笑顔のシーン（ファン）。サイン会のリザルトや群予告で使う */
.fg { position: relative; display: inline-block; width: 1em; height: 1.18em; border-radius: 50% 50% 22% 22%; background: var(--c); box-shadow: inset -.08em -.1em 0 rgba(0,0,0,.18); font-style: normal; vertical-align: bottom; }
.fg b { position: absolute; top: 28%; left: 0; right: 0; text-align: center; font: 900 .3em/1 var(--display); color: #1b1530; letter-spacing: .2em; }
.fanwall .fg { font-size: 22px; animation: fanPop .35s cubic-bezier(.2,1.8,.4,1); }
#parade span .fg { font-size: 1em; }
/* 縦が短い画面（スマホの横向きなど）：カードを低くし、まとめのボタンを 1 列に並べて、全部が画面に収まるように */
@media (max-height: 520px) {
  .gx.dealt { padding-bottom: calc(var(--safe-b) + 6px); }
  .gx-cards .gc { aspect-ratio: 3 / 3.3; }
  .gx-cards.single { grid-template-columns: minmax(0, 110px) !important; }
  .fr { padding-top: 14px; gap: 1px; }
  .fr .gsw { width: 18px; height: 18px; }
  .gx-sum { margin-top: 6px; }
  .gs-line { font-size: 15px; }
  .gs-sub { margin: 2px 0 4px; font-size: 11px; }
  .gx-sum .btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: auto; }
  .gx-sum .btns .row { display: contents; }
  .gx-sum .btn { padding: 6px 14px; font-size: 14px; min-height: 0; width: auto; flex: 0 0 auto; }
  .gx-sum .btns { flex-direction: row; }
  .gx-sum .btn small { display: none; }
  .gshare { margin: 0 0 4px; }
  .gx-stamp b { width: clamp(140px, 40vh, 220px); font-size: clamp(26px, 9vh, 44px); }
  .gx-push { bottom: calc(var(--safe-b) + 6%); padding: 10px 10px 8px; }
  .gx-cut { padding: 2vh 0; }
  .gx-big { font-size: clamp(60px, 20vh, 120px); }
}
/* スマホの横向き：レベルアップのカードを横に 3 枚並べ、スクロールなしで選べるように */
@media (max-height: 520px) and (min-width: 600px) {
  .lvtitle { font-size: 28px; }
  .lvline { margin: 0 0 6px; font-size: 13px; }
  .cards { flex-direction: row; width: min(860px, 100%); gap: 8px; }
  .cards .card { flex: 1 1 0; grid-template-columns: 40px 1fr; padding: 8px 10px; align-items: start; }
  .cards .card .ic { width: 40px; height: 40px; font-size: 26px; grid-row: auto; }
  .cards .card b { font-size: 15px; }
  .cards .card small { grid-column: 1 / -1; font-size: 11.5px; line-height: 1.35; }
  .lvbtns { margin-top: 6px; }
  .lvbtns .btn { padding: 6px 16px; }
  .autoalways { margin-top: 4px; }
}
.btn.pink { background: linear-gradient(180deg, #ff6fb0, #d61f6e); box-shadow: 0 5px 0 #7a0f3d, 0 0 18px rgba(255,61,139,.45); }
.btn.icononly { flex: 0 0 auto; min-width: 56px; padding-left: 12px; padding-right: 12px; font-size: 22px; }
#bShop, #bGacha, #bDex { white-space: nowrap; font-size: clamp(14px, 4.1vw, 18px); padding-left: 6px; padding-right: 6px; }
#bShop small, #bGacha small, #bDex small { white-space: nowrap; }
.evopath.combo { color: #ffd0e8; }
.evopath.combo { color: #ffd0e8; }
.goals { margin: 8px auto 0; width: min(440px, 100%); padding: 8px 12px; border-radius: 12px; background: rgba(255,210,63,.08); border: 1px solid rgba(255,210,63,.35); font-size: 13px; line-height: 1.6; }
.goals small { display: block; color: var(--yellow); font-weight: 900; margin-bottom: 2px; }
.goals b { color: var(--yellow); }

/* Wアンコール：狭まるエリア */
#zone { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 108px); transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(40,10,70,.75); border: 1px solid #b04dff; color: #e6ccff; font-weight: 900; font-size: 14px; white-space: nowrap; pointer-events: none; }
#zone.hot { color: #fff; border-color: #ff3d8b; animation: zonePulse .5s ease-in-out infinite alternate; }
#zone.out { color: #fff; background: rgba(176,30,90,.85); border-color: #fff; animation: zonePulse .3s ease-in-out infinite alternate; }
@keyframes zonePulse { to { transform: translateX(-50%) scale(1.08); } }
#zoneArrow { position: absolute; font-size: 44px; color: #fff; text-shadow: 0 0 8px #b04dff, 0 0 16px #ff3d8b; pointer-events: none; }
.calm #zone.hot, .calm #zone.out { animation: none; }
.touch #zone { bottom: calc(var(--safe-b) + 196px); font-size: 13px; }

/* ダブルアップ（ハイ＆ロー）のカード：画面下の固定の枠 */
#dblcard { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 150px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 16px; background: rgba(20,17,43,.85); border: 2px solid #ffd23f; box-shadow: 0 0 18px rgba(255,210,63,.45); pointer-events: none; z-index: 2; }
#dblcard .pc { width: 46px; height: 64px; border-radius: 7px; background: #fff; color: #14112b; display: grid; place-items: center; font-family: var(--display); font-size: 30px; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
#dblcard .pc.flip { animation: dblFlip .35s ease-out; }
@keyframes dblFlip { from { transform: rotateY(90deg); } to { transform: none; } }
#dblcard .arrow { font-size: 24px; font-weight: 900; color: #fff; }
#dblcard .dq { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; color: #fff; font-weight: 900; font-size: 14px; white-space: nowrap; }
#dblcard .dq span { display: flex; gap: 6px; }
#dblcard .dq i { font-style: normal; font-size: 12px; padding: 2px 7px; border-radius: 999px; }
#dblcard .dq .hi { background: #ff3d8b; } #dblcard .dq .lo { background: #1aa9c4; }
#dblcard .dq em { font-style: normal; color: #ffd23f; font-size: 13px; }
#dblcard.win { border-color: #ffd23f; box-shadow: 0 0 28px #ffd23f; }
#dblcard.win .dq b { color: #ffd23f; font-size: 18px; }
#dblcard.lose { border-color: #8a90a8; box-shadow: none; }
.touch #dblcard { bottom: calc(var(--safe-b) + 250px); }

/* 力尽きた画面：寝ている高木が見えるよう、下にまとめる */
#screen.deadscr { justify-content: flex-end; background: linear-gradient(to top, rgba(10,8,25,.88), rgba(10,8,25,0) 34%); }
#screen.deadscr .deadpanel { display: grid; justify-items: center; gap: 2px; width: min(620px, 100%); }
#screen.deadscr .logo { font-size: clamp(26px, 7vw, 40px); margin: 0; }
#screen.deadscr .best { margin: 2px 0 6px; font-size: 12px; }
#screen.deadscr .btns.row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; width: 100%; margin: 0; }
#screen.deadscr .btns.row2 .btn { margin: 0; }

/* 名前に「ジョイマン」が入るので、公式と間違われないようタイトルの下に明記 */
.title-top .unofficial { display: inline-block; margin: 2px auto 0; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); font-size: 12px; font-weight: 800; color: rgba(255,255,255,.85); }
.title-top .logo, #loading .logo { font-size: clamp(30px, 8.4vw, 78px); white-space: nowrap; }
.title-top .logo small, #loading .logo small { letter-spacing: .06em; font-size: .5em; }
