/* Yugimon V121 — mobile-only duel communication bar.
   Desktop and waiting-room button placement deliberately unchanged. */
.board-mobile-controls{display:none}
@media (max-width:700px){
  #game .field-divider{position:relative}
  #game .field-divider .board-mobile-controls{
    position:absolute;inset:0;z-index:7;display:flex;align-items:center;
    justify-content:space-between;padding:0 4%;pointer-events:none;
  }
  #game .board-mobile-pair{display:flex;align-items:center;gap:clamp(8px,3.2vw,17px)}
  #game .board-mobile-btn{
    pointer-events:auto;display:grid;place-items:center;flex:0 0 auto;
    width:34px;height:34px;min-width:0;min-height:0;padding:0;
    border-radius:50%;font-size:18px;line-height:1;
    color:#fff;box-shadow:0 2px 8px #0009,inset 0 1px 2px #ffffff42;
    border:2px solid #829ba7;touch-action:manipulation;-webkit-tap-highlight-color:transparent;
  }
  #game .board-mobile-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}
  #game .board-mobile-bot{background:linear-gradient(145deg,#d74a52,#70222f);border-color:#ffa1a6}
  #game .board-mobile-bot.is-off{background:linear-gradient(145deg,#4e3439,#2a2027);border-color:#a07178;opacity:.74}
  #game .board-mobile-voice{background:linear-gradient(145deg,#ac6d2e,#673712);border-color:#e6b375}
  #game .board-mobile-voice.active{border-color:#b0f8c5;box-shadow:0 0 8px #75ffa488}
  #game .board-mobile-chat{background:linear-gradient(145deg,#298c48,#155735);border-color:#87dca1}
  #game .board-mobile-reaction{background:linear-gradient(145deg,#3f78e0,#1a429f);border-color:#a0bbff}
  #game .field-divider .chain-badge{z-index:9;left:50%;transform:translateX(-50%);top:-19px;pointer-events:none}
  body:has(#game:not(.hidden)) > #chatFab,
  body:has(#game:not(.hidden)) > #reactionFab,
  body:has(#game:not(.hidden)) #ygVoiceFab{display:none!important}
  body:has(#game:not(.hidden)) #chatPanel,
  body:has(#game:not(.hidden)) #reactionPanel{
    left:50%;right:auto;transform:translateX(-50%);
    width:min(390px,calc(100vw - 20px));max-height:60dvh;
    bottom:max(92px,env(safe-area-inset-bottom,0px) + 90px)!important;
  }
  body:has(#game:not(.hidden)) #ygVoicePanel{
    right:8px;bottom:42px;max-height:min(56dvh,430px);
  }
  .story-tutorial-mode #boardMobileControls{display:none!important}
}
@media(max-width:360px){
  #game .board-mobile-btn{width:30px;height:30px;font-size:16px}
  #game .board-mobile-pair{gap:6px}
  #game .field-divider .board-mobile-controls{padding:0 3%}
}
