
#s2047-adventure-core,
.s2047-adventure-core {
  width: min(96vw, 1200px);
  margin: 24px auto;
  padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 8%, rgba(0, 235, 255, .18), transparent 30%),
    radial-gradient(circle at 80% 14%, rgba(255, 230, 95, .12), transparent 28%),
    linear-gradient(180deg, rgba(4, 15, 36, .98), rgba(1, 5, 18, .99));
  border: 1px solid rgba(120, 235, 255, .42);
  color: #f7fbff;
  box-shadow: 0 0 36px rgba(0, 225, 255, .16), inset 0 0 28px rgba(255, 225, 90, .06);
  box-sizing: border-box;
}

#s2047-adventure-core *,
.s2047-adventure-core * {
  box-sizing: border-box;
}

.s2047-core-header {
  text-align: center;
  margin-bottom: 18px;
}

.s2047-core-header h2 {
  margin: 0 0 8px;
  color: #fff1a0;
  font-size: clamp(28px, 5vw, 50px);
  text-shadow: 0 0 16px rgba(255, 230, 90, .45);
}

#s2047-core-location {
  margin: 8px 0 4px;
  font-size: clamp(20px, 4vw, 32px);
  color: #8df4ff;
  font-weight: 900;
}

#s2047-core-stats {
  margin: 0;
  color: #dff8ff;
}

.s2047-core-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
}

.s2047-core-panel {
  padding: 16px;
  border-radius: 20px;
  background: rgba(5, 20, 42, .9);
  border: 1px solid rgba(115, 233, 255, .34);
  box-shadow: inset 0 0 18px rgba(0, 225, 255, .08);
}

.s2047-core-main {
  grid-row: span 5;
}

.s2047-core-panel h3 {
  margin: 0 0 12px;
  color: #ffe680;
  text-align: center;
}

.s2047-core-output {
  height: 380px;
  overflow-y: auto;
  padding: 14px;
  border-radius: 16px;
  background: rgba(0, 8, 18, .9);
  border: 1px solid rgba(255, 235, 120, .22);
}

.s2047-core-line {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 180, 255, .1);
  border: 1px solid rgba(0, 220, 255, .15);
  line-height: 1.35;
}

.s2047-core-command-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

#s2047-core-command {
  flex: 1;
  min-height: 50px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(115, 233, 255, .44);
  background: rgba(0, 8, 18, .96);
  color: #fff;
  font-size: 16px;
}

#s2047-adventure-core button,
.s2047-adventure-core button {
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 235, 120, .75);
  background: linear-gradient(180deg, #ffe478, #bd7017);
  color: #111;
  font-weight: 850;
  cursor: pointer;
  transform: none !important;
}

#s2047-adventure-core button:hover,
#s2047-adventure-core button:focus,
#s2047-adventure-core button:active,
.s2047-adventure-core button:hover,
.s2047-adventure-core button:focus,
.s2047-adventure-core button:active {
  transform: none !important;
  filter: brightness(1.12);
}

.s2047-core-quick,
.s2047-core-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-top: 12px;
}

.s2047-core-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.s2047-core-list li {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}

@media (max-width: 900px) {
  .s2047-core-grid {
    grid-template-columns: 1fr;
  }
  .s2047-core-main {
    grid-row: auto;
  }
  .s2047-core-command-row {
    flex-direction: column;
  }
}


/* Space 2047: The Are We There Yet? Chronicles saved-game slots */
.s2047-core-save-panel {
  grid-column: 2;
}

.s2047-core-save-new {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

#s2047-core-save-name {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(115, 233, 255, .44);
  background: rgba(0, 8, 18, .96);
  color: #fff;
}

.s2047-core-save-slots {
  display: grid;
  gap: 10px;
}

.s2047-core-save-slot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
}

.s2047-core-save-info {
  display: grid;
  gap: 3px;
}

.s2047-core-save-info strong {
  color: #fff1a0;
}

.s2047-core-save-info span {
  color: #dff8ff;
}

.s2047-core-save-info small {
  color: rgba(247, 251, 255, .78);
}

.s2047-core-save-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.s2047-core-save-empty {
  padding: 10px;
  border-radius: 12px;
  color: rgba(247, 251, 255, .8);
  background: rgba(0, 0, 0, .2);
  text-align: center;
}

@media (max-width: 900px) {
  .s2047-core-save-panel {
    grid-column: auto;
  }

  .s2047-core-save-slot {
    grid-template-columns: 1fr;
  }

  .s2047-core-save-actions {
    flex-direction: row;
    justify-content: center;
  }
}


/* Space 2047 Load Saved Adventure box */
.s2047-core-load-panel {
  grid-column: 2;
}

