:root {
  color-scheme: dark;
  --bg: #07100b;
  --bg-2: #0c1710;
  --panel: rgba(13, 25, 17, 0.72);
  --panel-strong: rgba(15, 29, 20, 0.9);
  --panel-soft: rgba(235, 226, 199, 0.06);
  --line: rgba(209, 226, 191, 0.14);
  --line-bright: rgba(139, 221, 165, 0.34);
  --text: #f5eddc;
  --text-strong: #fff8e7;
  --muted: #a9b8a1;
  --faint: #71816f;
  --green: #86e5a5;
  --green-2: #2fbf7a;
  --gold: #f5c76c;
  --amber: #e88f4a;
  --danger: #ff8d74;
  --ink: #0a120d;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
  --shadow-tight: 0 18px 48px rgba(0, 0, 0, 0.28);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(245, 199, 108, 0.1) 0 1px, transparent 1px 100%),
    linear-gradient(35deg, rgba(134, 229, 165, 0.08) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 80px),
    linear-gradient(145deg, #050a07 0%, #08120c 42%, #111909 100%);
  background-size: 720px 720px, 620px 620px, 80px 80px, 80px 80px, 100% 100%;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(ellipse at 16% 16%, rgba(134, 229, 165, 0.12), transparent 36%),
    radial-gradient(ellipse at 84% 28%, rgba(245, 199, 108, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%);
}

body::after {
  z-index: -1;
  opacity: 0.64;
  background:
    repeating-radial-gradient(ellipse at 50% 42%, transparent 0 28px, rgba(134, 229, 165, 0.055) 29px 30px, transparent 31px 58px);
  mask-image: linear-gradient(90deg, transparent 0%, black 18%, black 82%, transparent 100%);
}

body.detail-open,
body.control-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  min-width: 0;
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.landing[hidden],
.app-shell[hidden],
.history-panel[hidden],
.detail-overlay[hidden],
.control-backdrop[hidden],
.ws-history[hidden] {
  display: none;
}

.landing-nav,
.landing-shell,
.landing-story,
.shell {
  width: min(1440px, calc(100vw - 64px));
  margin-inline: auto;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ambient-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.current-line {
  position: absolute;
  width: 52vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(134, 229, 165, 0.28), rgba(245, 199, 108, 0.18), transparent);
  transform-origin: left center;
}

.line-a {
  top: 20%;
  left: -6%;
  transform: rotate(-11deg);
}

.line-b {
  top: 62%;
  right: -8%;
  transform: rotate(15deg);
}

.line-c {
  bottom: 12%;
  left: 20%;
  transform: rotate(-3deg);
}

.landing {
  min-height: 100vh;
  padding: 24px 0 46px;
}

.landing-start-ui {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: #f7efe4;
}

.start-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #f7efe4;
}

.start-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1672px;
  height: 941px;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  overflow: hidden;
  background-image: url("./assets/start-ui-reference.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 1672px 941px;
}

.start-brand-outline {
  position: absolute;
  left: 118px;
  top: 174px;
  color: transparent;
  font-size: 174px;
  font-weight: 200;
  line-height: 1;
  letter-spacing: 0.16em;
  opacity: 0.42;
  -webkit-text-stroke: 1.1px rgba(121, 86, 66, 0.42);
  text-stroke: 1.1px rgba(121, 86, 66, 0.42);
}

.start-copy {
  position: absolute;
  left: 120px;
  top: 385px;
  width: 620px;
  color: #6d422b;
}

.start-copy h1 {
  margin: 0;
  color: #6b3d25;
  text-shadow: 0 11px 26px rgba(114, 65, 36, 0.13);
}

.start-copy h1 span,
.start-copy h1 strong {
  display: block;
}

.start-copy h1 span {
  margin-bottom: 7px;
  font-size: 88px;
  font-weight: 950;
  line-height: 0.82;
  letter-spacing: 0.01em;
}

.start-copy h1 strong {
  font-size: 78px;
  font-weight: 940;
  line-height: 1.04;
  letter-spacing: 0;
}

.start-copy h1 em {
  color: #f4b05f;
  font-style: normal;
  font-size: 56px;
  vertical-align: 10px;
}

.start-subtitle {
  margin: 22px 0 0;
  color: #b58765;
  font-size: 31px;
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: 0;
}

.start-divider {
  display: block;
  width: 61px;
  height: 1px;
  margin-top: 27px;
  background: rgba(163, 116, 86, 0.45);
}

.start-tagline {
  margin: 23px 0 0;
  color: #74462d;
  font-size: 24px;
  font-weight: 640;
  line-height: 1.35;
  letter-spacing: 0;
}

.start-actions {
  position: relative;
  margin-top: 12px;
  height: 70px;
}

.start-hotspot {
  position: absolute;
  display: block;
  border: 0;
  border-radius: 999px;
  outline: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
}

.start-hotspot:focus-visible {
  outline: 2px solid rgba(255, 120, 80, 0.55);
  outline-offset: 4px;
}

.start-hotspot-primary {
  left: 119px;
  top: 700px;
  width: 241px;
  height: 70px;
}

.start-hotspot-guide {
  left: 391px;
  top: 700px;
  width: 229px;
  height: 70px;
}

.start-guide-mark {
  position: relative;
  width: 29px;
  height: 24px;
}

.start-guide-mark::before,
.start-guide-mark::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 13px;
  height: 19px;
  border: 2px solid #a47453;
  background: rgba(255, 255, 255, 0.22);
}

.start-guide-mark::before {
  left: 1px;
  border-radius: 6px 2px 2px 6px;
}

.start-guide-mark::after {
  right: 1px;
  border-radius: 2px 6px 6px 2px;
}

.start-companion-card {
  position: absolute;
  left: 868px;
  top: 135px;
  width: 388px;
  height: 370px;
  padding: 35px 34px 29px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.66), rgba(255, 239, 218, 0.48)),
    rgba(255, 248, 239, 0.5);
  box-shadow: 0 28px 80px rgba(149, 91, 55, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px);
  color: #74472f;
}

.start-companion-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 21px;
  border-bottom: 1px solid rgba(178, 132, 101, 0.22);
}

.start-companion-card h2 {
  margin: 0;
  color: #5f3825;
  font-size: 27px;
  font-weight: 760;
  line-height: 1.2;
}

.start-companion-card header span {
  color: #ff806f;
  font-size: 31px;
  line-height: 1;
  text-shadow: 0 12px 26px rgba(255, 118, 94, 0.26);
}

