#appShell.xhaus-chat-home .satellite-report-panel[hidden],
#appShell.xhaus-chat-home .satellite-changes[hidden],
#appShell.xhaus-chat-home .satellite-decision-actions[hidden],
#appShell.xhaus-chat-home #cogList[hidden] {
  display: none !important;
}

#appShell.xhaus-chat-home .satellite-report-panel {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  min-height: 180px !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding: 16px !important;
  border: 1px solid rgba(214, 146, 98, .18) !important;
  border-radius: 20px !important;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 195, 149, .22), transparent 38%),
    rgba(255, 252, 247, .72) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .78) !important;
  overflow: visible !important;
}

#appShell.xhaus-chat-home .satellite-report-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  flex: 0 0 auto !important;
}

#appShell.xhaus-chat-home .satellite-report-kicker {
  margin: 0 0 3px !important;
  color: #e79a70 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: .16em !important;
}

#appShell.xhaus-chat-home .satellite-report-head h4 {
  margin: 0 !important;
  color: #80543d !important;
  font-family: "KaiTi", "STKaiti", "Songti SC", serif !important;
  font-size: 20px !important;
  line-height: 1.2 !important;
}

#appShell.xhaus-chat-home .satellite-observe-btn,
#appShell.xhaus-chat-home .satellite-decision-btn {
  display: inline-flex !important;
  min-height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 18px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease !important;
}

#appShell.xhaus-chat-home .satellite-observe-btn {
  border: 0 !important;
  background: linear-gradient(135deg, #ff796e, #ffa370) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(238, 123, 88, .22) !important;
}

#appShell.xhaus-chat-home .satellite-observe-btn:not(:disabled):hover,
#appShell.xhaus-chat-home .satellite-decision-btn:not(:disabled):hover {
  transform: translateY(-1px) !important;
}

#appShell.xhaus-chat-home .satellite-observe-btn:disabled,
#appShell.xhaus-chat-home .satellite-decision-btn:disabled {
  cursor: not-allowed !important;
  opacity: .52 !important;
}

#appShell.xhaus-chat-home .satellite-report-message {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  background: rgba(255, 245, 234, .7) !important;
  color: #9c7058 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

#appShell.xhaus-chat-home .satellite-report-message[data-phase="pending"] {
  background: rgba(255, 238, 218, .86) !important;
  color: #986044 !important;
}

#appShell.xhaus-chat-home .satellite-report-message[data-phase="applied"] {
  background: rgba(232, 247, 231, .84) !important;
  color: #60805d !important;
}

#appShell.xhaus-chat-home .satellite-changes {
  display: grid !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  align-content: start !important;
  gap: 10px !important;
  padding: 1px 4px 4px 1px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(194, 130, 91, .38) transparent !important;
}

#appShell.xhaus-chat-home .satellite-change-card {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 12px !important;
  padding: 13px 14px !important;
  border: 1px solid rgba(213, 147, 101, .16) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .68) !important;
  box-shadow: 0 8px 22px rgba(136, 82, 52, .06) !important;
}

#appShell.xhaus-chat-home .satellite-change-icon {
  display: grid !important;
  width: 36px !important;
  height: 36px !important;
  place-items: center !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #ff8074, #ffb17e) !important;
  color: #fff !important;
  font-size: 15px !important;
  box-shadow: 0 9px 18px rgba(238, 126, 94, .18) !important;
}

#appShell.xhaus-chat-home .satellite-change-card.is-cognition .satellite-change-icon {
  background: linear-gradient(135deg, #d899bb, #efb7c5) !important;
}

#appShell.xhaus-chat-home .satellite-change-copy,
#appShell.xhaus-chat-home .satellite-change-copy h5,
#appShell.xhaus-chat-home .satellite-change-copy p {
  min-width: 0 !important;
  margin: 0 !important;
}

#appShell.xhaus-chat-home .satellite-change-type {
  display: block !important;
  margin-bottom: 2px !important;
  color: #d3906b !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
}

#appShell.xhaus-chat-home .satellite-change-copy h5 {
  color: #80533c !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

#appShell.xhaus-chat-home .satellite-change-copy p {
  margin-top: 4px !important;
  color: #9d7661 !important;
  font-size: 11px !important;
  line-height: 1.55 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#appShell.xhaus-chat-home .satellite-change-check {
  display: inline-block !important;
  margin-top: 7px !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  background: rgba(239, 246, 229, .88) !important;
  color: #72825d !important;
  font-size: 9px !important;
  font-weight: 800 !important;
}