.s2047-core-save-new {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
}

#s2047-core-save-name {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(115, 233, 255, .44);
  background: rgba(0, 8, 18, .96);
  color: #fff;
}

.s2047-core-save-scroll-shell {
  display: grid;
  grid-template-rows: auto 220px auto;
  gap: 8px;
  margin-top: 10px;
}

.s2047-core-save-arrow {
  width: 100%;
  min-height: 36px !important;
  border-radius: 12px !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

.s2047-core-save-list {
  height: 220px;
  overflow-y: scroll !important;
  overflow-x: hidden;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(115, 233, 255, .42);
  background: rgba(0, 8, 18, .82);
  scrollbar-width: auto;
}

.s2047-core-save-list::-webkit-scrollbar {
  width: 14px;
}

.s2047-core-save-list::-webkit-scrollbar-track {
  background: rgba(0, 10, 20, .9);
  border-radius: 12px;
}

.s2047-core-save-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffe478, #bd7017);
  border-radius: 12px;
  border: 2px solid rgba(0, 10, 20, .9);
}

.s2047-core-save-choice {
  display: block !important;
  width: 100%;
  min-height: 74px !important;
  margin: 0 0 9px !important;
  padding: 10px 12px !important;
  text-align: left !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .07) !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  color: #f7fbff !important;
  box-shadow: inset 0 0 12px rgba(0, 225, 255, .06);
}

.s2047-core-save-choice strong,
.s2047-core-save-choice span,
.s2047-core-save-choice small {
  display: block;
}

.s2047-core-save-choice strong {
  color: #fff1a0;
  font-size: 15px;
}

.s2047-core-save-choice span {
  color: #dff8ff;
  margin-top: 3px;
}

.s2047-core-save-choice small {
  color: rgba(247, 251, 255, .78);
  margin-top: 3px;
  font-size: 12px;
}

.s2047-core-save-choice.selected {
  border-color: rgba(255, 235, 120, .95) !important;
  box-shadow: 0 0 18px rgba(255, 225, 80, .38), inset 0 0 14px rgba(0, 225, 255, .12) !important;
}

.s2047-core-save-empty {
  text-align: center !important;
  color: rgba(247, 251, 255, .82) !important;
}

.s2047-core-save-load-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .s2047-core-load-panel {
    grid-column: auto;
  }

  .s2047-core-save-load-row {
    grid-template-columns: 1fr;
  }
}

/* SPACE 2047 ALL ADVENTURE UPGRADE */
.s2047-core-grid{align-items:start;}
.s2047-core-panel{min-height:120px;}
.s2047-core-main{min-height:420px;}
.s2047-core-output{min-height:360px;}
.s2047-scroll-arrows{display:flex;gap:8px;justify-content:center;margin:0 0 8px;position:sticky;top:0;z-index:2;background:rgba(4,10,30,.78);padding:4px;border-radius:10px;}
.s2047-scroll-arrows button{min-width:46px;border-radius:10px;border:1px solid rgba(247,198,74,.55);background:rgba(0,0,0,.35);color:#f7c64a;font-weight:900;cursor:pointer;}
.s2047-scrollable-list{max-height:180px;overflow-y:scroll;scrollbar-width:thin;padding-right:6px;}
.s2047-core-quick button[data-cmd="previous location"],
.s2047-core-quick button[data-cmd="travel history"],
.s2047-core-quick button[data-cmd="discoveries"]{background:linear-gradient(135deg,rgba(247,198,74,.18),rgba(50,210,255,.12));}
.s2047-core-buttons button::before{content:'✦ ';opacity:.85;color:#f7c64a;}


/* SPACE 2047 RIGHT COLUMN TRAVEL HISTORY FIX */
@media (min-width: 901px) {
  #s2047-adventure-core .s2047-core-grid,
  .s2047-adventure-core .s2047-core-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr) !important;
    align-items: start !important;
  }

  #s2047-adventure-core .s2047-core-main,
  .s2047-adventure-core .s2047-core-main {
    grid-column: 1 !important;
    grid-row: 1 / span 20 !important;
  }

  #s2047-adventure-core .s2047-core-grid > .s2047-core-panel:not(.s2047-core-main),
  .s2047-adventure-core .s2047-core-grid > .s2047-core-panel:not(.s2047-core-main) {
    grid-column: 2 !important;
  }

  #s2047-adventure-core .s2047-core-history-panel,
  .s2047-adventure-core .s2047-core-history-panel {
    grid-column: 2 !important;
    margin-top: 0 !important;
  }
}

#s2047-adventure-core .s2047-core-history-panel,
.s2047-adventure-core .s2047-core-history-panel {
  max-height: 310px;
  overflow: hidden;
}

