/* Accepted selector composition. Game layout retains its original .app geometry. */
.app:has(#hubScreen:not([style*="none"])) { padding-top:0; }
#hubScreen { position:relative; width:min(100vw,620px); margin-left:calc((100% - min(100vw,620px)) / 2); margin-top:0; color:#e6f9ff; }
    #hubScreen .environment{ position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
    #hubScreen .environment img{ display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
    #hubScreen .environment::after{
      content: ""; position: absolute; inset: 0;
      background: linear-gradient(180deg, rgba(2,10,24,.58), rgba(2,10,24,.13) 32%, rgba(2,10,24,.29) 73%, rgba(2,10,24,.53));
    }
    #hubScreen .page{ position: relative; z-index: 1; width: min(100%, 620px); margin: 0 auto; padding: calc(env(safe-area-inset-top) + 14px) 12px calc(env(safe-area-inset-bottom) + 28px); }
    /* The slot preserves normal flow while the editor transforms the live root. */
    #hubScreen .arcade-header-slot{ width:min(100%,520px); aspect-ratio:1140 / 370; margin:0 auto 2px; }
    #hubScreen .selector{ width: min(100%, 520px); margin: 6px auto 0; }
    /* Preserve the original panel artwork aspect ratio. */
    #hubScreen .panel{ position: relative; aspect-ratio: 4 / 3; width: 100%; isolation: isolate; }
    #hubScreen .panel-art{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 12px rgba(0,201,255,.48)); pointer-events: none; user-select: none; }
    #hubScreen .panel-content{
      position: absolute; z-index: 1; top: 15%; right: 12%; bottom: 16%; left: 12%;
      display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0;
      gap: clamp(5px, 1.25vw, 9px);
    }
    /* Shared game-preview projection: interchangeable art overscans a removable chamfered alpha texture. */
    #hubScreen .preview{
      position: relative; min-height: 0; overflow: hidden;
      margin: -10px -9px -2px;
      border-radius: 0; background: transparent;
      -webkit-mask-image: url("assets/arcade-preview-textured-mask.svg");
      mask-image: url("assets/arcade-preview-textured-mask.svg");
      -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
      -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    }
    #hubScreen .preview img{
      display: block; width: 100%; height: 100%;
      object-fit: cover; object-position: var(--arcade-preview-position, 50% 47%);
      transform: scale(var(--arcade-preview-overscan, 1.20));
    }
    #hubScreen .preview::after{
      content: ""; position: absolute; inset: 0; pointer-events: none;
      background: linear-gradient(180deg, rgba(24,185,235,.10), transparent 45%, rgba(0,25,46,.25));
    }
    #hubScreen .panel-footer{ display:flex; align-items:center; gap:clamp(6px, 2vw, 12px); min-width:0; }
    #hubScreen .game-copy{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; justify-content:center; gap:2px; }
    #hubScreen .game-copy h2{ margin:0; color:#eefbff; font-size:clamp(15px, 4.3vw, 23px); line-height:1.1; letter-spacing:.015em; }
    #hubScreen .description{ margin:0; color:#acd0df; font-size:clamp(10px, 2.6vw, 13px); line-height:1.25; }
    #hubScreen .launch{
      flex:0 0 clamp(96px, 31%, 136px); min-height:44px; width:auto; padding:7px 6px;
      border:1px solid rgba(112,244,255,.28); border-radius:7px;
      color:#f5ffff; background:linear-gradient(180deg, #119db0, #087d98);
      box-shadow:0 0 15px rgba(19,193,255,.2), inset 0 1px rgba(236,255,255,.19);
      font:inherit; font-size:clamp(11px, 2.8vw, 14px); font-weight:800; letter-spacing:.045em;
      white-space:nowrap; opacity:1; cursor:pointer;
    }
    #hubScreen .tiles-area{ margin: 0 12px; }
    #hubScreen .tiles{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #hubScreen .tile{ min-width: 0; margin: 0; padding: 0; }
    #hubScreen .tile-art{ display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain;
      filter: drop-shadow(0 0 12px rgba(0,201,255,.48)); pointer-events: none; user-select: none; }
    #hubScreen :focus-visible { outline: 3px solid #fff0a8; outline-offset: 4px; }
    @media (max-width: 360px) {
      #hubScreen .page{ padding-left: 7px; padding-right: 7px; }
      #hubScreen .tiles-area{ margin-inline: 10px; }
      #hubScreen .panel-content{ top: 15%; bottom: 16%; }
    }

#hubScreen .arcade-home { position:absolute; left:15.2%; top:50%; width:max(44px,14%); height:44px; transform:translate(-50%,-50%); z-index:2; }
