body.portal-muse-page {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #ffffff;
  color: #171717;
  font-family: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

html.dark body.portal-muse-page {
  background: #09090b;
  color: #fafafa;
}

.muse-portal-main,
.muse-portal-main *,
.muse-portal-main *::before,
.muse-portal-main *::after {
  box-sizing: border-box;
}

.muse-root button,
.muse-root textarea,
.muse-root input {
  font: inherit;
}

.muse-root button {
  color: inherit;
}

.muse-root svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.muse-root .hidden {
  display: none !important;
}

.muse-portal-main {
  position: fixed;
  top: var(--portal-shell-bar-height, 5rem);
  bottom: var(--portal-shell-bar-height, 5rem);
  left: var(--portal-shell-offset, 10vw);
  width: var(--portal-shell-width, min(80vw, 1920px));
  height: auto;
  min-height: 0;
  margin-top: 0 !important;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  background: transparent !important;
  background-color: transparent !important;
  box-sizing: border-box;
}

body.portal-muse-page > nav.sticky + main.muse-portal-main {
  margin-top: 0 !important;
}

.muse-root {
  --muse-bg: #ffffff;
  --muse-panel: #f7f7f8;
  --muse-panel-strong: #ececec;
  --muse-elevated: #ffffff;
  --muse-text: #171717;
  --muse-muted: #6f6f76;
  --muse-faint: #9b9ba1;
  --muse-line: rgba(0, 0, 0, 0.1);
  --muse-hover: rgba(0, 0, 0, 0.06);
  --muse-active: rgba(0, 0, 0, 0.09);
  --muse-accent: #e24a91;
  --muse-sidebar-width: 312px;
  --muse-sidebar-collapsed-width: 72px;
  --muse-activity-width: clamp(300px, 21vw, 360px);
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--muse-sidebar-width) minmax(0, 1fr);
  padding-right: 0;
  overflow: hidden;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--muse-text);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  transition: padding-right 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.muse-root.is-activity-open {
  grid-template-columns: var(--muse-sidebar-width) minmax(0, 1fr);
  padding-right: var(--muse-activity-width);
}

html.dark .muse-root {
  --muse-bg: #000000;
  --muse-panel: #050505;
  --muse-panel-strong: #2f2f2f;
  --muse-elevated: #202020;
  --muse-text: #f5f5f5;
  --muse-muted: #b8b8bd;
  --muse-faint: #8b8b91;
  --muse-line: rgba(255, 255, 255, 0.12);
  --muse-hover: rgba(255, 255, 255, 0.08);
  --muse-active: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.muse-sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--muse-line);
  background: var(--muse-bg);
  overflow-y: auto;
  overscroll-behavior: contain;
}

html.dark .muse-sidebar {
  background: #000000;
}

.muse-sidebar-head {
  height: 74px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}

.muse-home-icon,
.muse-profile,
.muse-nav-action,
.muse-list-item,
.muse-section-add,
.muse-icon-button,
.muse-sidebar-reopen,
.muse-plus-button,
.muse-model-button,
.muse-send-button,
.muse-stop-button,
.muse-modal-primary,
.muse-popover button,
.muse-chip,
.muse-prompt-card {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.muse-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--muse-text);
  transition: background 0.16s ease, color 0.16s ease;
}

.muse-home-icon:hover {
  background: var(--muse-hover);
}

.muse-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ea580c;
  color: #fff;
  font-weight: 700;
}

.muse-icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--muse-muted);
  transition: background 0.16s ease, color 0.16s ease;
}

.muse-icon-button:hover,
.muse-section-add:hover,
.muse-sidebar-reopen:hover {
  background: var(--muse-hover);
  color: var(--muse-text);
}

.muse-primary-nav {
  padding: 0 8px 18px;
  display: grid;
  gap: 4px;
  flex: 0 0 auto;
}

.muse-nav-action,
.muse-list-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--muse-text);
  text-align: left;
  font-size: 15px;
  line-height: 1.25;
  transition: background 0.16s ease;
}

.muse-nav-action:hover,
.muse-list-item:hover,
.muse-list-item.is-active {
  background: var(--muse-active);
}

.muse-nav-action.is-active {
  background: transparent;
  box-shadow: none;
}

.muse-nav-action svg,
.muse-list-item svg {
  flex: 0 0 auto;
  color: currentColor;
}

.muse-search-box {
  padding: 0 12px 14px;
}

.muse-search-field {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--muse-line);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--muse-elevated);
  color: var(--muse-muted);
}

.muse-search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muse-text);
  outline: 0;
}

.muse-sidebar-section {
  padding: 0 8px 14px;
  flex: 0 0 auto;
}

.muse-recents-section {
  min-height: 0;
  flex: 0 0 auto;
}

.muse-section-head {
  min-height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muse-text);
  font-size: 14px;
  font-weight: 700;
}

.muse-section-add {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muse-muted);
}

.muse-section-add svg {
  width: 17px;
  height: 17px;
}

.muse-list {
  display: grid;
  gap: 2px;
}

.muse-recents-section .muse-list {
  min-height: 0;
  padding-bottom: 12px;
}

.muse-list-item {
  position: relative;
  min-height: 36px;
  padding: 8px 12px;
  gap: 9px;
  color: var(--muse-text);
  font-size: 14px;
}

.muse-conversation-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 2px;
  border-radius: 10px;
}

.muse-conversation-row:hover,
.muse-conversation-row:focus-within,
.muse-conversation-row.is-active {
  background: var(--muse-active);
}

.muse-conversation-row .muse-list-item {
  background: transparent !important;
}

.muse-list-item strong,
.muse-list-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-list-item small {
  display: none;
}

.muse-conversation-action {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--muse-muted);
  opacity: 0;
  transition: opacity 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.muse-conversation-row:hover .muse-conversation-action,
.muse-conversation-row:focus-within .muse-conversation-action,
.muse-conversation-row.is-active .muse-conversation-action {
  opacity: 1;
}

.muse-conversation-action:hover,
.muse-conversation-action.is-open {
  background: transparent;
  color: var(--muse-text);
}

.muse-conversation-action:focus,
.muse-conversation-action:focus-visible {
  outline: 0;
  box-shadow: none;
}

.muse-conversation-action svg {
  width: 18px;
  height: 18px;
}

.muse-pin-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin: 0 6px 2px 0;
  border-radius: 999px;
  background: var(--muse-text);
}

.muse-conversation-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 130;
  min-width: 236px;
  max-height: min(340px, calc(100vh - 24px));
  overflow-y: auto;
  display: grid;
  gap: 4px;
  border: 0;
  border-radius: 18px;
  background: #333333;
  color: #f5f5f5;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
  padding: 8px;
}

.muse-conversation-menu button,
.muse-menu-empty {
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0 12px;
}

.muse-conversation-menu button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
}

.muse-conversation-menu button svg {
  width: 21px;
  height: 21px;
}

.muse-conversation-menu button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-conversation-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.muse-conversation-menu button.is-danger {
  color: #ff6b6b;
}

.muse-menu-nested {
  position: relative;
}

.muse-menu-nested.is-open > button {
  background: rgba(255, 255, 255, 0.1);
}