#s2047-adventure-core .s2047-core-history-panel .s2047-scroll-arrows,
.s2047-adventure-core .s2047-core-history-panel .s2047-scroll-arrows {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 5 !important;
  margin: 0 0 8px !important;
}

#s2047-adventure-core #s2047-core-history,
.s2047-adventure-core #s2047-core-history {
  height: 185px !important;
  max-height: 185px !important;
  overflow-y: scroll !important;
  scrollbar-gutter: stable !important;
  padding-right: 8px !important;
}

@media (max-width: 900px) {
  #s2047-adventure-core .s2047-core-main,
  .s2047-adventure-core .s2047-core-main,
  #s2047-adventure-core .s2047-core-grid > .s2047-core-panel:not(.s2047-core-main),
  .s2047-adventure-core .s2047-core-grid > .s2047-core-panel:not(.s2047-core-main) {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}


/* SPACE 2047 RIGHT COLUMN PERMANENT SCROLLBOX FIX */
#s2047-adventure-core .s2047-core-grid,
.s2047-adventure-core .s2047-core-grid{
  display:grid !important;
  gap:18px !important;
}

@media (min-width:901px){
  #s2047-adventure-core .s2047-core-grid,
  .s2047-adventure-core .s2047-core-grid{
    grid-template-columns:minmax(0,1.35fr) minmax(290px,.85fr) !important;
  }
  #s2047-adventure-core .s2047-core-main,
  .s2047-adventure-core .s2047-core-main{
    grid-column:1 !important;
    grid-row:1 !important;
    min-height:560px !important;
  }
  #s2047-adventure-core .s2047-core-side-rail,
  .s2047-adventure-core .s2047-core-side-rail{
    grid-column:2 !important;
    grid-row:1 !important;
    min-width:0 !important;
    position:relative !important;
  }
}

#s2047-adventure-core .s2047-core-side-rail,
.s2047-adventure-core .s2047-core-side-rail{
  border:1px solid rgba(80,210,255,.35) !important;
  border-radius:18px !important;
  background:rgba(2,8,22,.48) !important;
  padding:10px !important;
  box-shadow:0 0 18px rgba(80,210,255,.10) inset !important;
}

#s2047-adventure-core .s2047-side-scroll-arrows,
.s2047-adventure-core .s2047-side-scroll-arrows{
  display:flex !important;
  flex-direction:row !important;
  justify-content:center !important;
  align-items:center !important;
  gap:10px !important;
  position:sticky !important;
  top:0 !important;
  z-index:20 !important;
  padding:4px 0 9px !important;
  margin:0 !important;
  background:rgba(2,8,22,.92) !important;
}

#s2047-adventure-core .s2047-side-scroll-arrows button,
.s2047-adventure-core .s2047-side-scroll-arrows button{
  width:50px !important;
  height:44px !important;
  border-radius:14px !important;
  border:1px solid rgba(247,198,74,.75) !important;
  background:linear-gradient(180deg,#f7d873,#c6932d) !important;
  color:#172033 !important;
  font-weight:900 !important;
  font-size:20px !important;
  cursor:pointer !important;
  line-height:1 !important;
}

#s2047-adventure-core .s2047-core-side-scroll,
.s2047-adventure-core .s2047-core-side-scroll{
  height:520px !important;
  max-height:calc(100vh - 220px) !important;
  min-height:360px !important;
  overflow-y:scroll !important;
  overflow-x:hidden !important;
  scrollbar-gutter:stable both-edges !important;
  padding:0 12px 10px 0 !important;
  scroll-behavior:smooth !important;
}

#s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar,
.s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar{
  width:16px !important;
}
#s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar-track,
.s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar-track{
  background:rgba(255,255,255,.10) !important;
  border-radius:14px !important;
}
#s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar-thumb,
.s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#f7d873,#c6932d) !important;
  border-radius:14px !important;
  border:2px solid rgba(2,8,22,.95) !important;
}

#s2047-adventure-core .s2047-core-side-scroll,
.s2047-adventure-core .s2047-core-side-scroll{
  scrollbar-width:auto !important;
  scrollbar-color:#f7c64a rgba(255,255,255,.10) !important;
}

#s2047-adventure-core .s2047-core-side-scroll .s2047-core-panel,
.s2047-adventure-core .s2047-core-side-scroll .s2047-core-panel{
  margin:0 0 12px !important;
  width:auto !important;
  max-width:none !important;
}

#s2047-adventure-core .s2047-core-history-panel,
.s2047-adventure-core .s2047-core-history-panel{
  max-height:none !important;
  overflow:visible !important;
}

#s2047-adventure-core #s2047-core-history,
.s2047-adventure-core #s2047-core-history,
#s2047-adventure-core #s2047-core-quests,
.s2047-adventure-core #s2047-core-quests{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  padding-right:0 !important;
}