#appShell.xhaus-chat-home .satellite-decision-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  flex: 0 0 auto !important;
  gap: 10px !important;
  padding-top: 2px !important;
}

#appShell.xhaus-chat-home .satellite-decision-btn.is-accept {
  border: 0 !important;
  background: linear-gradient(135deg, #ff796e, #ffa370) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(238, 123, 88, .2) !important;
}

#appShell.xhaus-chat-home .satellite-decision-btn.is-reject {
  border: 1px solid rgba(181, 121, 88, .22) !important;
  background: rgba(255, 252, 247, .82) !important;
  color: #9d7058 !important;
}

#appShell.xhaus-chat-home .memory-card.satellite-view > .doc-title,
#appShell.xhaus-chat-home .memory-card.satellite-view > textarea,
#appShell.xhaus-chat-home .memory-card.satellite-view > .wide-action,
#appShell.xhaus-chat-home .memory-card.satellite-view > .expand-button {
  display: none !important;
}

body.control-open #appShell.xhaus-chat-home .lower-control-row.is-open[data-active="memory"] > .memory-card.satellite-view {
  display: flex !important;
  flex-direction: column !important;
  min-height: 380px !important;
  flex: 1 1 auto !important;
  overflow: auto !important;
}

body.control-open #appShell.xhaus-chat-home .lower-control-row.is-open[data-active="memory"] > .satellite-card {
  display: none !important;
}

body.control-open #appShell.xhaus-chat-home .memory-card.satellite-view > .memory-expand-source {
  min-height: 240px !important;
  flex: 1 1 auto !important;
  overflow: auto !important;
  display: flex !important;
  flex-direction: column !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(194, 130, 91, .38) transparent !important;
}

#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-report-panel {
  gap: 7px !important;
  padding: 9px !important;
  border-radius: 14px !important;
}

#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-report-head h4,
#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-report-kicker,
#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-changes,
#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-decision-actions {
  display: none !important;
}

#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-report-message {
  padding: 6px 8px !important;
  font-size: 9px !important;
  line-height: 1.35 !important;
}

#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-observe-btn {
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 9px !important;
}

/* ── Satellite 报告专用弹窗 ── */

#satelliteReportOverlay {
  z-index: 100000 !important;
}

.satellite-report-overlay .detail-modal {
  max-width: 680px !important;
  max-height: min(92vh, 800px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.satellite-report-overlay .satellite-report-overlay-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex: 0 0 auto !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid rgba(213, 147, 101, .18) !important;
}

.satellite-report-overlay .satellite-report-overlay-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
}

.satellite-report-overlay .satellite-report-overlay-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 18px 2px 4px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(194, 130, 91, .38) transparent !important;
}

.satellite-report-overlay .satellite-report-message {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
  background: rgba(255, 245, 234, .74) !important;
  color: #9c7058 !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.satellite-report-overlay .satellite-report-message[data-phase="pending"] {
  background: rgba(255, 238, 218, .88) !important;
  color: #986044 !important;
}

.satellite-report-overlay .satellite-report-message[data-phase="applied"] {
  background: rgba(232, 247, 231, .86) !important;
  color: #60805d !important;
}

.satellite-report-overlay .satellite-changes {
  display: grid !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  align-content: start !important;
  gap: 10px !important;
  overflow-y: auto !important;
}

.satellite-report-overlay .satellite-decision-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  flex: 0 0 auto !important;
  gap: 12px !important;
  padding-top: 6px !important;
}

.satellite-report-overlay .satellite-decision-actions[hidden] {
  display: none !important;
}

/* ── 打开报告按钮（卫星摘要区域内） ── */

#appShell.xhaus-chat-home .satellite-open-report-row {
  flex: 0 0 auto !important;
  padding: 2px 0 !important;
}

#appShell.xhaus-chat-home .satellite-open-report-btn {
  display: flex !important;
  width: 100% !important;
  min-height: 44px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 20px !important;
  border: 2px dashed rgba(213, 147, 101, .45) !important;
  border-radius: 16px !important;
  background: rgba(255, 252, 247, .68) !important;
  color: #80543d !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: .04em !important;
  cursor: pointer !important;
  transition: border-color .2s ease, background .2s ease, transform .18s ease !important;
}

#appShell.xhaus-chat-home .satellite-open-report-btn:hover {
  border-color: #d3906b !important;
  background: rgba(255, 245, 234, .82) !important;
  transform: translateY(-1px) !important;
}

#appShell.xhaus-chat-home .satellite-open-report-btn:active {
  transform: translateY(0) !important;
}

