/* Synonym Smash 3D — look only. Layout and controls of the original game are kept. */
.sd3d-box{position:relative;border-radius:22px;overflow:hidden;margin:0 0 14px;border:1px solid rgba(167,139,250,.45);box-shadow:0 18px 50px rgba(76,29,149,.35),inset 0 0 0 1px rgba(255,255,255,.06);background:#1b1030}
.sd3d-box.lobby{height:min(42vh,420px)}
.sd3d-box.host{height:min(46vh,520px)}
.sd3d-box.select{height:min(34vh,320px);margin-bottom:12px}
.sd3d-box.student{height:min(34vh,330px)}
.sd3d-box.score{height:min(44vh,460px)}
.sd3d-canvas{display:block;width:100%!important;height:100%!important;touch-action:pan-y}
.sd3d-labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.sd3d-tag{position:absolute;transform:translate(-50%,-100%);text-align:center;white-space:nowrap;font:800 12px/1.25 system-ui,sans-serif;color:#fff;background:rgba(27,16,48,.82);border:1px solid rgba(167,139,250,.55);border-radius:10px;padding:3px 8px}
.sd3d-hp{width:74px;height:7px;border-radius:6px;background:rgba(255,255,255,.18);overflow:hidden;margin:3px auto 0}.sd3d-hp i{display:block;height:100%;transition:width .5s}
.sd3d-pop{position:absolute;transform:translate(-50%,-50%);font:900 26px/1 system-ui,sans-serif;color:#fff;-webkit-text-stroke:2px #1b1030;paint-order:stroke;animation:sd3dpop 1.4s ease-out forwards;white-space:nowrap}
.sd3d-pop.big{font-size:38px;color:#ffd34d}.sd3d-pop.heal{color:#4ade80}.sd3d-pop.miss{font-size:18px;color:#fda4af}
@keyframes sd3dpop{0%{opacity:0;transform:translate(-50%,-20%) scale(.6)}15%{opacity:1;transform:translate(-50%,-60%) scale(1.15)}100%{opacity:0;transform:translate(-50%,-210%) scale(1)}}
@media (prefers-reduced-motion:reduce){.sd3d-pop{animation:none;opacity:1;transform:translate(-50%,-80%)}.sd3d-hp i{transition:none}}
/* on a student phone during battle, the result popup becomes a bottom sheet so the 3D duel stays visible */
@media (max-width:760px){body:has(#studentBattleScreen.active) .modal{place-items:end center;background:rgba(0,0,0,.45)}body:has(#studentBattleScreen.active) .modal .modal-box{max-height:58vh;overflow:auto;margin-bottom:8px}}
#gfxBtn,#shakeBtn{font-size:12px}
/* long names are shortened on the 3D name tags (full name shows on hover and in the game's own lists) */
.sd3d-tag{pointer-events:auto;max-width:140px}
.sd3d-tag .nm{display:inline-block;max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
.sd3d-labels.dense .sd3d-tag{max-width:96px}.sd3d-labels.dense .sd3d-tag .nm{max-width:64px}