@media (max-width:900px){
  #s2047-adventure-core .s2047-core-side-scroll,
  .s2047-adventure-core .s2047-core-side-scroll{
    height:420px !important;
    max-height:420px !important;
  }
}


/* SPACE 2047 RIGHT COLUMN FULL CONTENT SCROLLER FINAL
   One scroller controls every box on the right of the Adventure chat box. */
#s2047-adventure-core .s2047-core-grid,
.s2047-adventure-core .s2047-core-grid{
  display:grid !important;
  gap:18px !important;
  align-items:start !important;
}
@media (min-width:901px){
  #s2047-adventure-core .s2047-core-grid,
  .s2047-adventure-core .s2047-core-grid{
    grid-template-columns:minmax(0,1.4fr) minmax(300px,.8fr) !important;
  }
  #s2047-adventure-core .s2047-core-main,
  .s2047-adventure-core .s2047-core-main{
    grid-column:1 !important;
    grid-row:1 !important;
  }
  #s2047-adventure-core .s2047-core-side-rail,
  .s2047-adventure-core .s2047-core-side-rail{
    grid-column:2 !important;
    grid-row:1 !important;
    position:sticky !important;
    top:12px !important;
    align-self:start !important;
  }
}
#s2047-adventure-core .s2047-core-side-rail,
.s2047-adventure-core .s2047-core-side-rail{
  box-sizing:border-box !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow:hidden !important;
  border:1px solid rgba(80,210,255,.42) !important;
  border-radius:18px !important;
  background:rgba(2,8,22,.55) !important;
  padding:10px !important;
  box-shadow:0 0 18px rgba(80,210,255,.12) inset !important;
}
#s2047-adventure-core .s2047-side-scroll-arrows,
.s2047-adventure-core .s2047-side-scroll-arrows{
  display:flex !important;
  flex-direction:row !important;
  justify-content:center !important;
  align-items:center !important;
  gap:10px !important;
  position:relative !important;
  z-index:30 !important;
  padding:0 0 9px 0 !important;
  margin:0 !important;
  background:rgba(2,8,22,.96) !important;
}
#s2047-adventure-core .s2047-side-scroll-arrows button,
.s2047-adventure-core .s2047-side-scroll-arrows button{
  width:54px !important;
  height:44px !important;
  min-width:54px !important;
  border-radius:14px !important;
  border:1px solid rgba(247,198,74,.85) !important;
  background:linear-gradient(180deg,#f8db78,#c89227) !important;
  color:#111827 !important;
  font-weight:900 !important;
  font-size:20px !important;
  cursor:pointer !important;
  line-height:1 !important;
}
#s2047-adventure-core .s2047-core-side-scroll,
.s2047-adventure-core .s2047-core-side-scroll{
  box-sizing:border-box !important;
  display:block !important;
  width:100% !important;
  height:520px !important;
  max-height:calc(100vh - 230px) !important;
  min-height:360px !important;
  overflow-y:scroll !important;
  overflow-x:hidden !important;
  -webkit-overflow-scrolling:touch !important;
  scrollbar-gutter:stable both-edges !important;
  scrollbar-width:auto !important;
  scrollbar-color:#f7c64a rgba(255,255,255,.12) !important;
  padding:0 12px 14px 0 !important;
  scroll-behavior:smooth !important;
}
#s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar,
.s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar{width:18px !important; display:block !important;}
#s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar-track,
.s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar-track{background:rgba(255,255,255,.12) !important; border-radius:14px !important;}
#s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar-thumb,
.s2047-adventure-core .s2047-core-side-scroll::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#f8db78,#c89227) !important; border-radius:14px !important; border:2px solid rgba(2,8,22,.95) !important;}
#s2047-adventure-core .s2047-core-side-scroll .s2047-core-panel,
.s2047-adventure-core .s2047-core-side-scroll .s2047-core-panel{
  display:block !important;
  width:auto !important;
  max-width:none !important;
  margin:0 0 12px 0 !important;
  flex:none !important;
}
/* No nested scrolling in the right column: the whole right column scrolls instead. */
#s2047-adventure-core .s2047-core-side-scroll #s2047-core-quests,
.s2047-adventure-core .s2047-core-side-scroll #s2047-core-quests,
#s2047-adventure-core .s2047-core-side-scroll #s2047-core-history,
.s2047-adventure-core .s2047-core-side-scroll #s2047-core-history,
#s2047-adventure-core .s2047-core-side-scroll .s2047-scrollable-list,
.s2047-adventure-core .s2047-core-side-scroll .s2047-scrollable-list{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  padding-right:0 !important;
}
#s2047-adventure-core .s2047-core-side-scroll .s2047-scroll-arrows,
.s2047-adventure-core .s2047-core-side-scroll .s2047-scroll-arrows{
  display:none !important;
}
@media (max-width:900px){
  #s2047-adventure-core .s2047-core-grid,
  .s2047-adventure-core .s2047-core-grid{display:block !important;}
  #s2047-adventure-core .s2047-core-side-rail,
  .s2047-adventure-core .s2047-core-side-rail{position:relative !important; top:auto !important; margin-top:14px !important;}
  #s2047-adventure-core .s2047-core-side-scroll,
  .s2047-adventure-core .s2047-core-side-scroll{height:430px !important; max-height:430px !important;}
}


/* Space 2047 Adventure: audited Directions panel */
#s2047-core-exits.s2047-compass-only{
  display:grid !important;
  grid-template-columns:repeat(3,76px) !important;
  gap:10px !important;
  justify-content:center !important;
  align-items:center !important;
  max-width:290px !important;
  margin:12px auto 0 auto !important;
}
#s2047-core-exits.s2047-compass-only .s2047-compass-btn{
  width:76px !important;
  height:76px !important;
  min-width:76px !important;
  border-radius:999px !important;
  padding:0 !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:21px !important;
  font-weight:900 !important;
  line-height:1 !important;
}
#s2047-core-exits.s2047-compass-only .s2047-updown-only{
  grid-column:1 / -1 !important;
  display:flex !important;
  justify-content:center !important;
  gap:14px !important;
  margin:6px auto 8px auto !important;
}
#s2047-core-exits.s2047-compass-only .s2047-updown-btn{
  min-width:112px !important;
  border-radius:18px !important;
  padding:13px 18px !important;
  font-weight:900 !important;
}
#s2047-core-exits.s2047-compass-only .s2047-map-safe-button,
#s2047-core-exits.s2047-compass-only .s2047-mission-progress-button,
#s2047-core-exits.s2047-compass-only [data-s2047-dynamic-map="1"],
#s2047-core-exits.s2047-compass-only [data-s2047-mission-progress="1"]{
  grid-column:1 / -1 !important;
  justify-self:center !important;
  width:auto !important;
  min-width:225px !important;
  max-width:260px !important;
  border-radius:22px !important;
  padding:13px 22px !important;
  margin:6px auto 0 auto !important;
  text-align:center !important;
}
#s2047-core-exits.s2047-compass-only button:disabled{
  opacity:.38 !important;
  filter:grayscale(.55) !important;
  cursor:not-allowed !important;
}
#s2047-core-exits.s2047-compass-only a:not([data-s2047-dynamic-map]):not([data-s2047-mission-progress]){
  display:none !important;
}