.start-companion-card ul {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.start-companion-card li {
  display: flex;
  align-items: center;
  gap: 18px;
}

.start-feature-icon {
  display: grid;
  width: 41px;
  height: 41px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: #a47453;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.12em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 24px rgba(150, 96, 60, 0.08);
}

.start-companion-card p {
  margin: 0;
  color: #74472f;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.32;
}

.start-footer {
  position: absolute;
  left: 120px;
  bottom: 38px;
  display: grid;
  grid-template-columns: 241px 54px minmax(0, 1fr) 296px;
  align-items: center;
  width: 1432px;
  color: #855034;
}

.start-footer-line {
  height: 1px;
  background: rgba(154, 104, 71, 0.25);
}

.start-footer-star {
  color: #f3b15f;
  font-size: 36px;
  text-align: center;
  text-shadow: 0 10px 24px rgba(243, 177, 95, 0.18);
}

.start-footer p {
  margin: 0;
  color: #7a4a32;
  font-size: 22px;
  font-weight: 620;
  line-height: 1.4;
  text-align: center;
}

.start-footer strong {
  color: #ff6f5f;
  font-weight: 820;
}

.start-hidden-action {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.landing-nav,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-nav {
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(245, 237, 220, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(255, 248, 230, 0.92), rgba(169, 184, 161, 0.62)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  object-fit: contain;
  padding: 7px;
}

.compact-brand strong {
  display: block;
  color: var(--text-strong);
  font-size: 22px;
  letter-spacing: 0.02em;
}

.landing-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(440px, 0.78fr);
  align-items: center;
  gap: 56px;
  min-height: calc(100vh - 222px);
  padding: 42px 0 30px;
}

.hero-copy {
  max-width: 800px;
}

.hero-copy h1 {
  max-width: 840px;
  margin-bottom: 22px;
  color: var(--text-strong);
  font-size: clamp(58px, 7vw, 108px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 760px;
  margin-bottom: 30px;
  color: #cbd4c5;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.72;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-garden {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  border: 1px solid rgba(209, 226, 191, 0.13);
  border-radius: 38px;
  background:
    linear-gradient(135deg, rgba(134, 229, 165, 0.13), transparent 34%),
    linear-gradient(315deg, rgba(245, 199, 108, 0.14), transparent 42%),
    rgba(12, 23, 16, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.hero-garden::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(134, 229, 165, 0.16);
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

.hero-garden::after {
  content: "";
  position: absolute;
  inset: auto 28px 28px;
  height: 44%;
  border: 1px solid rgba(245, 199, 108, 0.12);
  border-radius: 50% 50% 30px 30px / 70% 70% 30px 30px;
  opacity: 0.72;
}

.core-orbit {
  position: absolute;
  top: 56px;
  left: 50%;
  display: grid;
  width: min(292px, 62%);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(245, 237, 220, 0.18);
  border-radius: 50%;
  background:
    conic-gradient(from 180deg, rgba(134, 229, 165, 0.08), rgba(245, 199, 108, 0.18), rgba(134, 229, 165, 0.08)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform: translateX(-50%);
}

.core-orbit::before,
.core-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(134, 229, 165, 0.2);
  border-radius: 50%;
}

.core-orbit::before {
  inset: 22px;
}

.core-orbit::after {
  inset: 46px;
  border-color: rgba(245, 199, 108, 0.17);
}

.butler-portrait {
  position: relative;
  z-index: 1;
  width: 56%;
  object-fit: contain;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.26));
}

.signal-node {
  position: absolute;
  right: 30px;
  left: 30px;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(209, 226, 191, 0.13);
  border-radius: 20px;
  background: rgba(8, 16, 11, 0.58);
  box-shadow: var(--shadow-tight);
  backdrop-filter: blur(20px);
}

.signal-node span {
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.signal-node strong {
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1.5;
}

.node-one {
  bottom: 176px;
}

.node-two {
  bottom: 96px;
}

.node-three {
  bottom: 16px;
}

.landing-story {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-story article,
.rail-card,
.chat-panel,
.insight-card,
.control-card,
.detail-modal {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.026)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.landing-story article {
  padding: 24px;
}

.landing-story h2 {
  margin-bottom: 10px;
  color: var(--text-strong);
  font-size: 24px;
}

.landing-story p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.topbar {
  min-height: 98px;
  padding: 20px 0 16px;
}

.brand h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(32px, 3.3vw, 54px);
  line-height: 0.95;
  letter-spacing: 0;
}

.topbar-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid rgba(209, 226, 191, 0.13);
  border-radius: 999px;
  background: rgba(14, 26, 18, 0.62);
  color: #dce9d7;
  font-weight: 760;
  box-shadow: var(--shadow-tight);
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px var(--gold);
}

.status-pill.is-ok .pulse {
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.status-pill.is-bad .pulse {
  background: var(--danger);
  box-shadow: 0 0 18px var(--danger);
}

.console-grid {
  display: grid;
  grid-template-columns: 250px minmax(620px, 1fr) 270px;
  grid-template-areas: "rail chat insight";
  align-items: stretch;
  gap: 18px;
  padding-bottom: 44px;
}

.garden-rail {
  grid-area: rail;
  display: grid;
  align-content: start;
  gap: 16px;
}

.insight-panel {
  grid-area: insight;
  display: grid;
  align-content: start;
  gap: 16px;
}

.rail-card,
.insight-card {
  padding: 20px;
}

.agent-card {
  display: grid;
  justify-items: start;
}

.agent-avatar-ring {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  margin: 10px 0 18px;
  border: 1px solid rgba(209, 226, 191, 0.16);
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(255, 248, 230, 0.92), rgba(134, 229, 165, 0.18));
}

.agent-avatar-ring img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.agent-card span {
  color: var(--muted);
  font-size: 13px;
}

.agent-card strong {
  display: block;
  width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nature-card,
.insight-card.accented {
  border-color: rgba(134, 229, 165, 0.24);
  background:
    linear-gradient(145deg, rgba(134, 229, 165, 0.11), rgba(245, 199, 108, 0.05)),
    var(--panel);
}

.nature-card h3,
.insight-card h3 {
  margin-bottom: 10px;
  color: var(--text-strong);
  font-size: 20px;
}

.nature-card p,
.insight-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.chat-panel {
  grid-area: chat;
  display: flex;
  min-width: 0;
  height: min(730px, calc(100vh - 150px));
  min-height: 620px;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel::before {
  content: "";
  height: 4px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--amber), var(--green-2));
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.panel-head.compact {
  align-items: flex-start;
  padding: 0 0 18px;
  border-bottom: 0;
}

.panel-head h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(28px, 2.2vw, 38px);
  line-height: 1.08;
}

.chat-head-tools,
.panel-tools,
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.messages {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 30px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    rgba(5, 10, 7, 0.22);
  background-size: 38px 38px;
}

.messages::before {
  content: "";
  position: absolute;
  inset: 34px 32px auto auto;
  width: 220px;
  height: 110px;
  border: 1px solid rgba(134, 229, 165, 0.12);
  border-radius: 50%;
  transform: rotate(-16deg);
  pointer-events: none;
}

.message {
  position: relative;
  z-index: 1;
  display: flex;
  margin-bottom: 18px;
}

.message.is-user {
  justify-content: flex-end;
}

.bubble {
  max-width: min(720px, 78%);
  padding: 17px 20px;
  border: 1px solid rgba(209, 226, 191, 0.13);
  border-radius: 22px;
  background: rgba(15, 29, 20, 0.76);
  color: #f2ecd9;
  box-shadow: var(--shadow-tight);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.is-user .bubble {
  border-color: rgba(245, 199, 108, 0.34);
  background: linear-gradient(135deg, #f0b34f, #f7d783);
  color: #20170f;
}

.bubble.markdown {
  white-space: normal;
}

.bubble.markdown h3,
.bubble.markdown h4,
.bubble.markdown h5 {
  margin: 0 0 10px;
  line-height: 1.35;
}

.bubble.markdown h3 {
  font-size: 20px;
}

.bubble.markdown h4 {
  font-size: 17px;
}

.bubble.markdown h5 {
  font-size: 15px;
}

.bubble.markdown p {
  margin: 0 0 10px;
}

.bubble.markdown p:last-child,
.bubble.markdown ul:last-child,
.bubble.markdown ol:last-child,
.bubble.markdown .md-table-wrap:last-child,
.bubble.markdown pre:last-child {
  margin-bottom: 0;
}

.bubble.markdown strong {
  color: #fff7df;
  font-weight: 950;
}

.message.is-user .bubble.markdown strong {
  color: #1f160f;
}

.bubble.markdown em {
  color: #d8c8a8;
}

.bubble.markdown ul,
.bubble.markdown ol {
  margin: 0 0 10px;
  padding-left: 22px;
}

.bubble.markdown li {
  margin: 5px 0;
}

.bubble.markdown code {
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(134, 229, 165, 0.12);
  color: #b6ffd0;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.bubble.markdown pre {
  overflow: auto;
  margin: 0 0 12px;
  padding: 13px;
  border: 1px solid rgba(134, 229, 165, 0.14);
  border-radius: 14px;
  background: rgba(5, 10, 7, 0.5);
}

.bubble.markdown pre code {
  padding: 0;
  background: transparent;
}

.md-table-wrap {
  overflow-x: auto;
  margin: 0 0 12px;
}

.bubble.markdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.bubble.markdown th,
.bubble.markdown td {
  padding: 9px 10px;
  border: 1px solid rgba(209, 226, 191, 0.13);
  text-align: left;
}

.bubble.markdown th {
  background: rgba(134, 229, 165, 0.1);
}

.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: rgba(5, 10, 7, 0.18);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 14px;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--line);
  background: rgba(5, 10, 7, 0.24);
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(209, 226, 191, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(203, 212, 197, 0.56);
}

input:focus,
textarea:focus {
  border-color: rgba(134, 229, 165, 0.5);
  box-shadow: 0 0 0 4px rgba(134, 229, 165, 0.12);
}

.composer input {
  min-height: 62px;
  padding: 0 20px;
  font-size: 16px;
}

textarea {
  min-height: 130px;
  padding: 14px;
  line-height: 1.65;
  resize: vertical;
}

.doc-title {
  min-height: 50px;
  padding: 0 14px;
}

.primary-action,
.ghost-button,
.tool-button,
.small-button,
.quick-chip,
.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid rgba(209, 226, 191, 0.15);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  color: #e8ead8;
  font-weight: 850;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-action,
.wide-action {
  border-color: rgba(245, 199, 108, 0.34);
  background: linear-gradient(135deg, #e79b39, #f5cf79);
  color: #16110b;
}

.tool-button:hover,
.small-button:hover,
.quick-chip:hover,
.ghost-button:hover,
.primary-action:hover,
.send-button:hover {
  transform: translateY(-1px);
  border-color: rgba(134, 229, 165, 0.42);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.small-button {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.small-button.subtle {
  color: #c5cebd;
  background: rgba(255, 255, 255, 0.04);
}

.small-button.danger {
  border-color: rgba(255, 141, 116, 0.32);
  color: #ffd1c8;
}

.control-entry[data-open-control="runtime"] {
  border-color: rgba(134, 229, 165, 0.36);
  color: #b8ffd0;
}

.quick-chip {
  min-width: 86px;
}

.send-button {
  width: 62px;
  height: 62px;
  padding: 0;
  border-color: rgba(245, 199, 108, 0.34);
  border-radius: 18px;
  background: linear-gradient(135deg, #e79b39, #f5cf79);
}

.send-button span {
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 17px solid #15100b;
  transform: translateX(2px);
}

.history-panel {
  max-height: 260px;
  overflow: auto;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 10, 7, 0.22);
}

.history-item,
.managed-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid rgba(209, 226, 191, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.history-title,
.history-meta,
.managed-title,
.managed-meta {
  display: block;
}

.history-title,
.managed-title {
  overflow: hidden;
  color: var(--text-strong);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta,
.managed-meta {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(3, 8, 5, 0.62);
  backdrop-filter: blur(14px);
}

.runtime-panel,
.lower-control-row {
  display: none;
}

.runtime-panel.is-open,
.lower-control-row.is-open {
  position: fixed;
  top: clamp(68px, 8vh, 108px);
  right: clamp(18px, 5vw, 72px);
  z-index: 36;
  display: block;
  width: min(620px, calc(100vw - 36px));
  max-height: min(820px, calc(100vh - 92px));
}

.runtime-panel.is-open .activate-card,
.lower-control-row.is-open .control-card {
  display: flex;
  width: 100%;
  min-height: 0;
  max-height: min(820px, calc(100vh - 92px));
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  box-shadow: var(--shadow);
}

.runtime-panel.is-open .activate-card {
  min-height: 330px;
}

.lower-control-row.is-open .control-card {
  display: none;
}

.lower-control-row.is-open[data-active="skill"] .skill-card,
.lower-control-row.is-open[data-active="memory"] .memory-card {
  display: flex;
}

.runtime-hidden-controls {
  display: none;
}

.persona-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: auto;
  padding: 4px 2px 2px;
}

.persona-choice-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.persona-choice-wrap.deletable {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.persona-choice,
.persona-delete,
.ws-choice {
  min-height: 48px;
  border: 1px solid rgba(209, 226, 191, 0.14);
  background: rgba(255, 255, 255, 0.055);
  color: #e8ead8;
  font-weight: 850;
}

.persona-choice {
  overflow: hidden;
  border-radius: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persona-choice-wrap.deletable .persona-choice {
  border-radius: 16px 0 0 16px;
}

.persona-delete {
  padding: 0 10px;
  border-left: 0;
  color: #ffd1c8;
}

.persona-delete:last-child {
  border-radius: 0 16px 16px 0;
}

.persona-choice:hover,
.persona-delete:hover {
  border-color: rgba(134, 229, 165, 0.38);
  background: rgba(255, 255, 255, 0.09);
}

.force-toggle {
  gap: 8px;
}

.compact-textarea {
  min-height: 190px;
}

.wide-action {
  width: 100%;
  margin-top: 12px;
}

.result-line {
  max-height: 150px;
  margin: 12px 0 0;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid rgba(209, 226, 191, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.doc-list {
  display: grid;
  gap: 8px;
  max-height: 250px;
  margin-top: 12px;
  overflow: auto;
}

.doc-item {
  padding: 12px 14px;
  border: 1px solid rgba(209, 226, 191, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  line-height: 1.45;
}

.item-actions {
  display: flex;
  gap: 8px;
}

.satellite-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(134, 229, 165, 0.18);
  border-radius: 18px;
  background: rgba(134, 229, 165, 0.07);
}

.satellite-box strong,
.satellite-box span {
  display: block;
}

.satellite-box span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.memory-expand-source {
  min-width: 0;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: min(400px, calc(100vw - 44px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 29, 20, 0.94);
  box-shadow: var(--shadow);
  color: var(--text);
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 5, 0.62);
  backdrop-filter: blur(14px);
}

.detail-modal {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(940px, calc(100vw - 36px));
  max-height: min(780px, calc(100vh - 44px));
  min-height: 360px;
  flex-direction: column;
  overflow: hidden;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.detail-content {
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow: auto;
  padding: 20px;
  color: #dfe8d8;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.editor-modal {
  width: min(980px, calc(100vw - 36px));
}

.editor-textarea {
  flex: 1;
  min-height: 430px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(6, 13, 8, 0.95);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.65;
  resize: none;
}

.profile-avatar-panel {
  display: grid;
  gap: 14px;
  padding: 16px 20px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 246, 235, .10), rgba(255, 246, 235, .04));
}

.profile-avatar-toolbar,
.profile-avatar-actions,
.profile-avatar-workbench {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar-toolbar {
  justify-content: space-between;
}

.profile-avatar-toolbar strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.profile-avatar-toolbar span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.profile-avatar-workbench {
  align-items: stretch;
}

.avatar-crop-shell {
  position: relative;
  display: grid;
  width: 220px;
  height: 220px;
  flex: 0 0 220px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 246, 235, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26), 0 18px 44px rgba(0, 0, 0, .18);
}

#avatarCropCanvas {
  display: block;
  width: 220px;
  height: 220px;
  cursor: grab;
  touch-action: none;
}

#avatarCropCanvas:active {
  cursor: grabbing;
}

.avatar-crop-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, .86);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 0 0 8px rgba(255, 139, 121, .12);
}

.avatar-crop-controls {
  display: grid;
  min-width: 0;
  flex: 1;
  align-content: start;
  gap: 10px;
}

.avatar-zoom-label {
  color: var(--muted);
  font-size: 12px;
}

#avatarZoomInput {
  width: min(360px, 100%);
  accent-color: #ff897a;
}

.avatar-gallery {
  display: flex;
  max-width: 100%;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.avatar-gallery-item {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 50%;
  background: rgba(255, 246, 235, .14);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}

.avatar-gallery-item:hover,
.avatar-gallery-item:focus-visible {
  border-color: rgba(255, 137, 122, .78);
  outline: none;
}

.avatar-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-gallery-empty {
  color: var(--muted);
  font-size: 12px;
}

.profile-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-copy-grid label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.profile-copy-grid label span {
  color: var(--muted);
  font-size: 12px;
}

.profile-copy-grid input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: rgba(255, 246, 235, .10);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  padding: 10px 12px;
}

.profile-copy-grid input:focus {
  border-color: rgba(255, 137, 122, .72);
  box-shadow: 0 0 0 3px rgba(255, 137, 122, .16);
}

@media (max-width: 720px) {
  .profile-avatar-toolbar,
  .profile-avatar-workbench {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-copy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .landing-shell {
    grid-template-columns: 1fr;
  }

  .hero-garden {
    min-height: 500px;
  }

  .console-grid {
    grid-template-columns: 230px minmax(0, 1fr);
    grid-template-areas:
      "rail chat"
      "insight chat";
  }
}

@media (max-width: 920px) {
  .landing-nav,
  .landing-shell,
  .landing-story,
  .shell {
    width: min(100vw - 28px, 1440px);
  }

  .landing-story,
  .console-grid {
    grid-template-columns: 1fr;
  }

  .console-grid {
    grid-template-areas:
      "rail"
      "chat"
      "insight";
  }

  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-strip,
  .chat-head-tools {
    justify-content: flex-start;
  }

  .rail-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .chat-panel {
    height: min(730px, calc(100vh - 148px));
  }
}

@media (max-width: 620px) {
  .landing {
    padding-top: 14px;
  }

  .brand-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 13vw, 66px);
  }

  .hero-lead {
    font-size: 18px;
  }

  .signal-node {
    right: 18px;
    left: 18px;
  }

  .rail-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-panel {
    min-height: 560px;
  }

  .panel-head,
  .messages,
  .quick-row,
  .composer {
    padding-inline: 16px;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) 56px;
  }

  .send-button {
    width: 56px;
    height: 56px;
  }

  .bubble {
    max-width: 92%;
  }

  .runtime-panel.is-open,
  .lower-control-row.is-open {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 24px);
  }

  .persona-choices {
    grid-template-columns: 1fr;
  }
}

/* Warm presentation polish */
:root {
  color-scheme: light;
  --bg: #fbf0dc;
  --bg-2: #f6dfbd;
  --panel: rgba(255, 250, 241, 0.82);
  --panel-strong: rgba(255, 252, 246, 0.94);
  --panel-soft: rgba(120, 78, 38, 0.055);
  --line: rgba(122, 80, 40, 0.16);
  --line-bright: rgba(209, 129, 51, 0.35);
  --text: #3a2618;
  --text-strong: #25170f;
  --muted: #8a6546;
  --faint: #b28f6a;
  --green: #6f9a68;
  --green-2: #3f7a54;
  --gold: #d18433;
  --amber: #f3a43c;
  --danger: #b95d42;
  --ink: #25170f;
  --shadow: 0 24px 70px rgba(118, 72, 28, 0.17);
  --shadow-tight: 0 14px 34px rgba(118, 72, 28, 0.12);
}

body {
  color: var(--text);
  background:
    linear-gradient(115deg, rgba(94, 120, 84, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(35deg, rgba(209, 129, 51, 0.08) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(90deg, rgba(105, 72, 43, 0.04) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(105, 72, 43, 0.032) 0 1px, transparent 1px 88px),
    radial-gradient(ellipse at 18% 18%, rgba(255, 236, 197, 0.9), transparent 34%),
    radial-gradient(ellipse at 82% 20%, rgba(218, 236, 199, 0.58), transparent 30%),
    linear-gradient(145deg, #fffaf1 0%, #f8e8cf 46%, #f2c98f 100%);
  background-size: 720px 720px, 620px 620px, 88px 88px, 88px 88px, 100% 100%, 100% 100%, 100% 100%;
}

body::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), transparent 24%),
    radial-gradient(ellipse at 76% 82%, rgba(125, 93, 55, 0.12), transparent 34%),
    radial-gradient(ellipse at 20% 86%, rgba(111, 154, 104, 0.12), transparent 26%);
}

body::after {
  opacity: 0.34;
  background:
    repeating-radial-gradient(ellipse at 50% 42%, transparent 0 30px, rgba(117, 83, 48, 0.06) 31px 32px, transparent 33px 62px);
}

.current-line {
  background: linear-gradient(90deg, transparent, rgba(111, 154, 104, 0.28), rgba(209, 129, 51, 0.22), transparent);
}

.landing-nav,
.landing-shell,
.landing-story,
.shell {
  width: min(1640px, calc(100vw - 52px));
}

.landing-story article,
.rail-card,
.chat-panel,
.insight-card,
.control-card,
.detail-modal {
  border-color: rgba(122, 80, 40, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 247, 235, 0.74)),
    var(--panel);
  box-shadow: var(--shadow);
}

.brand-avatar,
.agent-avatar-ring {
  border-color: rgba(122, 80, 40, 0.16);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(246, 220, 179, 0.7)),
    rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 42px rgba(118, 72, 28, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.brand h1 {
  color: #2a1a10;
}

.eyebrow {
  color: #b76720;
}

.topbar-subtitle,
.hero-lead,
.nature-card p,
.insight-card p,
.agent-card span,
.result-line,
.managed-meta,
.history-meta,
.memory-expand-source {
  color: var(--muted);
}

.status-pill {
  border-color: rgba(122, 80, 40, 0.13);
  background: rgba(255, 250, 241, 0.76);
  color: #63452d;
}

.console-grid {
  grid-template-columns: 220px minmax(780px, 1fr) 250px;
  gap: 20px;
}

.chat-panel {
  height: min(800px, calc(100vh - 124px));
  min-height: 680px;
}

.chat-panel::before {
  height: 5px;
  background: linear-gradient(90deg, #6f9a68, #d18433, #f0ad55, #6f9a68);
}

.panel-head {
  padding: 20px 24px;
}

.panel-head h2 {
  font-size: clamp(26px, 1.9vw, 34px);
}

.messages {
  padding: 30px 34px;
  background:
    linear-gradient(90deg, rgba(117, 83, 48, 0.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(117, 83, 48, 0.023) 1px, transparent 1px),
    rgba(255, 252, 246, 0.42);
  background-size: 40px 40px;
}

.messages::before {
  border-color: rgba(111, 154, 104, 0.13);
}

.message {
  margin-bottom: 15px;
}

.bubble {
  max-width: min(760px, 76%);
  padding: 14px 17px;
  border-color: rgba(122, 80, 40, 0.12);
  background: rgba(255, 250, 241, 0.86);
  color: #3a2618;
  font-size: 15px;
  line-height: 1.62;
  box-shadow: 0 12px 30px rgba(118, 72, 28, 0.1);
}

.message.is-user .bubble {
  border-color: rgba(201, 120, 38, 0.22);
  background: linear-gradient(135deg, #f6a739, #ffd58b);
  color: #2a1a10;
}

.bubble.markdown h3 {
  font-size: 18px;
}

.bubble.markdown h4 {
  font-size: 16px;
}

.bubble.markdown h5,
.bubble.markdown p,
.bubble.markdown li {
  font-size: 15px;
}

.bubble.markdown strong {
  color: #24160e;
}

.bubble.markdown em {
  color: #765637;
}

.bubble.markdown code {
  background: rgba(122, 80, 40, 0.09);
  color: #7a4219;
}

.bubble.markdown pre {
  border-color: rgba(122, 80, 40, 0.14);
  background: #fff7ea;
  color: #3a2618;
}

.bubble.markdown th,
.bubble.markdown td {
  border-color: rgba(122, 80, 40, 0.14);
}

.bubble.markdown th {
  background: rgba(209, 129, 51, 0.11);
}

.quick-row,
.composer,
.history-panel {
  background: rgba(255, 247, 235, 0.62);
}

.composer {
  grid-template-columns: minmax(0, 1fr) 58px;
  padding: 16px 24px 20px;
}

.composer input {
  min-height: 58px;
  font-size: 15px;
}

input,
textarea {
  border-color: rgba(122, 80, 40, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: #352315;
}

input::placeholder,
textarea::placeholder {
  color: rgba(108, 78, 50, 0.58);
}

input:focus,
textarea:focus {
  border-color: rgba(209, 129, 51, 0.42);
  box-shadow: 0 0 0 4px rgba(209, 129, 51, 0.12);
}

.primary-action,
.ghost-button,
.tool-button,
.small-button,
.quick-chip,
.send-button,
.persona-choice,
.persona-delete,
.ws-choice {
  border-color: rgba(122, 80, 40, 0.15);
  background: rgba(255, 250, 241, 0.76);
  color: #5a3b24;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.primary-action,
.wide-action,
.send-button {
  border-color: rgba(201, 120, 38, 0.28);
  background: linear-gradient(135deg, #f3a13a, #ffd179);
  color: #24160e;
}

.tool-button:hover,
.small-button:hover,
.quick-chip:hover,
.ghost-button:hover,
.primary-action:hover,
.send-button:hover,
.persona-choice:hover,
.persona-delete:hover {
  border-color: rgba(209, 129, 51, 0.38);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(118, 72, 28, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.control-entry[data-open-control="runtime"] {
  border-color: rgba(111, 154, 104, 0.34);
  color: #3f6e49;
}

.small-button.subtle {
  color: #7b6046;
  background: rgba(255, 250, 241, 0.62);
}

.small-button.danger,
.persona-delete {
  border-color: rgba(185, 93, 66, 0.24);
  color: #9a4b35;
}

.send-button {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.send-button span {
  border-left-color: #24160e;
}

.history-item,
.managed-item,
.result-line,
.satellite-card {
  border-color: rgba(122, 80, 40, 0.12);
  background: rgba(255, 250, 241, 0.72);
}

.detail-backdrop,
.control-backdrop {
  background: rgba(54, 38, 25, 0.42);
  backdrop-filter: blur(16px);
}

.detail-content {
  color: #4f3522;
}

.editor-textarea {
  background: #fffaf1;
  color: #352315;
}

.toast {
  border-color: rgba(122, 80, 40, 0.18);
  background: rgba(255, 250, 241, 0.96);
  color: #3a2618;
}

@media (max-width: 1180px) {
  .console-grid {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .landing-nav,
  .landing-shell,
  .landing-story,
  .shell {
    width: min(100vw - 28px, 1640px);
  }

  .chat-panel {
    height: min(760px, calc(100vh - 128px));
  }
}

@media (max-width: 620px) {
  .chat-panel {
    min-height: 580px;
  }

  .messages {
    padding-block: 22px;
  }

  .bubble {
    max-width: 92%;
    font-size: 14px;
  }
}

/* XHAUS cozy showcase chat UI */
:root {
  color-scheme: light;
  --cream: #fff6ea;
  --cream-2: #fff0dd;
  --milk: rgba(255, 251, 246, 0.82);
  --milk-strong: rgba(255, 253, 249, 0.94);
  --peach: #ff8f78;
  --peach-2: #ffb071;
  --peach-soft: rgba(255, 143, 120, 0.16);
  --cocoa: #7b553d;
  --coffee: #5f3f2d;
  --tea: #a97957;
  --soft-line: rgba(175, 123, 84, 0.16);
  --soft-shadow: 0 26px 80px rgba(171, 106, 53, 0.18);
  --card-shadow: 0 18px 52px rgba(171, 106, 53, 0.12);
}

body:has(#appShell:not([hidden])) {
  min-height: 100vh;
  overflow-x: auto;
  background:
    linear-gradient(90deg, rgba(255, 247, 235, 0.52), rgba(255, 247, 235, 0.24)),
    url("/assets/chat-bg.png") center / cover fixed no-repeat;
  color: var(--coffee);
}

body:has(#appShell:not([hidden]))::before,
body:has(#appShell:not([hidden]))::after {
  display: none;
}

.xhaus-chat-home {
  width: min(1760px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 26px 0;
}

.xhaus-chat-home .console-grid {
  display: grid;
  grid-template-columns: 250px minmax(720px, 1fr) 500px;
  grid-template-areas: "rail chat insight";
  align-items: stretch;
  gap: 20px;
  min-height: calc(100vh - 52px);
  padding: 0;
}

.xhaus-chat-home .app-sidebar,
.xhaus-chat-home .chat-panel,
.xhaus-chat-home .app-widgets .widget-card,
.xhaus-chat-home .runtime-panel .control-card,
.xhaus-chat-home .lower-control-row .control-card,
.xhaus-chat-home .satellite-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 244, 232, 0.66)),
    rgba(255, 249, 241, 0.74);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(24px) saturate(1.05);
}

.xhaus-chat-home .app-sidebar {
  grid-area: rail;
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 34px 24px 28px;
  border-radius: 24px 0 0 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: #b28b70;
}

.sidebar-brand .brand-avatar {
  width: 38px;
  height: 38px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(197, 124, 75, 0.13);
}

.sidebar-brand strong {
  color: #9a7560;
  font-size: 19px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.sidebar-brand span {
  position: relative;
  padding-left: 12px;
  color: #c6a48d;
  font-size: 13px;
}

.sidebar-brand span::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 1px;
  background: rgba(169, 120, 86, 0.25);
}

.side-nav {
  display: grid;
  gap: 10px;
  margin-top: 46px;
}

.side-action {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #a17457;
  font-weight: 800;
  text-align: left;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.side-action:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.54);
  color: #8a5d43;
  box-shadow: 0 12px 26px rgba(174, 110, 68, 0.11);
}

.side-action.primary {
  min-height: 58px;
  margin-bottom: 12px;
  color: #fff;
  background: linear-gradient(135deg, #ff7f78, #ffad80);
  box-shadow: 0 16px 30px rgba(255, 127, 120, 0.28);
}

.side-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  color: inherit;
  font-size: 18px;
}

.sidebar-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 16px 18px;
  border: 1px solid rgba(213, 143, 95, 0.22);
  border-radius: 999px;
  background: rgba(255, 247, 238, 0.72);
  color: #b47b58;
  font-size: 14px;
  box-shadow: 0 14px 30px rgba(194, 124, 76, 0.11);
}

.sidebar-note b {
  color: #ef8b75;
  font-size: 20px;
}

.sidebar-bear {
  width: 176px;
  margin: 18px auto -12px;
  filter: drop-shadow(0 18px 24px rgba(169, 104, 63, 0.18));
  pointer-events: none;
}

.xhaus-chat-home .chat-panel {
  grid-area: chat;
  display: flex;
  height: auto;
  min-height: calc(100vh - 52px);
  max-height: calc(100vh - 52px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 0 24px 24px 0;
}

.xhaus-chat-home .chat-panel::before {
  display: none;
}

.chat-top {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 22px;
  padding: 18px 28px 12px;
}

.soft-status,
.agent-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  gap: 12px;
  border: 1px solid rgba(193, 138, 100, 0.16);
  border-radius: 20px;
  background: rgba(255, 251, 246, 0.58);
  color: #a17860;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.soft-status .status-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 12px;
  color: #ff8b72;
  background: rgba(255, 139, 114, 0.12);
  font-size: 20px;
}

.soft-status .pulse,
.agent-select .pulse {
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-radius: 999px;
  background: #68d87e;
  box-shadow: 0 0 16px rgba(104, 216, 126, 0.8);
}

.soft-status.is-bad .pulse {
  background: #ee816f;
  box-shadow: 0 0 16px rgba(238, 129, 111, 0.66);
}

.agent-select {
  min-width: 250px;
  padding: 0 18px;
  border: 1px solid rgba(193, 138, 100, 0.16);
  cursor: pointer;
}

.agent-select img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.agent-select strong {
  max-width: 116px;
  overflow: hidden;
  color: #7c5138;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-select .chevron {
  color: #b99a84;
}

.xhaus-chat-home .panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 60px 22px;
  border-bottom: 0;
}

.xhaus-chat-home .panel-head h2 {
  margin: 0;
  color: #794f36;
  font-size: clamp(28px, 2.2vw, 42px);
  line-height: 1.18;
  letter-spacing: 0.01em;
}

.conversation-subtitle {
  margin: 10px 0 0;
  color: #a87b5c;
  font-size: 15px;
}

.xhaus-chat-home .eyebrow {
  margin-bottom: 8px;
  color: #cf705c;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.xhaus-chat-home .chat-head-tools {
  display: none;
}

.xhaus-chat-home .history-panel {
  max-height: 180px;
  margin: 0 60px 12px;
  border: 1px solid rgba(193, 138, 100, 0.14);
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.72);
}

.xhaus-chat-home .messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 66px 24px;
  background:
    radial-gradient(circle at 42% 10%, rgba(255, 225, 200, 0.36), transparent 32%),
    rgba(255, 252, 248, 0.18);
}

.xhaus-chat-home .messages::before {
  display: none;
}

.xhaus-chat-home .message {
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.xhaus-chat-home .bubble {
  max-width: min(720px, 74%);
  padding: 15px 18px;
  border: 1px solid rgba(202, 150, 111, 0.16);
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.78);
  color: #704d38;
  font-size: 14px;
  line-height: 1.68;
  box-shadow: 0 14px 36px rgba(162, 99, 54, 0.1);
}

.xhaus-chat-home .message:not(.is-user)::before {
  content: "";
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: url("/assets/butler-default.png") center / cover no-repeat;
  box-shadow: 0 10px 24px rgba(184, 113, 72, 0.15);
}

.xhaus-chat-home .message.is-user .bubble {
  border: 0;
  border-radius: 20px 20px 6px 20px;
  background: linear-gradient(135deg, rgba(255, 246, 236, 0.9), rgba(255, 231, 211, 0.84));
  color: #6f4a35;
  box-shadow: 0 10px 28px rgba(169, 104, 63, 0.09);
}

.xhaus-chat-home .message.is-user::after {
  content: "";
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb49a, #ffe3c3);
  box-shadow: 0 10px 22px rgba(184, 113, 72, 0.12);
}

.xhaus-chat-home .bubble.markdown h3 {
  color: #704228;
  font-size: 17px;
}

.xhaus-chat-home .bubble.markdown h4 {
  color: #704228;
  font-size: 15px;
}

.xhaus-chat-home .bubble.markdown h5,
.xhaus-chat-home .bubble.markdown p,
.xhaus-chat-home .bubble.markdown li {
  font-size: 14px;
}

.xhaus-chat-home .bubble.markdown strong {
  color: #6a4027;
}

.xhaus-chat-home .quick-row {
  display: flex;
  gap: 14px;
  padding: 18px 60px;
  border-top: 1px solid rgba(190, 134, 96, 0.12);
  background: rgba(255, 250, 244, 0.44);
}

.xhaus-chat-home .quick-chip {
  min-width: 118px;
  min-height: 46px;
  border: 1px solid rgba(208, 151, 110, 0.18);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.76);
  color: #8d6148;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(169, 104, 63, 0.08);
}

.xhaus-chat-home .composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 14px;
  padding: 20px 60px 28px;
  border-top: 1px solid rgba(190, 134, 96, 0.11);
  background: rgba(255, 250, 244, 0.62);
}

.xhaus-chat-home .composer input {
  min-height: 58px;
  padding: 0 22px;
  border: 1px solid rgba(199, 143, 102, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  color: #6e4a34;
  font-size: 15px;
}

.xhaus-chat-home .composer input::placeholder {
  color: rgba(151, 105, 75, 0.58);
}

.xhaus-chat-home .send-button {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a7a, #ffa872);
  box-shadow: 0 16px 32px rgba(255, 132, 112, 0.28);
}

.xhaus-chat-home .send-button span {
  border-left-color: #fff;
}

.xhaus-chat-home .app-widgets {
  grid-area: insight;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
}

.xhaus-chat-home .runtime-panel,
.xhaus-chat-home .lower-control-row {
  position: static;
  display: block;
  width: auto;
  max-height: none;
}

.xhaus-chat-home .runtime-panel .activate-card,
.xhaus-chat-home .lower-control-row .control-card,
.xhaus-chat-home .satellite-card {
  display: flex;
  width: 100%;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  border-radius: 20px;
}

.xhaus-chat-home .runtime-panel .activate-card {
  min-height: 250px;
}

.xhaus-chat-home .lower-control-row {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 0;
}

.xhaus-chat-home .lower-control-row .control-card {
  max-height: none;
}

.xhaus-chat-home .panel-head.compact {
  padding: 0 0 14px;
}

.xhaus-chat-home .panel-head.compact h2,
.xhaus-chat-home .satellite-card h2 {
  color: #734a32;
  font-size: 22px;
}

.persona-feature {
  display: grid;
  grid-template-columns: 104px repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.persona-create,
.persona-card {
  min-height: 112px;
  margin: 0;
  border: 1px solid rgba(205, 148, 110, 0.16);
  border-radius: 16px;
  background: rgba(255, 250, 244, 0.62);
  color: #9a7057;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.persona-create {
  display: grid;
  place-items: center;
  gap: 4px;
}

.persona-create span {
  font-size: 34px;
  line-height: 1;
}

.persona-create em {
  font-style: normal;
  font-weight: 850;
}

.persona-card {
  position: relative;
  padding: 10px;
}

.persona-card.is-active {
  border-color: rgba(255, 128, 113, 0.58);
  box-shadow: 0 12px 30px rgba(255, 128, 113, 0.14);
}

.persona-card.is-active::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #ff7f78;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.persona-card img {
  width: 100%;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
}

.persona-card figcaption {
  margin-top: 8px;
  overflow: hidden;
  color: #8d6148;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhaus-chat-home .persona-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 96px;
  overflow: auto;
}

.xhaus-chat-home .persona-choice,
.xhaus-chat-home .persona-delete {
  min-height: 34px;
  border-color: rgba(205, 148, 110, 0.16);
  background: rgba(255, 250, 244, 0.68);
  color: #8d6148;
  font-size: 12px;
}

.xhaus-chat-home .doc-title,
.xhaus-chat-home textarea {
  border: 1px solid rgba(205, 148, 110, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: #6f4a35;
  font-size: 13px;
}

.xhaus-chat-home .doc-title {
  min-height: 42px;
}

.xhaus-chat-home textarea {
  min-height: 82px;
  max-height: 110px;
}

.xhaus-chat-home .wide-action,
.xhaus-chat-home .small-button,
.xhaus-chat-home .tool-button {
  border-color: rgba(205, 148, 110, 0.16);
  border-radius: 12px;
  background: rgba(255, 250, 244, 0.72);
  color: #8d6148;
  font-size: 13px;
}

.xhaus-chat-home .wide-action {
  background: linear-gradient(135deg, #ff8a7a, #ffa872);
  color: #fff;
}

.xhaus-chat-home .doc-list {
  max-height: 126px;
  overflow: auto;
}

.xhaus-chat-home .managed-item,
.xhaus-chat-home .history-item {
  border-color: rgba(205, 148, 110, 0.14);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.68);
}

.xhaus-chat-home .managed-title,
.xhaus-chat-home .history-title {
  color: #744c35;
}

.xhaus-chat-home .managed-meta,
.xhaus-chat-home .history-meta {
  color: #ba8c6d;
}

.xhaus-chat-home .result-line {
  max-height: 84px;
  border-color: rgba(205, 148, 110, 0.14);
  background: rgba(255, 250, 244, 0.64);
  color: #9b7155;
  font-size: 12px;
}

.xhaus-chat-home .memory-card {
  min-height: 250px;
}

.xhaus-chat-home .satellite-card {
  min-height: 190px;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 246, 229, 0.74)),
    url("/assets/satellite-bg.png") center / cover no-repeat;
}

.xhaus-chat-home .satellite-card span {
  display: block;
  max-width: 60%;
  color: #9a7057;
  font-size: 13px;
  line-height: 1.6;
}

.xhaus-chat-home .control-backdrop {
  background: rgba(123, 85, 61, 0.3);
  backdrop-filter: blur(12px);
}

.xhaus-chat-home .runtime-panel.is-open,
.xhaus-chat-home .lower-control-row.is-open {
  position: fixed;
  top: clamp(28px, 5vh, 70px);
  right: clamp(18px, 4vw, 72px);
  z-index: 36;
  display: block;
  width: min(620px, calc(100vw - 36px));
  max-height: min(860px, calc(100vh - 56px));
}

.xhaus-chat-home .runtime-panel.is-open .activate-card,
.xhaus-chat-home .lower-control-row.is-open .control-card {
  max-height: min(860px, calc(100vh - 56px));
  overflow: auto;
}

.xhaus-chat-home .lower-control-row.is-open {
  display: block;
}

.xhaus-chat-home .lower-control-row.is-open .control-card {
  display: none;
}

.xhaus-chat-home .lower-control-row.is-open[data-active="skill"] .skill-card,
.xhaus-chat-home .lower-control-row.is-open[data-active="memory"] .memory-card {
  display: flex;
}

.xhaus-chat-home .runtime-hidden-controls {
  display: none;
}

@media (max-width: 1360px) {
  .xhaus-chat-home {
    width: min(100vw - 28px, 1360px);
  }

  .xhaus-chat-home .console-grid {
    grid-template-columns: 210px minmax(620px, 1fr) 390px;
    gap: 14px;
  }

  .xhaus-chat-home .messages,
  .xhaus-chat-home .panel-head,
  .xhaus-chat-home .quick-row,
  .xhaus-chat-home .composer {
    padding-inline: 34px;
  }
}

@media (max-width: 1080px) {
  .xhaus-chat-home .console-grid {
    grid-template-columns: 180px minmax(0, 1fr);
    grid-template-areas:
      "rail chat"
      "insight insight";
  }

  .xhaus-chat-home .app-widgets {
    grid-template-columns: 1fr;
  }
}

/* Final reference-matched single-screen chat workspace */
body:has(#appShell:not([hidden])) {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 238, 216, 0.1), rgba(255, 248, 238, 0.18)),
    url("/assets/chat-bg.png") center / cover no-repeat fixed;
  color: #6d4a35;
}

body:has(#appShell:not([hidden]))::before,
body:has(#appShell:not([hidden]))::after {
  display: none;
}

.xhaus-chat-home {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  margin: 0;
  padding: clamp(18px, 2.4vw, 34px) clamp(22px, 2.6vw, 48px);
}

.xhaus-chat-home .console-grid {
  display: grid;
  grid-template-columns:
    clamp(220px, 15.3vw, 282px)
    minmax(560px, 1fr)
    clamp(438px, 35.6vw, 672px);
  grid-template-areas: "rail chat insight";
  column-gap: 0;
  row-gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.xhaus-chat-home .app-sidebar,
.xhaus-chat-home .chat-panel {
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.88), rgba(255, 246, 236, 0.76)),
    rgba(255, 250, 243, 0.78);
  box-shadow: 0 24px 72px rgba(173, 105, 55, 0.2);
  backdrop-filter: blur(28px) saturate(1.06);
}

.xhaus-chat-home .app-sidebar {
  grid-area: rail;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(22px, 2vw, 34px) clamp(18px, 1.7vw, 28px);
  border-right: 0;
  border-radius: 22px 0 0 22px;
}

.xhaus-chat-home .chat-panel {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(193, 138, 100, 0.1);
  border-radius: 0 22px 22px 0;
}

.xhaus-chat-home .app-widgets {
  grid-area: insight;
  display: grid;
  grid-template-rows: minmax(214px, 0.78fr) minmax(430px, 1.22fr);
  gap: clamp(14px, 1.5vw, 22px);
  min-width: 0;
  min-height: 0;
  margin-left: clamp(18px, 2.1vw, 34px);
  padding-block: clamp(8px, 1.2vw, 18px);
}

.xhaus-chat-home .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  color: rgba(157, 118, 92, 0.72);
}

.xhaus-chat-home .sidebar-brand .brand-avatar {
  width: 34px;
  height: 34px;
  padding: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 22px rgba(211, 126, 83, 0.16);
}

.xhaus-chat-home .sidebar-brand strong {
  color: #a98268;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.xhaus-chat-home .sidebar-brand span {
  position: relative;
  padding-left: 12px;
  color: #c1a48f;
  font-size: 13px;
}

.xhaus-chat-home .sidebar-brand span::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: rgba(170, 125, 92, 0.24);
}

.xhaus-chat-home .side-nav {
  display: grid;
  gap: clamp(8px, 1vh, 13px);
  margin-top: clamp(30px, 4.4vh, 56px);
}

.xhaus-chat-home .side-action {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 11px;
  min-height: clamp(42px, 4.8vh, 56px);
  padding: 0 14px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #a2775a;
  font-size: clamp(13px, 0.9vw, 16px);
  font-weight: 820;
  text-align: left;
  box-shadow: none;
}

.xhaus-chat-home .side-action.primary {
  min-height: clamp(50px, 5.6vh, 64px);
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ff786f, #ffad83);
  color: #fff;
  box-shadow: 0 18px 34px rgba(255, 126, 111, 0.3);
}

.xhaus-chat-home .side-action:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.58);
  color: #86583d;
  box-shadow: 0 12px 24px rgba(176, 105, 66, 0.1);
}

.xhaus-chat-home .side-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  color: currentColor;
  font-size: 18px;
}

.xhaus-chat-home .sidebar-note {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 14px 18px;
  border: 1px solid rgba(222, 152, 105, 0.22);
  border-radius: 28px;
  background: rgba(255, 247, 237, 0.78);
  color: #b98763;
  font-size: clamp(12px, 0.86vw, 14px);
  box-shadow: 0 14px 32px rgba(183, 111, 70, 0.12);
}

.xhaus-chat-home .sidebar-bear {
  width: min(78%, 184px);
  margin: clamp(12px, 1.8vh, 22px) auto -8px;
  filter: drop-shadow(0 20px 26px rgba(174, 103, 64, 0.2));
}

.xhaus-chat-home .chat-top {
  display: grid;
  grid-template-columns: minmax(134px, 1fr) minmax(134px, 1fr) minmax(190px, auto);
  gap: clamp(14px, 1.7vw, 26px);
  padding: clamp(16px, 1.7vw, 24px) clamp(24px, 2vw, 34px) 10px;
}

.xhaus-chat-home .soft-status,
.xhaus-chat-home .agent-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(42px, 5.1vh, 56px);
  gap: 10px;
  border: 1px solid rgba(202, 151, 114, 0.16);
  border-radius: 18px;
  background: rgba(255, 251, 247, 0.64);
  color: #a37b63;
  font-size: clamp(12px, 0.9vw, 14px);
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.xhaus-chat-home .soft-status .status-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 136, 113, 0.12);
  color: #ff876f;
}