.muse-menu-nested > button strong {
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.muse-project-submenu {
  position: fixed;
  top: var(--muse-project-submenu-top, 0);
  left: var(--muse-project-submenu-left, 0);
  z-index: 120;
  width: 260px;
  max-height: min(320px, calc(100vh - 24px));
  overflow-y: auto;
  display: none;
  gap: 4px;
  border-radius: 18px;
  background: #3b3b3b;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
  padding: 8px;
}

.muse-menu-nested.is-open .muse-project-submenu {
  display: grid;
}

.muse-menu-empty {
  display: flex;
  align-items: center;
  color: rgba(245, 245, 245, 0.54);
  font-size: 13px;
}

html:not(.dark) .muse-conversation-menu {
  background: #ffffff;
  color: #171717;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.16);
}

html:not(.dark) .muse-project-submenu {
  background: #ffffff;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.16);
}

html:not(.dark) .muse-conversation-menu button:hover {
  background: rgba(0, 0, 0, 0.07);
}

html:not(.dark) .muse-menu-nested.is-open > button {
  background: rgba(0, 0, 0, 0.07);
}

html:not(.dark) .muse-menu-empty {
  color: rgba(23, 23, 23, 0.52);
}

.muse-muted {
  padding: 8px 12px;
  color: var(--muse-faint);
  font-size: 13px;
}

.muse-sidebar-foot {
  height: 78px;
  padding: 10px 14px;
  border-top: 1px solid var(--muse-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
}

.muse-profile {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.muse-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  font-size: 12px;
}

.muse-profile strong,
.muse-profile small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-profile strong {
  color: var(--muse-text);
  font-size: 14px;
  font-weight: 650;
}

.muse-profile small {
  color: var(--muse-faint);
  font-size: 12px;
}

.muse-sidebar-reopen {
  position: fixed;
  top: calc(var(--portal-shell-bar-height, 5rem) + 18px);
  left: calc(var(--portal-shell-offset, 10vw) + 10px);
  z-index: 95;
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--muse-muted);
  background: var(--muse-elevated);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.muse-root.is-sidebar-collapsed {
  grid-template-columns: var(--muse-sidebar-collapsed-width) minmax(0, 1fr);
}

.muse-root.is-sidebar-collapsed.is-activity-open {
  grid-template-columns: var(--muse-sidebar-collapsed-width) minmax(0, 1fr);
}

.muse-root.is-sidebar-collapsed .muse-sidebar {
  transform: none;
  background: var(--muse-bg);
}

.muse-root.is-sidebar-collapsed .muse-sidebar-head {
  height: 72px;
  padding: 0;
  justify-content: center;
}

.muse-root.is-sidebar-collapsed .muse-home-icon {
  width: 44px;
  height: 44px;
  justify-content: center;
  border-radius: 12px;
}

.muse-root.is-sidebar-collapsed .muse-home-icon:hover,
.muse-root.is-sidebar-collapsed .muse-nav-action:hover,
.muse-root.is-sidebar-collapsed .muse-profile:hover {
  background: var(--muse-hover);
}

.muse-root.is-sidebar-collapsed .muse-home-icon,
.muse-root.is-sidebar-collapsed .muse-nav-action span,
.muse-root.is-sidebar-collapsed .muse-sidebar-section,
.muse-root.is-sidebar-collapsed .muse-profile strong,
.muse-root.is-sidebar-collapsed .muse-profile small,
.muse-root.is-sidebar-collapsed #muse-sidebar-logout,
.muse-root.is-sidebar-collapsed .muse-sidebar-reopen {
  display: none;
}

.muse-root.is-sidebar-collapsed .muse-icon-button#muse-collapse-sidebar {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--muse-text);
}

.muse-root.is-sidebar-collapsed .muse-primary-nav {
  padding: 0 0 18px;
  justify-items: center;
  gap: 10px;
}

.muse-root.is-sidebar-collapsed .muse-nav-action {
  width: 44px;
  height: 44px;
  min-height: 44px;
  justify-content: center;
  border-radius: 12px;
  padding: 0;
}

.muse-root.is-sidebar-collapsed .muse-nav-action.is-active {
  background: transparent;
}

.muse-root.is-sidebar-collapsed .muse-sidebar-foot {
  height: 72px;
  margin-top: auto;
  justify-content: center;
  padding: 0;
  border-top: 0;
}

.muse-root.is-sidebar-collapsed .muse-profile {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  justify-content: center;
  border-radius: 12px;
}

.muse-workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: transparent !important;
  background-color: transparent !important;
  overflow: hidden;
}

.muse-root.is-activity-open .muse-workspace {
  border-right: 1px solid var(--muse-line);
}

.muse-activity-panel {
  position: fixed;
  top: var(--portal-shell-bar-height, 5rem);
  right: var(--portal-shell-offset, 10vw);
  bottom: var(--portal-shell-bar-height, 5rem);
  z-index: 65;
  width: var(--muse-activity-width);
  height: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--muse-line);
  border-radius: 0;
  background: var(--muse-bg);
  color: var(--muse-text);
  box-shadow: none;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 1px));
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.18s ease;
  will-change: transform;
}

.muse-root.is-activity-open .muse-activity-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

html.dark .muse-activity-panel {
  background: #030303;
  box-shadow: none;
}

.muse-activity-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--muse-line);
  padding: 12px 22px;
}

.muse-activity-titleline {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  row-gap: 2px;
}

.muse-activity-head strong {
  color: var(--muse-text);
  font-size: 15px;
  font-weight: 720;
}

.muse-activity-head span {
  color: var(--muse-muted);
  font-size: 13px;
  white-space: normal;
}

.muse-activity-head .muse-icon-button {
  width: 36px;
  height: 36px;
  border-radius: 999px;
}

.muse-activity-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px 22px 30px;
}

.muse-activity-empty {
  color: var(--muse-muted);
  font-size: 13px;
}

.muse-activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  padding: 0 0 24px;
  color: var(--muse-muted);
}

.muse-activity-item + .muse-activity-item {
  border-top: 0;
}

.muse-activity-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 22px;
  bottom: 2px;
  width: 1px;
  background: var(--muse-line);
}

.muse-activity-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muse-muted);
}

.muse-activity-item.is-running .muse-activity-dot {
  color: var(--muse-text);
}

.muse-activity-item.is-completed .muse-activity-dot {
  color: var(--muse-muted);
}

.muse-activity-item.is-failed .muse-activity-dot {
  color: #ef4444;
}

.muse-activity-item.is-canceled .muse-activity-dot {
  color: #94a3b8;
}

.muse-activity-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.muse-activity-dot svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.muse-activity-dot:has(svg)::before {
  display: none;
}

.muse-activity-body {
  min-width: 0;
  display: grid;
  gap: 0;
}

.muse-activity-item-title {
  display: block;
  color: var(--muse-text);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.35;
}

.muse-activity-text {
  margin: 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.6;
}

.muse-activity-item.is-thinking .muse-activity-dot {
  margin-top: 7px;
}

.muse-activity-item.is-thinking .muse-activity-dot::before {
  width: 5px;
  height: 5px;
}

.muse-activity-item.is-thinking .muse-activity-text {
  margin-top: 7px;
  line-height: 1.52;
}

.muse-activity-item.is-thinking .muse-activity-text strong {
  display: inline-block;
  margin-top: 3px;
  color: var(--muse-text);
  font-weight: 720;
}

.muse-activity-item.is-thinking .muse-activity-text strong:first-child {
  margin-top: 0;
}

.muse-activity-sources {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.muse-activity-sources > a,
.muse-activity-sources > span {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muse-panel-strong) 82%, transparent);
  color: var(--muse-muted);
  padding: 5px 9px;
  text-decoration: none;
  font-size: 12px;
}

.muse-activity-source-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--muse-muted);
  overflow: hidden;
}

.muse-activity-source-fallback {
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muse-text) 10%, transparent);
  color: var(--muse-text);
  font-size: 9px;
  font-weight: 760;
  line-height: 1;
}

.muse-activity-source-fallback::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1.4px solid currentColor;
  border-radius: 999px;
  opacity: 0.72;
}

.muse-activity-source-fallback::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 7px;
  height: 1.4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.38;
}