/* SPACE 2047 SAFE FIX: keep Adventure content, hide only legacy direction pads, centre compass text */
.s2047-direction-pad,
#s2047-adventure-core .s2047-direction-pad,
.s2047-adventure-core .s2047-direction-pad,
button[data-s2047-se-button="1"],
button[data-s2047-extra-dir],
#s2047-core-exits button[data-s2047-extra-dir],
#s2047-core-exits button[data-s2047-se-button="1"]{
  display:none !important;
  visibility:hidden !important;
  width:0 !important;
  height:0 !important;
  min-width:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  overflow:hidden !important;
}

#s2047-core-exits.s2047-compass-only .s2047-compass-btn,
#s2047-core-exits .s2047-compass-btn{
  box-sizing:border-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  vertical-align:middle !important;
  line-height:76px !important;
  padding:0 !important;
  text-indent:0 !important;
  letter-spacing:0 !important;
  font-size:21px !important;
  font-weight:900 !important;
  white-space:nowrap !important;
}
#s2047-core-exits.s2047-compass-only .s2047-compass-btn::before,
#s2047-core-exits.s2047-compass-only .s2047-compass-btn::after,
#s2047-core-exits .s2047-compass-btn::before,
#s2047-core-exits .s2047-compass-btn::after{
  position:absolute !important;
  pointer-events:none !important;
}
#s2047-core-exits.s2047-compass-only .s2047-updown-only{
  display:flex !important;
}


