/* Final Hub QA corrections for the unified world system.
   These are narrowly scoped presentation fixes, not a new scene/scroll runtime. */

/* The old electricity frame is decorative cyan chrome. It competes with the
   destination colors and makes the Hub look like a debug overlay. */
body:has(.tesseract-page.hub-luminous) .hub-electric-layer {
  display: none !important;
}
body:has(.tesseract-page.hub-luminous) .tesseract-page,
body:has(.tesseract-page.hub-luminous) .tesseract-navigation,
body:has(.tesseract-page.hub-luminous) .tn-scene-shell {
  border-color: transparent !important;
  outline: 0 !important;
}

/* Keep the collapsed community control out of the selection panel / ENTER CTA.
   It becomes a compact utility button in the safe lower-right corner. */
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] {
  position: fixed !important;
  left: auto !important;
  right: max(.85rem, env(safe-area-inset-right)) !important;
  top: auto !important;
  bottom: max(.85rem, env(safe-area-inset-bottom)) !important;
  width: 3.25rem !important;
  min-width: 3.25rem !important;
  max-width: 3.25rem !important;
  height: 3.25rem !important;
  min-height: 3.25rem !important;
  max-height: 3.25rem !important;
  padding: 0 !important;
  border: 1px solid rgba(237,205,145,.28) !important;
  border-radius: 50% !important;
  background: rgba(10,7,13,.72) !important;
  box-shadow: 0 .65rem 1.8rem rgba(0,0,0,.3) !important;
  overflow: hidden !important;
  transform: none !important;
  z-index: 12350 !important;
  backdrop-filter: blur(14px) saturate(1.05) !important;
}
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] .community-rail-header {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] .community-rail-title,
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] .community-rail-collapsed-mark,
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] .community-rail-toggle-mark,
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] .community-chat-label,
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] [data-community-toggle-label] {
  display: none !important;
}
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] .community-rail-toggle {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  min-width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #f5dfb4 !important;
}
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] .community-chat-icon {
  display: block !important;
  position: relative !important;
  width: 1.08rem !important;
  height: .82rem !important;
  border: 1.4px solid currentColor !important;
  border-radius: .35rem !important;
  box-shadow: 0 0 .7rem rgba(239,200,129,.2) !important;
}
body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] .community-chat-icon::after {
  content: '' !important;
  position: absolute !important;
  left: .15rem !important;
  bottom: -.27rem !important;
  width: .32rem !important;
  height: .32rem !important;
  border-left: 1.4px solid currentColor !important;
  transform: skewY(-34deg) !important;
}

/* The destination menu is a selector on the Hub. Give the selected line a
   restrained accent, while all rows keep identical dimensions and typography. */
body:has(.tesseract-page.hub-luminous) .eq-world-menu__drawer nav a {
  min-height: 3.65rem !important;
}
body:has(.tesseract-page.hub-luminous) .eq-world-menu__drawer nav a > strong {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: .86rem !important;
  font-weight: 690 !important;
}
body:has(.tesseract-page.hub-luminous) .eq-world-menu__drawer nav a[data-world-role='pillar'] > strong::after {
  content: ' ·' !important;
  color: var(--world-accent) !important;
}

@media (max-width: 700px) {
  body:has(.tesseract-page.hub-luminous) .community-rail[data-variant='side'][data-collapsed='true'] {
    right: max(.62rem, env(safe-area-inset-right)) !important;
    bottom: max(.62rem, env(safe-area-inset-bottom)) !important;
    width: 3rem !important;
    min-width: 3rem !important;
    max-width: 3rem !important;
    height: 3rem !important;
    min-height: 3rem !important;
    max-height: 3rem !important;
  }
}

/* The Hub is the world: the scene fills the viewport and the interface floats inside it. */
.tesseract-page.hub-luminous .tn-scene-shell{position:fixed!important;inset:0!important;z-index:0!important;width:100vw!important;max-width:none!important;height:100lvh!important;min-height:0!important;margin:0!important;border-radius:0!important;background:#02040a!important;pointer-events:auto}
.tesseract-page.hub-luminous .tn-scene-shell::before,.tesseract-page.hub-luminous .tn-scene-shell::after,.tesseract-page.hub-luminous .tn-scene-glow,.tesseract-page.hub-luminous .tn-water-veil{display:none!important}
.tesseract-page.hub-luminous .tesseract-navigation{display:flex;flex-direction:column;min-height:100svh;background:none!important;pointer-events:none}
.tesseract-page.hub-luminous .tesseract-navigation::before{content:'';position:fixed;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,rgba(2,4,10,.78),rgba(2,4,10,.18) 24%,transparent 40%,transparent 58%,rgba(2,4,10,.82))}
.tesseract-page.hub-luminous .tesseract-navigation>*:not(.tn-scene-shell):not(script){position:relative;z-index:4;pointer-events:auto}
.tesseract-page.hub-luminous .tn-info{margin-top:auto!important;background:linear-gradient(180deg,rgba(8,10,18,.5),rgba(3,4,8,.72))!important;backdrop-filter:blur(14px)}
.tesseract-page.hub-luminous .tn-point-zero-cue{bottom:auto!important;top:62%!important}

.tesseract-page.hub-luminous .tn-info{max-width:24rem!important;padding:.8rem 1rem!important}
.tesseract-page.hub-luminous .tn-info h2{font-size:clamp(1.4rem,2.2vw,2rem)!important}

/* Entry paths fold into one small control so nothing stands between the visitor and the world. */
.tesseract-page.hub-luminous .tn-start-fold{align-self:center;margin:.5rem auto 0;max-width:min(64rem,calc(100vw - 2rem));width:max-content}
.tesseract-page.hub-luminous .tn-start-fold>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:.5rem;margin:0 auto;padding:.5rem 1rem;border-radius:999px;border:1px solid rgba(245,201,105,.4);background:rgba(6,8,16,.5);backdrop-filter:blur(10px);color:#f6e8cf;font:600 .72rem/1 system-ui,sans-serif;letter-spacing:.14em;text-transform:uppercase}
.tesseract-page.hub-luminous .tn-start-fold>summary::-webkit-details-marker{display:none}
.tesseract-page.hub-luminous .tn-start-fold>summary::after{content:'▾';font-size:.8em;transition:transform .2s ease}
.tesseract-page.hub-luminous .tn-start-fold[open]>summary::after{transform:rotate(180deg)}
.tesseract-page.hub-luminous .tn-start-fold[open]{width:min(64rem,calc(100vw - 2rem))}
.tesseract-page.hub-luminous .tn-start-fold:not([open])>*:not(summary){display:none!important}
.tesseract-page.hub-luminous .tn-start-fold>summary{display:flex;width:max-content}
/* The world's name is written on the cube; the panel keeps only the way in. */
.tesseract-page.hub-luminous .tn-info .tn-info-kicker,.tesseract-page.hub-luminous .tn-info h2,.tesseract-page.hub-luminous .tn-info h3{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
.tesseract-page.hub-luminous .tn-info{max-width:19rem!important;padding:.6rem .7rem!important;background:rgba(6,8,16,.35)!important;border-color:rgba(245,201,105,.2)!important}