.xhaus-chat-home .soft-status .pulse {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 999px;
  background: #68d77b;
  box-shadow: 0 0 16px rgba(104, 215, 123, 0.76);
}

.xhaus-chat-home .agent-select {
  justify-content: flex-start;
  min-width: 0;
  padding: 0 14px;
  cursor: pointer;
}

.xhaus-chat-home .agent-select img {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  object-fit: cover;
}

.xhaus-chat-home .agent-select strong {
  max-width: clamp(80px, 9vw, 150px);
  overflow: hidden;
  color: #7b5139;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhaus-chat-home .panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(24px, 4.3vh, 54px) clamp(42px, 4vw, 72px) clamp(14px, 2vh, 26px);
  border: 0;
}

.xhaus-chat-home .panel-head h2 {
  max-width: 650px;
  margin: 0;
  color: #794c31;
  font-size: clamp(26px, 2.35vw, 44px);
  line-height: 1.16;
  letter-spacing: 0;
}

.xhaus-chat-home .conversation-subtitle {
  margin-top: 10px;
  color: #a77a5d;
  font-size: clamp(13px, 1vw, 16px);
}

.xhaus-chat-home .eyebrow {
  color: #d57861;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.xhaus-chat-home .chat-head-tools {
  display: none;
}

.xhaus-chat-home .history-panel {
  flex: 0 0 auto;
  max-height: min(22vh, 210px);
  margin: 0 clamp(42px, 4vw, 72px) 12px;
  overflow: auto;
  border: 1px solid rgba(207, 151, 112, 0.14);
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.78);
}

.xhaus-chat-home .messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(18px, 2.6vh, 34px) clamp(42px, 4.3vw, 78px) clamp(16px, 2.4vh, 30px);
  background:
    radial-gradient(circle at 44% 6%, rgba(255, 226, 203, 0.38), transparent 31%),
    rgba(255, 253, 249, 0.18);
}

.xhaus-chat-home .messages::before {
  display: none;
}

.xhaus-chat-home .message {
  align-items: flex-end;
  gap: 12px;
  margin-bottom: clamp(12px, 1.7vh, 18px);
}

.xhaus-chat-home .message:not(.is-user)::before {
  content: "";
  width: clamp(34px, 3vw, 46px);
  height: clamp(34px, 3vw, 46px);
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: url("/assets/butler-default.png") center / cover no-repeat;
  box-shadow: 0 12px 24px rgba(182, 105, 65, 0.16);
}

.xhaus-chat-home .bubble {
  max-width: min(690px, 72%);
  padding: clamp(12px, 1.5vh, 16px) clamp(14px, 1.3vw, 20px);
  border: 1px solid rgba(202, 150, 111, 0.16);
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.82);
  color: #70503c;
  font-size: clamp(13px, 0.92vw, 15px);
  line-height: 1.65;
  box-shadow: 0 14px 34px rgba(160, 96, 53, 0.1);
}

.xhaus-chat-home .message.is-user .bubble {
  border: 0;
  border-radius: 20px 20px 6px 20px;
  background: linear-gradient(135deg, rgba(255, 246, 236, 0.96), rgba(255, 230, 210, 0.9));
  color: #6a432d;
}

.xhaus-chat-home .message.is-user::after {
  content: "";
  width: clamp(32px, 2.7vw, 42px);
  height: clamp(32px, 2.7vw, 42px);
  flex: 0 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb49a, #ffe0c4);
  box-shadow: 0 12px 22px rgba(182, 105, 65, 0.13);
}

.xhaus-chat-home .bubble.markdown h3 {
  color: #704328;
  font-size: clamp(15px, 1.04vw, 18px);
}

.xhaus-chat-home .bubble.markdown h4,
.xhaus-chat-home .bubble.markdown h5,
.xhaus-chat-home .bubble.markdown p,
.xhaus-chat-home .bubble.markdown li {
  font-size: clamp(13px, 0.92vw, 15px);
}

.xhaus-chat-home .bubble.markdown strong {
  color: #5f3821;
}

.xhaus-chat-home .quick-row {
  display: flex;
  flex: 0 0 auto;
  gap: clamp(10px, 1.1vw, 16px);
  padding: clamp(13px, 1.8vh, 20px) clamp(42px, 4vw, 72px);
  border-top: 1px solid rgba(198, 142, 102, 0.12);
  background: rgba(255, 250, 244, 0.44);
}

.xhaus-chat-home .quick-chip {
  min-width: clamp(92px, 8vw, 150px);
  min-height: clamp(38px, 4.4vh, 48px);
  padding-inline: 16px;
  border: 1px solid rgba(207, 151, 112, 0.18);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.78);
  color: #8b6048;
  font-size: clamp(12px, 0.88vw, 14px);
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(169, 104, 63, 0.08);
}

.xhaus-chat-home .composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(50px, 4.4vw, 62px);
  flex: 0 0 auto;
  gap: 14px;
  padding: clamp(15px, 2vh, 24px) clamp(42px, 4vw, 72px) clamp(20px, 2.6vh, 32px);
  border-top: 1px solid rgba(198, 142, 102, 0.12);
  background: rgba(255, 250, 244, 0.62);
}

.xhaus-chat-home .composer input {
  min-height: clamp(48px, 5.5vh, 62px);
  padding: 0 22px;
  border: 1px solid rgba(199, 143, 102, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  color: #6d4a35;
  font-size: clamp(13px, 0.96vw, 15px);
}

.xhaus-chat-home .send-button {
  width: clamp(50px, 4.4vw, 62px);
  height: clamp(50px, 4.4vw, 62px);
  min-height: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8476, #ffa972);
  box-shadow: 0 16px 32px rgba(255, 132, 112, 0.28);
}

.xhaus-chat-home .send-button span {
  border-left-color: #fff;
}

.xhaus-chat-home .runtime-panel,
.xhaus-chat-home .lower-control-row {
  position: static;
  display: block;
  width: auto;
  max-height: none;
  min-height: 0;
}

.xhaus-chat-home .runtime-panel .activate-card,
.xhaus-chat-home .lower-control-row .control-card,
.xhaus-chat-home .satellite-card {
  display: flex;
  width: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(16px, 1.6vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 245, 235, 0.72)),
    rgba(255, 250, 243, 0.76);
  box-shadow: 0 22px 58px rgba(171, 99, 51, 0.18);
  backdrop-filter: blur(28px) saturate(1.06);
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
  height: 100%;
  transform: rotate(-1.8deg);
}

.xhaus-chat-home .lower-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(170px, 0.78fr);
  grid-template-rows: minmax(180px, 0.9fr) minmax(190px, 1fr);
  grid-template-areas:
    "skill skill"
    "memory satellite";
  gap: clamp(14px, 1.5vw, 22px);
  height: 100%;
}

.xhaus-chat-home .skill-card {
  grid-area: skill;
  transform: rotate(1.4deg);
}

.xhaus-chat-home .memory-card {
  grid-area: memory;
  transform: rotate(-0.8deg);
}

.xhaus-chat-home .satellite-card {
  grid-area: satellite;
  justify-content: space-between;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.86), rgba(255, 246, 230, 0.74)),
    url("/assets/satellite-bg.png") center / cover no-repeat;
  transform: rotate(0.6deg);
}