/* Space 2047 final compass/right-arrow repair */
#s2047-core-exits.s2047-compass-only{
  display:grid !important;
  grid-template-columns:repeat(3,76px) !important;
  gap:10px !important;
  justify-content:center !important;
  align-items:center !important;
}
#s2047-core-exits.s2047-compass-only .s2047-compass-btn{
  width:76px !important;
  height:76px !important;
  min-width:76px !important;
  min-height:76px !important;
  border-radius:999px !important;
  padding:0 !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  line-height:1 !important;
  vertical-align:middle !important;
  transform:none !important;
}
#s2047-core-exits.s2047-compass-only .s2047-compass-btn::before,
#s2047-core-exits.s2047-compass-only .s2047-compass-btn::after,
#s2047-core-exits.s2047-compass-only .s2047-updown-btn::before,
#s2047-core-exits.s2047-compass-only .s2047-updown-btn::after{
  display:none !important;
  content:none !important;
}
#s2047-core-exits.s2047-compass-only .s2047-updown-only{
  grid-column:1 / -1 !important;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  gap:14px !important;
}
#s2047-adventure-core .s2047-side-scroll-arrows,
.s2047-adventure-core .s2047-side-scroll-arrows{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  gap:10px !important;
  position:sticky !important;
  top:0 !important;
  z-index:50 !important;
  margin:0 auto 10px auto !important;
  padding:6px 0 10px 0 !important;
  background:rgba(2,8,22,.96) !important;
  border-radius:14px !important;
}
#s2047-adventure-core .s2047-side-scroll-arrows button,
.s2047-adventure-core .s2047-side-scroll-arrows button{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  line-height:1 !important;
  padding:0 !important;
  margin:0 !important;
}

/* Legacy direction removal */
button, a{
}
#s2047-core-exits button, #s2047-core-exits a{
}
#s2047-core-exits button:not(.s2047-compass-btn):not(.s2047-updown-btn){
display:none !important;
}
.s2047-side-scroll-arrows button{
display:flex!important;align-items:center!important;justify-content:center!important;
}

/* Space 2047 Adventure popups for items, characters, and inventory */
.s2047-adventure-popup-overlay{
  position:fixed!important; inset:0!important; z-index:999999!important;
  display:flex!important; align-items:center!important; justify-content:center!important;
  padding:18px!important; background:rgba(0,0,0,.72)!important;
}
.s2047-adventure-popup{
  width:min(560px,94vw)!important; max-height:86vh!important; overflow:auto!important;
  position:relative!important; text-align:center!important; color:#fff7d6!important;
  border:2px solid rgba(255,215,106,.9)!important; border-radius:24px!important;
  padding:28px 20px 22px!important;
  background:radial-gradient(circle at top,#24365f 0,#071126 48%,#01030a 100%)!important;
  box-shadow:0 0 38px rgba(255,215,106,.35), inset 0 0 24px rgba(255,255,255,.06)!important;
}
.s2047-adventure-popup h2{margin:0 44px 12px!important;color:#ffd86b!important;font-size:clamp(1.45rem,5vw,2.3rem)!important;text-shadow:0 0 15px rgba(255,216,107,.35)!important;}
.s2047-adventure-popup p{font-size:1.05rem!important;line-height:1.55!important;margin:0 auto 18px!important;max-width:48ch!important;}
.s2047-adventure-popup-x{
  position:absolute!important; top:10px!important; right:10px!important; width:40px!important; height:40px!important;
  border-radius:50%!important; padding:0!important; min-width:40px!important; display:grid!important; place-items:center!important;
}
.s2047-adventure-popup-actions{display:flex!important;gap:10px!important;justify-content:center!important;flex-wrap:wrap!important;}
.s2047-adventure-popup-actions button{min-width:112px!important;}
#s2047-adventure-core #s2047-core-inventory li,
.s2047-adventure-core #s2047-core-inventory li{cursor:pointer!important;}
#s2047-adventure-core #s2047-core-inventory li:hover,
.s2047-adventure-core #s2047-core-inventory li:hover{outline:1px solid rgba(255,215,106,.6)!important;}

/* Space 2047 Adventure scroll-arrow stability fix: stop mobile smooth-scroll snap-back. */
#s2047-adventure-core .s2047-core-side-scroll,
.s2047-adventure-core .s2047-core-side-scroll,
#s2047-adventure-core .s2047-scrollable-list,
.s2047-adventure-core .s2047-scrollable-list{
  scroll-behavior:auto !important;
  overscroll-behavior:contain !important;
}
#s2047-adventure-core .s2047-side-scroll-arrows button,
.s2047-adventure-core .s2047-side-scroll-arrows button,
#s2047-adventure-core .s2047-scroll-arrows button,
.s2047-adventure-core .s2047-scroll-arrows button{
  touch-action:manipulation !important;
}


/* Space 2047 v38: remove redundant Up/Down buttons directly under Directions.
   Keep the outer right-column scroll arrows above the panel. */
#s2047-core-exits .s2047-updown-only,
#s2047-core-exits .s2047-updown-btn,
#s2047-core-exits [data-s2047-extra-dir="up"],
#s2047-core-exits [data-s2047-extra-dir="down"]{
  display:none!important;
  visibility:hidden!important;
  height:0!important;
  min-height:0!important;
  width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
}


/* Space 2047 v39 hard fix: remove the small Up/Down control strip immediately under the Directions heading.
   This targets all known duplicate control wrappers, while preserving the large side scroll arrows above
   the right column and preserving the 3x3 compass buttons. */
#s2047-core-exits > .s2047-updown-only,
#s2047-core-exits > .s2047-live-scroll-controls,
#s2047-core-exits > .s2047-nav-controls,
#s2047-core-exits > .s2047-sim-controls,
#s2047-core-exits > .s2047-admin-controls,
#s2047-core-exits > .s2047-computer-controls,
#s2047-core-exits > .s2047-core-arrows,
#s2047-core-exits > .s2047-scroll-arrows,
#s2047-core-exits > .s2047-direction-scroll-controls,
#s2047-core-exits button[data-live-scroll],
#s2047-core-exits button[data-nav-scroll-up],
#s2047-core-exits button[data-nav-scroll-down],
#s2047-core-exits button[data-sim-scroll-up],
#s2047-core-exits button[data-sim-scroll-down],
#s2047-core-exits button[data-admin-scroll-up],
#s2047-core-exits button[data-admin-scroll-down],
#s2047-core-exits button[data-computer-scroll-up],
#s2047-core-exits button[data-computer-scroll-down],
#s2047-core-exits button[data-core-up],
#s2047-core-exits button[data-core-down],
#s2047-core-exits .s2047-updown-btn,
#s2047-core-exits [data-s2047-extra-dir="up"],
#s2047-core-exits [data-s2047-extra-dir="down"]{
  display:none !important;
  visibility:hidden !important;
  height:0 !important;
  min-height:0 !important;
  max-height:0 !important;
  width:0 !important;
  min-width:0 !important;
  max-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  overflow:hidden !important;
  pointer-events:none !important;
}
#s2047-core-exits.s2047-compass-only{
  padding-top:0 !important;
}


