/* Match2Go territory game — opt-in map overlay, no takeover of real listings. */
.map-action-bar .hex-game-toggle{
  margin-left:auto;isolation:isolate;position:relative;display:inline-flex;gap:5px;align-items:center;justify-content:center;
  border:2px solid #e8a3e9;background:linear-gradient(125deg,#f43f8f,#9333ea 72%,#3b82f6);color:#fff;
  border-radius:999px;min-width:48px;min-height:44px;padding:8px 15px;font-size:13px;font-weight:800;
  box-shadow:0 4px 15px #8424c766;cursor:pointer;
  animation:hex-game-hop 12s ease-in-out infinite;
}
.map-action-bar .hex-game-toggle:hover,.map-action-bar .hex-game-toggle:focus-visible{transform:translateY(-1px);box-shadow:0 5px 23px #7e22ce99}
.map-action-bar .hex-game-toggle.is-on{background:linear-gradient(120deg,#0d9488,#0284c7);border-color:#a5f3fc;animation:none}
.map-action-bar .hex-game-toggle:focus-visible{outline:3px solid #111827;outline-offset:2px}
@keyframes hex-game-hop{0%,90%,96%,100%{transform:translateY(0) rotate(0)}92%{transform:translateY(-3px) rotate(-4deg)}94%{transform:translateY(1px) rotate(3deg)}}
.hex-game-panel[hidden]{display:none!important}
.hex-game-panel{
 position:fixed;bottom:max(85px,calc(env(safe-area-inset-bottom) + 84px));left:12px;z-index:14;
 width:min(346px,calc(100vw - 24px));box-sizing:border-box;border:1px solid #d7e3f0;border-radius:18px;
 padding:11px 13px;background:#ffffffed;backdrop-filter:blur(13px);box-shadow:0 8px 30px #142d4a36;
 color:#24364d;font:600 13px/1.4 system-ui,sans-serif;overflow-wrap:anywhere;
}
.hex-game-panel .hex-game-status{font-size:14px;font-weight:800;margin:0 0 7px}
.hex-game-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.hex-game-panel button{font:inherit;background:#edf5fd;color:#174d80;border:1px solid #bcd6ec;
 border-radius:999px;min-height:35px;padding:5px 10px;cursor:pointer}
.hex-game-panel .hex-game-hint{margin:8px 0 0;color:#516a83;font-size:12px;font-weight:500}
.hex-game-active #nearby-sheet{display:none!important}
.hex-game-dialog{box-sizing:border-box;border:1px solid #d4e0ef;border-radius:20px;padding:0;
 width:min(520px,calc(100vw - 26px));max-height:min(84dvh,720px);max-width:none;overflow:auto;
 background:#fff;color:#263951;box-shadow:0 14px 54px #13284266;
 font:15px/1.48 system-ui,sans-serif;overflow-wrap:anywhere}
.hex-game-dialog::backdrop{background:#10243c95}
.hex-game-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;
 padding:17px 17px 12px;background:linear-gradient(100deg,#fcf4ff,#ecf8ff);border-radius:20px 20px 0 0}
.hex-game-dialog-head h2{font:800 19px/1.3 system-ui,sans-serif;margin:0}
.hex-game-dialog-head .hex-game-close{background:transparent;border:0;font-size:27px;min-height:40px;min-width:40px;color:#334c67;cursor:pointer}
.hex-game-dialog-body{padding:12px 17px 19px}
.hex-game-dialog-body p{margin:8px 0}
.hex-game-rules{padding-left:21px;margin:8px 0;display:grid;gap:9px}
.hex-game-rules li{padding-left:3px}
.hex-game-dialog-body .hex-game-small{font-size:13px;color:#5b7086}
.hex-game-modal-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:16px}
.hex-game-dialog button{font:700 14px system-ui,sans-serif;border:1px solid #cddbea;border-radius:11px;
 min-height:42px;padding:9px 13px;cursor:pointer;background:#f2f6fa;color:#243951}
.hex-game-dialog .hex-game-primary{background:#6d28d9;color:#fff;border-color:#6d28d9}
.hex-game-dialog .hex-game-muted{background:#fff}
.hex-game-dialog button:disabled{opacity:.52;cursor:not-allowed}
.hex-game-dialog button:focus-visible{outline:3px solid #4338ca;outline-offset:2px}
.hex-game-dialog .hex-game-error{color:#b91c1c}
.hex-game-dialog input.hex-game-name,.hex-game-dialog input.hex-game-share-url{
 display:block;box-sizing:border-box;width:100%;margin:10px 0;border-radius:9px;
 border:1px solid #aec7d8;padding:10px;min-height:42px;font-size:15px}
.hex-game-colors{display:flex;gap:4px;flex-wrap:wrap;align-items:center;margin:10px 0}
.hex-game-colors button{font-size:25px;line-height:1;min-width:40px;padding:5px}
.hex-game-colors button[aria-pressed="true"]{outline:2px solid #1f2937}
.hex-game-cell-id{display:block;font-size:12px;opacity:.76;margin:9px 0}
.hex-game-leaders{display:grid;gap:6px;padding-left:22px}
.hex-game-leaders li{padding:4px 0}
@media(max-width:450px){
 .map-action-bar .hex-game-toggle{font-size:19px;width:52px;min-width:52px;max-width:52px;overflow:hidden;white-space:nowrap;padding:6px;}
 .map-action-bar .hex-game-toggle.is-on{font-size:16px}
 .hex-game-panel{left:9px;bottom:max(85px,calc(env(safe-area-inset-bottom) + 82px));width:calc(100vw - 18px);padding:9px 11px}
}
@media(max-width:360px){.map-action-bar .hex-game-toggle{width:45px;min-width:45px;max-width:45px;padding:4px;font-size:18px}}
@media(prefers-reduced-motion:reduce){.map-action-bar .hex-game-toggle{animation:none!important;transition:none!important}}

/* 2026-11-02: touch-friendly and non-clipping game-only controls. */
.map-action-bar .hex-game-toggle{
  white-space:nowrap;flex:0 0 auto;min-width:46px;box-sizing:border-box;
  display:inline-flex;align-items:center;justify-content:center;
  overflow:visible;gap:6px;line-height:1.15;
}
.map-action-bar .hex-game-toggle .hex-game-toggle-icon{
  flex:0 0 auto;font-size:20px;line-height:1;
}
.map-action-bar .hex-game-toggle .hex-game-toggle-name{display:inline-block;font-size:13px}
.hex-game-panel .hex-game-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.hex-game-panel .hex-game-actions>button{
  box-sizing:border-box;width:100%;min-width:0;min-height:43px;white-space:normal;
  font-size:13px;font-weight:700;line-height:1.2;text-align:center;overflow-wrap:anywhere;
  padding:8px 6px;
}
.hex-game-dialog>.hex-game-dialog-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  box-sizing:border-box;width:100%;min-height:66px;
}
.hex-game-dialog .hex-game-dialog-head h2{flex:1;min-width:0;margin:0;font-size:19px}
.hex-game-dialog .hex-game-dialog-head>.hex-game-close{
  position:relative;display:grid;place-items:center;flex:0 0 44px;
  box-sizing:border-box;min-width:44px;max-width:44px;min-height:44px;
  width:44px;height:44px;padding:0;margin:0;
  border:1px solid #cbd8e8;border-radius:50%;background:#fff;
  color:#26435d;font:600 28px/1 system-ui,sans-serif;
  box-shadow:none;outline:none;-webkit-tap-highlight-color:transparent;
  cursor:pointer;touch-action:manipulation;
}
.hex-game-dialog .hex-game-dialog-head>.hex-game-close:focus-visible{
  outline:2px solid #4338ca;outline-offset:2px;
}
.hex-game-dialog .hex-game-modal-actions{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
  align-items:stretch;justify-content:stretch;
}
.hex-game-dialog .hex-game-modal-actions>button{
  box-sizing:border-box;min-width:0;width:100%;min-height:44px;
  white-space:normal;overflow-wrap:anywhere;padding:9px 11px;
}
.hex-game-dialog .hex-game-owner{
  font-weight:800;font-size:16px;color:#20344d;
  border-left:6px solid #3b82f6;border-radius:5px;
  margin:9px 0 14px;padding:7px 10px;background:#f1f5fb;
}
.hex-game-dialog .hex-game-modal-actions>button:last-child:nth-child(3){grid-column:1 / -1}
@media(max-width:580px){
  .map-action-bar .hex-game-toggle{flex:0 0 48px;width:48px;min-width:48px;max-width:48px;height:48px;
    padding:0;border-radius:50%;overflow:visible;font-size:20px;}
  .map-action-bar .hex-game-toggle .hex-game-toggle-name{display:none}
  .map-action-bar .hex-game-toggle .hex-game-toggle-icon{font-size:22px}
}
@media(min-width:581px){
  .hex-game-panel{width:min(390px,calc(100vw - 24px))}
  .hex-game-panel .hex-game-actions{grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media(max-width:359px){
  .map-action-bar .hex-game-toggle{flex-basis:42px;width:42px;min-width:42px;max-width:42px;height:44px}
}