.xhaus-chat-home .panel-head.compact {
  align-items: flex-start;
  padding: 0 0 12px;
  border: 0;
}

.xhaus-chat-home .panel-head.compact h2,
.xhaus-chat-home .satellite-card h2 {
  color: #754a32;
  font-size: clamp(18px, 1.35vw, 24px);
  line-height: 1.2;
}

.xhaus-chat-home .panel-tools {
  gap: 8px;
}

.xhaus-chat-home .persona-feature {
  display: grid;
  grid-template-columns: minmax(80px, 0.75fr) repeat(2, minmax(84px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.xhaus-chat-home .persona-create,
.xhaus-chat-home .persona-card {
  min-height: clamp(92px, 11vh, 130px);
  margin: 0;
  border: 1px solid rgba(205, 148, 110, 0.16);
  border-radius: 16px;
  background: rgba(255, 250, 244, 0.66);
  color: #9a7057;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.xhaus-chat-home .persona-create {
  display: grid;
  place-items: center;
  gap: 2px;
}

.xhaus-chat-home .persona-create span {
  color: #b58c73;
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1;
}

.xhaus-chat-home .persona-create em {
  font-style: normal;
  font-weight: 850;
}

.xhaus-chat-home .persona-card {
  position: relative;
  padding: 10px;
}

.xhaus-chat-home .persona-card.is-active {
  border-color: rgba(255, 128, 113, 0.6);
  box-shadow: 0 12px 30px rgba(255, 128, 113, 0.14);
}

.xhaus-chat-home .persona-card.is-active::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #ff7f78;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.xhaus-chat-home .persona-card img {
  width: 100%;
  height: clamp(54px, 7vh, 82px);
  border-radius: 14px;
  object-fit: cover;
}

.xhaus-chat-home .persona-card figcaption {
  margin-top: 8px;
  overflow: hidden;
  color: #8d6148;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xhaus-chat-home .persona-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: clamp(60px, 8.6vh, 96px);
  overflow: auto;
}

.xhaus-chat-home .persona-choice,
.xhaus-chat-home .persona-delete {
  min-height: 32px;
  border-color: rgba(205, 148, 110, 0.16);
  background: rgba(255, 250, 244, 0.7);
  color: #8d6148;
  font-size: 12px;
}

.xhaus-chat-home .doc-title,
.xhaus-chat-home textarea {
  border: 1px solid rgba(205, 148, 110, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: #6f4a35;
  font-size: 13px;
}

.xhaus-chat-home .doc-title {
  min-height: 38px;
}

.xhaus-chat-home textarea {
  min-height: 68px;
  max-height: 96px;
}

.xhaus-chat-home .wide-action,
.xhaus-chat-home .small-button,
.xhaus-chat-home .tool-button {
  min-height: 34px;
  border-color: rgba(205, 148, 110, 0.16);
  border-radius: 12px;
  background: rgba(255, 250, 244, 0.72);
  color: #8d6148;
  font-size: 12px;
}

.xhaus-chat-home .wide-action {
  background: linear-gradient(135deg, #ff8476, #ffa972);
  color: #fff;
}

.xhaus-chat-home .doc-list {
  max-height: clamp(72px, 12vh, 132px);
  overflow: auto;
}

.xhaus-chat-home .managed-item,
.xhaus-chat-home .history-item {
  margin-bottom: 7px;
  padding: 9px 10px;
  border-color: rgba(205, 148, 110, 0.14);
  border-radius: 14px;
  background: rgba(255, 250, 244, 0.68);
}

.xhaus-chat-home .managed-title,
.xhaus-chat-home .history-title {
  color: #744c35;
  font-size: 12px;
}

.xhaus-chat-home .managed-meta,
.xhaus-chat-home .history-meta {
  color: #ba8c6d;
  font-size: 11px;
}

.xhaus-chat-home .result-line {
  max-height: 54px;
  margin-top: 8px;
  padding: 10px;
  overflow: auto;
  border-color: rgba(205, 148, 110, 0.14);
  background: rgba(255, 250, 244, 0.64);
  color: #9b7155;
  font-size: 11px;
}

.xhaus-chat-home .satellite-card span {
  display: block;
  max-width: 72%;
  color: #9a7057;
  font-size: 12px;
  line-height: 1.6;
}

.xhaus-chat-home .runtime-hidden-controls {
  display: none;
}

.xhaus-chat-home .control-backdrop {
  background: rgba(111, 76, 54, 0.28);
  backdrop-filter: blur(14px);
}

.xhaus-chat-home .runtime-panel.is-open,
.xhaus-chat-home .lower-control-row.is-open {
  position: fixed;
  top: 50%;
  right: 50%;
  z-index: 36;
  display: block;
  width: min(720px, calc(100vw - 44px));
  max-height: min(860px, calc(100vh - 56px));
  transform: translate(50%, -50%);
}

.xhaus-chat-home .runtime-panel.is-open .activate-card,
.xhaus-chat-home .lower-control-row.is-open .control-card {
  max-height: min(860px, calc(100vh - 56px));
  overflow: auto;
  transform: none;
}

.xhaus-chat-home .lower-control-row.is-open {
  height: auto;
}

.xhaus-chat-home .lower-control-row.is-open .control-card {
  display: none;
}

.xhaus-chat-home .lower-control-row.is-open[data-active="skill"] .skill-card,
.xhaus-chat-home .lower-control-row.is-open[data-active="memory"] .memory-card {
  display: flex;
}

@media (max-width: 1280px) {
  .xhaus-chat-home {
    padding: 18px 22px;
  }

  .xhaus-chat-home .console-grid {
    grid-template-columns: 196px minmax(470px, 1fr) 390px;
  }

  .xhaus-chat-home .app-widgets {
    margin-left: 18px;
  }

  .xhaus-chat-home .panel-head,
  .xhaus-chat-home .messages,
  .xhaus-chat-home .quick-row,
  .xhaus-chat-home .composer {
    padding-inline: 30px;
  }

  .xhaus-chat-home .persona-feature {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Reference screenshot alignment pass */
body:has(#appShell:not([hidden])) {
  overflow: hidden !important;
  background:
    linear-gradient(90deg, rgba(255, 240, 218, 0.04), rgba(255, 250, 242, 0.12)),
    url("/assets/chat-bg.png") center / cover no-repeat fixed !important;
}

.xhaus-chat-home {
  height: 100vh !important;
  overflow: hidden !important;
}

.xhaus-chat-home .console-grid {
  height: 100% !important;
  overflow: visible !important;
}

.xhaus-chat-home .soft-status {
  position: relative;
  width: clamp(136px, 10.7vw, 190px);
  min-width: 0;
  padding: 0 22px;
}

.xhaus-chat-home .soft-status span:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}

.xhaus-chat-home .soft-status .status-icon {
  width: clamp(30px, 2.4vw, 42px);
  height: clamp(30px, 2.4vw, 42px);
  border-radius: 14px;
  background: rgba(255, 139, 114, 0.1);
  color: #ff906f;
  font-size: clamp(19px, 1.5vw, 27px);
}

.xhaus-chat-home .soft-status .pulse {
  position: absolute;
  right: 22px;
  margin: 0;
}

.xhaus-chat-home .agent-select {
  min-width: clamp(190px, 14.6vw, 250px);
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
  height: 100%;
  padding: clamp(18px, 1.8vw, 26px);
}

.persona-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -2px 0 12px;
  color: #a77a61;
  font-size: 13px;
  font-weight: 850;
}

.persona-gallery-head span:first-child::after {
  content: " ♥";
  color: #ff8975;
}

.xhaus-chat-home .persona-feature {
  display: none !important;
}

.xhaus-chat-home .persona-choices {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(9px, 0.9vw, 14px);
  max-height: none !important;
  overflow: visible;
}

.xhaus-chat-home .persona-choice-wrap {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: clamp(124px, 14.4vh, 168px);
}

.xhaus-chat-home .persona-choice-wrap.deletable {
  grid-template-columns: minmax(0, 1fr);
}

.xhaus-chat-home .persona-choice {
  display: flex;
  min-height: clamp(124px, 14.4vh, 168px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  padding: clamp(9px, 0.8vw, 13px);
  overflow: hidden;
  border: 1px solid rgba(215, 151, 110, 0.17);
  border-radius: 17px !important;
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.78), rgba(255, 242, 229, 0.63));
  color: #8d634d;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.xhaus-chat-home .persona-choice-wrap.is-active .persona-choice {
  border-color: rgba(255, 128, 113, 0.68);
  box-shadow: 0 12px 28px rgba(255, 128, 113, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.xhaus-chat-home .persona-choice-wrap.is-active::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #ff7f78;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(255, 126, 111, 0.3);
}

.xhaus-chat-home .persona-choice-wrap.is-create .persona-choice {
  align-items: center;
  justify-content: center;
  color: #a9856f;
}

.persona-card-plus {
  display: grid;
  width: clamp(42px, 3.2vw, 60px);
  height: clamp(42px, 3.2vw, 60px);
  place-items: center;
  color: #b8937a;
  font-size: clamp(30px, 2.8vw, 46px);
  font-weight: 300;
}

.persona-card-img {
  width: 100%;
  height: clamp(64px, 7.8vh, 92px);
  border-radius: 14px;
  object-fit: cover;
}

.persona-card-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #7d563f;
  font-size: clamp(12px, 0.86vw, 14px);
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persona-card-desc {
  display: -webkit-box;
  overflow: hidden;
  color: #b18a72;
  font-size: clamp(10px, 0.72vw, 12px);
  line-height: 1.32;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.xhaus-chat-home .persona-delete {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  width: auto;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(255, 128, 113, 0.2);
  border-radius: 9px !important;
  background: rgba(255, 246, 240, 0.88);
  color: #d67664;
  font-size: 11px;
}

.xhaus-chat-home .persona-edit {
  right: 40px;
}

.xhaus-chat-home .skill-card {
  min-height: 0;
}

.xhaus-chat-home .memory-card {
  min-height: 0;
}

.xhaus-chat-home .satellite-card {
  min-height: 0;
  overflow: hidden;
  background-image:
    linear-gradient(140deg, rgba(255, 255, 255, 0.78), rgba(255, 244, 223, 0.48)),
    url("/assets/satellite-bg.png") !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

.xhaus-chat-home .satellite-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 16px;
  pointer-events: none;
}

.xhaus-chat-home .satellite-card h2,
.xhaus-chat-home .satellite-card span,
.xhaus-chat-home .satellite-card button,
.xhaus-chat-home .satellite-card .eyebrow {
  position: relative;
  z-index: 1;
}

.xhaus-chat-home .runtime-panel.is-open .activate-card {
  transform: none !important;
}

@media (min-width: 1500px) {
  .xhaus-chat-home .persona-choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-height: 760px) {
  .xhaus-chat-home .side-nav {
    gap: 6px;
    margin-top: 24px;
  }

  .xhaus-chat-home .sidebar-bear {
    width: 130px;
  }

  .xhaus-chat-home .persona-choice-wrap,
  .xhaus-chat-home .persona-choice {
    min-height: 112px;
  }

  .persona-card-img {
    height: 56px;
  }
}

/* Final screenshot fidelity pass: soft one-screen layout, no clipped cards. */
body:has(#appShell:not([hidden])) {
  color: #7b513a !important;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans SC",
    "Source Han Sans SC",
    "Hiragino Sans GB",
    Arial,
    sans-serif !important;
}

.xhaus-chat-home,
.xhaus-chat-home * {
  box-sizing: border-box;
}

.xhaus-chat-home {
  height: 100vh !important;
  padding: clamp(22px, 3vh, 44px) clamp(32px, 3.2vw, 60px) !important;
  overflow: hidden !important;
}

.xhaus-chat-home .console-grid {
  display: grid !important;
  grid-template-columns: clamp(230px, 15.6vw, 298px) minmax(660px, 1fr) clamp(520px, 35vw, 680px) !important;
  gap: clamp(22px, 2vw, 38px) !important;
  height: calc(100vh - clamp(44px, 6vh, 88px)) !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.xhaus-chat-home .app-sidebar,
.xhaus-chat-home .chat-panel,
.xhaus-chat-home .runtime-panel .activate-card,
.xhaus-chat-home .lower-control-row .control-card,
.xhaus-chat-home .satellite-card {
  border: 1px solid rgba(255, 232, 210, 0.82) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 244, 0.74)) !important;
  box-shadow:
    0 24px 64px rgba(176, 99, 54, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(24px) saturate(1.08) !important;
}

.xhaus-chat-home .app-sidebar {
  height: 100% !important;
  min-height: 0 !important;
  padding: clamp(26px, 2.7vh, 38px) clamp(22px, 1.8vw, 30px) !important;
  overflow: hidden !important;
  border-radius: 28px 0 0 28px !important;
}

.xhaus-chat-home .sidebar-brand,
.xhaus-chat-home .side-action,
.xhaus-chat-home .sidebar-note,
.xhaus-chat-home .panel-head,
.xhaus-chat-home .persona-gallery-head,
.xhaus-chat-home .managed-title,
.xhaus-chat-home .managed-meta,
.xhaus-chat-home .doc-title,
.xhaus-chat-home textarea,
.xhaus-chat-home .small-button,
.xhaus-chat-home .tool-button,
.xhaus-chat-home .quick-chip,
.xhaus-chat-home .composer input,
.xhaus-chat-home .bubble {
  color: #8f6148;
}

.xhaus-chat-home .side-nav {
  gap: clamp(8px, 1.1vh, 15px) !important;
  margin-top: clamp(34px, 4.9vh, 58px) !important;
}

.xhaus-chat-home .side-action {
  color: #a77558 !important;
  font-size: clamp(14px, 0.9vw, 17px) !important;
}

.xhaus-chat-home .side-action.primary {
  color: #fff !important;
  background: linear-gradient(135deg, #ff786f, #ffa376) !important;
}

.xhaus-chat-home .sidebar-note {
  margin-top: auto !important;
  background: rgba(255, 248, 240, 0.8) !important;
}

.xhaus-chat-home .sidebar-bear {
  position: relative !important;
  z-index: 0 !important;
  width: min(194px, 78%) !important;
  max-height: 25vh !important;
  margin: clamp(14px, 1.8vh, 24px) auto -16px !important;
  border: 0 !important;
  border-radius: 30px !important;
  background: transparent !important;
  mix-blend-mode: multiply !important;
  opacity: 0.98 !important;
  object-fit: contain !important;
  transform: perspective(900px) rotateX(2deg) rotateY(-4deg) translateZ(0) !important;
  filter:
    drop-shadow(0 20px 26px rgba(158, 90, 52, 0.23))
    drop-shadow(0 6px 10px rgba(255, 255, 255, 0.3))
    saturate(1.08)
    contrast(1.02) !important;
}

.xhaus-chat-home .chat-panel {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
  border-radius: 0 28px 28px 0 !important;
}

.xhaus-chat-home .chat-top {
  min-height: clamp(60px, 7vh, 82px) !important;
  padding: 0 clamp(32px, 3.2vw, 58px) !important;
}

.xhaus-chat-home .panel-head {
  min-height: clamp(126px, 17vh, 188px) !important;
  padding: clamp(22px, 3vh, 40px) clamp(38px, 4vw, 70px) !important;
}

.xhaus-chat-home .panel-head h2 {
  color: #7a4d35 !important;
  font-size: clamp(28px, 2.6vw, 48px) !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
}

.xhaus-chat-home .conversation-subtitle {
  color: #b17b59 !important;
  font-size: clamp(13px, 1vw, 18px) !important;
}

.xhaus-chat-home .messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: clamp(22px, 2.7vh, 40px) clamp(38px, 4vw, 70px) !important;
  overflow-y: auto !important;
}

.xhaus-chat-home .message {
  gap: 16px !important;
  margin-bottom: 18px !important;
}

.xhaus-chat-home .bubble {
  border-color: rgba(226, 176, 136, 0.34) !important;
  background: rgba(255, 252, 248, 0.76) !important;
  color: #6f4935 !important;
  font-size: clamp(13px, 0.95vw, 17px) !important;
  line-height: 1.74 !important;
  box-shadow: 0 18px 42px rgba(173, 112, 70, 0.1) !important;
}

.xhaus-chat-home .message.is-user .bubble {
  background: linear-gradient(135deg, #ffc07d, #ff956e) !important;
  color: #6a331d !important;
}

.xhaus-chat-home .quick-row,
.xhaus-chat-home .composer {
  padding-inline: clamp(38px, 4vw, 70px) !important;
}

.xhaus-chat-home .quick-row {
  min-height: clamp(76px, 9vh, 104px) !important;
}

.xhaus-chat-home .quick-chip {
  border-color: rgba(224, 175, 135, 0.38) !important;
  background: rgba(255, 252, 247, 0.72) !important;
  color: #8b5c43 !important;
}

.xhaus-chat-home .composer {
  min-height: clamp(86px, 10.6vh, 118px) !important;
}

.xhaus-chat-home .send-button {
  background: linear-gradient(135deg, #ff8a72, #ffaf7a) !important;
  box-shadow: 0 18px 34px rgba(255, 131, 103, 0.24) !important;
}

.xhaus-chat-home .app-widgets {
  display: grid !important;
  grid-template-rows: minmax(228px, 0.92fr) minmax(410px, 1.24fr) !important;
  gap: clamp(16px, 2vh, 28px) !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  padding: clamp(8px, 0.8vh, 14px) 0 !important;
}

.xhaus-chat-home .runtime-panel,
.xhaus-chat-home .lower-control-row {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  z-index: auto !important;
  width: auto !important;
  max-height: none !important;
  height: auto !important;
  transform: none !important;
}

.xhaus-chat-home .runtime-panel .activate-card,
.xhaus-chat-home .lower-control-row .control-card,
.xhaus-chat-home .satellite-card {
  position: relative !important;
  display: flex !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  transform: none !important;
}

.xhaus-chat-home .runtime-panel .activate-card {
  height: 100% !important;
  padding: clamp(22px, 2.2vh, 30px) clamp(24px, 2vw, 34px) !important;
  border-radius: 28px !important;
}

.xhaus-chat-home .lower-control-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.36fr) minmax(190px, 0.78fr) !important;
  grid-template-rows: minmax(202px, 0.93fr) minmax(210px, 1fr) !important;
  gap: clamp(14px, 1.5vw, 24px) !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.xhaus-chat-home .skill-card {
  grid-column: 1 / 3 !important;
  grid-row: 1 !important;
}

.xhaus-chat-home .memory-card {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

.xhaus-chat-home .satellite-card {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

.xhaus-chat-home .skill-card,
.xhaus-chat-home .memory-card,
.xhaus-chat-home .satellite-card {
  height: 100% !important;
  padding: clamp(18px, 2vh, 26px) clamp(20px, 1.7vw, 28px) !important;
  border-radius: 24px !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .runtime-hidden-controls {
  display: none !important;
}

.xhaus-chat-home .persona-gallery-head {
  margin: 2px 0 clamp(12px, 1.3vh, 18px) !important;
  color: #ac7256 !important;
  font-size: clamp(13px, 0.9vw, 16px) !important;
}

.xhaus-chat-home .persona-choices {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(10px, 0.85vw, 15px) !important;
  max-height: clamp(132px, 16.2vh, 188px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 2px 3px 6px !important;
}

.xhaus-chat-home .persona-choice-wrap,
.xhaus-chat-home .persona-choice {
  min-height: clamp(124px, 14.4vh, 164px) !important;
}

.xhaus-chat-home .persona-choice {
  gap: 6px !important;
  padding: clamp(9px, 0.8vw, 13px) !important;
  border-color: rgba(230, 174, 137, 0.34) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255, 250, 244, 0.78), rgba(255, 239, 226, 0.52)) !important;
  color: #8a5c43 !important;
}

.xhaus-chat-home .persona-card-img {
  width: 100% !important;
  height: clamp(68px, 8.2vh, 92px) !important;
  border-radius: 15px !important;
  object-fit: cover !important;
  object-position: center 18% !important;
  filter: saturate(1.04) contrast(1.03) !important;
}

.xhaus-chat-home .persona-choice[data-index="1"] .persona-card-img {
  object-fit: contain !important;
  padding: 6px !important;
  background: rgba(255, 246, 237, 0.58) !important;
}

.xhaus-chat-home .persona-card-title {
  color: #855940 !important;
  font-size: clamp(12px, 0.86vw, 14px) !important;
  line-height: 1.2 !important;
}

.xhaus-chat-home .persona-card-desc {
  color: #be8c6b !important;
  font-size: clamp(10px, 0.72vw, 12px) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) #skillName,
.xhaus-chat-home .lower-control-row:not(.is-open) #skillContent,
.xhaus-chat-home .lower-control-row:not(.is-open) #installSkillBtn,
.xhaus-chat-home .lower-control-row:not(.is-open) #skillResult,
.xhaus-chat-home .lower-control-row:not(.is-open) #cogTitle,
.xhaus-chat-home .lower-control-row:not(.is-open) #cogContent {
  display: none !important;
}

.xhaus-chat-home .doc-list {
  display: grid !important;
  gap: 8px !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: auto !important;
}

.xhaus-chat-home .skill-card .doc-list {
  grid-template-columns: 1fr !important;
}

.xhaus-chat-home .managed-item {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  min-height: clamp(38px, 4.8vh, 52px) !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  border-color: rgba(226, 174, 134, 0.22) !important;
  border-radius: 15px !important;
  background: rgba(255, 251, 246, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66) !important;
}

.xhaus-chat-home button.managed-item {
  width: 100%;
  border-style: solid;
  cursor: pointer;
  text-align: left;
}

.xhaus-chat-home .managed-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8072, #ffad74);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.xhaus-chat-home .managed-main {
  min-width: 0;
}

.xhaus-chat-home .managed-title {
  color: #7d5138 !important;
  font-size: clamp(12px, 0.82vw, 14px) !important;
}

.xhaus-chat-home .managed-meta {
  color: #c39a80 !important;
  font-size: clamp(10px, 0.72vw, 12px) !important;
}

.xhaus-chat-home .managed-placeholder-action,
.xhaus-chat-home .managed-edit,
.xhaus-chat-home .managed-delete {
  color: #d78268 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

.xhaus-chat-home .item-actions {
  display: flex !important;
  gap: 5px !important;
}

.xhaus-chat-home .item-actions .small-button {
  min-height: 26px !important;
  padding: 0 7px !important;
}

.xhaus-chat-home .memory-card .doc-list {
  max-height: 100% !important;
}

.xhaus-chat-home .satellite-card {
  isolation: isolate !important;
  justify-content: space-between !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 250, 240, 0.72) 48%, rgba(255, 246, 224, 0.34) 100%),
    url("/assets/satellite-bg.png") center / cover no-repeat !important;
}

.xhaus-chat-home .satellite-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 85% 16%, rgba(255, 193, 117, 0.22), transparent 32%);
  pointer-events: none;
}

.xhaus-chat-home .satellite-card::after {
  inset: 8px !important;
  border-color: rgba(255, 255, 255, 0.68) !important;
}

.xhaus-chat-home .satellite-card h2 {
  max-width: 78% !important;
  color: #7a4d35 !important;
  font-size: clamp(21px, 1.6vw, 30px) !important;
  line-height: 1.1 !important;
}

.xhaus-chat-home .satellite-card span {
  display: -webkit-box !important;
  max-width: 68% !important;
  overflow: hidden !important;
  color: #9b6c52 !important;
  font-size: clamp(12px, 0.86vw, 14px) !important;
  line-height: 1.55 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.xhaus-chat-home .satellite-card button {
  align-self: flex-start !important;
  min-height: 36px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ff806f, #ffae76) !important;
  color: #fff !important;
}

.xhaus-chat-home .runtime-panel.is-open,
.xhaus-chat-home .lower-control-row.is-open {
  position: fixed !important;
  top: 50% !important;
  right: 50% !important;
  z-index: 36 !important;
  width: min(760px, calc(100vw - 44px)) !important;
  height: auto !important;
  max-height: min(880px, calc(100vh - 54px)) !important;
  transform: translate(50%, -50%) !important;
}

.xhaus-chat-home .runtime-panel.is-open .activate-card,
.xhaus-chat-home .lower-control-row.is-open .control-card {
  height: auto !important;
  max-height: min(880px, calc(100vh - 54px)) !important;
  overflow: auto !important;
}

@media (max-width: 1450px), (max-height: 820px) {
  .xhaus-chat-home {
    padding: 18px 28px !important;
  }

  .xhaus-chat-home .console-grid {
    grid-template-columns: 220px minmax(560px, 1fr) 470px !important;
    gap: 22px !important;
    height: calc(100vh - 36px) !important;
  }

  .xhaus-chat-home .persona-choice-wrap,
  .xhaus-chat-home .persona-choice {
    min-height: 116px !important;
  }

  .xhaus-chat-home .persona-card-img {
    height: 58px !important;
  }

  .xhaus-chat-home .sidebar-bear {
    width: 150px !important;
  }
}

/* Tight reference polish: fit the right panels and crop visual assets intentionally. */
.xhaus-chat-home .app-widgets {
  grid-template-rows: minmax(278px, 1.02fr) minmax(386px, 1.08fr) !important;
}

.xhaus-chat-home .runtime-panel .panel-head,
.xhaus-chat-home .skill-card .panel-head,
.xhaus-chat-home .memory-card .panel-head {
  min-height: 0 !important;
  padding: 0 !important;
}

.xhaus-chat-home .app-widgets .panel-head h2,
.xhaus-chat-home .satellite-card h2 {
  color: #8a573d !important;
  font-size: clamp(24px, 1.65vw, 34px) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

.xhaus-chat-home .runtime-panel .activate-card {
  gap: clamp(8px, 1vh, 14px) !important;
  padding: clamp(18px, 1.8vh, 24px) clamp(22px, 1.7vw, 30px) !important;
}

.xhaus-chat-home .persona-gallery-head {
  margin: 0 0 8px !important;
}

.xhaus-chat-home .persona-choices {
  max-height: none !important;
  overflow: hidden !important;
  align-content: start !important;
}

.xhaus-chat-home .persona-choice-wrap,
.xhaus-chat-home .persona-choice {
  min-height: clamp(104px, 12.6vh, 138px) !important;
}

.xhaus-chat-home .persona-card-img {
  height: clamp(56px, 6.8vh, 74px) !important;
  object-position: center 14% !important;
}

.xhaus-chat-home .persona-card-title {
  font-size: clamp(11px, 0.78vw, 13px) !important;
}

.xhaus-chat-home .persona-card-desc {
  font-size: clamp(9px, 0.66vw, 11px) !important;
  -webkit-line-clamp: 1 !important;
}

.xhaus-chat-home .skill-card,
.xhaus-chat-home .memory-card,
.xhaus-chat-home .satellite-card {
  gap: clamp(10px, 1vh, 14px) !important;
}

.xhaus-chat-home .skill-card .doc-list {
  grid-template-columns: 1fr !important;
  align-content: start !important;
}

.xhaus-chat-home .managed-item {
  min-height: clamp(34px, 4vh, 46px) !important;
  padding: 7px 10px !important;
}

.xhaus-chat-home .managed-icon {
  width: 25px !important;
  height: 25px !important;
}

.xhaus-chat-home .memory-card .doc-list {
  align-content: start !important;
}

.xhaus-chat-home .memory-card .managed-item {
  min-height: clamp(44px, 5.1vh, 58px) !important;
}

.xhaus-chat-home .satellite-card {
  padding: clamp(18px, 2vh, 24px) !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 250, 239, 0.56) 50%, rgba(255, 239, 206, 0.1) 100%),
    url("/assets/satellite-bg.png") center / cover no-repeat !important;
}

.xhaus-chat-home .satellite-card span {
  max-width: 70% !important;
  -webkit-line-clamp: 4 !important;
}

.xhaus-chat-home .sidebar-bear {
  width: min(190px, 82%) !important;
  height: clamp(132px, 18vh, 184px) !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center 66% !important;
  clip-path: inset(2% 4% 4% 4% round 30px) !important;
}

@media (max-width: 1450px), (max-height: 820px) {
  .xhaus-chat-home .app-widgets {
    grid-template-rows: minmax(240px, 1fr) minmax(350px, 1fr) !important;
  }

  .xhaus-chat-home .app-widgets .panel-head h2,
  .xhaus-chat-home .satellite-card h2 {
    font-size: 25px !important;
  }

  .xhaus-chat-home .persona-choice-wrap,
  .xhaus-chat-home .persona-choice {
    min-height: 98px !important;
  }

  .xhaus-chat-home .persona-card-img {
    height: 50px !important;
  }

  .xhaus-chat-home .sidebar-bear {
    width: 150px !important;
    height: 134px !important;
  }
}

/* Ultimate proportion lock after visual QA. */
.xhaus-chat-home .app-widgets {
  grid-template-rows: clamp(270px, 31vh, 326px) minmax(0, 1fr) !important;
}

.xhaus-chat-home .lower-control-row {
  grid-template-rows: minmax(236px, 0.98fr) minmax(214px, 1fr) !important;
}

.xhaus-chat-home .managed-item {
  min-height: clamp(32px, 3.7vh, 43px) !important;
  padding: 6px 10px !important;
}

.xhaus-chat-home .managed-icon {
  width: 24px !important;
  height: 24px !important;
}

.xhaus-chat-home .managed-title {
  font-size: clamp(11px, 0.78vw, 13px) !important;
}

.xhaus-chat-home .managed-meta {
  font-size: clamp(9px, 0.66vw, 11px) !important;
}

.xhaus-chat-home .sidebar-bear {
  width: min(190px, 82%) !important;
  height: clamp(132px, 18vh, 184px) !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center 66% !important;
  clip-path: inset(2% 4% 4% 4% round 30px) !important;
}

@media (max-width: 1450px), (max-height: 820px) {
  .xhaus-chat-home .app-widgets {
    grid-template-rows: 236px minmax(0, 1fr) !important;
  }

  .xhaus-chat-home .lower-control-row {
    grid-template-rows: minmax(214px, 1fr) minmax(182px, 0.88fr) !important;
  }
}

.xhaus-chat-home .persona-card-img {
  object-position: center 30% !important;
}

.xhaus-chat-home .satellite-card {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 250, 240, 0.34) 52%, rgba(255, 239, 206, 0.04) 100%),
    url("/assets/satellite-bg.png") center bottom / cover no-repeat !important;
}

.xhaus-chat-home .satellite-card::before {
  background: radial-gradient(circle at 86% 12%, rgba(255, 188, 106, 0.12), transparent 34%) !important;
}

/* Image-to-UI reference lock: 1536x960 warm assistant dashboard. */
body:has(#appShell:not([hidden])) {
  overflow: hidden !important;
  background:
    linear-gradient(90deg, rgba(255, 214, 170, 0.18), rgba(255, 245, 232, 0.06)),
    url("/assets/chat-bg.png") center / cover no-repeat fixed !important;
}

.xhaus-chat-home {
  --ref-ink: #7d5037;
  --ref-muted: #b38669;
  --ref-line: rgba(217, 160, 118, 0.24);
  --ref-panel: rgba(255, 252, 247, 0.82);
  --ref-card: rgba(255, 251, 246, 0.7);
  --ref-coral: #ff8a75;
  --ref-peach: #ffb079;
  height: 100vh !important;
  padding: clamp(18px, 2.35vh, 24px) clamp(28px, 2.45vw, 38px) !important;
  overflow: hidden !important;
  color: var(--ref-ink) !important;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", Arial, sans-serif !important;
}

.xhaus-chat-home .console-grid {
  display: grid !important;
  grid-template-columns: clamp(218px, 14.95vw, 230px) clamp(620px, 42.65vw, 655px) minmax(520px, 1fr) !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  height: calc(100vh - clamp(36px, 4.7vh, 48px)) !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.xhaus-chat-home .app-sidebar,
.xhaus-chat-home .chat-panel {
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  border-color: rgba(255, 255, 255, 0.82) !important;
  background: rgba(255, 252, 248, 0.8) !important;
  box-shadow: 0 26px 60px rgba(177, 96, 48, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(24px) saturate(1.08) !important;
}

.xhaus-chat-home .app-sidebar {
  position: relative !important;
  z-index: 3 !important;
  padding: clamp(26px, 3vh, 30px) clamp(18px, 1.55vw, 22px) !important;
  overflow: hidden !important;
  border-width: 1px 0 1px 1px !important;
  border-radius: 20px 0 0 20px !important;
  background:
    linear-gradient(90deg, rgba(255, 252, 248, 0.84), rgba(255, 246, 237, 0.68)),
    rgba(255, 250, 244, 0.8) !important;
}

.xhaus-chat-home .chat-panel {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-width: 1px 1px 1px 0 !important;
  border-radius: 0 20px 20px 0 !important;
  background: rgba(255, 252, 248, 0.78) !important;
}

.xhaus-chat-home .sidebar-brand {
  gap: 10px !important;
  min-height: 36px !important;
  color: #9f785e !important;
}

.xhaus-chat-home .sidebar-brand .brand-avatar {
  width: 26px !important;
  height: 26px !important;
  padding: 3px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.8) !important;
}

.xhaus-chat-home .sidebar-brand strong {
  color: #a77b61 !important;
  font-size: 18px !important;
  letter-spacing: 0.02em !important;
}

.xhaus-chat-home .sidebar-brand span {
  color: #b99b85 !important;
  font-size: 12px !important;
}

.xhaus-chat-home .side-nav {
  gap: 20px !important;
  margin-top: 38px !important;
}

.xhaus-chat-home .side-action {
  min-height: 31px !important;
  grid-template-columns: 24px 1fr !important;
  gap: 9px !important;
  padding: 0 10px !important;
  border-radius: 13px !important;
  color: #a4775b !important;
  font-size: 15px !important;
  font-weight: 760 !important;
}

.xhaus-chat-home .side-action.primary {
  min-height: 46px !important;
  margin: 0 0 8px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #ff7771 0%, #ffa076 100%) !important;
  box-shadow: 0 14px 26px rgba(255, 119, 113, 0.24) !important;
}

.xhaus-chat-home .side-icon {
  width: 24px !important;
  height: 24px !important;
  color: inherit !important;
  font-size: 17px !important;
}

.xhaus-chat-home .sidebar-note {
  z-index: 2 !important;
  width: 172px !important;
  min-height: 56px !important;
  margin: auto auto 166px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(225, 161, 112, 0.32) !important;
  border-radius: 999px !important;
  background: rgba(255, 248, 239, 0.72) !important;
  color: #bd8866 !important;
  box-shadow: 0 18px 34px rgba(190, 107, 60, 0.12) !important;
}

.xhaus-chat-home .sidebar-bear {
  position: absolute !important;
  left: -42px !important;
  bottom: -8px !important;
  z-index: 1 !important;
  width: 282px !important;
  height: 222px !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  clip-path: none !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  mix-blend-mode: multiply !important;
  opacity: 0.98 !important;
  transform: none !important;
  filter: drop-shadow(0 24px 30px rgba(142, 78, 42, 0.24)) saturate(1.08) contrast(1.03) !important;
}

.xhaus-chat-home .chat-top {
  display: grid !important;
  grid-template-columns: 165px 165px minmax(190px, 1fr) !important;
  gap: 24px !important;
  align-items: center !important;
  min-height: 73px !important;
  padding: 0 42px 0 30px !important;
}

.xhaus-chat-home .soft-status,
.xhaus-chat-home .agent-select {
  height: 45px !important;
  min-height: 45px !important;
  padding: 0 20px !important;
  border: 1px solid rgba(220, 166, 126, 0.22) !important;
  border-radius: 999px !important;
  background: rgba(255, 249, 242, 0.56) !important;
  box-shadow: none !important;
}

.xhaus-chat-home .soft-status .status-icon {
  width: 31px !important;
  height: 31px !important;
  border-radius: 12px !important;
  background: rgba(255, 136, 117, 0.11) !important;
  color: #ff9a76 !important;
  font-size: 19px !important;
}

.xhaus-chat-home .soft-status .pulse {
  right: 23px !important;
  width: 8px !important;
  height: 8px !important;
}

.xhaus-chat-home .agent-select {
  justify-content: center !important;
  gap: 8px !important;
  color: #9a6c52 !important;
  font-size: 12px !important;
}

.xhaus-chat-home .agent-select img {
  width: 28px !important;
  height: 28px !important;
}

.xhaus-chat-home .agent-select strong {
  max-width: 116px !important;
  color: #8a5d42 !important;
  font-size: 14px !important;
}

.xhaus-chat-home .panel-head:not(.compact) {
  display: block !important;
  min-height: 190px !important;
  padding: 42px 62px 20px !important;
  border: 0 !important;
}

.xhaus-chat-home .panel-head:not(.compact) .eyebrow {
  margin-bottom: 10px !important;
  color: #d27460 !important;
  font-size: 12px !important;
  letter-spacing: 0.09em !important;
}

.xhaus-chat-home .panel-head:not(.compact) h2 {
  color: #7a4a31 !important;
  font-family: "KaiTi", "STKaiti", "LXGW WenKai", "PingFang SC", "Microsoft YaHei", serif !important;
  font-size: 31px !important;
  font-weight: 900 !important;
  line-height: 1.16 !important;
}

.xhaus-chat-home .conversation-subtitle {
  margin-top: 11px !important;
  color: #a87555 !important;
  font-size: 15px !important;
}

.xhaus-chat-home .chat-head-tools {
  display: none !important;
}

.xhaus-chat-home .messages {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 4px 60px 24px !important;
  overflow-y: auto !important;
  scroll-padding-bottom: 20px !important;
}

.xhaus-chat-home .message {
  gap: 12px !important;
  margin-bottom: 16px !important;
}

.xhaus-chat-home .message:not(.is-user)::before,
.xhaus-chat-home .message.is-user::after {
  width: 46px !important;
  height: 46px !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 12px 24px rgba(165, 91, 49, 0.14) !important;
}

.xhaus-chat-home .bubble {
  max-width: min(520px, 74%) !important;
  padding: 14px 18px !important;
  border-color: rgba(226, 177, 139, 0.28) !important;
  border-radius: 16px !important;
  background: rgba(255, 252, 248, 0.78) !important;
  color: #6f4935 !important;
  font-size: 13px !important;
  line-height: 1.72 !important;
  box-shadow: 0 12px 30px rgba(164, 92, 51, 0.08) !important;
}

.xhaus-chat-home .message.is-user .bubble {
  border: 0 !important;
  background: rgba(255, 248, 240, 0.76) !important;
  color: #6e4d38 !important;
  box-shadow: 0 12px 26px rgba(168, 94, 53, 0.08) !important;
}

.xhaus-chat-home .quick-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  min-height: 81px !important;
  padding: 18px 62px !important;
  border-top: 1px solid rgba(216, 170, 131, 0.17) !important;
}

.xhaus-chat-home .quick-chip {
  height: 42px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(222, 169, 128, 0.28) !important;
  border-radius: 12px !important;
  background: rgba(255, 250, 244, 0.64) !important;
  color: #8c5e43 !important;
  font-size: 14px !important;
  font-weight: 780 !important;
}

.xhaus-chat-home .composer {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 58px !important;
  gap: 16px !important;
  align-items: center !important;
  min-height: 75px !important;
  padding: 14px 62px 20px !important;
  border-top: 1px solid rgba(216, 170, 131, 0.15) !important;
}

.xhaus-chat-home .composer input {
  height: 46px !important;
  border: 1px solid rgba(218, 166, 126, 0.24) !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.62) !important;
  color: #7f563d !important;
  font-size: 14px !important;
}