/* Space 2047 v40: hard-hide duplicate Up/Down controls only inside the Directions controls container. */
#s2047-core-exits .s2047-updown-only,
#s2047-core-exits .s2047-updown-btn,
#s2047-core-exits [data-s2047-extra-dir="up"],
#s2047-core-exits [data-s2047-extra-dir="down"],
#s2047-core-exits .s2047-direction-scroll-controls,
#s2047-core-exits .s2047-live-scroll-controls,
#s2047-core-exits .s2047-nav-controls,
#s2047-core-exits .s2047-sim-controls,
#s2047-core-exits .s2047-admin-controls,
#s2047-core-exits .s2047-computer-controls,
#s2047-core-exits .s2047-core-arrows{
  display:none!important; visibility:hidden!important; height:0!important; min-height:0!important; overflow:hidden!important; padding:0!important; margin:0!important; border:0!important;
}

/* Space 2047 v42: hide the unwanted Up/Down strip directly under Adventure heading. */
.s2047-core-main > .s2047-v33-scroll-controls,
.s2047-core-main > .s2047-live-scroll-controls,
.s2047-core-main [data-v33-scroll-up],
.s2047-core-main [data-v33-scroll-down]{display:none!important;visibility:hidden!important;height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;}


/* Space 2047 v43: Adventure text arrows moved to the right underneath the text adventure box. */
#s2047-adventure-core .s2047-core-output,
.s2047-adventure-core .s2047-core-output{
  overflow-y:scroll !important;
  scrollbar-gutter:stable both-edges !important;
  scroll-behavior:auto !important;
}
#s2047-adventure-core .s2047-adventure-output-scroll-arrows,
.s2047-adventure-core .s2047-adventure-output-scroll-arrows{
  display:flex !important;
  justify-content:flex-end !important;
  align-items:center !important;
  gap:8px !important;
  width:100% !important;
  margin:8px 0 10px !important;
  padding:0 4px 0 0 !important;
  box-sizing:border-box !important;
}
#s2047-adventure-core .s2047-adventure-output-scroll-arrows button,
.s2047-adventure-core .s2047-adventure-output-scroll-arrows button{
  min-width:48px !important;
  height:38px !important;
  border-radius:12px !important;
  border:1px solid rgba(247,198,74,.75) !important;
  background:linear-gradient(135deg,rgba(5,12,32,.96),rgba(23,62,96,.86)) !important;
  color:#f7c64a !important;
  font-weight:900 !important;
  cursor:pointer !important;
  box-shadow:0 0 12px rgba(247,198,74,.18) !important;
}
#s2047-adventure-core .s2047-adventure-output-scroll-arrows button:hover,
.s2047-adventure-core .s2047-adventure-output-scroll-arrows button:hover{
  transform:translateY(-1px);
  box-shadow:0 0 16px rgba(247,198,74,.34) !important;
}
@media (max-width:700px){
  #s2047-adventure-core .s2047-adventure-output-scroll-arrows,
  .s2047-adventure-core .s2047-adventure-output-scroll-arrows{
    justify-content:flex-end !important;
    margin-top:7px !important;
  }
  #s2047-adventure-core .s2047-adventure-output-scroll-arrows button,
  .s2047-adventure-core .s2047-adventure-output-scroll-arrows button{
    min-width:46px !important;
    height:38px !important;
  }
}


