/* A playmat is the background of its own territory, never a screen overlay. */
.stage .territory[data-playmat]{position:relative;isolation:isolate;overflow:hidden}
.stage .territory[data-playmat]::before,body.duel-active .stage .territory[data-playmat]::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:-1;background-image:linear-gradient(180deg,#07121b38,#07121b65),var(--neo-playmat-image)!important;background-size:cover!important;background-position:center!important;opacity:1!important}
.stage .territory[data-playmat] .zone,.stage .territory[data-playmat] .field-row{position:relative;z-index:1}
.duel-playmat-editor{display:inline-flex;align-items:center;padding:6px 9px;border:1px solid #648088;border-radius:7px;color:#c7f7ee;text-decoration:none;font-weight:800;font-size:12px;white-space:nowrap;background:#172b3b}
.duel-playmat-editor:hover{background:#29495a;color:white}
.duel-playmat-picker{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:800;color:#d7edf6}
.duel-playmat-picker select{max-width:158px;min-width:90px;padding:6px;border:1px solid #648088;border-radius:7px;background:#162b3b;color:white}
@media(max-width:780px){.duel-playmat-picker{font-size:10px}.duel-playmat-picker select{max-width:112px;padding:5px}}

/* Mobile deliberately uses the existing grass battlefield, not a scaled desktop
   playmat. Keep the selection and gifts stored so switching to desktop restores
   the player's chosen mat; do not change duel state or card interactions. */
@media (max-width:780px) {
 body.duel-active .stage .territory[data-playmat]::before {
  content:none!important;
  display:none!important;
  background-image:none!important;
 }
 body.duel-active .duel-playmat-picker,
 body.duel-active .duel-playmat-editor,
 body.duel-active #playmatSelect {
  display:none!important;
 }
}
