/* Main-menu silhouette pass: every destination has a recognizable physical shape. */
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul {
  --rem-orbit-cyan: #73e8ff;
  --rem-orbit-ice: #d9f8ff;
  --rem-orbit-ink: #030b18;
  --rem-orbit-gold: #ffd478;
}

/* ---------- Hangar facilities ---------- */
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions {
  top: 132px !important;
  right: 10px !important;
  left: 10px !important;
  height: 246px !important;
}

#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-home-dock .menu-dock-btn {
  --facility-rgb: 93, 221, 255;
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
  height: 88px !important;
  min-height: 88px !important;
  max-height: 88px !important;
  grid-template-rows: 58px 22px !important;
  isolation: isolate;
  transition: transform 140ms ease, filter 140ms ease !important;
}

#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(1) {
  --facility-rgb: 255, 204, 101;
  top: 14px !important;
  left: 0 !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(2) {
  --facility-rgb: 134, 228, 255;
  top: 0 !important;
  right: 1px !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(3) {
  --facility-rgb: 119, 190, 255;
  top: 146px !important;
  left: 5px !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(4) {
  --facility-rgb: 132, 255, 218;
  top: 132px !important;
  right: 0 !important;
}

#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn > i {
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  display: grid !important;
  place-items: center !important;
  width: 58px !important;
  height: 58px !important;
  overflow: hidden !important;
  border: 1px solid rgba(var(--facility-rgb), .66) !important;
  background:
    linear-gradient(135deg, rgba(var(--facility-rgb), .2), transparent 47%),
    linear-gradient(160deg, rgba(12, 38, 64, .97), rgba(2, 10, 24, .96)) !important;
  box-shadow:
    inset 0 0 0 3px rgba(var(--facility-rgb), .045),
    0 8px 18px rgba(0, 0, 0, .42) !important;
  color: rgb(var(--facility-rgb)) !important;
  filter: drop-shadow(0 0 7px rgba(var(--facility-rgb), .22)) !important;
  transform: translateX(-50%) !important;
  transition: transform 140ms ease, border-color 140ms ease, filter 140ms ease !important;
}

/* Shop: cut-metal supply terminal. */
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(1) > i {
  width: 64px !important;
  clip-path: polygon(0 10px, 10px 0, 100% 0, 100% 43px, 50px 58px, 0 58px) !important;
}
/* STB: a floating jewel rather than another square tile. */
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(2) > i {
  width: 54px !important;
  height: 54px !important;
  top: 3px !important;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%) !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(2) > i svg {
  width: 27px !important;
  height: 27px !important;
}
/* Record: radar-like circular archive. */
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(3) > i {
  border-radius: 50% !important;
  background:
    radial-gradient(circle, transparent 42%, rgba(var(--facility-rgb), .14) 44% 46%, transparent 48%),
    linear-gradient(145deg, rgba(18, 55, 89, .98), rgba(2, 10, 25, .97)) !important;
}
/* Settings: compact eight-point system node. */
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(4) > i {
  width: 62px !important;
  height: 62px !important;
  clip-path: polygon(30% 0, 50% 10%, 70% 0, 79% 20%, 100% 30%, 90% 50%, 100% 70%, 79% 80%, 70% 100%, 50% 90%, 30% 100%, 21% 80%, 0 70%, 10% 50%, 0 30%, 21% 20%) !important;
}

#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn > i::before,
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn > i::after {
  display: none !important;
  content: none !important;
}

#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn > i svg {
  width: 31px !important;
  height: 31px !important;
  stroke-width: 2.15 !important;
}

#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn > strong {
  top: 62px !important;
  width: auto !important;
  min-width: 70px;
  padding: 4px 7px 5px !important;
  border: 1px solid rgba(var(--facility-rgb), .22);
  background: rgba(2, 10, 24, .9);
  color: #f2fbff !important;
  font: 800 10px/1 "Yu Gothic UI", sans-serif !important;
  letter-spacing: .03em !important;
  text-shadow: 0 1px 0 #000 !important;
}

