/* 演出の舞台（カードの上に重ねる層） */
.pv-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 3; }
.ball, .rod, .plate { position: absolute; }
.ball { border-radius: 50%; background: var(--ones); border: 2px solid var(--ones-line); }
.rod { border-radius: 4px; background: var(--tens); border: 2px solid var(--tens-line); transition: border-color 0.3s; }
.rod.edge-o { border-color: var(--ones-line); }
.plate { border-radius: 4px; background-color: var(--hun); border: 2px solid var(--hun-line); transition: border-color 0.3s;
  background-image: repeating-linear-gradient(90deg, transparent 0 3px, rgba(255, 255, 255, 0.4) 3px 4px); }
.plate.edge-t { border-color: var(--tens-line); }
.arrow-static { position: absolute; width: 32px; height: 24px; fill: none; stroke: var(--ink); }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; }
.float-pt { position: absolute; font-size: var(--fs-s); line-height: 1.6; white-space: nowrap; color: var(--ink); }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* トースト（ほめ言葉・おしい） */
.toast { position: absolute; left: 50%; top: calc(var(--card-pad) + var(--h-chip)); transform: translate(-50%, -100%); width: max-content; max-width: 100%; z-index: 5; pointer-events: none; display: flex; justify-content: center; }
.toast-pill { padding: 0 16px; border-radius: 16px; text-align: center; animation: toastPop 0.3s ease-out 1 both; }
.toast-pill.praise { background: var(--ink); color: var(--white); font-size: var(--fs-m); line-height: 1.4; white-space: nowrap; }
.toast-pill.soft { background: var(--line); color: var(--ink); font-size: var(--fs-s); line-height: 1.6; }
.toast-pill.soft span { white-space: nowrap; }
.toast-pill.out { animation: toastOut 0.3s ease-in 1 both; }
@keyframes toastPop { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes toastOut { 0% { opacity: 1; } 100% { opacity: 0; } }

/* オーバーレイ */
.overlay { display: none; position: absolute; inset: 0; z-index: 20; align-items: center; justify-content: center; background: rgba(43, 43, 43, 0.4); }
.overlay.on { display: flex; animation: ovIn 0.3s ease-out 1 both; }
@keyframes ovIn { 0% { opacity: 0; } 100% { opacity: 1; } }
.o-card { display: flex; flex-direction: column; align-items: stretch; gap: 16px; width: min(calc(100% - 32px), 320px); padding: 24px; background: var(--white); border-radius: 16px; border: 2px solid var(--line); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; }
.toggle { min-width: 96px; height: 48px; padding: 0 16px; border-radius: 16px; background: var(--white); border: 2px solid var(--key-line); box-shadow: 0 4px 0 var(--key-line); font-size: var(--fs-s); }
.toggle[aria-checked="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); box-shadow: 0 4px 0 var(--ink-sub); }
.lv-card { align-items: center; text-align: center; gap: 8px; position: relative; z-index: 1; }
.lv-glow { position: absolute; width: 384px; height: 384px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 248, 236, 0.9) 0%, rgba(255, 248, 236, 0) 70%); opacity: 0; animation: lvGlow 1s ease-out 1 both; }
@keyframes lvGlow { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }

/* 動きを弱める（OS設定 or 手動） */
html[data-reduce="1"] .ans.wait { animation: none; }
html[data-reduce="1"] .ans-ones.wait { box-shadow: 0 0 0 2px var(--ones-line); }
html[data-reduce="1"] .ans-tens.wait { box-shadow: 0 0 0 2px var(--tens-line); }
html[data-reduce="1"] .ans-hun.wait { box-shadow: 0 0 0 2px var(--hun-line); }
html[data-reduce="1"] .combo.bump,
html[data-reduce="1"] .key.pulse,
html[data-reduce="1"] .stars svg.on,
html[data-reduce="1"] .concept-balls,
html[data-reduce="1"] .concept-rod,
html[data-reduce="1"] .lv-glow { animation: none; }
html[data-reduce="1"] .lv-glow { opacity: 0; }
html[data-reduce="1"] .toast-pill { animation: none; }
html[data-reduce="1"] .overlay.on { animation: none; }
html[data-reduce="1"] .xp-fill { transition: none; }