/* The expanded memory editor is fixed; individual contents handle scrolling. */
body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card {
  min-height: 0 !important;
  overflow: hidden !important;
}

body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card > textarea {
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  resize: none !important;
}

body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card > .memory-expand-source {
  display: block !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card .memory-list,
body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card .satellite-changes {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card .satellite-report-panel {
  min-height: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card .satellite-changes {
  height: auto !important;
}

/* Expanded report: read the current file/report content before taking action. */
body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card .satellite-report-message {
  order: 1 !important;
}

body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card .satellite-changes {
  order: 2 !important;
}

body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card .satellite-decision-actions {
  order: 3 !important;
}

body.control-open #appShell.xhaus-chat-home > .lower-control-row.is-open[data-active="memory"] > .memory-card .satellite-report-head {
  order: 4 !important;
  margin-top: auto !important;
}

/* The compact main-card actions have their own typography and never inherit
   the expanded report's button sizing. */
#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view {
  --satellite-compact-action-font-size: 14px;
}

#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-report-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 8px !important;
}

#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-observe-btn,
#appShell.xhaus-chat-home .sample-board > .lower-control-row:not(.is-open) > .memory-card.satellite-view .satellite-open-report-btn {
  min-width: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  font-size: var(--satellite-compact-action-font-size) !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

/* The full Satellite report is rendered outside #appShell, so it needs the
   same primary-action treatment explicitly instead of inheriting page styles. */
.satellite-report-overlay .satellite-observe-btn {
  display: inline-flex !important;
  min-height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #ff796e, #ffa370) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(238, 123, 88, .22) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

.satellite-report-overlay .satellite-observe-btn:not(:disabled):hover {
  transform: translateY(-1px) !important;
}

.satellite-report-overlay .satellite-observe-btn:disabled {
  cursor: not-allowed !important;
  opacity: .52 !important;
}


/* Full-screen Satellite review actions live outside #appShell.  Keep their
   visual language aligned with the warm pink primary actions in the app. */
.satellite-report-overlay .detail-modal {
  width: min(920px, calc(100vw - 64px)) !important;
  max-width: 920px !important;
  min-height: min(560px, calc(100dvh - 64px)) !important;
  max-height: min(90dvh, 820px) !important;
}

.satellite-report-overlay .satellite-decision-actions {
  gap: 14px !important;
  padding: 12px 4px 2px !important;
}

.satellite-report-overlay .satellite-decision-btn {
  display: inline-flex !important;
  min-height: 48px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 20px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
  cursor: pointer !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}

.satellite-report-overlay .satellite-decision-btn.is-accept {
  border: 0 !important;
  background: linear-gradient(135deg, #ff796e, #ffa370) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(238, 123, 88, .24) !important;
}

.satellite-report-overlay .satellite-decision-btn.is-reject {
  border: 1px solid rgba(238, 128, 112, .34) !important;
  background: linear-gradient(135deg, rgba(255, 235, 232, .98), rgba(255, 247, 239, .98)) !important;
  color: #b96b5a !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88), 0 8px 18px rgba(191, 113, 90, .10) !important;
}

.satellite-report-overlay .satellite-decision-btn:not(:disabled):hover {
  transform: translateY(-2px) !important;
}

.satellite-report-overlay .satellite-decision-btn.is-accept:not(:disabled):hover {
  box-shadow: 0 16px 28px rgba(238, 123, 88, .32) !important;
  filter: saturate(1.04) !important;
}

.satellite-report-overlay .satellite-decision-btn.is-reject:not(:disabled):hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 22px rgba(191, 113, 90, .16) !important;
}

.satellite-report-overlay .satellite-decision-btn:focus-visible {
  outline: 3px solid rgba(255, 137, 117, .42) !important;
  outline-offset: 3px !important;
}

.satellite-report-overlay .satellite-decision-btn:disabled {
  cursor: not-allowed !important;
  opacity: .52 !important;
}

@media (max-width: 700px) {
  .satellite-report-overlay.detail-overlay {
    padding: 16px !important;
  }

  .satellite-report-overlay .detail-modal {
    width: calc(100vw - 28px) !important;
    min-height: min(560px, calc(100dvh - 32px)) !important;
    border-radius: 22px !important;
  }

  .satellite-report-overlay .satellite-decision-actions {
    grid-template-columns: 1fr !important;
  }
}


.satellite-report-overlay .satellite-report-message,
#appShell.xhaus-chat-home .satellite-report-message {
  white-space: pre-line;
}