.muse-activity-source-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.muse-activity-source-icon img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 999px;
  object-fit: cover;
  background: var(--muse-panel-strong);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.muse-activity-source-icon img.is-loaded {
  opacity: 1;
}

html.dark .muse-activity-sources > a,
html.dark .muse-activity-sources > span {
  background: #1d1d1d;
  color: #d7d7dc;
}

.muse-activity-image {
  width: min(180px, 100%);
  margin-top: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.muse-activity-image img {
  display: block;
  width: 100%;
  height: auto;
}

body.portal-muse-page .muse-portal-main,
body.portal-muse-page .muse-root,
body.portal-muse-page .muse-workspace {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

html.dark main.muse-portal-main,
html.dark .muse-workspace {
  background: transparent !important;
  background-color: transparent !important;
}

.muse-mobile-topbar {
  display: none;
}

.muse-view {
  height: 100%;
  min-height: 0;
  display: none;
  overflow: hidden;
}

.muse-view.is-active {
  display: flex;
  flex-direction: column;
}

.muse-error {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 30;
  width: min(680px, calc(100% - 40px));
  transform: translateX(-50%);
  border-radius: 14px;
  background: #fef2f2;
  color: #b91c1c;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.muse-thread {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 54px 24px 22px;
}

.muse-empty {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.muse-empty h1 {
  max-width: min(760px, calc(100% - 32px));
  margin: 0 0 40px;
  color: var(--muse-text);
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.muse-empty-kicker {
  margin-bottom: 14px;
  color: var(--muse-faint);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.muse-empty-prompts {
  width: min(760px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.muse-empty-prompts button {
  min-height: 48px;
  border: 1px solid var(--muse-line);
  border-radius: 16px;
  background: transparent;
  color: var(--muse-text);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
}

.muse-empty-prompts button:hover {
  background: var(--muse-hover);
}

.muse-thread-loading {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--muse-muted);
}

.muse-thread-loading strong {
  color: var(--muse-text);
  font-size: 18px;
  font-weight: 620;
}

.muse-thread-loading p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.muse-thread-loading-dot {
  width: 34px;
  height: 34px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.muse-thread-loading-dot::before,
.muse-thread-loading-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.muse-thread-loading-dot::before {
  border: 1px solid color-mix(in srgb, var(--muse-text) 18%, transparent);
}

.muse-thread-loading-dot::after {
  inset: 11px;
  background: var(--muse-text);
  opacity: 0.72;
  animation: museThreadLoadingPulse 1.4s ease-in-out infinite;
}

@keyframes museThreadLoadingPulse {
  0%,
  100% {
    transform: scale(0.78);
    opacity: 0.32;
  }
  50% {
    transform: scale(1);
    opacity: 0.82;
  }
}

.muse-project-group {
  display: grid;
  gap: 2px;
}

.muse-project-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  border-radius: 10px;
}

.muse-project-row:hover,
.muse-project-row.is-active {
  background: var(--muse-active);
}

.muse-project-row .muse-list-item {
  min-width: 0;
}

.muse-project-row .muse-list-item:hover,
.muse-project-row .muse-list-item.is-active {
  background: transparent;
}

.muse-project-action {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muse-muted);
  cursor: pointer;
  opacity: 0.82;
  transition: opacity 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.muse-project-row:hover .muse-project-action,
.muse-project-action.is-open {
  opacity: 1;
}

.muse-project-action:hover,
.muse-project-action.is-open {
  background: transparent;
  color: var(--muse-text);
}

.muse-project-action svg {
  width: 18px;
  height: 18px;
}

.muse-project-children {
  margin: -1px 0 5px;
  display: grid;
  gap: 1px;
  padding-left: 24px;
}

.muse-project-child-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  border-radius: 9px;
}

.muse-project-child {
  min-width: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muse-muted);
  cursor: pointer;
  padding: 6px 6px 6px 10px;
  text-align: left;
  font-size: 13px;
  line-height: 1.25;
  transition: background 0.16s ease, color 0.16s ease;
}

.muse-project-child-row:hover,
.muse-project-child-row.is-active {
  background: var(--muse-active);
}

.muse-project-child:hover,
.muse-project-child.is-active {
  background: transparent;
  color: var(--muse-text);
}

.muse-project-child span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-project-child-action {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muse-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.muse-project-child-row:hover .muse-project-child-action,
.muse-project-child-action.is-open {
  opacity: 1;
}

.muse-project-child-action:hover,
.muse-project-child-action.is-open {
  background: transparent;
  color: var(--muse-text);
}

.muse-project-child-action svg {
  width: 18px;
  height: 18px;
}

.muse-project-home {
  width: min(900px, calc(100% - 32px));
  min-height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 36px;
  padding: clamp(42px, 7vh, 84px) 0 132px;
  text-align: left;
}

.muse-project-context-bar {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.muse-project-context {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  justify-self: flex-start;
  gap: 12px;
  border-radius: 12px;
  color: var(--muse-text);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 540;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.muse-project-context > span {
  min-width: 0;
}

.muse-project-context svg {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  stroke-width: 1.55;
}

.muse-project-context-actions {
  position: relative;
  flex: 0 0 auto;
}

.muse-project-action.is-home {
  width: 32px;
  height: 32px;
  opacity: 1;
}

.muse-project-thread-list {
  display: grid;
  gap: 0;
}

.muse-project-thread-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.muse-project-thread-tabs span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--muse-line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--muse-text);
  font-size: 15px;
  font-weight: 620;
}

.muse-project-thread-row {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--muse-line);
  padding: 13px 0;
}

.muse-project-thread-row:last-child {
  border-bottom: 1px solid var(--muse-line);
}

.muse-project-thread-row:hover,
.muse-project-thread-row:focus-within,
.muse-project-thread-row.is-active {
  background: color-mix(in srgb, var(--muse-active) 56%, transparent);
}

.muse-project-thread {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muse-text);
  cursor: pointer;
  padding: 0 0 0 14px;
  text-align: left;
}

.muse-project-thread strong,
.muse-project-thread span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-project-thread strong {
  font-size: 15px;
  font-weight: 650;
}

.muse-project-thread span {
  color: var(--muse-muted);
  font-size: 14px;
  line-height: 1.35;
}

.muse-project-thread-row time {
  color: var(--muse-muted);
  font-size: 14px;
  white-space: nowrap;
}

.muse-project-thread-action {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muse-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.16s ease, color 0.16s ease;
}

.muse-project-thread-row:hover .muse-project-thread-action,
.muse-project-thread-row:focus-within .muse-project-thread-action,
.muse-project-thread-action.is-open {
  opacity: 1;
}

.muse-project-thread-action:hover,
.muse-project-thread-action.is-open {
  color: var(--muse-text);
}

.muse-project-thread-action svg {
  width: 18px;
  height: 18px;
}

.muse-project-empty-chat {
  border-top: 1px solid var(--muse-line);
  border-bottom: 1px solid var(--muse-line);
  padding: 18px 0;
  color: var(--muse-muted);
  font-size: 15px;
}

.muse-message-list {
  width: min(820px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 26px;
}

.muse-message {
  display: flex;
  width: 100%;
  min-width: 0;
}

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

.muse-bubble {
  min-width: 0;
  max-width: min(720px, 88%);
  color: var(--muse-text);
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.muse-message.is-user .muse-bubble {
  border-radius: 22px;
  background: var(--muse-panel-strong);
  padding: 12px 16px;
}

.muse-message-user-attachments {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.muse-message-user-attachment {
  width: 104px;
  display: block;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muse-muted);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.muse-message-user-attachment img {
  width: 104px;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--muse-active);
}

.muse-message.is-assistant .muse-bubble {
  width: 100%;
}

.muse-message-content {
  word-break: break-word;
}

.muse-message-content p {
  margin: 0 0 14px;
  line-height: 1.72;
}

.muse-message-content p:last-child {
  margin-bottom: 0;
}

.muse-message-terminal {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muse-muted);
  font-size: 14px;
  line-height: 1.5;
}

.muse-message-terminal.is-failed {
  color: var(--muse-danger);
}

.muse-message-content h2,
.muse-message-content h3,
.muse-message-content h4,
.muse-message-content h5 {
  margin: 22px 0 10px;
  color: var(--muse-text);
  font-weight: 760;
  line-height: 1.32;
}

.muse-message-content h3 {
  font-size: 18px;
}

.muse-message-content h4,
.muse-message-content h5 {
  font-size: 16px;
}

.muse-message-content strong {
  font-weight: 760;
}

.muse-message-content code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--muse-panel-strong);
  font-size: 0.92em;
}

.muse-message-content pre {
  margin: 12px 0;
  padding: 12px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--muse-panel-strong);
}

.muse-message-content blockquote {
  margin: 14px 0;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--muse-line);
  color: var(--muse-muted);
}

