/* The Block — hub world styles */
  .wrap { max-width: none; margin: 0; border-left: 0; border-right: 0; }
  .stagebox { position: relative; width: 100%; }
  canvas.stage { max-width: none; width: min(100%, calc((100vh - 140px) * 16 / 9)); height: auto; aspect-ratio: 16/9; display: block; margin: 0 auto; background: #0b0b0f; }
  .hudbar { position: absolute; top: 30px; right: 12px; display: flex; gap: 6px; z-index: 4; }
  .hudleft { position: absolute; top: 30px; left: 12px; display: flex; gap: 6px; z-index: 4; flex-wrap: wrap; max-width: 60%; }
  .hudleft .stat { background: rgba(28,28,39,.85); font-size: 12px; padding: 6px 10px; }
  @media (max-width: 700px) { .pads button { min-width: 48px; height: 44px; font-size: 15px; } }
  .hudbar .btn { font-size: 12px; padding: 5px 10px; opacity: .92; }
  .pads { max-width: none; }
  .pads { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 4; pointer-events: none; }
  .pads .grp { pointer-events: auto; }
  .pads button { opacity: .85; }
  .pads .grp { display: flex; gap: 8px; }
  .pads button { min-width: 62px; height: 52px; padding: 0 12px; border-radius: 10px; border: 1px solid #333; background: var(--card); color: var(--ink); font-size: 18px; font-weight: 800; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; }
  .pads button:active, .pads button.on { background: var(--gold); color: #111; }
  .pads button small { display: block; font-size: 9px; letter-spacing: 1px; opacity: .7; }
  #room { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.85); display: flex; flex-direction: column; }
  #room .bar { background: linear-gradient(#4b7fd0, #1e4d9b); color: #fff; font: bold 13px Verdana, sans-serif; padding: 6px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--pg-orange); }
  #room .bar .btn { margin-left: auto; }
  #room iframe { flex: 1; width: 100%; border: 0; background: var(--pg-bg); }
  .cust { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 760px; text-align: left; }
  .cust .prev { background: var(--card); border: 2px solid var(--gold); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .cust .prev canvas { width: 144px; height: 180px; image-rendering: pixelated; }
  .cust .opts { flex: 1 1 380px; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
  .cust .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: rgba(255,255,255,.04); border-radius: 8px; padding: 6px 8px; }
  .cust .row > label { width: 64px; font-weight: 800; color: var(--gold); flex: none; }
  .cust select { font: bold 12px Verdana, sans-serif; background: var(--bg); color: var(--ink); border: 1px solid #444; border-radius: 6px; padding: 4px 6px; }
  .cust .sw { display: flex; gap: 4px; flex-wrap: wrap; }
  .cust .sw button { width: 18px; height: 18px; border-radius: 4px; border: 2px solid #222; cursor: pointer; padding: 0; }
  .cust .sw button.on { border-color: #fff; box-shadow: 0 0 0 1px var(--gold); }
  .cust input[type=color] { width: 26px; height: 22px; padding: 0; border: 1px solid #444; background: none; cursor: pointer; }
  .cust input[type=range] { flex: 1; min-width: 140px; accent-color: var(--gold); }
  .cust .diff { flex-direction: column; align-items: stretch; }
  .cust .diff .bar { display: flex; align-items: center; gap: 8px; }
  .cust .diff small { color: var(--muted); font-size: 11px; }
  .cust .presets button, .cust .foot .btn { font-size: 12px; }
  .cust .blg { display: flex; flex-wrap: wrap; gap: 5px; }
  .cust .blg button { background: var(--card); color: var(--ink); border: 2px solid #333; border-radius: 8px; padding: 3px 7px; cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 4px; }
  .cust .blg button.on { border-color: var(--gold); background: #2a2a38; }
  .cust .blg button.lock { opacity: .45; cursor: not-allowed; }
  .cust .blg button.lock:hover { opacity: .7; }
  .cust .presets { display: flex; gap: 6px; flex-wrap: wrap; }
  .cust .presets button { background: var(--card); color: var(--ink); border: 1px solid #444; border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 11px; }
  .cust .foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .roster { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; width: 100%; max-width: 640px; }
  .fighter-card { background: var(--card); border: 2px solid transparent; border-radius: 12px; padding: 10px; cursor: pointer; text-align: center; transition: transform .1s, border-color .1s; }
  .fighter-card:hover, .fighter-card.sel { transform: translateY(-3px); border-color: var(--gold); }
  .fighter-card canvas { width: 80px; height: 100px; image-rendering: pixelated; }
  .fighter-card b { display: block; font-family: var(--font-display); font-size: 18px; letter-spacing: 1px; text-transform: uppercase; }
  .fighter-card small { color: var(--muted); font-size: 11px; display: block; }
  .mapo { position: absolute; inset: 0; background: rgba(0,0,0,.85); z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; }
  .mapo h2 { font-family: var(--font-display); color: var(--gold); margin: 0; font-size: 34px; text-transform: uppercase; }
  .mapo .list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px; width: 100%; max-width: 760px; }
  .mapo .list button { text-align: left; background: var(--card); color: var(--ink); border: 1px solid #333; border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; }
  .mapo .list button:hover { border-color: var(--gold); }
  .mapo .list button small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
  .mapo .list button canvas { display: block; width: 100%; height: 44px; }
  .mapo .list h3.zone { grid-column: 1 / -1; margin: 6px 0 0; font-family: var(--font-display); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid #333; padding-bottom: 3px; text-align: left; }
  .mapo .list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-height: 70vh; overflow: auto; }

/* ---- P2P chat ---- */
.chatlog { position: absolute; left: 14px; bottom: 126px; width: min(46%, 420px); display: flex; flex-direction: column; gap: 3px; pointer-events: none; z-index: 3; }
.chatlog div { background: rgba(0,0,0,.6); color: #fff; font: 12px Verdana, sans-serif; padding: 4px 8px; border-radius: 6px; max-width: 100%; word-wrap: break-word; animation: chatfade 14s forwards; }
.chatlog div b { color: var(--gold); }
.chatlog div.sys { color: #9ad; font-style: italic; }
@keyframes chatfade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.chatbox { position: absolute; left: 14px; bottom: 74px; display: flex; gap: 6px; align-items: center; z-index: 4; background: rgba(0,0,0,.75); padding: 6px 8px; border-radius: 8px; width: min(60%, 520px); }
.chatbox.hidden { display: none; }
.chatbox input { flex: 1; font: 13px Verdana, sans-serif; background: #111; color: #fff; border: 1px solid #555; border-radius: 6px; padding: 5px 8px; min-width: 0; }
.chatbox input:focus { outline: 2px solid var(--gold); }
.cust .row input[type=text] { font: bold 13px Verdana, sans-serif; background: var(--bg); color: var(--ink); border: 1px solid #444; border-radius: 6px; padding: 4px 8px; width: 160px; }
#onlineStat.on b { color: #35d07f; }

/* ---- mobile hub ---- */
@media (max-width: 700px) {
  .hudleft { top: 6px; left: 6px; gap: 4px; max-width: 58%; }
  .hudleft .stat { font-size: 10px; padding: 3px 6px; }
  .hudbar { top: 6px; right: 6px; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 40%; }
  .hudbar .btn { font-size: 10px; padding: 3px 6px; }
  .pads { left: 6px; right: 6px; bottom: 6px; gap: 4px; }
  .pads .grp { gap: 4px; }
  .pads button { min-width: 44px; height: 42px; padding: 0 8px; font-size: 15px; }
  .chatbox { left: 6px; right: 6px; width: auto; bottom: 56px; }
  .chatlog { left: 6px; bottom: 100px; width: 80%; }
  .cust .prev canvas { width: 96px; height: 120px; }
  .cust .row > label { width: 52px; font-size: 12px; }
  .cust .row input[type=text] { width: 130px; }
  .mapo { padding: 10px; }
  .mapo h2 { font-size: 24px; }
  .mapo .list { grid-template-columns: 1fr; max-height: none; flex: 1; }
}
/* portrait phones: show a taller slice of the block — the 16:9 canvas is cropped left/right and centered on you */
@media (orientation: portrait) and (max-width: 700px) {
  .stagebox { overflow: hidden; height: min(62vh, 560px); }
  canvas.stage { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 100%; width: auto; max-width: none; margin: 0; }
  .mapo, #select { position: fixed; inset: 0; z-index: 50; overflow-y: auto; justify-content: flex-start; }
}
@media (max-height: 500px) {
  canvas.stage { width: min(100%, calc((100vh - 8px) * 16 / 9)); }
  .hudleft { top: 6px; left: 6px; max-width: 50%; } .hudbar { top: 6px; right: 6px; }
  .hudleft .stat { font-size: 10px; padding: 3px 6px; } .hudbar .btn { font-size: 10px; padding: 3px 6px; }
  .pads button { min-width: 44px; height: 40px; padding: 0 8px; font-size: 14px; }
}
/* touch devices: action names only, no key hints */
@media (hover: none) and (pointer: coarse) { .pads button small { display: none; } .pads button { height: 46px; } }
/* the Interact pad lights up when something is in reach */
.pads button#actPad { opacity: .45; transition: opacity .15s, border-color .15s; }
.pads button#actPad.ready { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
/* customizer: compact so it fits inside the 16:9 game window */
@media (min-width: 0px) {
  #select { padding: 12px 16px; gap: 6px; }
  #select h2 { font-size: 28px; }
  #select > p { font-size: 12px; margin: 0; }
  .cust { gap: 10px; }
  .cust .prev canvas { width: 96px; height: 120px; }
  .cust .opts { gap: 4px; font-size: 12px; }
  .cust .row { padding: 3px 6px; gap: 6px; }
  .cust .row > label { width: 54px; }
  .cust select { padding: 2px 4px; font-size: 11px; }
  .cust .sw button { width: 15px; height: 15px; }
  .cust .blg button { padding: 2px 6px; font-size: 11px; white-space: nowrap; }
  .cust .opts { min-width: 0; }
  .cust .row.bling { flex-wrap: nowrap; }
  .cust .blg { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .cust .row small { display: none; }
  .cust .foot span { display: none; }
}
/* the Step Outside row stays reachable while the customizer scrolls */
#select .cust .foot { position: sticky; bottom: -12px; background: rgba(0,0,0,.85); padding: 8px 6px; border-radius: 8px; z-index: 2; }