.xhaus-chat-home .send-button {
  width: 58px !important;
  height: 58px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ff8b76, #ff9d7f) !important;
  box-shadow: 0 16px 30px rgba(255, 124, 104, 0.22) !important;
}

.xhaus-chat-home .app-widgets {
  position: relative !important;
  display: block !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 0 0 30px !important;
  padding: 0 !important;
  overflow: visible !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open),
.xhaus-chat-home .lower-control-row:not(.is-open) {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  pointer-events: none !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  position: absolute !important;
  display: flex !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  pointer-events: auto !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  border-radius: 18px !important;
  background: rgba(255, 252, 248, 0.74) !important;
  box-shadow: 0 24px 48px rgba(173, 97, 52, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(22px) saturate(1.08) !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
  top: 16px !important;
  left: 0 !important;
  width: min(100%, 530px) !important;
  height: 305px !important;
  padding: 26px 28px 20px !important;
  transform: rotate(-2.4deg) !important;
  transform-origin: center !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
  top: 356px !important;
  left: 18px !important;
  width: min(492px, calc(100% - 24px)) !important;
  height: 252px !important;
  padding: 24px 26px !important;
  transform: rotate(2deg) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card {
  top: 636px !important;
  left: -54px !important;
  width: 370px !important;
  height: 300px !important;
  padding: 24px 26px !important;
  transform: rotate(0deg) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  top: 636px !important;
  left: 330px !important;
  width: 258px !important;
  height: 300px !important;
  padding: 28px 28px 20px !important;
  transform: rotate(0deg) !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .panel-head.compact,
.xhaus-chat-home .lower-control-row:not(.is-open) .panel-head.compact {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.xhaus-chat-home .app-widgets .eyebrow {
  color: #d47764 !important;
  font-size: 13px !important;
  letter-spacing: 0.08em !important;
}

.xhaus-chat-home .app-widgets .panel-head.compact h2,
.xhaus-chat-home .satellite-card h2 {
  color: #7d5037 !important;
  font-size: 27px !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card .drawer-close,
.xhaus-chat-home .lower-control-row:not(.is-open) .drawer-close {
  min-width: 52px !important;
  min-height: 36px !important;
  border-radius: 12px !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card .panel-head.compact {
  margin-bottom: 52px !important;
}

.xhaus-chat-home .persona-gallery-head {
  margin: 0 0 14px !important;
  color: #a76d50 !important;
  font-size: 13px !important;
}

.xhaus-chat-home .persona-choices {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 13px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

.xhaus-chat-home .persona-choice-wrap,
.xhaus-chat-home .persona-choice {
  min-height: 128px !important;
}

.xhaus-chat-home .persona-choice {
  align-items: center !important;
  gap: 7px !important;
  padding: 12px 9px 10px !important;
  border: 1px solid rgba(226, 171, 132, 0.32) !important;
  border-radius: 14px !important;
  background: rgba(255, 246, 235, 0.44) !important;
  text-align: center !important;
}

.xhaus-chat-home .persona-choice-wrap.is-active .persona-choice {
  border-color: rgba(255, 129, 117, 0.72) !important;
  box-shadow: 0 12px 24px rgba(255, 126, 111, 0.14) !important;
}

.xhaus-chat-home .persona-card-plus {
  width: 48px !important;
  height: 48px !important;
  color: #b48667 !important;
  font-size: 42px !important;
}

.xhaus-chat-home .persona-card-img {
  width: 70px !important;
  height: 62px !important;
  border-radius: 12px !important;
  object-fit: cover !important;
  object-position: center 28% !important;
}

.xhaus-chat-home .persona-card-title {
  width: 100% !important;
  color: #8d5e42 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.xhaus-chat-home .persona-card-desc {
  width: 100% !important;
  color: #bf9273 !important;
  font-size: 10px !important;
  -webkit-line-clamp: 1 !important;
}

.xhaus-chat-home .runtime-hidden-controls,
.xhaus-chat-home .lower-control-row:not(.is-open) #skillName,
.xhaus-chat-home .lower-control-row:not(.is-open) #skillContent,
.xhaus-chat-home .lower-control-row:not(.is-open) #installSkillBtn,
.xhaus-chat-home .lower-control-row:not(.is-open) #skillResult,
.xhaus-chat-home .lower-control-row:not(.is-open) #cogTitle,
.xhaus-chat-home .lower-control-row:not(.is-open) #cogContent {
  display: none !important;
}

.xhaus-chat-home .skill-card .panel-head.compact,
.xhaus-chat-home .memory-card .panel-head.compact {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  margin-bottom: 14px !important;
}

.xhaus-chat-home .panel-tools {
  gap: 8px !important;
}

.xhaus-chat-home .small-button,
.xhaus-chat-home .tool-button {
  min-height: 33px !important;
  border: 1px solid rgba(222, 168, 128, 0.26) !important;
  border-radius: 12px !important;
  background: rgba(255, 248, 240, 0.64) !important;
  color: #9a684b !important;
  font-size: 12px !important;
}

.xhaus-chat-home .doc-list {
  display: grid !important;
  gap: 9px !important;
  overflow: hidden !important;
  max-height: none !important;
}

.xhaus-chat-home .skill-card .doc-list {
  margin-top: 0 !important;
}

.xhaus-chat-home .managed-item {
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) 42px !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 42px !important;
  padding: 7px 9px !important;
  border: 1px solid rgba(225, 173, 136, 0.22) !important;
  border-radius: 13px !important;
  background: rgba(255, 251, 247, 0.56) !important;
  box-shadow: none !important;
}

.xhaus-chat-home .managed-icon {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ff7f70, #ffa976) !important;
  color: #fff !important;
  font-size: 10px !important;
}

.xhaus-chat-home .managed-title {
  color: #80553c !important;
  font-size: 12px !important;
  line-height: 1.1 !important;
}

.xhaus-chat-home .managed-meta {
  margin-top: 2px !important;
  color: #bd9173 !important;
  font-size: 10px !important;
}

.xhaus-chat-home .managed-placeholder-action,
.xhaus-chat-home .managed-edit,
.xhaus-chat-home .managed-delete {
  color: #e47e68 !important;
  font-size: 10px !important;
}

.xhaus-chat-home .memory-card .managed-item {
  min-height: 48px !important;
}

.xhaus-chat-home .satellite-card {
  justify-content: space-between !important;
  background:
    linear-gradient(90deg, rgba(255, 252, 248, 0.76), rgba(255, 246, 229, 0.2)),
    url("/assets/satellite-bg.png") center bottom / cover no-repeat !important;
}

.xhaus-chat-home .satellite-card span {
  display: block !important;
  max-width: 78% !important;
  color: #9d6c50 !important;
  font-size: 12px !important;
  line-height: 1.58 !important;
}

.xhaus-chat-home .satellite-card button {
  align-self: flex-start !important;
  min-height: 34px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ff806f, #ffa36f) !important;
  color: #fff !important;
}

@media (max-width: 1300px), (max-height: 820px) {
  .xhaus-chat-home {
    padding: 16px 24px !important;
  }

  .xhaus-chat-home .console-grid {
    grid-template-columns: 210px minmax(560px, 1fr) 470px !important;
  }

  .xhaus-chat-home .app-widgets {
    margin-left: 22px !important;
  }

  .xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
    height: 270px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
    top: 318px !important;
    width: 440px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .memory-card {
    top: 590px !important;
    left: -30px !important;
    width: 316px !important;
    height: 268px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
    top: 590px !important;
    left: 300px !important;
    width: 190px !important;
    height: 268px !important;
  }
}

/* Final image-to-UI polish: keep the reference-like floating composition. */
.xhaus-chat-home .app-widgets,
.xhaus-chat-home .insight-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open),
.xhaus-chat-home .lower-control-row:not(.is-open) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  background:
    linear-gradient(145deg, rgba(255, 253, 249, 0.92), rgba(255, 244, 231, 0.82)) !important;
  border-color: rgba(234, 193, 160, 0.36) !important;
  box-shadow:
    0 24px 52px rgba(170, 111, 61, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
  top: 18px !important;
  transform: rotate(-2.2deg) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
  transform: rotate(1.7deg) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card {
  transform: rotate(0deg) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  transform: rotate(0deg) !important;
  background:
    linear-gradient(90deg, rgba(255, 253, 249, 0.68), rgba(255, 244, 229, 0.04)),
    url("/assets/satellite-bg.png") center bottom / cover no-repeat !important;
}

.xhaus-chat-home .persona-choice {
  overflow: hidden !important;
}

.xhaus-chat-home .persona-card-img {
  display: block !important;
  width: 72px !important;
  height: 66px !important;
  object-fit: cover !important;
  object-position: center 24% !important;
  transform: translateZ(0) !important;
}

.xhaus-chat-home .persona-choice .persona-card-img[src*="emma"] {
  object-position: center 22% !important;
}

.xhaus-chat-home .persona-choice .persona-card-img[src*="franziska"] {
  object-position: center 18% !important;
}

.xhaus-chat-home .sidebar-bear {
  left: -58px !important;
  bottom: -16px !important;
  width: 310px !important;
  height: 245px !important;
  object-fit: cover !important;
  object-position: 36% 66% !important;
  mix-blend-mode: multiply !important;
  opacity: 0.94 !important;
  filter: saturate(1.06) contrast(1.02) drop-shadow(0 24px 30px rgba(181, 107, 57, 0.18)) !important;
  -webkit-mask-image: radial-gradient(ellipse at 44% 58%, #000 42%, rgba(0, 0, 0, 0.82) 58%, transparent 76%) !important;
  mask-image: radial-gradient(ellipse at 44% 58%, #000 42%, rgba(0, 0, 0, 0.82) 58%, transparent 76%) !important;
}

/* Screenshot fidelity pass: fit a 1536x824 browser viewport without clipped cards. */
.xhaus-chat-home {
  height: 100vh !important;
  min-height: 720px !important;
  overflow: hidden !important;
  font-family:
    "LXGW WenKai",
    "STKaiti",
    "KaiTi",
    "Microsoft YaHei",
    "PingFang SC",
    sans-serif !important;
}

.xhaus-chat-home * {
  letter-spacing: 0 !important;
}

.xhaus-chat-home .console-grid {
  width: min(1460px, calc(100vw - 42px)) !important;
  height: min(760px, calc(100vh - 46px)) !important;
  grid-template-columns: 230px minmax(620px, 655px) minmax(500px, 560px) !important;
  column-gap: 30px !important;
  align-items: stretch !important;
}

.xhaus-chat-home .app-sidebar,
.xhaus-chat-home .chat-panel {
  height: 100% !important;
}

.xhaus-chat-home .chat-panel {
  grid-template-rows: 88px 150px minmax(0, 1fr) 76px 88px !important;
}

.xhaus-chat-home .brand-avatar {
  background:
    rgba(255, 255, 255, 0.72)
    url("./assets/xhaus-logo.png") center / 78% 78% no-repeat !important;
}

.xhaus-chat-home .brand-avatar[src] {
  object-fit: contain !important;
  object-position: center !important;
}

.xhaus-chat-home .app-widgets {
  width: 560px !important;
  height: 100% !important;
  margin-left: 0 !important;
  overflow: visible !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open),
.xhaus-chat-home .lower-control-row:not(.is-open) {
  position: absolute !important;
  inset: 0 !important;
  width: 560px !important;
  height: 100% !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
  top: 12px !important;
  left: 0 !important;
  width: 540px !important;
  height: 282px !important;
  padding: 23px 26px !important;
  transform: rotate(-2.1deg) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
  top: 328px !important;
  left: 18px !important;
  width: 510px !important;
  height: 220px !important;
  padding: 22px 26px 18px !important;
  transform: rotate(1.6deg) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card {
  top: 585px !important;
  left: -24px !important;
  width: 330px !important;
  height: 174px !important;
  padding: 21px 22px !important;
  transform: rotate(0deg) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  top: 585px !important;
  left: 328px !important;
  width: 220px !important;
  height: 174px !important;
  padding: 24px 24px 18px !important;
  background:
    linear-gradient(90deg, rgba(255, 252, 247, 0.74), rgba(255, 244, 228, 0.04)),
    url("./assets/satellite-bg.png") center bottom / cover no-repeat !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  overflow: hidden !important;
  border-radius: 21px !important;
}

.xhaus-chat-home .app-widgets .panel-head.compact h2,
.xhaus-chat-home .satellite-card h2 {
  color: #7c4d35 !important;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Helvetica Neue",
    sans-serif !important;
  font-size: 29px !important;
  font-weight: 900 !important;
  letter-spacing: -0.01em !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .panel-head.compact h2 {
  font-size: 29px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card .panel-head.compact h2,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card .panel-head.compact h2 {
  font-size: 26px !important;
}

.xhaus-chat-home .persona-choices {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 14px !important;
}

.xhaus-chat-home .persona-choice-wrap,
.xhaus-chat-home .persona-choice {
  min-height: 126px !important;
}

.xhaus-chat-home .persona-card-img {
  width: 74px !important;
  height: 58px !important;
  border-radius: 13px !important;
  object-position: center 20% !important;
}

.xhaus-chat-home .doc-list {
  gap: 8px !important;
}

.xhaus-chat-home .managed-item {
  grid-template-columns: 24px minmax(0, 1fr) auto auto !important;
  min-height: 38px !important;
  padding: 6px 9px !important;
}

.xhaus-chat-home .skill-card .managed-item {
  grid-template-columns: 24px minmax(210px, 1fr) auto auto !important;
}

.xhaus-chat-home .memory-card .managed-item {
  grid-template-columns: 22px minmax(150px, 1fr) auto auto !important;
  min-height: 42px !important;
}

.xhaus-chat-home .managed-title {
  display: block !important;
  max-width: none !important;
  overflow: hidden !important;
  color: #8a5b40 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .managed-meta {
  max-width: none !important;
  overflow: hidden !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .managed-edit,
.xhaus-chat-home .managed-delete,
.xhaus-chat-home .managed-placeholder-action {
  padding: 3px 7px !important;
  border: 1px solid rgba(255, 134, 111, 0.22) !important;
  border-radius: 999px !important;
  background: rgba(255, 246, 240, 0.78) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card span {
  max-width: 82% !important;
  font-size: 11px !important;
  line-height: 1.42 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card button {
  min-height: 30px !important;
  padding: 0 14px !important;
  font-size: 11px !important;
}

.xhaus-chat-home .sidebar-bear {
  left: -38px !important;
  bottom: -20px !important;
  width: 286px !important;
  height: 214px !important;
  object-fit: cover !important;
  object-position: center 63% !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  border-radius: 0 !important;
  filter:
    drop-shadow(0 34px 30px rgba(170, 93, 50, 0.22))
    drop-shadow(0 12px 14px rgba(255, 166, 110, 0.18))
    saturate(1.04) !important;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%),
    linear-gradient(90deg, transparent 0, #000 10%, #000 92%, transparent 100%) !important;
  -webkit-mask-composite: source-in !important;
  mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%),
    linear-gradient(90deg, transparent 0, #000 10%, #000 92%, transparent 100%) !important;
  mask-composite: intersect !important;
}

@media (max-height: 850px) {
  .xhaus-chat-home .console-grid {
    height: calc(100vh - 34px) !important;
  }

  .xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
    height: 266px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
    top: 306px !important;
    height: 206px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
  .xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
    top: 548px !important;
    height: 164px !important;
  }

  .xhaus-chat-home .sidebar-bear {
    width: 260px !important;
    height: 194px !important;
  }
}

/* Final correction pass against the supplied reference image. */
.xhaus-chat-home {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", Arial, sans-serif !important;
}

.xhaus-chat-home .panel-head h2,
.xhaus-chat-home #conversationTitle {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif !important;
  font-weight: 900 !important;
}

.xhaus-chat-home .message {
  align-items: flex-start !important;
}

.xhaus-chat-home .message:not(.is-user)::before,
.xhaus-chat-home .message.is-user::after {
  flex: 0 0 46px !important;
  margin-top: 0 !important;
  align-self: flex-start !important;
}

.xhaus-chat-home .message.is-user {
  align-items: flex-start !important;
}

.xhaus-chat-home .message.is-user::after {
  margin-top: 0 !important;
}

.xhaus-chat-home .message.is-user .bubble {
  margin-top: 0 !important;
}

.xhaus-chat-home .app-widgets,
.xhaus-chat-home .insight-panel,
.xhaus-chat-home .runtime-panel:not(.is-open),
.xhaus-chat-home .lower-control-row:not(.is-open) {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  transform: none !important;
  overflow: hidden !important;
  background: rgba(255, 252, 248, 0.88) !important;
  border: 1px solid rgba(239, 197, 161, 0.44) !important;
  box-shadow: 0 26px 50px rgba(168, 98, 50, 0.16) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
  top: 12px !important;
  left: 0 !important;
  width: 536px !important;
  height: 268px !important;
  padding: 22px 26px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
  top: 312px !important;
  left: 18px !important;
  width: 508px !important;
  height: 214px !important;
  padding: 22px 26px 16px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card {
  top: 560px !important;
  left: 0 !important;
  width: 314px !important;
  height: 180px !important;
  padding: 22px 24px 18px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  top: 560px !important;
  left: 340px !important;
  width: 200px !important;
  height: 180px !important;
  padding: 22px 21px 16px !important;
  background:
    linear-gradient(90deg, rgba(255, 252, 248, 0.76), rgba(255, 248, 235, 0.22)),
    url("./assets/satellite-bg.png") center bottom / cover no-repeat !important;
}

.xhaus-chat-home .persona-widget .drawer-close {
  display: none !important;
}

.xhaus-chat-home .force-toggle {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-width: 66px !important;
  writing-mode: horizontal-tb !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .force-toggle span {
  display: inline !important;
  writing-mode: horizontal-tb !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-edit,
.xhaus-chat-home .lower-control-row:not(.is-open) .managed-delete,
.xhaus-chat-home .lower-control-row:not(.is-open) .managed-placeholder-action {
  display: none !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-item {
  grid-template-columns: 24px minmax(0, 1fr) !important;
  min-height: 40px !important;
  padding: 7px 10px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card .managed-item {
  min-height: 38px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-title {
  max-width: 100% !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-meta {
  max-width: 100% !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card h2 {
  font-size: 25px !important;
  line-height: 1.08 !important;
  margin-bottom: 10px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card span {
  max-width: 88% !important;
  max-height: 42px !important;
  overflow: hidden !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: flex-start !important;
  min-height: 31px !important;
  margin-top: auto !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
}

.xhaus-chat-home .sidebar-bear {
  left: -38px !important;
  bottom: -18px !important;
  width: 282px !important;
  height: 214px !important;
  object-fit: cover !important;
  object-position: center 64% !important;
  border-radius: 0 0 0 18px !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
  filter: drop-shadow(0 26px 24px rgba(153, 88, 42, 0.22)) saturate(1.05) !important;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 8%, #000 100%) !important;
  mask-image: linear-gradient(180deg, transparent 0, #000 8%, #000 100%) !important;
}

@media (max-height: 850px) {
  .xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
    height: 254px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
    top: 294px !important;
    height: 198px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
  .xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
    top: 530px !important;
    height: 168px !important;
  }
}

/* Reference note polish: airy sticky notes, friendly rows, separate teddy card. */
.xhaus-chat-home .console-grid {
  grid-template-columns: 230px minmax(620px, 660px) minmax(500px, 560px) !important;
  column-gap: 30px !important;
}

.xhaus-chat-home .app-sidebar {
  overflow: visible !important;
}

.xhaus-chat-home .sidebar-note {
  bottom: 196px !important;
  z-index: 3 !important;
}

.xhaus-chat-home .sidebar-bear {
  left: 32px !important;
  bottom: 26px !important;
  z-index: 4 !important;
  width: 185px !important;
  height: 154px !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: 39% 64% !important;
  border: 1px solid rgba(255, 214, 184, 0.62) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 45% 20%, rgba(255, 255, 255, 0.88), rgba(255, 241, 225, 0.72) 62%, rgba(255, 222, 189, 0.58)),
    rgba(255, 247, 237, 0.88) !important;
  box-shadow:
    0 28px 42px rgba(178, 102, 55, 0.22),
    0 8px 16px rgba(255, 165, 111, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  filter: saturate(1.08) contrast(1.02) !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.xhaus-chat-home .app-widgets {
  width: 560px !important;
  isolation: isolate !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  background:
    linear-gradient(145deg, rgba(255, 253, 249, 0.9), rgba(255, 247, 239, 0.76)) !important;
  border: 1px solid rgba(245, 198, 165, 0.42) !important;
  box-shadow:
    0 26px 46px rgba(166, 99, 53, 0.13),
    0 7px 18px rgba(255, 172, 112, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
  top: 16px !important;
  left: 0 !important;
  width: 540px !important;
  height: 254px !important;
  padding: 23px 27px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
  top: 304px !important;
  left: 18px !important;
  width: 508px !important;
  height: 222px !important;
  padding: 22px 25px 17px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card {
  top: 568px !important;
  left: -18px !important;
  width: 338px !important;
  height: 180px !important;
  padding: 22px 24px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  top: 568px !important;
  left: 344px !important;
  width: 214px !important;
  height: 180px !important;
  padding: 22px 22px 17px !important;
  background:
    linear-gradient(90deg, rgba(255, 252, 247, 0.72), rgba(255, 244, 226, 0.08)),
    url("./assets/satellite-bg.png") center bottom / cover no-repeat !important;
}

.xhaus-chat-home .app-widgets .eyebrow {
  color: #e07f6f !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.xhaus-chat-home .app-widgets .panel-head.compact h2,
.xhaus-chat-home .satellite-card h2 {
  color: #81513a !important;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: 28px !important;
  font-weight: 900 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card .panel-head.compact,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card .panel-head.compact {
  margin-bottom: 10px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card .panel-tools,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card .panel-tools {
  gap: 9px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card .tool-button,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card .tool-button {
  min-height: 33px !important;
  padding: 0 13px !important;
  border-radius: 14px !important;
  color: #a36c4e !important;
  font-size: 12px !important;
}

.xhaus-chat-home .doc-list {
  gap: 9px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card .doc-list {
  max-height: 128px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card .doc-list {
  max-height: 92px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-item {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) 42px !important;
  gap: 11px !important;
  min-height: 38px !important;
  padding: 6px 9px !important;
  border: 1px solid rgba(237, 193, 162, 0.36) !important;
  border-radius: 13px !important;
  background: rgba(255, 252, 247, 0.58) !important;
  box-shadow: none !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card .managed-item {
  min-height: 42px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-icon {
  width: 25px !important;
  height: 25px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ff7d70, #ffa46f) !important;
  color: #fff !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-main {
  min-width: 0 !important;
  padding: 0 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-title {
  display: block !important;
  overflow: hidden !important;
  color: #8a5a40 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.16 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-meta {
  display: block !important;
  overflow: hidden !important;
  color: rgba(173, 123, 91, 0.78) !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .managed-switch {
  display: inline-block !important;
  justify-self: end !important;
  width: 31px !important;
  height: 17px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ff806f, #ffa06e) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34) !important;
  position: relative !important;
}

.xhaus-chat-home .managed-switch::after {
  content: "" !important;
  position: absolute !important;
  top: 3px !important;
  right: 3px !important;
  width: 11px !important;
  height: 11px !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(139, 76, 42, 0.22) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-edit,
.xhaus-chat-home .lower-control-row:not(.is-open) .managed-delete,
.xhaus-chat-home .lower-control-row:not(.is-open) .managed-placeholder-action,
.xhaus-chat-home .lower-control-row:not(.is-open) .item-actions {
  display: none !important;
}

.xhaus-chat-home .lower-control-row.is-open .managed-switch {
  display: none !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card h2 {
  font-size: 24px !important;
  line-height: 1.06 !important;
  margin: 4px 0 9px !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card span {
  display: block !important;
  max-width: 80% !important;
  max-height: 46px !important;
  color: rgba(139, 91, 64, 0.88) !important;
  font-size: 11px !important;
  line-height: 1.42 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card button {
  margin-top: auto !important;
  min-height: 30px !important;
  padding: 0 16px !important;
  border: 0 !important;
  background: linear-gradient(135deg, #ff816f, #ffa06e) !important;
  color: #fff !important;
  box-shadow: 0 10px 18px rgba(238, 117, 88, 0.18) !important;
}

.xhaus-chat-home .persona-choice-wrap:not(.is-active)::after {
  display: none !important;
}

.xhaus-chat-home .persona-choice-wrap.is-active::after {
  display: grid !important;
}

@media (max-height: 850px) {
  .xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
    top: 10px !important;
    height: 236px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
    top: 282px !important;
    height: 198px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
  .xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
    top: 518px !important;
    height: 170px !important;
  }

  .xhaus-chat-home .sidebar-note {
    bottom: 178px !important;
  }

  .xhaus-chat-home .sidebar-bear {
    bottom: 20px !important;
    width: 174px !important;
    height: 142px !important;
  }
}

.gui-live-link {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 128, 105, .28);
  border-radius: 999px;
  background: rgba(255, 247, 238, .86);
  color: #b65d42;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.gui-live-link:hover {
  background: #fff0df;
}

/* Image-to-UI competition pass: adaptive reference composition. */
@font-face {
  font-family: "XhausSoftUI";
  src:
    local("YouYuan"),
    local("Microsoft YaHei UI"),
    local("PingFang SC");
}

body:has(.xhaus-chat-home:not([hidden])) {
  overflow: hidden !important;
}

.xhaus-chat-home:not([hidden]) {
  --peach-ink: #8a5a40;
  --peach-muted: rgba(163, 108, 78, 0.78);
  --peach-line: rgba(239, 197, 165, 0.42);
  --peach-card: rgba(255, 251, 246, 0.86);
  --peach-coral: #ff826f;
  position: fixed !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100vw !important;
  height: 100svh !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: clamp(18px, 2.8vw, 42px) clamp(22px, 3vw, 52px) !important;
  overflow: hidden !important;
  color: var(--peach-ink) !important;
  background:
    linear-gradient(90deg, rgba(255, 244, 235, 0.12), rgba(255, 244, 235, 0)),
    url("./assets/chat-bg.png") center / cover no-repeat !important;
  font-family:
    "Microsoft YaHei UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Noto Sans SC",
    sans-serif !important;
  letter-spacing: 0 !important;
}

.xhaus-chat-home:not([hidden])::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: -1 !important;
  background:
    radial-gradient(circle at 63% 16%, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 34%, transparent 66%, rgba(255, 238, 214, 0.18)) !important;
  pointer-events: none !important;
}

.xhaus-chat-home .console-grid {
  display: grid !important;
  grid-template-columns:
    clamp(176px, 14.6vw, 228px)
    minmax(560px, 1fr)
    clamp(430px, 35.4vw, 560px) !important;
  grid-template-areas: "rail chat insight" !important;
  gap: clamp(24px, 2vw, 36px) !important;
  width: min(1508px, calc(100vw - clamp(44px, 6vw, 92px))) !important;
  height: min(900px, calc(100svh - clamp(36px, 6vh, 72px))) !important;
  min-height: min(680px, calc(100svh - 36px)) !important;
  max-height: 900px !important;
  padding: 0 !important;
  margin: 0 !important;
  align-items: stretch !important;
  overflow: visible !important;
}

.xhaus-chat-home .app-sidebar,
.xhaus-chat-home .chat-panel,
.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  background:
    linear-gradient(145deg, rgba(255, 253, 249, 0.9), rgba(255, 247, 239, 0.7)) !important;
  border: 1px solid var(--peach-line) !important;
  box-shadow:
    0 26px 48px rgba(155, 86, 42, 0.14),
    0 6px 18px rgba(255, 166, 108, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.xhaus-chat-home .app-sidebar {
  position: relative !important;
  z-index: 3 !important;
  grid-area: rail !important;
  display: flex !important;
  height: 100% !important;
  min-height: 0 !important;
  flex-direction: column !important;
  padding: clamp(22px, 3.4vh, 34px) clamp(18px, 1.8vw, 26px) !important;
  overflow: visible !important;
  border-radius: clamp(18px, 1.8vw, 26px) 0 0 clamp(18px, 1.8vw, 26px) !important;
}

.xhaus-chat-home .sidebar-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 34px !important;
  margin: 0 0 clamp(42px, 7.2vh, 72px) !important;
}

.xhaus-chat-home .sidebar-brand .brand-avatar {
  width: clamp(26px, 2.2vw, 34px) !important;
  height: clamp(26px, 2.2vw, 34px) !important;
  padding: 4px !important;
  border-radius: 50% !important;
  object-fit: contain !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 8px 18px rgba(156, 92, 51, 0.16) !important;
}

.xhaus-chat-home .sidebar-brand strong {
  color: #9b6a52 !important;
  font-size: clamp(17px, 1.65vw, 23px) !important;
  font-weight: 900 !important;
  letter-spacing: 0.01em !important;
}

.xhaus-chat-home .sidebar-brand span {
  padding-left: 8px !important;
  border-left: 1px solid rgba(166, 111, 82, 0.24) !important;
  color: rgba(163, 108, 78, 0.64) !important;
  font-size: clamp(10px, 0.95vw, 13px) !important;
}

.xhaus-chat-home .side-nav {
  display: grid !important;
  gap: clamp(14px, 2.1vh, 22px) !important;
  align-content: start !important;
  padding: 0 !important;
}

.xhaus-chat-home .side-action {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: clamp(8px, 0.9vw, 13px) !important;
  min-height: clamp(32px, 4.8vh, 45px) !important;
  padding: 0 clamp(10px, 1.3vw, 18px) !important;
  border: 0 !important;
  border-radius: clamp(11px, 1vw, 15px) !important;
  background: transparent !important;
  color: #a37156 !important;
  box-shadow: none !important;
  font-size: clamp(12px, 1.06vw, 15px) !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .side-action.primary {
  min-height: clamp(48px, 6.6vh, 58px) !important;
  justify-content: flex-start !important;
  padding-left: clamp(20px, 1.9vw, 28px) !important;
  background: linear-gradient(135deg, #ff756b, #ff9d7c) !important;
  color: #fff !important;
  box-shadow: 0 20px 34px rgba(240, 118, 91, 0.24) !important;
}

.xhaus-chat-home .side-icon {
  display: inline-grid !important;
  width: clamp(16px, 1.4vw, 20px) !important;
  place-items: center !important;
  color: currentColor !important;
  font-size: clamp(14px, 1.2vw, 18px) !important;
}

.xhaus-chat-home .sidebar-note {
  position: absolute !important;
  left: clamp(21px, 2vw, 34px) !important;
  right: auto !important;
  bottom: clamp(162px, 21.6%, 218px) !important;
  z-index: 6 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: min(176px, calc(100% - 42px)) !important;
  min-height: clamp(44px, 5.6vh, 56px) !important;
  padding: 0 clamp(14px, 1.3vw, 18px) !important;
  border: 1px solid rgba(244, 191, 154, 0.56) !important;
  border-radius: 999px !important;
  background: rgba(255, 250, 243, 0.82) !important;
  box-shadow: 0 14px 28px rgba(176, 99, 53, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  color: #b17c61 !important;
  font-size: clamp(10px, 0.9vw, 13px) !important;
  line-height: 1 !important;
}

.xhaus-chat-home .sidebar-note::before {
  content: "" !important;
  position: absolute !important;
  left: 14px !important;
  bottom: -9px !important;
  width: 16px !important;
  height: 16px !important;
  border-left: 1px solid rgba(244, 191, 154, 0.56) !important;
  border-bottom: 1px solid rgba(244, 191, 154, 0.56) !important;
  border-radius: 0 0 0 9px !important;
  background: rgba(255, 250, 243, 0.82) !important;
  transform: rotate(-18deg) !important;
}

.xhaus-chat-home .sidebar-note b {
  color: #ff8271 !important;
  font-size: clamp(18px, 1.7vw, 24px) !important;
  font-weight: 500 !important;
}

.xhaus-chat-home .sidebar-bear {
  position: absolute !important;
  left: clamp(26px, 2.4vw, 44px) !important;
  bottom: clamp(12px, 2vh, 24px) !important;
  z-index: 5 !important;
  width: min(190px, calc(100% - 44px)) !important;
  height: clamp(130px, 20.5%, 182px) !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 220, 191, 0.76) !important;
  border-radius: clamp(20px, 1.8vw, 28px) !important;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.92), rgba(255, 239, 221, 0.64) 64%, rgba(255, 222, 190, 0.54)) !important;
  object-fit: cover !important;
  object-position: 43% 64% !important;
  box-shadow:
    0 34px 46px rgba(161, 91, 48, 0.22),
    0 12px 18px rgba(255, 164, 110, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
  filter: saturate(1.08) contrast(1.02) drop-shadow(0 10px 10px rgba(153, 89, 50, 0.1)) !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.xhaus-chat-home .chat-panel {
  grid-area: chat !important;
  display: grid !important;
  grid-template-rows:
    clamp(56px, 7.2%, 72px)
    clamp(116px, 17.5%, 154px)
    minmax(0, 1fr)
    clamp(58px, 8%, 74px)
    clamp(70px, 9.5%, 88px) !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: 0 clamp(22px, 2vw, 30px) clamp(22px, 2vw, 30px) 0 !important;
}

.xhaus-chat-home .chat-panel::before {
  display: none !important;
}

.xhaus-chat-home .chat-top {
  display: grid !important;
  grid-template-columns: minmax(140px, 0.9fr) minmax(140px, 0.9fr) minmax(190px, 1.18fr) !important;
  gap: clamp(18px, 2vw, 36px) !important;
  align-items: center !important;
  padding: clamp(14px, 2.1vh, 22px) clamp(24px, 4.2vw, 54px) 0 !important;
}

.xhaus-chat-home .soft-status,
.xhaus-chat-home .agent-select {
  height: clamp(42px, 5.4vh, 54px) !important;
  min-width: 0 !important;
  border: 1px solid rgba(236, 196, 164, 0.46) !important;
  border-radius: 999px !important;
  background: rgba(255, 252, 247, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
  color: #9e6d53 !important;
}

.xhaus-chat-home .soft-status span:last-child {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

.xhaus-chat-home .status-icon {
  display: inline-grid !important;
  width: clamp(26px, 2.4vw, 36px) !important;
  height: clamp(26px, 2.4vw, 36px) !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: rgba(255, 226, 216, 0.72) !important;
  color: #ff8a73 !important;
  font-size: clamp(16px, 1.55vw, 22px) !important;
}

.xhaus-chat-home .pulse {
  width: 8px !important;
  height: 8px !important;
  margin-left: auto !important;
  background: #58d06f !important;
  box-shadow: none !important;
}

.xhaus-chat-home .agent-select {
  display: flex !important;
  justify-content: center !important;
  gap: clamp(7px, 0.7vw, 11px) !important;
  padding: 0 clamp(12px, 1.5vw, 20px) !important;
  font-size: clamp(11px, 0.9vw, 13px) !important;
}

.xhaus-chat-home .agent-select img {
  width: clamp(24px, 2vw, 32px) !important;
  height: clamp(24px, 2vw, 32px) !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center 24% !important;
}

.xhaus-chat-home .agent-select strong {
  max-width: 110px !important;
  overflow: hidden !important;
  color: #7f4f38 !important;
  font-size: clamp(12px, 1vw, 14px) !important;
  font-weight: 900 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .panel-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  min-height: 0 !important;
  padding: clamp(30px, 6vh, 56px) clamp(34px, 4.8vw, 66px) clamp(8px, 1.6vh, 18px) !important;
  border: 0 !important;
}

.xhaus-chat-home .eyebrow {
  margin: 0 0 clamp(7px, 1vh, 10px) !important;
  color: #df7769 !important;
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif !important;
  font-size: clamp(10px, 0.9vw, 13px) !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
}

.xhaus-chat-home #conversationTitle {
  margin: 0 !important;
  color: #7c4d35 !important;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", sans-serif !important;
  font-size: clamp(27px, 2.45vw, 39px) !important;
  font-weight: 900 !important;
  line-height: 1.12 !important;
}

.xhaus-chat-home .conversation-subtitle {
  margin: clamp(8px, 1.2vh, 12px) 0 0 !important;
  color: #b2795f !important;
  font-size: clamp(12px, 1.02vw, 15px) !important;
  line-height: 1.45 !important;
}

.xhaus-chat-home .chat-head-tools {
  display: none !important;
}

.xhaus-chat-home .messages {
  min-height: 0 !important;
  padding: clamp(10px, 1.8vh, 18px) clamp(38px, 4.6vw, 70px) clamp(16px, 2.6vh, 28px) !important;
  overflow-y: auto !important;
  background: transparent !important;
}

.xhaus-chat-home .messages::before {
  display: none !important;
}

.xhaus-chat-home .message {
  align-items: flex-start !important;
  margin-bottom: clamp(13px, 2vh, 20px) !important;
}

.xhaus-chat-home .message:not(.is-user)::before,
.xhaus-chat-home .message.is-user::after {
  width: clamp(36px, 3.6vw, 48px) !important;
  height: clamp(36px, 3.6vw, 48px) !important;
  flex: 0 0 clamp(36px, 3.6vw, 48px) !important;
  margin-top: clamp(4px, 0.7vh, 8px) !important;
  border: 2px solid rgba(255, 239, 226, 0.94) !important;
  border-radius: 50% !important;
  background-size: cover !important;
  background-position: center 24% !important;
  box-shadow: 0 10px 20px rgba(170, 96, 52, 0.16) !important;
}

.xhaus-chat-home .message:not(.is-user)::before {
  margin-right: clamp(12px, 1.45vw, 18px) !important;
}

.xhaus-chat-home .message.is-user::after {
  margin-left: clamp(12px, 1.45vw, 18px) !important;
}

.xhaus-chat-home .bubble {
  max-width: min(540px, 76%) !important;
  padding: clamp(12px, 1.6vh, 18px) clamp(15px, 1.8vw, 22px) !important;
  border: 1px solid rgba(234, 192, 160, 0.42) !important;
  border-radius: clamp(14px, 1.6vw, 21px) !important;
  background: rgba(255, 252, 247, 0.72) !important;
  color: #775038 !important;
  box-shadow: 0 16px 34px rgba(157, 88, 45, 0.08) !important;
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif !important;
  font-size: clamp(12px, 1vw, 14px) !important;
  line-height: 1.72 !important;
}

.xhaus-chat-home .message.is-user .bubble {
  background: rgba(255, 247, 239, 0.82) !important;
  color: #704831 !important;
  box-shadow: 0 12px 26px rgba(157, 88, 45, 0.08) !important;
}

.xhaus-chat-home .quick-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(10px, 1.35vw, 16px) !important;
  align-items: center !important;
  padding: clamp(12px, 1.8vh, 18px) clamp(34px, 4.8vw, 66px) !important;
  border-top: 1px solid rgba(231, 190, 160, 0.35) !important;
  background: rgba(255, 248, 240, 0.34) !important;
}

.xhaus-chat-home .quick-chip {
  min-width: 0 !important;
  min-height: clamp(38px, 5vh, 48px) !important;
  padding: 0 clamp(8px, 1.2vw, 16px) !important;
  border: 1px solid rgba(236, 196, 164, 0.52) !important;
  border-radius: clamp(12px, 1.1vw, 17px) !important;
  background: rgba(255, 250, 245, 0.78) !important;
  color: #8c5c42 !important;
  box-shadow: none !important;
  font-size: clamp(11px, 0.98vw, 14px) !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .composer {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) clamp(52px, 5.2vw, 66px) !important;
  gap: clamp(12px, 1.6vw, 20px) !important;
  align-items: center !important;
  padding: clamp(14px, 2vh, 22px) clamp(34px, 4.8vw, 66px) clamp(16px, 2.5vh, 28px) !important;
  border-top: 1px solid rgba(231, 190, 160, 0.35) !important;
  background: rgba(255, 247, 239, 0.46) !important;
}

.xhaus-chat-home .composer input {
  min-height: clamp(46px, 6vh, 58px) !important;
  padding: 0 clamp(15px, 1.8vw, 22px) !important;
  border: 1px solid rgba(236, 196, 164, 0.48) !important;
  border-radius: clamp(14px, 1.3vw, 20px) !important;
  background: rgba(255, 252, 247, 0.82) !important;
  color: #7f563d !important;
  box-shadow: 0 10px 24px rgba(157, 88, 45, 0.06) !important;
  font-size: clamp(12px, 1vw, 14px) !important;
}

.xhaus-chat-home .send-button {
  width: clamp(52px, 5.2vw, 66px) !important;
  height: clamp(52px, 5.2vw, 66px) !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ff806f, #ffa16f) !important;
  box-shadow: 0 18px 34px rgba(240, 118, 91, 0.24) !important;
}

.xhaus-chat-home .app-widgets,
.xhaus-chat-home .insight-panel {
  position: relative !important;
  grid-area: insight !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open),
.xhaus-chat-home .lower-control-row:not(.is-open) {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  position: absolute !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: clamp(18px, 1.8vw, 28px) !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
  top: 1.8% !important;
  left: 1.4% !important;
  width: 97% !important;
  height: 29% !important;
  padding: clamp(18px, 2.2vw, 28px) clamp(20px, 2.4vw, 32px) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
  top: 38.2% !important;
  left: 4.2% !important;
  width: 91.6% !important;
  height: 25.8% !important;
  padding: clamp(17px, 1.8vw, 24px) clamp(19px, 2.1vw, 28px) clamp(13px, 1.5vw, 20px) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card {
  top: 71.7% !important;
  left: 0 !important;
  width: 61% !important;
  height: 23.5% !important;
  padding: clamp(17px, 1.8vw, 24px) clamp(18px, 2vw, 26px) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  top: 71.7% !important;
  right: 0 !important;
  left: auto !important;
  width: 36.6% !important;
  height: 23.5% !important;
  padding: clamp(18px, 1.9vw, 25px) clamp(17px, 1.8vw, 24px) clamp(14px, 1.5vw, 20px) !important;
  background:
    linear-gradient(90deg, rgba(255, 252, 247, 0.72), rgba(255, 246, 234, 0.16)),
    url("./assets/satellite-bg.png") center bottom / cover no-repeat !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .panel-head.compact,
.xhaus-chat-home .lower-control-row:not(.is-open) .panel-head.compact {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 0 !important;
  margin: 0 0 clamp(8px, 1.2vh, 14px) !important;
  min-height: auto !important;
}

.xhaus-chat-home .app-widgets .panel-head.compact h2,
.xhaus-chat-home .satellite-card h2 {
  margin: 0 !important;
  color: #7d503a !important;
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif !important;
  font-size: clamp(20px, 1.7vw, 25px) !important;
  font-weight: 900 !important;
  line-height: 1.06 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card .panel-head.compact h2,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card .panel-head.compact h2 {
  font-size: clamp(20px, 1.65vw, 24px) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card h2 {
  max-width: 86% !important;
  font-size: clamp(20px, 1.75vw, 26px) !important;
  line-height: 1.1 !important;
}

.xhaus-chat-home .persona-gallery-head {
  display: flex !important;
  justify-content: space-between !important;
  margin: 0 0 clamp(9px, 1.2vh, 14px) !important;
  color: #ad765b !important;
  font-size: clamp(11px, 0.95vw, 13px) !important;
  font-weight: 850 !important;
}

.xhaus-chat-home .persona-gallery-head span:first-child::after,
.xhaus-chat-home .app-widgets .eyebrow::after {
  content: " ❤" !important;
  color: #ff8c79 !important;
  letter-spacing: 0 !important;
}

.xhaus-chat-home .persona-choices {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(10px, 1.1vw, 16px) !important;
  height: min-content !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

.xhaus-chat-home .persona-choice-wrap {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  min-height: clamp(108px, 15.2vh, 142px) !important;
}

.xhaus-chat-home .persona-choice {
  display: grid !important;
  grid-template-rows: clamp(44px, 6.7vh, 66px) auto auto !important;
  justify-items: center !important;
  align-content: start !important;
  gap: clamp(4px, 0.65vh, 8px) !important;
  width: 100% !important;
  height: 100% !important;
  min-height: clamp(108px, 15.2vh, 142px) !important;
  padding: clamp(10px, 1.2vw, 14px) clamp(7px, 0.8vw, 12px) !important;
  border: 1px solid rgba(236, 196, 164, 0.52) !important;
  border-radius: clamp(14px, 1.2vw, 20px) !important;
  background: rgba(255, 249, 242, 0.54) !important;
  color: #8b5d43 !important;
  box-shadow: none !important;
  text-align: center !important;
  white-space: normal !important;
}

.xhaus-chat-home .persona-choice-wrap.is-active .persona-choice {
  border-color: rgba(255, 128, 112, 0.82) !important;
  box-shadow: 0 14px 28px rgba(241, 128, 102, 0.12) !important;
}

.xhaus-chat-home .persona-choice-wrap.is-active::after {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  display: grid !important;
  width: clamp(20px, 2vw, 26px) !important;
  height: clamp(20px, 2vw, 26px) !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: #ff7f73 !important;
  color: #fff !important;
  content: "✓" !important;
  font-size: clamp(12px, 1.1vw, 15px) !important;
  font-weight: 900 !important;
}

.xhaus-chat-home .persona-choice-wrap:not(.is-active)::after {
  display: none !important;
}

.xhaus-chat-home .persona-card-plus {
  display: grid !important;
  width: clamp(38px, 4.2vw, 54px) !important;
  height: clamp(38px, 4.2vw, 54px) !important;
  place-items: center !important;
  color: #b88768 !important;
  font-size: clamp(24px, 2.4vw, 34px) !important;
  font-weight: 300 !important;
}

.xhaus-chat-home .persona-card-img {
  width: clamp(54px, 5.2vw, 74px) !important;
  height: clamp(44px, 4.5vw, 61px) !important;
  border-radius: clamp(11px, 1.1vw, 16px) !important;
  object-fit: cover !important;
  object-position: center 25% !important;
  filter: saturate(1.06) contrast(1.04) !important;
}

.xhaus-chat-home .persona-card-title {
  color: #8a5d43 !important;
  font-size: clamp(10px, 0.9vw, 12px) !important;
  font-weight: 900 !important;
  line-height: 1.12 !important;
}

.xhaus-chat-home .persona-card-desc {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: rgba(174, 122, 91, 0.75) !important;
  font-size: clamp(8px, 0.72vw, 10px) !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card .drawer-close,
.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card .small-button.drawer-close,
.xhaus-chat-home .lower-control-row:not(.is-open) .drawer-close {
  display: none !important;
}

.xhaus-chat-home .panel-tools {
  gap: clamp(8px, 0.8vw, 12px) !important;
}

.xhaus-chat-home .tool-button,
.xhaus-chat-home .small-button {
  min-height: clamp(30px, 4.2vh, 40px) !important;
  padding: 0 clamp(11px, 1.2vw, 17px) !important;
  border: 1px solid rgba(236, 196, 164, 0.52) !important;
  border-radius: clamp(11px, 1vw, 16px) !important;
  background: rgba(255, 250, 245, 0.58) !important;
  color: #986549 !important;
  box-shadow: none !important;
  font-size: clamp(10px, 0.85vw, 12px) !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .force-toggle {
  display: inline-flex !important;
  min-width: clamp(58px, 5vw, 72px) !important;
  gap: 7px !important;
  writing-mode: horizontal-tb !important;
}

.xhaus-chat-home .force-toggle span {
  display: inline !important;
  writing-mode: horizontal-tb !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) #skillName,
.xhaus-chat-home .lower-control-row:not(.is-open) #skillContent,
.xhaus-chat-home .lower-control-row:not(.is-open) #installSkillBtn,
.xhaus-chat-home .lower-control-row:not(.is-open) #skillResult,
.xhaus-chat-home .lower-control-row:not(.is-open) #cogTitle,
.xhaus-chat-home .lower-control-row:not(.is-open) #cogContent {
  display: none !important;
}

.xhaus-chat-home .doc-list {
  display: grid !important;
  gap: clamp(7px, 0.9vh, 10px) !important;
  overflow: hidden !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card .doc-list {
  max-height: none !important;
  height: calc(100% - clamp(54px, 7vh, 68px)) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card .doc-list {
  max-height: none !important;
  height: calc(100% - clamp(48px, 6.2vh, 60px)) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-item {
  display: grid !important;
  grid-template-columns: clamp(24px, 2.1vw, 31px) minmax(0, 1fr) clamp(30px, 2.7vw, 40px) !important;
  gap: clamp(8px, 0.9vw, 12px) !important;
  align-items: center !important;
  min-height: clamp(34px, 4.6vh, 45px) !important;
  padding: clamp(5px, 0.7vh, 8px) clamp(8px, 0.9vw, 12px) !important;
  border: 1px solid rgba(238, 195, 162, 0.38) !important;
  border-radius: clamp(11px, 1vw, 15px) !important;
  background: rgba(255, 250, 245, 0.52) !important;
  box-shadow: none !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-icon {
  display: inline-grid !important;
  width: clamp(24px, 2.1vw, 31px) !important;
  height: clamp(24px, 2.1vw, 31px) !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ff776c, #ff9f76) !important;
  color: #fff !important;
  font-size: clamp(11px, 0.95vw, 14px) !important;
  line-height: 1 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-main {
  min-width: 0 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-title {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: #86583f !important;
  font-size: clamp(10px, 0.86vw, 12px) !important;
  font-weight: 900 !important;
  line-height: 1.16 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-meta {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: rgba(174, 122, 91, 0.68) !important;
  font-size: clamp(8px, 0.72vw, 10px) !important;
  line-height: 1.12 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .managed-switch {
  position: relative !important;
  display: inline-block !important;
  justify-self: end !important;
  width: clamp(28px, 2.8vw, 36px) !important;
  height: clamp(16px, 1.55vw, 19px) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ff806f, #ffa16f) !important;
}

.xhaus-chat-home .managed-switch::after {
  content: "" !important;
  position: absolute !important;
  top: 3px !important;
  right: 3px !important;
  width: calc(100% - 19px) !important;
  max-width: 13px !important;
  min-width: 10px !important;
  aspect-ratio: 1 !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(139, 76, 42, 0.22) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .managed-edit,
.xhaus-chat-home .lower-control-row:not(.is-open) .managed-delete,
.xhaus-chat-home .lower-control-row:not(.is-open) .managed-placeholder-action,
.xhaus-chat-home .lower-control-row:not(.is-open) .item-actions {
  display: none !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card span {
  display: block !important;
  max-width: 84% !important;
  max-height: none !important;
  overflow: hidden !important;
  color: rgba(132, 86, 60, 0.82) !important;
  font-size: clamp(9px, 0.78vw, 11px) !important;
  line-height: 1.42 !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: flex-start !important;
  min-height: clamp(28px, 3.7vh, 34px) !important;
  margin-top: auto !important;
  padding: 0 clamp(11px, 1vw, 16px) !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ff806f, #ffa16f) !important;
  color: #fff !important;
  box-shadow: 0 12px 20px rgba(238, 117, 88, 0.2) !important;
}

.xhaus-chat-home .lower-control-row.is-open .control-card,
.xhaus-chat-home .runtime-panel.is-open .activate-card {
  background: rgba(255, 252, 248, 0.94) !important;
  color: #7f523b !important;
}

@media (max-width: 1280px), (max-height: 760px) {
  .xhaus-chat-home .console-grid {
    grid-template-columns:
      clamp(150px, 13.4vw, 188px)
      minmax(480px, 1fr)
      clamp(360px, 32vw, 456px) !important;
    gap: clamp(16px, 1.5vw, 24px) !important;
    width: calc(100vw - 32px) !important;
    height: calc(100svh - 28px) !important;
  }

  .xhaus-chat-home .app-sidebar {
    padding-inline: clamp(14px, 1.3vw, 18px) !important;
  }

  .xhaus-chat-home .side-nav {
    gap: 10px !important;
  }

  .xhaus-chat-home .sidebar-note {
    bottom: 150px !important;
  }

  .xhaus-chat-home .sidebar-bear {
    height: 126px !important;
  }

  .xhaus-chat-home .chat-panel {
    grid-template-rows: 52px 112px minmax(0, 1fr) 56px 66px !important;
  }

  .xhaus-chat-home .messages {
    padding-inline: 30px !important;
  }

  .xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
    height: 28% !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
    top: 37% !important;
    height: 25% !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
  .xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
    top: 70% !important;
    height: 23% !important;
  }
}

/* Hard no-overlap pass: fix sidebar, status pills and card scrolling. */
.xhaus-chat-home .console-grid {
  grid-template-columns:
    clamp(168px, 13.6vw, 214px)
    minmax(560px, 1fr)
    clamp(440px, 34.6vw, 548px) !important;
  gap: clamp(24px, 2vw, 34px) !important;
}

.xhaus-chat-home .app-sidebar {
  padding-top: clamp(22px, 3vh, 30px) !important;
  padding-bottom: clamp(18px, 2.6vh, 24px) !important;
}

.xhaus-chat-home .sidebar-brand {
  margin-bottom: clamp(32px, 4.8vh, 48px) !important;
}

.xhaus-chat-home .side-nav {
  gap: clamp(10px, 1.45vh, 15px) !important;
}

.xhaus-chat-home .side-action {
  min-height: clamp(31px, 4.1vh, 38px) !important;
  font-size: clamp(12px, 1vw, 14px) !important;
}

.xhaus-chat-home .side-action.primary {
  min-height: clamp(44px, 5.8vh, 54px) !important;
}

.xhaus-chat-home .sidebar-note {
  left: clamp(18px, 1.8vw, 28px) !important;
  bottom: clamp(150px, 19.5%, 178px) !important;
  width: min(170px, calc(100% - 36px)) !important;
  min-height: clamp(42px, 5vh, 50px) !important;
  z-index: 8 !important;
}

.xhaus-chat-home .sidebar-bear {
  left: clamp(20px, 2.2vw, 34px) !important;
  bottom: clamp(16px, 2vh, 24px) !important;
  width: min(178px, calc(100% - 38px)) !important;
  height: clamp(122px, 18.2%, 150px) !important;
  z-index: 7 !important;
}

.xhaus-chat-home .chat-top {
  grid-template-columns:
    clamp(116px, 11vw, 152px)
    clamp(116px, 11vw, 152px)
    clamp(206px, 18vw, 258px) !important;
  justify-content: center !important;
  gap: clamp(14px, 1.55vw, 24px) !important;
  padding-inline: clamp(28px, 4vw, 54px) !important;
}

.xhaus-chat-home .soft-status {
  width: clamp(116px, 11vw, 152px) !important;
  padding: 0 clamp(10px, 1vw, 14px) !important;
  justify-content: center !important;
}

.xhaus-chat-home .soft-status .pulse {
  flex: 0 0 auto !important;
  margin-left: clamp(12px, 1.2vw, 18px) !important;
}

.xhaus-chat-home .agent-select {
  width: clamp(206px, 18vw, 258px) !important;
  justify-content: center !important;
  padding-inline: clamp(10px, 1.1vw, 16px) !important;
}

.xhaus-chat-home .agent-select span:first-child {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .agent-select strong {
  max-width: clamp(78px, 7.6vw, 118px) !important;
  white-space: nowrap !important;
}

.xhaus-chat-home .agent-select .chevron {
  flex: 0 0 auto !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 31.5% !important;
  min-height: 228px !important;
  padding: clamp(18px, 2vw, 25px) clamp(20px, 2.1vw, 28px) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
  top: 36% !important;
  left: 3.2% !important;
  width: 93.6% !important;
  height: 27% !important;
  min-height: 188px !important;
  padding: clamp(16px, 1.75vw, 23px) clamp(18px, 2vw, 26px) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card {
  top: 69.5% !important;
  left: 0 !important;
  width: 61.2% !important;
  height: 28.5% !important;
  min-height: 180px !important;
  padding: clamp(16px, 1.75vw, 23px) clamp(18px, 2vw, 25px) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  top: 69.5% !important;
  right: 0 !important;
  width: 36% !important;
  height: 28.5% !important;
  min-height: 180px !important;
  padding: clamp(16px, 1.75vw, 23px) clamp(16px, 1.75vw, 22px) !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
  overflow: hidden auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(176, 119, 84, 0.42) transparent !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card::-webkit-scrollbar,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card::-webkit-scrollbar,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card::-webkit-scrollbar,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card::-webkit-scrollbar,
.xhaus-chat-home .persona-choices::-webkit-scrollbar,
.xhaus-chat-home .doc-list::-webkit-scrollbar {
  width: 6px !important;
}

.xhaus-chat-home .runtime-panel:not(.is-open) .activate-card::-webkit-scrollbar-thumb,
.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card::-webkit-scrollbar-thumb,
.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card::-webkit-scrollbar-thumb,
.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card::-webkit-scrollbar-thumb,
.xhaus-chat-home .persona-choices::-webkit-scrollbar-thumb,
.xhaus-chat-home .doc-list::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: rgba(176, 119, 84, 0.42) !important;
}

.xhaus-chat-home .persona-choices {
  max-height: calc(100% - clamp(74px, 9vh, 92px)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 4px 8px 0 !important;
}

.xhaus-chat-home .persona-choice-wrap,
.xhaus-chat-home .persona-choice {
  min-height: clamp(96px, 12.5vh, 124px) !important;
}

.xhaus-chat-home .persona-choice {
  grid-template-rows: clamp(42px, 5.6vh, 56px) auto auto !important;
}

.xhaus-chat-home .persona-card-img {
  width: clamp(52px, 4.8vw, 68px) !important;
  height: clamp(40px, 4.1vw, 54px) !important;
}

.xhaus-chat-home .doc-list {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 4px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(176, 119, 84, 0.42) transparent !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .skill-card .doc-list {
  height: calc(100% - clamp(50px, 6.4vh, 64px)) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .memory-card .doc-list {
  height: calc(100% - clamp(46px, 5.8vh, 60px)) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card h2 {
  max-width: 100% !important;
  margin-bottom: clamp(8px, 1vh, 12px) !important;
}

.xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card span {
  max-width: 100% !important;
  overflow: visible !important;
}

@media (max-width: 1360px), (max-height: 820px) {
  .xhaus-chat-home .console-grid {
    grid-template-columns:
      clamp(150px, 13vw, 180px)
      minmax(500px, 1fr)
      clamp(372px, 33vw, 456px) !important;
    gap: clamp(16px, 1.4vw, 24px) !important;
    width: calc(100vw - 30px) !important;
    height: calc(100svh - 26px) !important;
  }

  .xhaus-chat-home .sidebar-brand {
    margin-bottom: 28px !important;
  }

  .xhaus-chat-home .side-nav {
    gap: 8px !important;
  }

  .xhaus-chat-home .side-action {
    min-height: 30px !important;
  }

  .xhaus-chat-home .side-action.primary {
    min-height: 42px !important;
  }

  .xhaus-chat-home .sidebar-note {
    bottom: 132px !important;
  }

  .xhaus-chat-home .sidebar-bear {
    height: 110px !important;
  }

  .xhaus-chat-home .chat-top {
    grid-template-columns: 108px 108px 196px !important;
    gap: 12px !important;
  }

  .xhaus-chat-home .soft-status {
    width: 108px !important;
  }

  .xhaus-chat-home .agent-select {
    width: 196px !important;
  }

  .xhaus-chat-home .runtime-panel:not(.is-open) .activate-card {
    height: 31% !important;
    min-height: 206px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .skill-card {
    top: 35.4% !important;
    height: 27% !important;
    min-height: 168px !important;
  }

  .xhaus-chat-home .lower-control-row:not(.is-open) .memory-card,
  .xhaus-chat-home .lower-control-row:not(.is-open) .satellite-card {
    top: 68.5% !important;
    height: 30% !important;
    min-height: 168px !important;
  }
}

/* Skill / memory activation switches */
.xhaus-chat-home button.managed-switch {
  --managed-switch-width: clamp(31px, 2.8vw, 36px);
  --managed-switch-knob: clamp(11px, 1vw, 13px);
  width: var(--managed-switch-width) !important;
  min-width: var(--managed-switch-width) !important;
  height: clamp(17px, 1.55vw, 19px) !important;
  padding: 0 !important;
  border: 1px solid rgba(162, 119, 94, 0.38) !important;
  appearance: none !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: border-color 180ms ease, background-color 180ms ease, opacity 180ms ease !important;
}

.xhaus-chat-home button.managed-switch::after {
  top: 50% !important;
  right: auto !important;
  left: 3px !important;
  width: var(--managed-switch-knob) !important;
  min-width: var(--managed-switch-knob) !important;
  max-width: var(--managed-switch-knob) !important;
  height: var(--managed-switch-knob) !important;
  background: rgba(155, 117, 96, 0.55) !important;
  box-shadow: none !important;
  transform: translateY(-50%) !important;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease !important;
}

.xhaus-chat-home button.managed-switch.is-active {
  border-color: transparent !important;
  background: linear-gradient(135deg, #ff806f, #ffa16f) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3) !important;
}

.xhaus-chat-home button.managed-switch.is-active::after {
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(139, 76, 42, 0.22) !important;
  transform: translate(
    calc(var(--managed-switch-width) - var(--managed-switch-knob) - 6px),
    -50%
  ) !important;
}

.xhaus-chat-home button.managed-switch:focus-visible {
  outline: 2px solid rgba(255, 111, 91, 0.72) !important;
  outline-offset: 3px !important;
}

.xhaus-chat-home button.managed-switch:disabled {
  cursor: wait !important;
  opacity: 0.62 !important;
}