.muse-message-content ul,
.muse-message-content ol {
  margin: 12px 0 14px;
  padding-left: 24px;
}

.muse-message-content li {
  margin: 6px 0;
  line-height: 1.68;
}

.muse-message-content .muse-markdown-image-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--muse-panel-strong);
  color: var(--muse-text);
  text-decoration: none;
}

.muse-message-content .muse-markdown-image-link:hover {
  background: var(--muse-hover);
}

.muse-message-content .muse-math {
  color: var(--muse-text);
  font-family: "Times New Roman", "Noto Serif", serif;
  font-size: 1.08em;
  line-height: 1.6;
}

.muse-message-content .muse-math-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.08em;
  vertical-align: -0.12em;
}

.muse-message-content .muse-math-block {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 0.1em;
  margin: 16px 0 18px;
  overflow-x: auto;
  white-space: nowrap;
}

.muse-message-content .muse-math sup,
.muse-message-content .muse-math sub {
  font-size: 0.72em;
  line-height: 1;
}

.muse-message-content .muse-math-frac {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  margin: 0 0.16em;
  vertical-align: middle;
  line-height: 1.15;
}

.muse-message-content .muse-math-frac > span:first-child {
  min-width: 100%;
  padding: 0 0.18em 0.08em;
  border-bottom: 1px solid currentColor;
}

.muse-message-content .muse-math-frac > span:last-child {
  padding: 0.08em 0.18em 0;
}

.muse-message-content .muse-math-sqrt {
  display: inline-flex;
  align-items: stretch;
  margin: 0 0.08em;
}

.muse-message-content .muse-math-sqrt::before {
  content: "√";
  padding-right: 0.03em;
}

.muse-message-content .muse-math-sqrt > span {
  border-top: 1px solid currentColor;
  padding: 0 0.12em;
}

.muse-message-content .muse-math-space {
  display: inline-block;
  width: 0.45em;
}

.muse-message-content .muse-math-space.is-wide {
  width: 1em;
}

.muse-message-content .muse-math-text {
  font-family: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.92em;
}

.muse-markdown-table {
  width: 100%;
  margin: 16px 0;
  overflow-x: auto;
}

.muse-message-content table {
  min-width: 520px;
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--muse-line);
  border-radius: 10px;
  font-size: 14px;
}

.muse-message-content th,
.muse-message-content td {
  padding: 9px 11px;
  border: 1px solid var(--muse-line);
  text-align: left;
  vertical-align: top;
}

.muse-message-content th {
  background: var(--muse-panel);
  color: var(--muse-text);
  font-weight: 720;
}

.muse-message-meta,
.muse-message-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muse-faint);
  font-size: 11px;
}

.muse-message-meta {
  margin-top: 8px;
}

.muse-message-actions {
  min-height: 32px;
  margin-top: 10px;
}

.muse-message-action,
.muse-message-icon-action {
  border: 0;
  background: transparent;
  color: var(--muse-text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
}

.muse-message-icon-action {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0;
  transition: background 0.16s ease, color 0.16s ease;
}

.muse-message-icon-action:hover,
.muse-message-icon-action:focus-visible {
  background: var(--muse-hover);
}

.muse-message-icon-action svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.2;
}

.muse-sources-pill {
  height: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muse-text);
  cursor: pointer;
  padding: 0 10px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
  transition: background 0.16s ease, color 0.16s ease;
}

.muse-root button.muse-sources-pill {
  font: inherit;
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
}

.muse-sources-pill:hover,
.muse-sources-pill:focus-visible {
  background: var(--muse-hover);
}

.muse-sources-pill svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.muse-sources-count {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--muse-hover);
  color: var(--muse-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.muse-thought-pill {
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--muse-muted);
  cursor: pointer;
  padding: 0;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  transition: color 0.16s ease;
}

.muse-thought-pill:hover,
.muse-thought-pill:focus-visible {
  color: var(--muse-text);
}

.muse-thought-pill svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.muse-activity-inline {
  margin: 4px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muse-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  padding: 0;
}

.muse-activity-inline:hover {
  color: var(--muse-text);
}

.muse-activity-inline svg {
  width: 15px;
  height: 15px;
}

.muse-activity-thread-preview {
  width: 100%;
  margin: 0 0 16px;
  display: grid;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--muse-text);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.muse-activity-preview-row {
  display: block;
  color: var(--muse-text);
  font-size: 15px;
  line-height: 1.62;
}

.muse-activity-preview-row span {
  color: var(--muse-muted);
  font-weight: 650;
}

.muse-activity-preview-thought {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muse-muted);
  font-size: 14px;
  line-height: 1.3;
}

.muse-activity-preview-thought svg {
  width: 14px;
  height: 14px;
}

.muse-activity-thread-preview:hover .muse-activity-preview-thought,
.muse-activity-thread-preview:focus-visible .muse-activity-preview-thought {
  color: var(--muse-text);
}

.muse-live-process {
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
  color: var(--muse-muted);
}

.muse-live-process-row {
  position: relative;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muse-muted);
  cursor: default;
  overflow: hidden;
  padding: 3px 7px;
  text-align: left;
  font: inherit;
  font-size: 17px;
  line-height: 1.45;
  white-space: normal;
  transition: color 0.16s ease;
}

.muse-live-process button.muse-live-process-row {
  cursor: pointer;
}

.muse-live-process-row > svg,
.muse-live-process-row > span {
  position: relative;
  z-index: 1;
}

.muse-live-process-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.muse-live-process-row.is-thinking::after,
.muse-live-process-row.is-searching::after,
.muse-live-process-row.is-image::after {
  content: "";
  position: absolute;
  inset: -4px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--muse-text) 7%, transparent) 35%,
    color-mix(in srgb, var(--muse-text) 16%, transparent) 50%,
    color-mix(in srgb, var(--muse-text) 7%, transparent) 65%,
    transparent 100%
  );
  transform: translate3d(-130%, 0, 0) scaleX(0.9);
  animation: muse-search-breathe 6.2s cubic-bezier(0.34, 0, 0.18, 1) infinite;
}

.muse-live-process-row.is-thinking::after {
  animation-duration: 6.4s;
}

.muse-live-process-row.is-image::after {
  animation-duration: 6.8s;
}

@keyframes muse-search-breathe {
  0% {
    transform: translate3d(-130%, 0, 0) scaleX(0.9);
    opacity: 0;
  }
  22% {
    opacity: 0.45;
  }
  48% {
    opacity: 0.92;
  }
  72% {
    transform: translate3d(130%, 0, 0) scaleX(1.08);
    opacity: 0.42;
  }
  100% {
    transform: translate3d(130%, 0, 0) scaleX(1.08);
    opacity: 0;
  }
}

