/* EXOLAND V27 · fullscreen arcade and integrated live player comms. */
.arcade-dialog .arcade-dialog-top{display:flex;align-items:center;gap:10px;justify-content:space-between}
.arcade-dialog .arcade-dialog-top>div:first-child{min-width:0;flex:1}
.exo-v27-top-actions{display:flex;align-items:center;gap:7px;margin-left:auto}
.exo-v27-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:8px 12px;border:1px solid #73d8ff8f;border-radius:10px;background:linear-gradient(150deg,#143669,#101c48);color:#d9f7ff;font:850 10px/1 'Exo 2',sans-serif;letter-spacing:.55px;white-space:nowrap;cursor:pointer;transition:background .2s,border-color .2s,transform .2s}
.exo-v27-action:hover,.exo-v27-action:focus-visible,.exo-v27-action.is-active{border-color:#8ff2ff;background:linear-gradient(145deg,#1965a0,#213073);color:white}
.exo-v27-action:focus-visible,.exo-v27-chat button:focus-visible{outline:2px solid #9bf5ff;outline-offset:3px}
.exo-v27-action svg{height:17px;width:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.exo-v27-chat-toggle{border-color:#6af4d399;background:linear-gradient(135deg,#0f3d59,#172455)}
.exo-v27-online-dot{width:7px;height:7px;display:inline-block;flex:none;border-radius:50%;background:#54ffc3;box-shadow:0 0 12px #4effc6d9}
.exo-v27-chat-toggle b{font:900 12px 'Rajdhani',sans-serif;color:#98ffe3}
.exo-game-layout{position:relative}
.exo-v27-chat[hidden]{display:none!important}
.exo-v27-chat{position:absolute;z-index:35;top:0;right:0;width:294px;height:min(590px,calc(96dvh - 188px));min-height:340px;display:flex;flex-direction:column;overflow:hidden;border:1px solid #69dce9a8;border-radius:15px;background:linear-gradient(165deg,rgba(12,38,75,.99),rgba(6,17,43,.995));box-shadow:0 24px 70px #000c,0 0 0 1px #60d5ff18,inset 0 0 28px #394de522;color:#e9faff}
.exo-v27-chat-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 12px 11px;border-bottom:1px solid #58b2e54b;background:linear-gradient(105deg,#164a7f,#261957)}
.exo-v27-chat-head small{display:flex;align-items:center;gap:7px;color:#86dcff;font:850 8px 'Exo 2',sans-serif;letter-spacing:1px}
.exo-v27-chat-head h3{margin:5px 0 0;color:#fff;font:italic 900 18px/1 'Exo 2',sans-serif;letter-spacing:-.6px}
.exo-v27-chat-head-right{display:flex;align-items:center;gap:8px}
.exo-v27-chat-head-right strong{font:850 9px 'Exo 2',sans-serif;white-space:nowrap;color:#96ffe5}
.exo-v27-chat-close{display:grid;place-items:center;width:29px;height:29px;border:1px solid #75bffc7f;border-radius:8px;background:#102c52;color:white;font:800 23px/1 sans-serif;cursor:pointer}
.exo-v27-chat-notice{padding:10px 12px;border-bottom:1px solid #5584c02f;color:#a9c4df;background:#101a3b8c;font:650 10px/1.45 system-ui,sans-serif}
.exo-v27-chat-messages{flex:1;min-height:50px;overflow-y:auto;overscroll-behavior:contain;padding:10px 11px;display:flex;flex-direction:column;gap:9px;scrollbar-color:#2d6399 transparent;scrollbar-width:thin}
.exo-v27-chat-message{padding:8px 9px;border-radius:10px;background:linear-gradient(135deg,#142d60b5,#121f478c);border:1px solid #5f95ca36;overflow-wrap:anywhere}
.exo-v27-chat-meta{display:flex;align-items:center;gap:7px;margin-bottom:5px}
.exo-v27-chat-meta strong{min-width:0;flex:1;color:#8bf0ff;font:900 10px/1.2 'Exo 2',sans-serif;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.exo-v27-chat-meta time{font:700 9px 'Rajdhani',sans-serif;color:#89accd}
.exo-v27-chat-report{padding:3px 4px;border:0;border-radius:4px;background:transparent;color:#86a7c6;font:750 8px 'Exo 2',sans-serif;cursor:pointer}
.exo-v27-chat-report:hover{color:#ffc0bf;background:#9d35352b}
.exo-v27-chat-message p{margin:0;color:#f0f8ff;font:500 12px/1.45 system-ui,sans-serif;white-space:pre-wrap}
.exo-v27-chat-loading,.exo-v27-chat-empty{margin:auto;color:#accaf1;font:600 12px/1.5 system-ui,sans-serif;text-align:center;padding:10px}
.exo-v27-chat-emojis{display:flex;align-items:center;justify-content:space-between;gap:3px;padding:8px 9px;border-top:1px solid #5194da3d}
.exo-v27-chat-emojis button{display:grid;place-items:center;border:1px solid #5595d74b;background:#0d2951;border-radius:8px;cursor:pointer;width:38px;height:35px;font-size:19px;transition:transform .15s,background .15s}
.exo-v27-chat-emojis button:hover{background:#25457d;transform:translateY(-2px)}
.exo-v27-chat-compose{display:flex;align-items:center;gap:7px;padding:0 10px 8px}
.exo-v27-chat-compose input[name=message]{width:100%;flex:1;min-width:0;max-width:100%;height:41px;border:1px solid #75a4e67f;border-radius:9px;background:#071933;color:white;padding:0 10px;font:500 12px system-ui,sans-serif;outline:none}
.exo-v27-chat-compose input[name=message]:focus{border-color:#8cefff;box-shadow:0 0 0 2px #38c9f730}
.exo-v27-chat-compose input::placeholder{color:#86a1c5}
.exo-v27-chat-compose button{flex:none;min-height:41px;padding:0 12px;border:1px solid #ffc09b;border-radius:9px;background:linear-gradient(135deg,#ff8530,#f63ca8 60%,#8230e4);color:white;font:900 11px 'Exo 2',sans-serif;cursor:pointer}
.exo-v27-chat-compose button:disabled{opacity:.55;cursor:wait}
.exo-v27-chat-status{min-height:26px;padding:0 10px 9px;color:#88dfc5;font:650 10px/1.4 system-ui,sans-serif}
.exo-v27-chat-status.has-error{color:#ffc0b1}
.exo-v27-honeypot{position:absolute!important;left:-300vw!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.exo-v27-fullscreen .exo-v27-top-actions{z-index:20}
/* The fallback is useful on iOS Safari, where arbitrary elements cannot always
   enter native Fullscreen API. It maximises within the current browser viewport. */
.arcade-dialog.exo-v27-fullscreen{position:fixed!important;inset:0!important;margin:0!important;transform:none!important;box-sizing:border-box!important;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;border:0!important;border-radius:0!important;overflow:hidden!important;background:linear-gradient(150deg,#041329,#081a43)!important}
.arcade-dialog.exo-v27-fullscreen .arcade-modal-inner{height:100dvh!important;max-height:none!important;min-height:0;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden!important;padding:calc(8px + env(safe-area-inset-top,0px)) calc(9px + env(safe-area-inset-right,0px)) calc(7px + env(safe-area-inset-bottom,0px)) calc(9px + env(safe-area-inset-left,0px))!important}
.arcade-dialog.exo-v27-fullscreen .arcade-dialog-top{flex:none;margin-bottom:5px!important}
.arcade-dialog.exo-v27-fullscreen .arcade-dialog-top h2{font-size:clamp(16px,3vw,21px);margin:2px 0 4px}
.arcade-dialog.exo-v27-fullscreen .arcade-stats,.arcade-dialog.exo-v27-fullscreen .exo-arcade-rankline,.arcade-dialog.exo-v27-fullscreen .game-bottom,.arcade-dialog.exo-v27-fullscreen .touch-controls,.arcade-dialog.exo-v27-fullscreen .game-privacy-note,.arcade-dialog.exo-v27-fullscreen .game-announcer{display:none!important}
.arcade-dialog.exo-v27-fullscreen .exo-game-scoreline{flex:none;margin:0 0 7px;padding:6px 9px}
.arcade-dialog.exo-v27-fullscreen .exo-game-layout{flex:1;min-height:0;max-height:100%;display:flex!important;align-items:center;justify-content:center;position:relative}
.arcade-dialog.exo-v27-fullscreen .game-frame{width:100%;max-width:100%;height:100%!important;min-height:0!important;max-height:100%!important;aspect-ratio:auto!important;margin:0;position:relative}
.arcade-dialog.exo-v27-fullscreen .game-frame canvas{display:block;width:100%!important;height:100%!important}
.arcade-dialog.exo-v27-fullscreen .exo-game-leaderboard{display:none!important}
.arcade-dialog.exo-v27-fullscreen .exo-game-leaderboard.is-expanded{display:flex!important;top:0;left:auto;right:5px;width:min(400px,96%);z-index:30;max-height:100%;position:absolute}
.arcade-dialog.exo-v27-fullscreen .exo-v27-chat{top:0;right:0;height:100%;min-height:0;max-height:none;width:min(360px,100%)}
@media(max-width:1050px){
 .arcade-dialog .exo-v27-chat{position:absolute;inset:80px 8px auto 8px;width:auto;height:min(560px,calc(90dvh - 150px));min-height:300px;max-height:80dvh;z-index:45}
 .arcade-dialog.exo-v27-fullscreen .exo-v27-chat{position:absolute;inset:auto 0 0 0;width:100%;height:min(520px,73%);min-height:240px;max-height:calc(100% - 35px);border-radius:17px 17px 0 0;box-shadow:0 -15px 55px #000d}
 .arcade-dialog.exo-v27-fullscreen .exo-game-layout>.game-frame{width:100%}
}
@media(max-width:600px){
 .arcade-dialog .exo-v27-top-actions{gap:5px}
 .arcade-dialog .exo-v27-action{font-size:9px;min-height:34px;padding:7px 8px;letter-spacing:0}
 .arcade-dialog .exo-v27-action svg{width:15px;height:15px}
 .arcade-dialog .arcade-dialog-top .modal-kicker{font-size:7px;letter-spacing:1px}
 .arcade-dialog .arcade-dialog-top h2{font-size:17px;letter-spacing:-.6px;margin:2px 0 5px}
 .arcade-dialog .arcade-dialog-top{gap:5px}
 .arcade-dialog .arcade-dialog-top .modal-close{width:32px;height:32px;flex:none}
 .arcade-dialog .exo-v27-chat{top:62px;left:0;right:0;width:100%;height:min(510px,76dvh);max-height:76dvh;border-radius:14px}
 .arcade-dialog.exo-v27-fullscreen .exo-v27-action span:not(.exo-v27-online-dot){font-size:9px}
 .arcade-dialog.exo-v27-fullscreen .arcade-dialog-top h2{font-size:15px}
 .arcade-dialog.exo-v27-fullscreen .arcade-dialog-top .modal-kicker{display:none}
 .arcade-dialog.exo-v27-fullscreen .exo-v27-chat{top:auto;bottom:0;left:0;right:0;width:100%;height:min(520px,70%);max-height:70dvh}
 .arcade-dialog.exo-v27-fullscreen .exo-game-layout>.game-frame{max-height:none!important;aspect-ratio:auto!important}
 .arcade-dialog.exo-v27-fullscreen .exo-game-scoreline{gap:3px;padding:5px}
 .arcade-dialog.exo-v27-fullscreen .exo-game-scoreline-me{display:none}
 .arcade-dialog.exo-v27-fullscreen .exo-game-rank-toggle{padding:5px}
}
@media(max-width:380px){.arcade-dialog .exo-v27-action{padding:6px}.arcade-dialog .exo-v27-action svg{width:13px;height:13px}.arcade-dialog .arcade-dialog-top .modal-close{width:29px}}
@media(prefers-reduced-motion:reduce){.exo-v27-action,.exo-v27-chat-emojis button{transition:none}}
/* Keep the visually hidden input label accessible without consuming form width. */
.exo-v27-chat-compose .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
@media(max-width:600px){
  /* Place the composer above the mobile browser's bottom safe area. */
  .arcade-dialog:not(.exo-v27-fullscreen) .exo-v27-chat{
    position:fixed;top:calc(82px + env(safe-area-inset-top,0px));
    bottom:calc(12px + env(safe-area-inset-bottom,0px));
    left:12px;right:12px;width:auto;height:auto;max-height:none;min-height:0;
  }
}


/* EXOLAND V32: separate, responsive pilot comms dialog.
   This stays in the browser's modal top layer: chat never stretches the game,
   and the composer stays above the mobile software keyboard. */
#exoLiveChat:not([open]),#exoLiveChat[hidden]{display:none!important}
#exoLiveChat[open]{
  position:fixed!important;
  inset:auto!important;
  top:calc(var(--exo-v32-viewport-top,0px) + var(--exo-v32-viewport-height,100dvh)/2)!important;
  left:50%!important;right:auto!important;bottom:auto!important;
  transform:translate(-50%,-50%)!important;
  box-sizing:border-box!important;
  display:flex!important;flex-direction:column!important;
  margin:0!important;padding:0!important;
  width:min(420px,calc(100vw - 22px))!important;
  height:min(570px,calc(var(--exo-v32-viewport-height,100dvh) - 22px))!important;
  max-width:calc(100vw - 18px)!important;max-height:none!important;min-height:0!important;
  overflow:hidden!important;
  border:1px solid #78e2ff99!important;border-radius:18px!important;
  background:linear-gradient(160deg,#102b5b,#08132e 74%)!important;
  box-shadow:0 28px 100px #000d,0 0 32px #2c9dff36!important;
  color:#eafaff;
  z-index:1000!important;
}
#exoLiveChat::backdrop{background:#020817bd;backdrop-filter:blur(5px)}
#exoLiveChat .exo-v27-chat-head{flex:none;padding:12px 13px;gap:10px}
#exoLiveChat .exo-v27-chat-head h3{font-size:18px}
#exoLiveChat .exo-v27-chat-head-right{gap:9px}
#exoLiveChat .exo-v27-chat-close{
  width:auto;min-width:112px;height:36px;padding:0 11px;
  border:1px solid #8ef4f2;border-radius:9px;
  font:900 10px/1 'Exo 2',sans-serif;letter-spacing:.2px;
  color:#fff;background:linear-gradient(120deg,#125a85,#2343a4);
}
#exoLiveChat .exo-v27-chat-notice{flex:none;font-size:10px;padding:8px 12px;line-height:1.4}
#exoLiveChat .exo-v27-chat-messages{min-height:0;flex:1 1 0;overflow-y:auto;overscroll-behavior:contain;padding:11px 12px}
#exoLiveChat .exo-v27-chat-emojis{flex:none;justify-content:space-around;gap:5px;padding:7px 10px;overflow-x:auto;scrollbar-width:none}
#exoLiveChat .exo-v27-chat-emojis button{flex:none;width:39px;height:37px}
#exoLiveChat .exo-v27-chat-compose{flex:none;display:flex;padding:9px 10px 7px;gap:8px;background:linear-gradient(#172c57,#0a244b)}
#exoLiveChat .exo-v27-chat-compose input[name=message]{height:49px!important;min-height:49px!important;font-size:16px!important;padding:0 12px;min-width:0}
#exoLiveChat .exo-v27-chat-compose button{min-height:49px!important;height:49px!important;padding:0 17px;font-size:12px;letter-spacing:.3px;white-space:nowrap}
#exoLiveChat .exo-v27-chat-status{flex:none;min-height:25px;padding:5px 12px 9px;line-height:1.25;background:#0a244b;font-size:10px}
#exoLiveChat .exo-v27-chat-compose input:focus{outline:0;box-shadow:0 0 0 2px #5ed6ff55;border-color:#85f3ff}
#exoLiveChat.exo-v32-keyboard .exo-v27-chat-notice{display:none}
#exoLiveChat.exo-v32-keyboard .exo-v27-chat-head{padding:8px 10px}
#exoLiveChat.exo-v32-keyboard .exo-v27-chat-emojis{padding:4px 7px}
#exoLiveChat.exo-v32-keyboard .exo-v27-chat-emojis button{width:35px;height:32px;font-size:17px}

/* Fullscreen graphics: original world aspect ratio, never stretch pixels.
   JS fits the frame into the available space and updates canvas DPI. */
.arcade-dialog.exo-v27-fullscreen .exo-game-layout{overflow:hidden!important;min-width:0!important;min-height:0!important}
.arcade-dialog.exo-v27-fullscreen .exo-game-layout>.game-frame{
  box-sizing:border-box!important;
  width:var(--exo-v32-stage-width,100%)!important;
  height:var(--exo-v32-stage-height,100%)!important;
  max-width:100%!important;max-height:100%!important;
  min-width:0!important;min-height:0!important;
  aspect-ratio:auto!important;
  flex:0 0 auto!important;
  align-self:center!important;
  margin:auto!important;
  overflow:hidden;
}
.arcade-dialog.exo-v27-fullscreen .exo-game-layout>.game-frame canvas{
  width:100%!important;height:100%!important;
  object-fit:fill!important;image-rendering:auto!important;
}
@media(max-width:600px){
  #exoLiveChat[open]{width:calc(100vw - 18px)!important;border-radius:15px!important;
    height:min(500px,calc(var(--exo-v32-viewport-height,100dvh) - 14px))!important}
  #exoLiveChat .exo-v27-chat-head-right strong{font-size:9px}
  #exoLiveChat .exo-v27-chat-notice{font-size:9px}
  #exoLiveChat .exo-v27-chat-message p{font-size:13px}
  #exoLiveChat .exo-v27-chat-close{min-width:106px;font-size:9px}
  #exoLiveChat .exo-v27-chat-compose input[name=message]{flex:1}
  #exoLiveChat .exo-v27-chat-compose button{min-width:77px}
}
@media(max-height:420px){
  #exoLiveChat .exo-v27-chat-notice{display:none}
  #exoLiveChat .exo-v27-chat-emojis{padding:3px 6px}
  #exoLiveChat .exo-v27-chat-emojis button{height:30px;width:34px;font-size:16px}
  #exoLiveChat .exo-v27-chat-head{padding:7px 10px}
  #exoLiveChat .exo-v27-chat-status{padding:4px 9px}
}

/* Atmospheric letterbox: do not stretch the gameplay canvas to fill the device. */
.arcade-dialog.exo-v27-fullscreen .exo-game-layout{isolation:isolate;background:#07112d}
.arcade-dialog.exo-v27-fullscreen .exo-game-layout::before{
  content:"";position:absolute;inset:-12px;z-index:0;pointer-events:none;
  background:linear-gradient(180deg,#06112c77,#0b174c99),url('../img/game/star-runner-v25.webp') center/cover no-repeat;
  opacity:.46;filter:blur(14px) saturate(1.35);
}
.arcade-dialog.exo-v27-fullscreen .exo-game-layout>.game-frame{position:relative;z-index:1}
