/* OpenMuse's compact web composition, adapted to Dingdang's live task cards.
   Reference: openmuse-main/apps/mobile/{App.tsx,src/chat.tsx,src/ui.tsx}. */
html:has(body.openmuse-ui) { min-width: 0; }
.openmuse-ui.sky-milk.muse-wheat {
  min-width: 0;
  --ink: #11191c;
  --muted: #697176;
  --faint: #92999d;
  --line: #eeeef0;
  --accent: #c8e7ff;
  --accent-strong: #1473c8;
  --accent-rgb: 200, 231, 255;
  --paper: #fff;
  --paper-solid: #fff;
  --selection: #edf7fd;
  --shadow: 0 0.25rem 1.25rem rgba(24, 56, 75, .07);
  background: #fcfcfc;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Noto Sans SC', sans-serif;
}
.openmuse-ui .app-shell::before,
.openmuse-ui .app-shell::after { display: none; }
.openmuse-ui .shell.app-shell { display: block; min-height: 100dvh; height: 100dvh; }
.openmuse-ui .stage.main {
  --overlay-header-height: clamp(7.5rem, 17dvh, 9.125rem);
  position: relative; width: 100%; height: 100dvh; background: #fcfcfc;
}
.openmuse-ui .sidebar {
  position: fixed; z-index: 42; top: 0; bottom: 0; left: 0;
  width: min(21.25rem, 88vw); height: 100dvh; padding: 1.5rem 1.125rem 1.125rem;
  overflow: visible; border-right: 0.0625rem solid #eeeef0; background: #fff;
  box-shadow: 0.9375rem 0 3.125rem rgba(17, 25, 28, .11);
  transform: translateX(-105%); transition: transform .22s ease;
}
.openmuse-ui .sidebar.open { transform: translateX(0); }
.openmuse-ui .sidebar-backdrop {
  position: fixed; z-index: 41; inset: 0; width: 100%; height: 100%;
  border: 0; background: rgba(17, 25, 28, .18); cursor: default;
}
.openmuse-ui .sidebar-backdrop[hidden] { display: none; }
.openmuse-ui .brand { padding: 0 0.5625rem 1.0625rem; color: #11191c; }
.openmuse-ui .brand small { color: #697176; }
.openmuse-ui .brand-mark, .openmuse-ui .assistant-avatar {
  border-color: #eeeef0; background: #fff; box-shadow: none;
}
.openmuse-ui .new-chat {
  margin: 0.375rem 0 0.9375rem; border: 0.0625rem solid #eeeef0; border-radius: 1.375rem;
  background: #f3f5f6; box-shadow: none; color: #11191c;
}
.openmuse-ui .new-chat:hover { background: #edf7fd; box-shadow: none; }
.openmuse-ui .section-label { color: #697176; }
.openmuse-ui .conversation-row:hover,
.openmuse-ui .conversation-row.is-current { background: #f3f5f6; box-shadow: none; }
.openmuse-ui .conversation.active { color: #11191c; }
.openmuse-ui .profile.account-zone { border-top-color: #eeeef0; }
.openmuse-ui .account-trigger:hover, .openmuse-ui .account-trigger[aria-expanded="true"] { background: #f3f5f6; }
.openmuse-ui .account-menu { border-color: #eeeef0; background: #fff; box-shadow: 0 0.75rem 2.25rem rgba(17,25,28,.13); }
.openmuse-ui .account-menu-item:hover, .openmuse-ui .account-menu-item[aria-checked="true"] { background: #edf7fd; color: #1473c8; }

.openmuse-ui .stage-header.topbar {
  position: absolute; z-index: 4; top: 0; right: 0; left: 0; display: flex; align-items: flex-start;
  width: min(47.5rem, 100%); height: var(--overlay-header-height); min-height: var(--overlay-header-height);
  margin: 0 auto; padding: 2% 3% 0; border: 0;
  background: transparent; box-shadow: none; backdrop-filter: none;
  -webkit-backdrop-filter: none; pointer-events: none;
}
.openmuse-ui .stage-header.topbar::before,
.openmuse-ui .stage-header.topbar::after { content: none; display: none; }
.openmuse-ui .stage-header.topbar .stage-title,
.openmuse-ui .stage-header.topbar .header-actions { pointer-events: auto; }
.openmuse-ui .stage-title { flex: 0 0 2.625rem; }
.openmuse-ui .stage-title h1 { position: absolute; width: 0.0625rem; height: 0.0625rem; overflow: hidden; clip: rect(0,0,0,0); }
.openmuse-ui .mobile-menu, .openmuse-ui .muse-top-action {
  display: grid; width: 2.75rem; height: 2.75rem; flex: 0 0 2.75rem; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: #11191c;
  box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; cursor: pointer;
}
.openmuse-ui .mobile-menu:hover, .openmuse-ui .muse-top-action:hover { background: #f3f5f6; }
.openmuse-ui .muse-icon { display: block; width: 1.4375rem; height: 1.4375rem; object-fit: contain; }
.openmuse-ui .header-actions { margin-left: auto; }
.openmuse-ui .muse-agent-identity {
  position: absolute; top: 0.5625rem; left: 50%; display: flex; align-items: center;
  flex-direction: column; width: min(9rem, calc(100% - 7.5rem));
  padding: 0.125rem 0.375rem 0.25rem; border-radius: 1.5rem;
  isolation: isolate; background: transparent; box-shadow: none;
  transform: translateX(-50%); text-align: center;
}
.openmuse-ui .muse-agent-identity::before {
  position: absolute; z-index: -1; inset: -0.25rem -0.625rem -0.5rem;
  border-radius: 48% 48% 44% 44% / 38% 38% 60% 60%; content: '';
  background: radial-gradient(ellipse at 50% 42%,
    rgba(255,255,255,.97) 0%, rgba(255,255,255,.89) 45%,
    rgba(247,250,255,.58) 70%, rgba(247,250,255,0) 100%);
  backdrop-filter: blur(0.75rem) saturate(1.2);
  -webkit-backdrop-filter: blur(0.75rem) saturate(1.2);
  mask-image: radial-gradient(ellipse, #000 52%, rgba(0,0,0,.72) 73%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse, #000 52%, rgba(0,0,0,.72) 73%, transparent 100%);
  pointer-events: none;
}
.openmuse-ui .muse-agent-name { color: #11191c; font-size: 1rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.25rem; }
.openmuse-ui .muse-agent-subtitle { overflow: hidden; max-width: 100%; color: #697176; font-size: 0.6875rem; line-height: 1.0625rem; text-overflow: ellipsis; white-space: nowrap; }
.openmuse-ui .health-pill {
  min-height: 1.8125rem; margin-top: 0.1875rem; padding: 0 0.75rem; border: 0; border-radius: 62.4375rem;
  background: #f3f5f6; color: #697176; font-size: 0.75rem;
}
.openmuse-ui .health-dot { width: 0.375rem; height: 0.375rem; background: #7dbb9e; box-shadow: none; }
.openmuse-ui .dingdang-floating-presence {
  position: relative; top: auto; right: auto; display: block; flex: 0 0 3.625rem;
  width: 3.625rem; height: 3.625rem; min-height: 3.625rem; max-height: 3.625rem;
  margin: 0 0 0.125rem; padding: 0; overflow: hidden; border: 0;
  border-radius: 0; background: transparent; box-shadow: none;
}
.openmuse-ui .dingdang-floating-presence .presence-copy,
.openmuse-ui .dingdang-floating-presence .mascot-glow { display: none; }
.openmuse-ui .dingdang-floating-presence .mascot-stage {
  position: absolute; inset: 0; width: 3.625rem; height: 3.625rem; overflow: hidden; transform: none;
  background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none;
  mask-image: radial-gradient(circle, #000 56%, transparent 77%);
  -webkit-mask-image: radial-gradient(circle, #000 56%, transparent 77%);
}
.openmuse-ui .dingdang-floating-presence .companion-pair,
.openmuse-ui .dingdang-floating-presence .companion-pair img,
.openmuse-ui .dingdang-floating-presence .companion-pair video {
  position: absolute; inset: 0; width: 3.625rem; height: 3.625rem; object-fit: cover;
  filter: none; mix-blend-mode: normal;
}
.openmuse-ui .dingdang-floating-presence [hidden] { display: none !important; }

.openmuse-ui .content.conversation-canvas { width: min(47.5rem, 100%); margin: 0 auto; }
.openmuse-ui .scroll-region, .openmuse-ui .muse-wheat .scroll-region {
  padding: 0 5.5% 2dvh; scrollbar-width: thin;
}
.openmuse-ui .thread.timeline { width: 100%; max-width: 100%; padding: 0 0 0.9375rem; }
.openmuse-ui .thread.timeline:not(.is-empty) { padding-top: calc(var(--overlay-header-height) + 2dvh); }
.openmuse-ui .thread.timeline.is-empty { display: flex; align-items: center; justify-content: center; min-height: 100%; }
.openmuse-ui .thread-intro.muse-intro {
  display: flex; min-height: 100%; align-items: center; justify-content: center;
  margin: 0; padding: 1.25rem 0; text-align: center;
}
.openmuse-ui .intro-copy { max-width: 27.5rem; }
.openmuse-ui .thread-intro .kicker { margin-bottom: 0.6875rem; color: #697176; font-size: 0.625rem; letter-spacing: .14em; }
.openmuse-ui .thread-intro h1 { margin: 0 0 0.625rem; color: #11191c; font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -.04em; }
.openmuse-ui .thread-intro p { margin: 0 auto; color: #697176; font-size: 0.875rem; line-height: 1.65; }
.openmuse-ui .prompt-row { justify-content: center; margin-top: 1.5625rem; }
.openmuse-ui .prompt-chip { min-height: 2.375rem; border: 0; border-radius: 1.375rem; background: #f1f2f3; color: #11191c; box-shadow: none; }
.openmuse-ui .prompt-chip:hover { background: #edf7fd; color: #1473c8; }
.openmuse-ui .message-row.message { margin: 0 0 0.8125rem; }
.openmuse-ui .message-row .assistant-avatar,
.openmuse-ui .message-row .message-name { display: none; }
.openmuse-ui .message-row .message-body { max-width: 95%; }
.openmuse-ui .message-row.user .message-body { max-width: 85%; }
.openmuse-ui .message-row .bubble,
.openmuse-ui .message-row.user .bubble {
  padding: 0.8125rem 1rem; border: 0; border-radius: 1.375rem;
  background: #eeeef0; box-shadow: none; color: #11191c;
  font-size: 0.9375rem; line-height: 1.55;
}
.openmuse-ui .message-row.assistant .bubble { border-bottom-left-radius: 0.4375rem; border-top-left-radius: 1.375rem; }
.openmuse-ui .message-row.user .bubble { border-bottom-right-radius: 0.4375rem; border-top-right-radius: 1.375rem; background: #c8e7ff; }
.openmuse-ui .message-row .activity-bubble { min-height: 3.125rem; }
.openmuse-ui .thinking-dots { color: #697176; }
.openmuse-ui .thread > .card:not(.inline-discovery),
.openmuse-ui .inline-discovery,
.openmuse-ui .collaboration-card {
  width: 100%; max-width: 100%; margin: 0.75rem 0 1.125rem; padding: 1.125rem;
  border: 0; border-radius: 1.5rem; background: #f3f3f5; box-shadow: none;
}
.openmuse-ui .card-title, .openmuse-ui .card-heading h2, .openmuse-ui .collaboration-card h2 { color: #11191c; }
.openmuse-ui .card-subtitle, .openmuse-ui .card-heading p, .openmuse-ui .run-summary { color: #697176; }
.openmuse-ui .candidate.agent-choice,
.openmuse-ui .agent-category,
.openmuse-ui .plan-node,
.openmuse-ui .group-member,
.openmuse-ui .task-result {
  border: 0.0625rem solid #eeeef0; border-radius: 1.125rem; background: #fff; box-shadow: none;
}
.openmuse-ui .candidate.agent-choice:hover { border-color: #c8e7ff; background: #edf7fd; }
.openmuse-ui .candidate.agent-choice:has(input:checked) { border-color: #a4d6f8; background: #edf7fd; box-shadow: none; }
.openmuse-ui .primary, .openmuse-ui .primary-button { border: 0; background: #c8e7ff; box-shadow: none; color: #11191c; }
.openmuse-ui .secondary { border: 0; background: #fff; color: #11191c; }
.openmuse-ui .danger { border: 0; background: #fbeeed; color: #aa4a45; }
.openmuse-ui .task-actions button, .openmuse-ui .primary, .openmuse-ui .secondary, .openmuse-ui .danger { border-radius: 1.5rem; }

.openmuse-ui .composer-area {
  flex: 0 0 auto;
  width: min(47.5rem, 100%); margin: 0 auto; padding: 1dvh 3% 0; background: transparent;
  box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.openmuse-ui .composer-stack { width: min(45rem, 100%); }
.openmuse-ui .composer {
  display: flex; align-items: flex-end; min-height: 4rem; gap: 0.5rem;
  padding: 0.5rem; border: 0.0625rem solid #eef0f2; border-radius: 2rem;
  background: rgba(255,255,255,.78); box-shadow: 0 0.25rem 1.25rem rgba(24, 56, 75, .06);
  backdrop-filter: blur(1.125rem) saturate(1.12);
  -webkit-backdrop-filter: blur(1.125rem) saturate(1.12);
}
.openmuse-ui .composer:focus-within { border-color: #c7e4f9; box-shadow: 0 0.25rem 1.25rem rgba(24, 56, 75, .1); }
.openmuse-ui .composer textarea { min-height: 2.75rem; max-height: 8.75rem; padding: 0.625rem 0.125rem; color: #11191c; font-size: 1.0625rem; line-height: 1.5rem; }
.openmuse-ui .composer textarea::placeholder { color: #92999d; }
.openmuse-ui .attachment, .openmuse-ui .send-button {
  display: grid; width: 2.75rem; min-width: 2.75rem; height: 2.75rem; flex: 0 0 2.75rem;
  place-items: center; border: 0; border-radius: 50%; box-shadow: none;
}
.openmuse-ui .attachment { background: transparent; color: #11191c; font-size: 1.75rem; font-weight: 300; }
.openmuse-ui .attachment:hover { background: #edf7fd; }
.openmuse-ui .send-button { background: #f3f5f6; color: #9cb5c5; font-size: 1.6875rem; }
.openmuse-ui .attachment .muse-icon { width: 1.625rem; height: 1.625rem; }
.openmuse-ui .send-button .muse-icon { width: 1.5625rem; height: 1.5625rem; opacity: .38; }
.openmuse-ui .composer:has(textarea:not(:placeholder-shown)) .send-button { background: #c8e7ff; color: #11191c; }
.openmuse-ui .composer:has(textarea:not(:placeholder-shown)) .send-button .muse-icon { opacity: 1; }
.openmuse-ui.sky-milk .send-button.liquid-clear-control { background: #f3f5f6; box-shadow: none; color: #9cb5c5; }
.openmuse-ui.sky-milk .composer:has(textarea:not(:placeholder-shown)) .send-button.liquid-clear-control { background: #c8e7ff; color: #11191c; }
.openmuse-ui.sky-milk .send-button::before { display: none; }
.openmuse-ui .composer-footnote { display: none; }
.openmuse-ui .muse-dock {
  display: grid; flex: 0 0 auto; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
  width: min(95%, 25rem); min-height: 3.6875rem;
  margin: 0.375rem auto max(0.5rem, env(safe-area-inset-bottom)); padding: 0.25rem;
  border: 0; border-radius: 2.5rem; background: transparent;
  box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.openmuse-ui .muse-dock-button {
  display: grid; place-items: center;
  min-width: 0; min-height: 44px; height: 3rem; padding: 0.25rem 0;
  border: 0; border-radius: 0.875rem; background: transparent; color: #697176; cursor: pointer;
}
.openmuse-ui .muse-dock-button:hover, .openmuse-ui .muse-dock-button[aria-current="page"] { background: #edf7fd; color: #1473c8; }
.openmuse-ui .muse-dock-button .muse-icon { width: 1.4375rem; height: 1.4375rem; }
.openmuse-ui .toast { border: 0; border-radius: 1.25rem; background: #11191c; color: #fff; }
.openmuse-ui .auth-page { background: #fcfcfc; }
.openmuse-ui .auth-card {
  width: min(26.25rem, 100%); padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; backdrop-filter: none;
}
.openmuse-ui .auth-card .brand { flex-direction: column; gap: 0.75rem; margin: 0 0 0.5rem; padding: 0; color: #11191c; font-size: 1.6875rem; font-weight: 600; text-align: center; }
.openmuse-ui .auth-card .brand-mark { width: 4.5rem; height: 4.5rem; border: 0; border-radius: 50%; background: #edf7fd; }
.openmuse-ui .auth-card .brand small { display: none; }
.openmuse-ui .auth-card h1 { margin: 0 0 0.5rem; color: #11191c; font-size: 1.75rem; font-weight: 600; text-align: center; }
.openmuse-ui .auth-card p { margin: 0 0 1.375rem; color: #697176; font-size: 0.875rem; text-align: center; }
.openmuse-ui .auth-card form { padding: 1.375rem; border: 0.0625rem solid #eeeef0; border-radius: 1.4375rem; background: #fff; box-shadow: 0 0.25rem 1.25rem rgba(24,56,75,.05); }
.openmuse-ui .auth-card label { color: #697176; font-size: 0.75rem; }
.openmuse-ui .auth-card input { min-height: 2.9375rem; border-color: #eeeef0; border-radius: 1.1875rem; color: #11191c; font-size: 0.9375rem; }
.openmuse-ui .auth-card input:focus { border-color: #c7e4f9; box-shadow: 0 0 0 0.1875rem #edf7fd; }
.openmuse-ui .auth-submit { min-height: 2.75rem; border-radius: 1.5rem; background: #c8e7ff; color: #11191c; font-size: 0.875rem; }
.openmuse-ui .auth-switch { color: #1473c8; }
.openmuse-ui .admin-dialog { border-color: #eeeef0; border-radius: 1.625rem; color: #11191c; box-shadow: 0 1.5rem 5rem rgba(17,25,28,.18); }
.openmuse-ui .admin-dialog::backdrop { background: rgba(17,25,28,.25); }

@media (max-width: 47.5rem) {
  .openmuse-ui .stage.main { --overlay-header-height: clamp(6rem, 14.5dvh, 8rem); padding-top: env(safe-area-inset-top); }
  .openmuse-ui .stage-header.topbar { padding: 3% 4.4% 0; }
  .openmuse-ui .muse-agent-identity { top: 0.1875rem; }
  .openmuse-ui .dingdang-floating-presence,
  .openmuse-ui .dingdang-floating-presence .mascot-stage,
  .openmuse-ui .dingdang-floating-presence .companion-pair,
  .openmuse-ui .dingdang-floating-presence .companion-pair img,
  .openmuse-ui .dingdang-floating-presence .companion-pair video { width: 3.0625rem; height: 3.0625rem; }
  .openmuse-ui .dingdang-floating-presence { flex-basis: 3.0625rem; }
  .openmuse-ui .dingdang-floating-presence { min-height: 3.0625rem; max-height: 3.0625rem; }
  .openmuse-ui .scroll-region, .openmuse-ui .muse-wheat .scroll-region { padding: 0 4.4% 1.8dvh; }
  .openmuse-ui .thread.timeline:not(.is-empty) { padding-top: calc(var(--overlay-header-height) + 1.7dvh); }
  .openmuse-ui .thread-intro h1 { font-size: 1.5625rem; }
  .openmuse-ui .composer-area { padding: 0.7dvh 4.4% 0; }
  .openmuse-ui .composer textarea { font-size: 1rem; }
  .openmuse-ui .composer { gap: 0.375rem; }
}
@media (max-height: 36rem) and (hover: none) {
  :root { font-size: clamp(90%, 3.6dvh, 100%); }
  .openmuse-ui .stage.main { --overlay-header-height: clamp(4.5rem, 18dvh, 6rem); }
  .openmuse-ui .muse-agent-identity { top: 0; padding-bottom: 0.125rem; }
  .openmuse-ui .muse-agent-subtitle,
  .openmuse-ui .health-pill { display: none; }
  .openmuse-ui .dingdang-floating-presence,
  .openmuse-ui .dingdang-floating-presence .mascot-stage,
  .openmuse-ui .dingdang-floating-presence .companion-pair,
  .openmuse-ui .dingdang-floating-presence .companion-pair img,
  .openmuse-ui .dingdang-floating-presence .companion-pair video {
    width: 2.75rem; height: 2.75rem;
  }
  .openmuse-ui .dingdang-floating-presence { min-height: 2.75rem; max-height: 2.75rem; flex-basis: 2.75rem; }
  .openmuse-ui .thread-intro.muse-intro { padding-block: 0.5rem; }
  .openmuse-ui .muse-dock { margin-top: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .openmuse-ui .sidebar { transition-duration: .001ms; }
}

/* Static alpha mascot keeps the login mark clear on the page background. */
.openmuse-ui .auth-card .brand-mark { background: transparent; box-shadow: none; overflow: visible; }
.openmuse-ui .auth-card .brand-mark img { width: 100%; height: 100%; margin: 0; object-fit: contain; mix-blend-mode: normal; filter: none; }

/* Account names may be long or contain no word boundaries. */
.openmuse-ui .muse-agent-identity { width: min(18rem, calc(100% - 7.5rem)); }
.openmuse-ui .muse-agent-name { max-width: min(90vw, 42rem); overflow-wrap: anywhere; }
.model-settings [hidden] { display: none; }
.model-settings input, .model-settings select { width: 100%; min-width: 0; box-sizing: border-box; }

.model-settings.account-form, .model-settings .account-form { padding: 0; }
.model-settings { margin-top: 1rem; }
.model-settings h2 { margin: 0; font-size: 1rem; }
.model-settings select { padding: .625rem .75rem; border: 1px solid var(--line); border-radius: .5625rem; background: #fff; color: var(--ink); font: inherit; font-size: .75rem; }