.muse-live-process button:hover,
.muse-live-process button:focus-visible {
  color: var(--muse-text);
}

.muse-live-process svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.muse-stream-tail {
  width: fit-content;
  max-width: 100%;
  margin: 14px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muse-muted);
  font-size: 15px;
  font-weight: 560;
  line-height: 1.35;
}

.muse-stream-tail-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.78;
  animation: muse-stream-tail-breathe 2.8s ease-in-out infinite;
}

@keyframes muse-stream-tail-breathe {
  0%,
  100% {
    opacity: 0.34;
    transform: scale(0.84);
  }
  45% {
    opacity: 0.9;
    transform: scale(1.12);
  }
}

.muse-image-card {
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 0;
  overflow: visible;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--muse-muted);
}

.muse-thinking {
  padding: 12px 14px;
}

.muse-thinking summary {
  cursor: pointer;
  color: var(--muse-muted);
  font-size: 12px;
  font-weight: 650;
}

.muse-thinking div {
  margin-top: 8px;
  white-space: pre-wrap;
}

.muse-tool-sources {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.muse-tool-sources a,
.muse-tool-sources span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: var(--muse-elevated);
  padding: 4px 8px;
  color: var(--muse-muted);
  text-decoration: none;
}

.muse-image-card img {
  display: block;
  width: auto;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.muse-image-preview-frame {
  display: block;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  padding: 0;
}

.muse-image-card.is-expired {
  min-width: min(360px, 100%);
}

.muse-image-expired {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--muse-line);
  border-radius: 14px;
  color: var(--muse-faint);
  padding: 24px;
}

.muse-image-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 8px;
  padding: 10px 0 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--muse-muted);
  font-size: 12px;
}

.muse-image-caption > span:first-child {
  max-width: min(640px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-composer {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 30px;
  flex: 0 0 auto;
}

.muse-input-shell {
  min-height: 68px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border: 1px solid var(--muse-line);
  border-radius: 34px;
  background: var(--muse-elevated);
  padding: 10px 12px 10px 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.muse-input-shell.has-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "input input input"
    "plus spacer actions";
  row-gap: 8px;
  column-gap: 10px;
  align-items: center;
  padding-top: 16px;
}

html.dark .muse-input-shell {
  background: #222222;
  box-shadow: none;
}

.muse-plus-button,
.muse-send-button,
.muse-stop-button,
.muse-inline-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--muse-muted);
}

.muse-plus-button:hover {
  background: var(--muse-hover);
  color: var(--muse-text);
}

.muse-input-shell.has-input .muse-plus-button {
  grid-area: plus;
}

.muse-input-column {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 6px;
}

.muse-input-shell.has-input .muse-input-column {
  grid-area: input;
  width: 100%;
}

.muse-composer-actions {
  min-width: 0;
  flex: 0 0 auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.muse-input-shell.has-input .muse-composer-actions {
  grid-area: actions;
  justify-self: end;
}

.muse-input-column textarea,
.muse-image-composer textarea {
  max-height: 190px;
  min-height: 44px;
  width: 100%;
  resize: none;
  border: 0;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--muse-text);
  padding: 11px 0;
  outline: 0;
  font-size: 18px;
  line-height: 1.45;
}

.muse-input-shell.has-input .muse-input-column textarea {
  min-height: 38px;
  padding: 2px 24px 8px;
}

.muse-input-column textarea::placeholder,
.muse-image-composer textarea::placeholder {
  color: var(--muse-faint);
}

html.dark body.portal-muse-page .muse-input-column textarea,
html.dark body.portal-muse-page .muse-image-composer textarea {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
}

.muse-mode-row,
.muse-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.muse-input-shell.is-dragging,
.muse-image-input-shell.is-dragging {
  outline: 2px solid rgba(16, 163, 127, 0.55);
  outline-offset: 3px;
  background: color-mix(in srgb, var(--muse-elevated) 82%, rgba(16, 163, 127, 0.18));
}

.muse-composer-drop-hint {
  display: none;
}

.muse-attachment-card {
  max-width: 190px;
  height: 54px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--muse-line);
  border-radius: 14px;
  background: var(--muse-elevated);
  color: var(--muse-text);
  padding: 5px 7px 5px 5px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.muse-attachments + textarea {
  padding-top: 4px;
}

.muse-attachment-card img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--muse-active);
}

.muse-attachment-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.muse-attachment-card button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: var(--muse-hover);
  color: var(--muse-muted);
  cursor: pointer;
  line-height: 1;
}

.muse-image-attachments {
  width: var(--muse-images-content-width);
  margin: -6px auto 0;
}

.muse-mode-chip,
.muse-aspect-chip,
.muse-size-chip {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  background: var(--muse-active);
  color: var(--muse-text);
  cursor: pointer;
  padding: 0 11px;
  font-size: 14px;
  font-weight: 650;
  transition: background 0.16s ease, color 0.16s ease;
}

.muse-mode-chip:hover,
.muse-aspect-chip:hover,
.muse-size-chip:hover {
  background: var(--muse-hover);
}

.muse-mode-chip.is-web,
.muse-mode-chip.is-image {
  color: #7ab7ff;
}

.muse-mode-chip svg {
  width: 20px;
  height: 20px;
}

.muse-mode-chip strong {
  color: var(--muse-faint);
  font-size: 13px;
}

.muse-aspect-chip small {
  color: var(--muse-faint);
  font-weight: 650;
}

.muse-aspect-chip > svg,
.muse-size-chip > svg {
  width: 15px;
  height: 15px;
}

.muse-aspect-icon {
  width: 18px;
  height: 13px;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.muse-aspect-icon.is-square {
  width: 17px;
  height: 17px;
}

.muse-aspect-icon.is-portrait {
  width: 14px;
  height: 19px;
}

.muse-aspect-icon.is-story {
  width: 12px;
  height: 20px;
}

.muse-aspect-icon.is-landscape {
  width: 21px;
  height: 15px;
}

.muse-aspect-icon.is-widescreen {
  width: 24px;
  height: 14px;
}

.muse-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: var(--muse-active);
  color: var(--muse-text);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 650;
}

.muse-model-button {
  min-width: 112px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muse-muted);
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}

.muse-model-button:hover,
.muse-model-button[aria-expanded="true"] {
  background: var(--muse-hover);
  color: var(--muse-text);
}

.muse-model-button small {
  color: var(--muse-faint);
  font-size: 12px;
}

.muse-model-button svg {
  width: 16px;
  height: 16px;
}

.muse-image-model-button {
  display: none;
  min-width: 124px;
}

.muse-input-shell.is-image-mode .muse-image-model-button {
  display: inline-flex;
}

.muse-send-button,
.muse-stop-button {
  background: var(--muse-accent);
  color: #fff;
}

.muse-send-button:disabled {
  cursor: default;
  background: #d1d1d1;
  color: #ffffff;
  opacity: 1;
}

html.dark .muse-send-button:disabled {
  background: #3a3a3a;
  color: rgba(255, 255, 255, 0.58);
}

.muse-stop-button span {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: currentColor;
}