/* Space 2047 v44: remove the arrow buttons above Send and place them at the right middle of the Adventure text box. */
#s2047-adventure-core .s2047-adventure-output-wrap,
.s2047-adventure-core .s2047-adventure-output-wrap{
  display:grid !important;
  grid-template-columns:minmax(0, 1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  width:100% !important;
  margin:0 0 12px !important;
}
#s2047-adventure-core .s2047-adventure-output-wrap .s2047-core-output,
.s2047-adventure-core .s2047-adventure-output-wrap .s2047-core-output{
  grid-column:1 !important;
  grid-row:1 !important;
  width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  overflow-y:scroll !important;
  scrollbar-gutter:stable !important;
}
#s2047-adventure-core .s2047-adventure-output-wrap .s2047-adventure-output-scroll-arrows,
.s2047-adventure-core .s2047-adventure-output-wrap .s2047-adventure-output-scroll-arrows{
  grid-column:2 !important;
  grid-row:1 !important;
  align-self:center !important;
  justify-self:end !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  align-items:center !important;
  gap:8px !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
}
#s2047-adventure-core .s2047-adventure-output-wrap .s2047-adventure-output-scroll-arrows button,
.s2047-adventure-core .s2047-adventure-output-wrap .s2047-adventure-output-scroll-arrows button{
  width:52px !important;
  min-width:52px !important;
  height:48px !important;
  min-height:48px !important;
  padding:0 !important;
  border-radius:14px !important;
  font-size:18px !important;
  line-height:1 !important;
}
/* Safety: any old direct child Adventure arrows left above the Send row are hidden. */
#s2047-adventure-core .s2047-core-main > .s2047-adventure-output-scroll-arrows,
.s2047-adventure-core .s2047-core-main > .s2047-adventure-output-scroll-arrows{
  display:none !important;
  visibility:hidden !important;
  height:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}
@media (max-width:700px){
  #s2047-adventure-core .s2047-adventure-output-wrap,
  .s2047-adventure-core .s2047-adventure-output-wrap{
    grid-template-columns:minmax(0, 1fr) 48px !important;
    gap:7px !important;
  }
  #s2047-adventure-core .s2047-adventure-output-wrap .s2047-adventure-output-scroll-arrows button,
  .s2047-adventure-core .s2047-adventure-output-wrap .s2047-adventure-output-scroll-arrows button{
    width:46px !important;
    min-width:46px !important;
    height:44px !important;
    min-height:44px !important;
  }
}


/* Space 2047 v46: final Adventure arrow layout. Remove yellow v34/v33 strips; keep blue arrows middle-right of text. */
#s2047-adventure-core .s2047-v34-scroll-controls,
.s2047-adventure-core .s2047-v34-scroll-controls,
#s2047-adventure-core .s2047-core-main .s2047-v33-scroll-controls,
.s2047-adventure-core .s2047-core-main .s2047-v33-scroll-controls{
  display:none!important;visibility:hidden!important;width:0!important;height:0!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;pointer-events:none!important;
}
#s2047-adventure-core .s2047-adventure-output-wrap,
.s2047-adventure-core .s2047-adventure-output-wrap{
  display:grid!important;grid-template-columns:minmax(0,1fr) 58px!important;align-items:center!important;gap:10px!important;width:100%!important;
}
#s2047-adventure-core .s2047-adventure-output-scroll-arrows,
.s2047-adventure-core .s2047-adventure-output-scroll-arrows{
  grid-column:2!important;grid-row:1!important;align-self:center!important;justify-self:center!important;display:flex!important;flex-direction:column!important;gap:8px!important;margin:0!important;padding:0!important;width:auto!important;
}
#s2047-adventure-core .s2047-adventure-output-scroll-arrows button,
.s2047-adventure-core .s2047-adventure-output-scroll-arrows button{
  width:52px!important;min-width:52px!important;height:48px!important;min-height:48px!important;border-radius:14px!important;
}
