/* Aster Base uses the rover canvas and keeps its walking HUD in one overlay. */
.mars-energy-farm-visit {
  position:absolute;top:18px;left:445px;z-index:45;min-height:60px;padding:10px 18px;
  border:1px solid #b5c7d4;border-radius:16px;background:#e8f2ff;color:#254c70;
  font:800 14px/1.2 system-ui,sans-serif;cursor:pointer;
}
.mars-energy-farm-visit:focus-visible {outline:3px solid #156d76;outline-offset:3px;}
@media(max-width:760px){.mars-energy-farm-visit{top:auto;bottom:244px;left:auto;right:12px;min-height:58px;padding:8px 14px;font-size:13px;border-radius:14px;}}
.mars-bubble-visit {
  position: absolute; top: 18px; left: 290px; z-index: 45;
  min-height: 60px; padding: 10px 19px; border: 1px solid #b4d7d0;
  border-radius: 16px; background: #e4fff5; color: #235b56;
  font: 800 14px/1.2 system-ui, sans-serif; cursor: pointer;
}
.mars-rover-level.inside-habitat > :not(.mars-rover-stage):not(.mars-bubble-ui) { display: none !important; }
.mars-bubble-ui {
  position: absolute; inset: 0; z-index: 46; pointer-events: none;
  color: #244f55; font-family: system-ui, sans-serif;
}
.mars-bubble-ui button {
  pointer-events: auto; min-height: 52px; border: 1px solid #b8d5d0;
  border-radius: 10px; background: #faf8efd9; color: #304b43;
  font: 650 13px/1.2 system-ui, sans-serif; padding: 12px 18px; cursor: pointer;
  box-shadow: 0 3px 12px #233f3714; backdrop-filter: blur(16px);
}
.mars-bubble-ui button:active { transform: translateY(2px); box-shadow: none; }
.mars-bubble-ui button:disabled { opacity: 0.55; cursor: default; }
.mars-bubble-ui button:focus-visible, .mars-bubble-visit:focus-visible { outline: 3px solid #156d76; outline-offset: 3px; }
.mars-bubble-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 15px;
  position: absolute; top: max(20px, env(safe-area-inset-top)); left: 24px; right: 24px;
}
.mars-bubble-header > div { padding: 14px 18px; background: #f9f7eadb; border: 1px solid #ffffffa8; border-radius: 4px 18px 18px 18px; box-shadow: 0 8px 30px #243c3514; backdrop-filter: blur(16px); }
.mars-bubble-header span { font-size: 10px; font-weight: 800; letter-spacing: 2px; color: #598078; }
.mars-bubble-header h1 { margin: 6px 0; font: 400 27px/1.1 Georgia, serif; letter-spacing: -0.5px; }
.mars-bubble-header p { margin: 0; font-size: 12px; color: #527e72; }
.mars-bubble-places { position: absolute; left: 24px; bottom: 28px; display: flex; flex-direction: row; gap: 6px; }
.mars-bubble-places button { text-align: center; min-width: 92px; background: #f9f7eadb; }
.mars-bubble-places .mars-bubble-journal-toggle { background: #ffe4a6ed; color: #654b25; border-color: #cfb879; }
.mars-bubble-dock {
  position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(580px, calc(100% - 32px)); box-sizing: border-box; padding: 14px 18px;
  background: #f9f7eade; border: 1px solid #ffffffaa; border-radius: 16px; box-shadow: 0 10px 36px #28463614;
  display: grid; gap: 8px; backdrop-filter: blur(16px);
}
.mars-bubble-dock p { margin: 0; font-size: 12px; line-height: 1.4; min-height: 17px; }
.mars-bubble-walk { display: grid; grid-template-columns: 1fr 1.2fr 1fr 1fr; gap: 8px; }
.mars-bubble-walk button { min-height: 58px; padding: 10px 5px; touch-action: none; }
.mars-bubble-walk [data-habitat-walk="forward"] { background: #287d72; color: #fff; border-color: #24665e; }
.mars-bubble-dock .mars-bubble-action { background: #f7d68b; border-color: #dfbe79; color: #664d23; min-height: 48px; }
.mars-bubble-dock small { text-align: center; font-size: 11px; color: #67877b; }
@media (min-width: 1000px) {
  .mars-bubble-dock { left: auto; right: 24px; transform: none; width: 380px; }
}
.mars-bubble-journal-shade { pointer-events: auto; position: absolute; inset: 0; background: #143c434f; backdrop-filter: blur(7px); display: grid; place-items: center; padding: 18px; box-sizing: border-box; }
.mars-bubble-journal { width: min(760px,100%); max-height: calc(100% - 12px); display: flex; flex-direction: column; background: #fffaf0; border: 1px solid #fff; border-radius: 22px; box-shadow: 0 20px 80px #102e4440; overflow: hidden; pointer-events: auto; }
.mars-bubble-journal > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #d7ded0; background: #f2eddd; flex-shrink: 0; }
.mars-bubble-journal > header span { font-size: 10px; letter-spacing: 2px; font-weight: 750; color: #638078; }
.mars-bubble-journal h2 { margin: 5px 0 0; font: 400 29px/1.15 Georgia,serif; }
.mars-bubble-journal-body { overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 24px; }
.mars-bubble-journal-intro { font-size: 15px; line-height: 1.5; margin: 0 0 12px; }
.mars-bubble-journal-count { font-size: 13px; font-weight: 750; color: #8b6527; }
.mars-bubble-journal-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.mars-bubble-journal-cards article { padding: 17px; background: #fffdf6; border: 1px solid #d9d9c5; border-radius: 15px; align-self: start; }
.mars-bubble-journal-cards article.found { background: #eef6e5; border-color: #9bbb9f; }
.mars-bubble-stamp { display: inline-block; font: 750 10px/1.2 system-ui,sans-serif; letter-spacing: 1px; color: #8a6736; padding: 7px 9px; background: #f8e6bd; border: 1px dashed #b9975c; border-radius: 5px; transform: rotate(-2deg); }
.found .mars-bubble-stamp { color: #29634d; background: #d6eacb; border-color: #76a180; }
.mars-bubble-journal-cards h3 { margin: 14px 0 8px; font: 500 23px/1.1 Georgia,serif; }
.mars-bubble-journal-cards p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.mars-bubble-journal-cards button { width: 100%; min-height: 48px; background: #e4efdf; border-color: #bdcfb6; }
.mars-bubble-cell-clues { display: grid; gap: 14px; border-top: 1px solid #dfdeca; margin-top: 17px; padding-top: 15px; }
.mars-bubble-cell-clues p { font-size: 12px; }
.mars-bubble-cell-clues button { background: #fbefd2; }
.mars-bubble-journal-footnote { font-size: 12px; line-height: 1.5; color: #6e7c6e; margin: 18px 0 0; }
.mars-bubble-explorer-badge { margin: 0 0 18px; padding: 16px; border: 2px solid #c9a757; border-radius: 12px; background: #f4dfa1; text-align: center; font: 500 26px Georgia,serif; color: #654b25; }
.mars-bubble-explorer-badge span { display: block; font: 650 13px system-ui,sans-serif; margin-top: 5px; }
/* The discovery launcher belongs to the parent host, outside the rover section. */
.rover-discovery-base:has(.inside-habitat) + .rover-discovery-entry { display: none; }
body:has(.inside-habitat) .zephy-buddy { display: none; }
@media (max-width: 760px) {
  .mars-bubble-visit { left: 12px; right: auto; top: auto; bottom: 244px; min-width: 126px; min-height: 58px; padding: 8px 14px; font-size: 13px; border-radius: 14px; }
  .mars-bubble-header { left: 12px; right: 12px; top: max(12px, env(safe-area-inset-top)); gap: 8px; }
  .mars-bubble-header > div { padding: 10px 12px; border-radius: 4px 14px 14px 14px; }
  .mars-bubble-header span { font-size: 8px; letter-spacing: 1.2px; }
  .mars-bubble-header h1 { font-size: 21px; margin: 5px 0; }
  .mars-bubble-header p { font-size: 11px; }
  .mars-bubble-header > button { max-width: 108px; min-height: 58px; padding: 10px; font-size: 12px; }
  .mars-bubble-places { left: 12px; right: 12px; top: auto; bottom: 146px; flex-direction: row; gap: 5px; }
  .mars-bubble-ui:has(.mars-bubble-action) .mars-bubble-places { bottom: 204px; }
  .mars-bubble-places button { flex: 1; min-width: 0; padding: 10px 8px; font-size: 12px; text-align: center; }
  .mars-bubble-dock { bottom: max(12px, env(safe-area-inset-bottom)); padding: 10px; gap: 7px; width: calc(100% - 24px); }
  .mars-bubble-dock p { font-size: 12px; }
  .mars-bubble-walk { gap: 6px; }
  .mars-bubble-walk button { font-size: 12px; }
  .mars-bubble-dock small { display: none; }
  .mars-bubble-places button { padding: 10px 4px; font-size: 11px; }
  .mars-bubble-journal-shade { padding: 10px; }
  .mars-bubble-journal { max-height: calc(100% - 8px); border-radius: 16px; }
  .mars-bubble-journal > header { padding: 14px; gap: 8px; }
  .mars-bubble-journal h2 { font-size: 24px; }
  .mars-bubble-journal > header button { padding: 10px; max-width: 106px; font-size: 12px; }
  .mars-bubble-journal-body { padding: 15px; }
  .mars-bubble-journal-cards { grid-template-columns: 1fr; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .mars-bubble-header > div { padding: 10px 15px; }
  .mars-bubble-header h1 { font-size: 23px; }
  .mars-bubble-places { top: 122px; bottom: auto; }
  .mars-bubble-ui:has(.mars-bubble-action) .mars-bubble-places { bottom: auto; }
  .mars-bubble-dock { width: 460px; left: auto; right: 16px; transform: none; bottom: 12px; padding: 10px; gap: 7px; }
  .mars-bubble-dock small { display: none; }
}