.muse-popover,
.muse-model-popover {
  position: fixed;
  z-index: 120;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  border: 1px solid var(--muse-line);
  border-radius: 18px;
  background: var(--muse-elevated);
  color: var(--muse-text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.muse-popover.is-above,
.muse-model-popover.is-above {
  transform-origin: bottom center;
}

html.dark .muse-popover,
html.dark .muse-model-popover {
  background: #333333;
}

.muse-popover {
  width: 240px;
  padding: 8px;
}

.muse-popover button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 8px 10px;
  text-align: left;
  color: var(--muse-text);
}

.muse-popover button:hover {
  background: var(--muse-hover);
}

.muse-popover button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.muse-popover button.is-active {
  color: #7ab7ff;
}

.muse-tool-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.muse-tool-icon svg {
  width: 22px;
  height: 22px;
}

.muse-tool-check {
  margin-left: auto;
  color: #7ab7ff;
  opacity: 0;
}

.muse-popover button.is-active .muse-tool-check {
  opacity: 1;
}

.muse-aspect-popover {
  width: 300px;
}

.muse-size-popover {
  width: 220px;
}

.muse-aspect-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.muse-aspect-option small {
  margin-top: 0;
}

.muse-size-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.muse-size-option small {
  margin-top: 0;
}

.muse-model-popover {
  width: min(360px, calc(100vw - 28px));
  max-height: min(580px, calc(100vh - 40px));
  overflow: auto;
  padding: 12px;
}

.muse-model-section {
  display: grid;
  gap: 7px;
  padding-bottom: 12px;
}

.muse-model-section + .muse-model-section {
  border-top: 1px solid var(--muse-line);
  padding-top: 12px;
}

.muse-model-section-title {
  color: var(--muse-faint);
  font-size: 12px;
  font-weight: 650;
}

.muse-model-back {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--muse-muted);
  padding: 2px 0 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.muse-model-back:hover {
  color: var(--muse-text);
}

.muse-model-option {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muse-text);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.muse-model-option:hover,
.muse-model-option.is-active {
  background: var(--muse-active);
}

.muse-model-configure {
  font-weight: 560;
}

.muse-model-option small {
  display: block;
  margin-top: 3px;
  color: var(--muse-faint);
  font-size: 12px;
}

.muse-search-modal {
  position: absolute;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(28px, 5vh, 64px) 24px 24px;
  background: transparent;
}

.muse-search-panel {
  width: min(680px, calc(100vw - 104px));
  max-height: min(68vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: #303030;
  color: #f5f5f5;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

html:not(.dark) .muse-search-panel {
  border-color: rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: #171717;
}

.muse-search-modal-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0 20px;
}

html:not(.dark) .muse-search-modal-head {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.muse-search-modal-head input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  font-size: 18px;
  line-height: 1.2;
  padding: 0;
}

.muse-search-modal-head input::-webkit-search-cancel-button,
.muse-search-modal-head input::-webkit-search-decoration {
  display: none;
}

html.dark body.portal-muse-page .muse-search-modal-head input {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
}

.muse-search-modal-head input::placeholder {
  color: rgba(245, 245, 245, 0.58);
}

html:not(.dark) .muse-search-modal-head input::placeholder {
  color: rgba(23, 23, 23, 0.42);
}

.muse-search-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 245, 245, 0.72);
  cursor: pointer;
}

html:not(.dark) .muse-search-close {
  color: rgba(23, 23, 23, 0.58);
}

.muse-search-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

html:not(.dark) .muse-search-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #171717;
}

.muse-search-results {
  overflow-y: auto;
  padding: 0 10px 14px;
}

.muse-search-quick {
  padding: 10px 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

html:not(.dark) .muse-search-quick {
  border-bottom-color: rgba(0, 0, 0, 0.07);
}

.muse-search-group {
  padding: 8px 0 10px;
}

.muse-search-group-title {
  padding: 10px 18px 8px;
  color: rgba(245, 245, 245, 0.62);
  font-size: 13px;
  font-weight: 600;
}

html:not(.dark) .muse-search-group-title {
  color: rgba(23, 23, 23, 0.54);
}

.muse-search-item {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  padding: 0 14px;
  text-align: left;
  cursor: pointer;
}

.muse-search-item:hover,
.muse-search-item.is-active {
  background: rgba(255, 255, 255, 0.11);
}

html:not(.dark) .muse-search-item:hover,
html:not(.dark) .muse-search-item.is-active {
  background: rgba(0, 0, 0, 0.06);
}

.muse-search-item svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.muse-search-item span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.muse-search-empty {
  padding: 34px;
  color: rgba(245, 245, 245, 0.58);
  text-align: center;
}

html:not(.dark) .muse-search-empty {
  color: rgba(23, 23, 23, 0.48);
}

.muse-images-shell {
  width: 100%;
  min-height: 0;
  padding: 44px 0 50px;
  overflow-y: auto;
  --muse-images-content-width: min(800px, calc(100% - 32px));
}

.muse-images-shell h1,
.muse-image-composer,
.muse-image-prompts {
  width: var(--muse-images-content-width);
  margin-left: auto;
  margin-right: auto;
}

.muse-images-shell h1 {
  margin-top: 0;
  margin-bottom: 28px;
  color: var(--muse-text);
  font-size: 30px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: 0;
}

.muse-image-composer {
  margin-bottom: 44px;
}

.muse-image-run-status {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 18px;
  background: var(--muse-active);
  padding: 12px 14px;
}

.muse-image-run-status-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.muse-image-run-status-copy strong {
  color: var(--muse-text);
  font-size: 14px;
  font-weight: 650;
}

.muse-image-run-status-copy p {
  margin: 0;
  color: var(--muse-muted);
  font-size: 13px;
  line-height: 1.4;
}

.muse-image-run-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.muse-image-run-status-actions button {
  height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.muse-image-run-status-actions button:first-child {
  background: transparent;
  color: var(--muse-text);
}

.muse-image-run-status-actions button:last-child {
  background: var(--muse-text);
  color: var(--muse-bg);
}

html.dark .muse-image-run-status-actions button:last-child {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #2f2f2f;
  color: #f5f5f5;
}

.muse-image-input-shell {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 32px;
  background: #f4f4f4;
  padding: 10px 10px 10px 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.muse-image-composer textarea {
  min-width: 0;
  min-height: 40px;
  max-height: 160px;
  flex: 1 1 auto;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--muse-text);
  padding: 9px 4px;
  line-height: 1.5;
  font-size: 16px;
}

.muse-image-composer textarea::placeholder {
  color: rgba(23, 23, 23, 0.46);
}

.muse-image-tool-button,
.muse-image-send-button,
.muse-image-model-pill {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.muse-image-tool-button,
.muse-image-send-button {
  width: 40px;
  flex: 0 0 auto;
}

.muse-image-tool-button,
.muse-image-model-pill {
  background: transparent;
  color: var(--muse-muted);
}

.muse-image-tool-button:hover,
.muse-image-model-pill:hover {
  background: var(--muse-hover);
}

.muse-image-model-pill {
  gap: 6px;
  max-width: 190px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 540;
}

.muse-image-model-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-image-model-pill small {
  color: var(--muse-faint);
  font-size: 13px;
}

.muse-image-model-pill svg {
  width: 16px;
  height: 16px;
}

.muse-image-aspect-page-pill,
.muse-image-size-page-pill {
  flex: 0 0 auto;
}

.muse-image-aspect-page-pill .muse-aspect-icon {
  width: 17px;
  height: 12px;
}

.muse-image-send-button {
  background: #d1d1d1;
  color: #ffffff;
}

.muse-image-send-button:disabled {
  cursor: default;
  opacity: 1;
  background: #b8b8b8;
}

html.dark .muse-image-input-shell {
  background: #232323;
}

html.dark .muse-image-composer textarea::placeholder {
  color: rgba(245, 245, 245, 0.48);
}

html.dark .muse-image-send-button {
  background: #3a3a3a;
  color: rgba(255, 255, 255, 0.68);
}

html.dark .muse-image-send-button:not(:disabled) {
  background: #2f2f2f;
  color: #f5f5f5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

html:not(.dark) .muse-image-send-button:not(:disabled) {
  background: #171717;
  color: #ffffff;
}

.muse-image-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.muse-image-section-head h2,
.muse-my-images h2 {
  margin: 0;
  color: var(--muse-text);
  font-size: 20px;
  font-weight: 640;
  letter-spacing: 0;
}

.muse-carousel-actions {
  display: flex;
  gap: 10px;
}

.muse-carousel-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: #202020;
  color: #ffffff;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.muse-carousel-button:hover {
  background: #333333;
}

html:not(.dark) .muse-carousel-button {
  border-color: rgba(0, 0, 0, 0.1);
  background: #ffffff;
  color: #171717;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

html:not(.dark) .muse-carousel-button:hover {
  background: #f3f3f3;
}

.muse-prompt-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 5);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: 6px 0;
  scrollbar-width: none;
}

.muse-prompt-row::-webkit-scrollbar {
  display: none;
}

.muse-prompt-card {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #1f1f1f;
  color: #fff;
  padding: 0;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: none;
  transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
}

.muse-prompt-card:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.muse-prompt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 32%, rgba(0, 0, 0, 0.68) 100%);
  pointer-events: none;
}