#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:focus-visible {
  outline: 2px solid rgb(var(--facility-rgb)) !important;
  outline-offset: 5px !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:is(:hover, :focus-visible) > i {
  border-color: rgba(var(--facility-rgb), .96) !important;
  filter: drop-shadow(0 0 11px rgba(var(--facility-rgb), .56)) !important;
  transform: translateX(-50%) translateY(-2px) !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:active > i {
  transform: translateX(-50%) scale(.91) !important;
}

/* ---------- Sortie gate ---------- */
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-hero-card {
  display: block !important;
  width: min(calc(100% - 18px), 410px) !important;
  min-height: 82px !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-hero-play {
  position: relative !important;
  height: 78px !important;
  min-height: 78px !important;
  max-height: 78px !important;
  grid-template-columns: 54px 1fr 28px !important;
  overflow: hidden !important;
  clip-path: polygon(0 17px, 17px 0, calc(100% - 46px) 0, 100% 39px, calc(100% - 46px) 100%, 17px 100%, 0 calc(100% - 17px)) !important;
  border: 0 !important;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255,255,255,.2) 18%, transparent 31%) -150% 0 / 55% 100% no-repeat,
    linear-gradient(105deg, #087893 0, #66e8ef 47%, #16b8d0 68%, #08677f 100%) !important;
  box-shadow: inset 0 0 0 2px rgba(220, 252, 255, .42), 0 9px 22px rgba(0, 0, 0, .38) !important;
  animation: rem-sortie-scan 4.8s ease-in-out infinite;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-hero-play::after {
  content: "" !important;
  position: absolute !important;
  right: 24px !important;
  bottom: 8px !important;
  left: 24px !important;
  display: block !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, rgba(235,255,255,.75), transparent) !important;
  opacity: .65;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-hero-play:active {
  transform: scale(.975) !important;
}

/* ---------- End-content constellation ---------- */
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck::before {
  content: "";
  position: absolute;
  top: 88px;
  right: 9%;
  bottom: 70px;
  left: 9%;
  pointer-events: none;
  background:
    linear-gradient(31deg, transparent 49.7%, rgba(94,218,255,.13) 50%, transparent 50.3%),
    linear-gradient(146deg, transparent 49.7%, rgba(190,124,255,.11) 50%, transparent 50.3%);
  opacity: .8;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .rem-mode-grid-main,
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .rem-mode-grid-sub {
  position: relative;
  z-index: 1;
  display: block !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .menu-btn {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  padding: 16px 22px !important;
  overflow: hidden !important;
  border: 1px solid rgba(var(--mode-rgb, 111, 224, 255), .55) !important;
  border-left: 1px solid rgba(var(--mode-rgb, 111, 224, 255), .55) !important;
  background:
    radial-gradient(circle at 25% 20%, rgba(var(--mode-rgb, 111, 224, 255), .18), transparent 42%),
    linear-gradient(145deg, rgba(13, 37, 57, .98), rgba(3, 10, 23, .98)) !important;
  box-shadow: inset 0 0 0 3px rgba(var(--mode-rgb, 111, 224, 255), .035), 0 10px 24px rgba(0,0,0,.32) !important;
  transition: transform 150ms ease, filter 150ms ease !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .menu-btn::before {
  left: 16px !important;
  top: 13px !important;
  border-color: rgba(var(--mode-rgb, 111, 224, 255), .5) !important;
  color: rgb(var(--mode-rgb, 111, 224, 255)) !important;
  background: rgba(2, 9, 20, .78) !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .menu-btn::after {
  right: 16px !important;
  color: rgba(var(--mode-rgb, 111, 224, 255), .72) !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .menu-btn strong {
  overflow: visible !important;
  color: #f5fbff !important;
  font-size: clamp(15px, 4vw, 19px) !important;
  text-overflow: clip !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .menu-btn > span {
  max-width: 86% !important;
  color: rgba(204,231,238,.7) !important;
  font-size: 9px !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .menu-btn:is(:hover, :focus-visible) {
  filter: brightness(1.18) drop-shadow(0 0 8px rgba(var(--mode-rgb, 111, 224, 255), .22)) !important;
  transform: translateY(-2px) !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .menu-btn:active {
  transform: scale(.975) !important;
}

/* Four modes, four silhouettes and four different visual weights. */
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-endless {
  --mode-rgb: 120, 215, 255;
  width: 88% !important;
  min-height: 116px !important;
  margin: 8px 0 18px auto !important;
  padding-left: 64px !important;
  clip-path: polygon(10% 0, 100% 0, 92% 100%, 0 100%, 5% 50%) !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-genkyo {
  --mode-rgb: 214, 134, 255;
  width: 46% !important;
  min-height: 154px !important;
  margin: 0 auto 0 2% !important;
  padding: 36px 20px 22px !important;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%) !important;
  text-align: center !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-genkyo::before {
  left: 50% !important;
  transform: translateX(-50%) !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-genkyo::after { display: none !important; }
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-genkyo > span { max-width: 100% !important; }

#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-cosmo {
  --mode-rgb: 105, 221, 190;
  width: 52% !important;
  min-height: 132px !important;
  margin: -58px 1% 18px auto !important;
  padding: 25px 18px 18px 54px !important;
  border-radius: 50% !important;
  clip-path: ellipse(50% 48% at 50% 50%) !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-abyss {
  --mode-rgb: 240, 91, 139;
  width: 72% !important;
  min-height: 156px !important;
  margin: -4px 0 0 auto !important;
  padding: 34px 52px !important;
  clip-path: polygon(50% 0, 64% 27%, 100% 50%, 64% 73%, 50% 100%, 36% 73%, 0 50%, 36% 27%) !important;
  text-align: center !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-abyss::before {
  left: 50% !important;
  transform: translateX(-50%) !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-abyss::after { display: none !important; }
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-abyss strong {
  max-width: 100% !important;
  font-size: clamp(12px, 3.4vw, 16px) !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-overflow: clip !important;
  white-space: normal !important;
}
#menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-abyss > span { max-width: 100% !important; }

@keyframes rem-sortie-scan {
  0%, 58%, 100% { background-position: -150% 0, 0 0; }
  78% { background-position: 280% 0, 0 0; }
}

@media (max-width: 380px) {
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions { right: 5px !important; left: 5px !important; }
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-home-dock .menu-dock-btn {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
  }
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-endless { width: 94% !important; }
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-genkyo { width: 48% !important; }
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-cosmo { width: 54% !important; }
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .btn-abyss { width: 78% !important; }
}

@media (prefers-reduced-motion: reduce) {
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-hero-play { animation: none !important; }
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn,
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn > i,
  #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-operation-deck .menu-btn { transition: none !important; }
}