.muse-prompt-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.muse-prompt-copy {
  position: absolute;
  z-index: 1;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 3px;
  color: #ffffff;
}

.muse-prompt-title {
  display: block;
  font-size: 14px;
  font-weight: 520;
  line-height: 1.2;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.58);
}

.muse-prompt-copy small {
  display: block;
  max-height: 28px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10.5px;
  font-weight: 450;
  line-height: 1.25;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.48);
}

.muse-my-images {
  width: 100%;
  margin-top: 38px;
}

.muse-my-images h2 {
  width: var(--muse-images-content-width);
  margin: 0 auto 14px;
}

.muse-photo-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: transparent;
}

.muse-photo-prompt-card {
  width: min(448px, calc(100vw - 32px));
  border-radius: 22px;
  background: #232323;
  color: #ffffff;
  padding: 22px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

html:not(.dark) .muse-photo-prompt-card {
  background: #202020;
}

.muse-photo-prompt-card h2 {
  margin: 0;
  color: #ffffff;
  text-align: center;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: 0;
}

.muse-photo-prompt-card p {
  margin: 6px 0 18px;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  font-size: 15px;
  line-height: 1.2;
}

.muse-photo-recents-section h3 {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
}

.muse-photo-recents {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.muse-photo-recent {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #151515;
  padding: 0;
  cursor: pointer;
}

.muse-photo-recent.is-selected {
  box-shadow: 0 0 0 3px #ffffff;
}

.muse-photo-recent img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.muse-photo-choose {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111111 !important;
  -webkit-text-fill-color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 560;
}

.muse-photo-choose:hover {
  background: #f0f0f0;
}

html.dark .muse-photo-choose {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #2f2f2f;
  color: #f5f5f5 !important;
  -webkit-text-fill-color: #f5f5f5;
}

html.dark .muse-photo-choose:hover {
  background: #3a3a3a;
}

.muse-photo-cancel {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: underline;
}

.muse-image-grid {
  width: var(--muse-images-content-width);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
  gap: 4px;
  margin: 0 auto;
  padding: 0;
}

.muse-gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 0;
  background: var(--muse-panel);
  color: var(--muse-text);
  padding: 0;
  cursor: pointer;
}

.muse-gallery-item > button {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

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

.muse-gallery-actions {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.muse-gallery-item:hover .muse-gallery-actions,
.muse-gallery-item:focus-within .muse-gallery-actions {
  opacity: 1;
  pointer-events: auto;
}

.muse-gallery-actions button,
.muse-gallery-actions a {
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.muse-gallery-item.is-expired {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muse-faint);
  cursor: default;
}

.muse-gallery-empty {
  grid-column: 1 / -1;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 2px 8px;
  color: var(--muse-faint);
  text-align: center;
  font-size: 15px;
}

.muse-image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 24px;
}

.muse-image-preview-card {
  position: relative;
  max-width: min(1080px, 96vw);
  max-height: 92vh;
}

.muse-image-preview-card img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 10px;
}

.muse-image-preview-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

html.dark .muse-image-preview-close {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(32, 32, 32, 0.96);
  color: #f5f5f5;
}

.muse-image-preview-download {
  position: absolute;
  right: 28px;
  bottom: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
}

.muse-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.32);
  padding: 24px;
}

.muse-modal-card {
  width: min(480px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--muse-line);
  border-radius: 20px;
  background: var(--muse-elevated);
  color: var(--muse-text);
  padding: 20px 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
}

.muse-modal-card header,
.muse-modal-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.muse-modal-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 560;
}

.muse-modal-field {
  display: grid;
  gap: 9px;
  margin-top: 20px;
  font-size: 14px;
}

.muse-modal-field input {
  height: 46px;
  border: 1px solid var(--muse-line);
  border-radius: 14px;
  background: transparent;
  color: var(--muse-text);
  padding: 0 14px;
  outline: 0;
  font-size: 16px;
}

.muse-modal-tip {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  background: var(--muse-active);
  padding: 12px;
  font-size: 13px;
  color: var(--muse-text);
  line-height: 1.45;
}

.muse-confirm-card {
  width: min(440px, 100%);
}

.muse-delete-confirm-modal {
  perspective: 1200px;
}

.muse-delete-confirm-card {
  transform-origin: 50% 12%;
  animation: muse-confirm-page-in 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes muse-confirm-page-in {
  0% {
    opacity: 0;
    transform: translateY(12px) rotateX(-10deg) scale(0.985);
  }
  62% {
    opacity: 1;
    transform: translateY(-2px) rotateX(2deg) scale(1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg) scale(1);
  }
}

.muse-confirm-message {
  margin: 18px 0 0;
  color: var(--muse-text);
  font-size: 15px;
  line-height: 1.55;
}

.muse-modal-card footer {
  margin-top: 18px;
  justify-content: flex-end;
}

.muse-modal-primary {
  min-width: 112px;
  height: 42px;
  border: 1px solid var(--muse-text);
  border-radius: 999px;
  background: var(--muse-text);
  color: var(--muse-bg);
  padding: 0 20px;
  font-weight: 650;
}

html.dark .muse-modal-primary {
  border-color: rgba(255, 255, 255, 0.18);
  background: #2f2f2f;
  color: #f5f5f5;
}

.muse-modal-primary:disabled {
  background: var(--muse-active);
  border-color: var(--muse-line);
  color: var(--muse-faint);
  opacity: 0.45;
  cursor: not-allowed;
}

.muse-modal-secondary {
  min-width: 104px;
  height: 42px;
  border: 1px solid var(--muse-line);
  border-radius: 999px;
  background: var(--muse-active);
  color: var(--muse-text);
  padding: 0 18px;
  font-weight: 650;
  cursor: pointer;
}

.muse-modal-secondary:hover {
  background: var(--muse-hover);
}

.muse-modal-danger {
  min-width: 112px;
  height: 42px;
  border: 1px solid rgba(180, 35, 24, 0.38);
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  padding: 0 20px;
  font-weight: 700;
  cursor: pointer;
}

.muse-modal-danger:hover {
  background: #9f1f17;
}

html.dark .muse-modal-danger {
  background: #ef4444;
  color: #120606;
}

.muse-sidebar-backdrop {
  display: none;
}

@media (max-width: 1120px) {
  .muse-root {
    --muse-sidebar-width: 288px;
  }

  .muse-prompt-row {
    grid-auto-columns: calc((100% - 24px) / 3);
  }
}

@media (max-width: 820px) {
  .muse-portal-main {
    left: max(var(--portal-shell-offset, 4vw), env(safe-area-inset-left, 0px));
    right: max(var(--portal-shell-offset, 4vw), env(safe-area-inset-right, 0px));
    width: auto;
    min-height: 0;
    padding: 0;
  }

  .muse-root {
    border-radius: 0;
  }

  .muse-search-modal {
    padding: 24px 12px 18px;
  }

  .muse-search-panel {
    width: min(100%, 520px);
    max-height: 72vh;
    border-radius: 18px;
  }

  .muse-search-modal-head {
    min-height: 62px;
    padding: 0 16px;
  }

  .muse-search-modal-head input {
    font-size: 18px;
  }

  .muse-search-group-title {
    padding: 10px 16px 8px;
  }

  .muse-search-item {
    min-height: 50px;
    padding: 0 12px;
  }

  .muse-search-item span {
    font-size: 16px;
  }

  .muse-root {
    grid-template-columns: 1fr;
  }

  .muse-root.is-activity-open,
  .muse-root.is-sidebar-collapsed.is-activity-open {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .muse-workspace {
    display: flex;
    flex-direction: column;
  }

  .muse-root.is-activity-open .muse-workspace {
    border-right: 0;
  }

  .muse-activity-panel {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: calc(var(--portal-shell-bar-height, 5rem) + 10px);
    left: 10px;
    width: auto;
    max-height: min(72vh, calc(100dvh - var(--portal-shell-bar-height, 5rem) - var(--portal-shell-bar-height, 5rem) - 20px));
    z-index: 130;
    border-radius: 22px;
    border: 1px solid var(--muse-line);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    transform: translateY(calc(100% + 18px));
  }

  .muse-root.is-activity-open .muse-activity-panel {
    transform: translateY(0);
  }

  .muse-view {
    height: auto;
    flex: 1 1 auto;
  }

  .muse-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    width: min(312px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.22);
  }

  .muse-recents-section .muse-list {
    padding-bottom: calc(var(--portal-shell-bar-height, 5rem) + 24px + env(safe-area-inset-bottom, 0px));
  }

  .muse-root.is-mobile-sidebar-open .muse-sidebar {
    transform: translateX(0);
  }

  .muse-root.is-mobile-sidebar-open .muse-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.36);
  }

  body.portal-muse-page .muse-root.is-sidebar-collapsed {
    grid-template-columns: 1fr !important;
  }

  body.portal-muse-page .muse-root.is-sidebar-collapsed .muse-sidebar {
    position: fixed !important;
    width: min(312px, 86vw) !important;
    padding: 0;
    transform: translateX(-105%) !important;
    background: var(--muse-bg);
  }

  body.portal-muse-page .muse-root.is-mobile-sidebar-open.is-sidebar-collapsed .muse-sidebar {
    transform: translateX(0) !important;
  }

  .muse-root.is-sidebar-collapsed .muse-sidebar-reopen {
    display: none;
  }

  .muse-root.is-sidebar-collapsed .muse-sidebar-head,
  .muse-root.is-sidebar-collapsed .muse-sidebar-foot {
    padding-inline: 14px;
  }

  .muse-root.is-sidebar-collapsed .muse-home-icon {
    width: auto;
    height: auto;
    justify-content: flex-start;
  }

  .muse-root.is-sidebar-collapsed .muse-nav-action span {
    display: inline;
  }

  .muse-root.is-sidebar-collapsed .muse-sidebar-section {
    display: block;
  }

  .muse-root.is-sidebar-collapsed .muse-profile strong,
  .muse-root.is-sidebar-collapsed .muse-profile small {
    display: block;
  }

  .muse-root.is-sidebar-collapsed .muse-icon-button#muse-collapse-sidebar,
  .muse-root.is-sidebar-collapsed #muse-sidebar-logout {
    display: inline-flex;
  }

  .muse-root.is-sidebar-collapsed .muse-nav-action {
    width: 100%;
    justify-content: flex-start;
    padding-inline: 14px;
  }

  .muse-root.is-sidebar-collapsed .muse-profile {
    width: auto;
    justify-content: flex-start;
  }

  .muse-mobile-topbar {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    color: var(--muse-text);
    font-weight: 700;
  }

  .muse-thread {
    padding: 20px 14px 16px;
  }

  .muse-empty h1,
  .muse-project-home h1 {
    margin-bottom: 28px;
    font-size: 28px;
    line-height: 1.22;
  }

  .muse-composer {
    width: calc(100% - 18px);
    padding-bottom: 14px;
  }

  .muse-input-shell {
    border-radius: 26px;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
  }

  .muse-input-shell.has-input {
    grid-template-columns: auto minmax(0, 1fr) auto;
    row-gap: 6px;
    column-gap: 6px;
    padding: 12px 8px 8px;
  }

  .muse-input-column {
    flex: 1 1 150px;
  }

  .muse-input-shell.has-input .muse-input-column {
    flex: none;
  }

  .muse-composer-actions {
    gap: 6px;
    max-width: 100%;
  }

  .muse-model-button {
    max-width: 42vw;
    min-width: 0;
    padding: 0 10px;
  }

  .muse-image-model-button {
    max-width: 34vw;
  }

  .muse-model-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .muse-image-composer .muse-model-button {
    max-width: 38vw;
  }

  .muse-image-composer .muse-model-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .muse-model-button small,
  .muse-model-button small {
    display: none;
  }

  .muse-input-column textarea,
  .muse-image-composer textarea {
    font-size: 16px;
  }

  .muse-input-shell.has-input .muse-input-column textarea {
    padding-inline: 12px;
  }

  .muse-images-shell {
    width: 100%;
    padding: 22px 0 34px;
    --muse-images-content-width: calc(100% - 24px);
  }

  .muse-images-shell h1,
  .muse-image-composer,
  .muse-image-prompts,
  .muse-my-images h2 {
    width: calc(100% - 24px);
  }

  .muse-images-shell h1 {
    margin-bottom: 18px;
    font-size: 30px;
  }

  .muse-image-input-shell {
    min-height: 62px;
    border-radius: 26px;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
  }

  .muse-image-model-pill {
    max-width: 42vw;
  }

  .muse-prompt-row {
    grid-auto-columns: minmax(132px, calc((100% - 12px) / 2));
  }

  .muse-photo-prompt-modal {
    padding: 16px;
  }

  .muse-photo-prompt-card {
    width: 100%;
    border-radius: 22px;
    padding: 20px 16px 22px;
  }

  .muse-photo-prompt-card h2 {
    font-size: 24px;
  }

  .muse-photo-prompt-card p {
    margin-bottom: 16px;
    font-size: 15px;
  }

  .muse-photo-recents {
    gap: 10px;
  }

  .muse-photo-recents-section h3 {
    font-size: 15px;
  }

  .muse-photo-choose {
    height: 52px;
    font-size: 16px;
  }

  .muse-photo-cancel {
    margin-top: 18px;
    font-size: 15px;
  }

  .muse-empty-prompts {
    grid-template-columns: 1fr;
  }

  .muse-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .muse-root,
  .muse-activity-panel {
    transition: none !important;
  }

  .muse-live-process-row.is-thinking::after,
  .muse-live-process-row.is-searching::after,
  .muse-live-process-row.is-image::after,
  .muse-stream-tail-dot,
  .muse-delete-confirm-card {
    animation: none !important;
  }

  .muse-live-process-row.is-thinking::after,
  .muse-live-process-row.is-searching::after,
  .muse-live-process-row.is-image::after,
  .muse-stream-tail-dot {
    opacity: 0 !important;
  }
}
