/* A quieter, more legible home for the native Group lifecycle. */
.openmuse-ui .thread > .card.group-task-card {
  max-width: min(100%, 68rem);
  padding: clamp(1rem, 2.1vw, 1.625rem);
  border: 1px solid #e8ecee;
  border-radius: 1.625rem;
  background: linear-gradient(150deg, #f7f9f9 0%, #f3f5f6 70%, #f1f3f4 100%);
  box-shadow: 0 .75rem 2rem rgba(28, 46, 54, .035);
}

.group-task-head { display: flex; align-items: center; gap: .875rem; min-width: 0; }
.group-emblem {
  position: relative; display: block; flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem;
  border: 1px solid #e4edf2; border-radius: .9375rem; background: #fff;
}
.group-emblem::before, .group-emblem::after {
  content: ''; position: absolute; top: 1.34rem; height: 1px; background: #9ec8df; transform-origin: left center;
}
.group-emblem::before { left: .88rem; width: .92rem; transform: rotate(-29deg); }
.group-emblem::after { left: .88rem; width: .92rem; transform: rotate(29deg); }
.group-emblem i { position: absolute; z-index: 1; width: .5rem; height: .5rem; border-radius: 50%; background: #a9d3e9; }
.group-emblem i:first-child { top: 1.1rem; left: .59rem; width: .58rem; height: .58rem; background: #5da9d4; }
.group-emblem i:nth-child(2) { top: .72rem; right: .57rem; }
.group-emblem i:last-child { bottom: .72rem; right: .57rem; }
.group-task-heading { flex: 1; min-width: 0; }
.group-task-eyebrow { color: #78888f; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; }
.group-task-title { margin: .125rem 0 0; color: #142027; font-size: 1.125rem; font-weight: 680; letter-spacing: -.025em; line-height: 1.3; }
.group-task-summary { margin: .25rem 0 0; color: #63727a; font-size: .75rem; line-height: 1.45; }
.openmuse-ui .group-task-status { align-self: flex-start; margin-top: .125rem; padding: .375rem .625rem; border: 1px solid rgba(119, 157, 173, .12); border-radius: 999px; background: #e9f3f8; color: #426a80; font-size: .6875rem; font-weight: 600; white-space: nowrap; }
.openmuse-ui .group-task-status.waiting { border-color: #f0e0c8; background: #fcf3e6; color: #926c35; }
.openmuse-ui .group-task-status.done { border-color: #d6eadf; background: #e9f7ee; color: #397353; }
.openmuse-ui .group-task-status.error { border-color: #f0dede; background: #fbeded; color: #aa5655; }

.group-journey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .625rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.group-journey-step { min-width: 0; color: #8a969a; font-size: .6875rem; font-weight: 550; }
.group-journey-step::before { content: ''; display: block; height: .1875rem; margin-bottom: .55rem; border-radius: 999px; background: #dfe6e9; }
.group-journey-step.is-done::before { background: #a8d6ec; }
.group-journey-step.is-current::before { background: #61add4; }
.group-journey-step.is-current { color: #28566e; font-weight: 650; }
.group-journey-step.is-done { color: #617782; }
.group-journey-dot { display: inline-block; width: .375rem; height: .375rem; margin-right: .35rem; border-radius: 50%; background: currentColor; vertical-align: .0625rem; }

.group-wait-cue { display: grid; grid-template-columns: .625rem minmax(0, 1fr) auto; align-items: center; gap: .5rem .625rem; margin-top: 1.125rem; padding: .75rem .875rem; border: 1px solid #e5edf1; border-radius: .875rem; background: rgba(255, 255, 255, .72); color: #526d7b; font-size: .75rem; }
.group-wait-pulse { width: .5rem; height: .5rem; border-radius: 50%; background: #70b4d5; box-shadow: 0 0 0 0 rgba(112, 180, 213, .3); animation: group-wait-breathe 2.4s ease-out infinite; }
.group-wait-line { min-width: 0; overflow-wrap: anywhere; }
.group-wait-time { color: #315f75; font-size: .6875rem; font-variant-numeric: tabular-nums; font-weight: 650; }
.group-wait-track { grid-column: 1 / -1; height: .1875rem; overflow: hidden; border-radius: 999px; background: #e5edf1; }
.group-wait-fill { display: block; height: 100%; width: 100%; border-radius: inherit; background: #7cbbd9; transition: width 1s linear; }
@keyframes group-wait-breathe { 55% { box-shadow: 0 0 0 .3125rem rgba(112, 180, 213, 0); } 100% { box-shadow: 0 0 0 0 rgba(112, 180, 213, 0); } }

.group-task-notice { display: flex; align-items: flex-start; gap: .55rem; margin-top: 1.25rem; padding: .8125rem .9375rem; border: 1px solid #eadfcf; border-radius: .875rem; background: #fcf8f2; color: #715f4b; font-size: .75rem; line-height: 1.55; overflow-wrap: anywhere; }
.group-notice-mark { display: grid; flex: 0 0 1rem; width: 1rem; height: 1rem; margin-top: .07rem; place-items: center; border: 1px solid #cfae80; border-radius: 50%; color: #a4773d; font-size: .625rem; font-weight: 700; line-height: 1; }
.group-section-heading { display: flex; align-items: baseline; gap: .5rem; margin: 1.375rem 0 .625rem; color: #293b44; font-size: .75rem; font-weight: 680; }
.group-member-count { color: #87939a; font-size: .6875rem; font-weight: 500; }
.openmuse-ui .group-member-list { display: block; margin: 0; padding: .125rem 1rem; border: 1px solid #e9eef0; border-radius: 1.125rem; background: #fff; }
.openmuse-ui .group-member { display: flex; gap: .8125rem; min-width: 0; margin: 0; padding: 1rem .125rem; border: 0; border-radius: 0; background: transparent; }
.openmuse-ui .group-member + .group-member { border-top: 1px solid #eef1f2; }
.group-member-mark { display: block; position: relative; flex: 0 0 2.125rem; width: 2.125rem; height: 2.125rem; border: 1px solid #dfe9ee; border-radius: .6875rem; background: #f2f7f9; }
.group-member-mark::before, .group-member-mark::after { content: ''; position: absolute; border-radius: 50%; background: #9fc8dc; }
.group-member-mark::before { top: .47rem; left: .75rem; width: .5rem; height: .5rem; }
.group-member-mark::after { bottom: .42rem; left: .5rem; width: 1rem; height: .46rem; border-radius: .5rem .5rem .3rem .3rem; }
.group-member-mark.is-connected { border-color: #d6e9df; background: #eef8f2; }
.group-member-mark.is-connected::before, .group-member-mark.is-connected::after { background: #78ba92; }
.group-member-mark.has-issue { border-color: #f0dddb; background: #fcf1ef; }
.group-member-mark.has-issue::before, .group-member-mark.has-issue::after { background: #d29891; }
.group-member-content { flex: 1; min-width: 0; }
.group-member-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .625rem; min-width: 0; }
.group-member-head strong { color: #172329; font-size: .875rem; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.openmuse-ui .group-member-head .badge { padding: .25rem .5rem; border-radius: 999px; font-size: .625rem; }
.group-member-description { margin: .25rem 0 0; color: #718087; font-size: .75rem; line-height: 1.5; }
.group-member-identity { margin-top: .5rem; }
.group-member-identity summary, .group-task-meta summary { width: fit-content; color: #778991; cursor: pointer; font-size: .6875rem; line-height: 1.5; }
.group-member-identity summary:hover, .group-task-meta summary:hover { color: #286a8d; }
.group-member-identity code, .group-identity-value code { display: block; max-width: 100%; margin-top: .375rem; color: #52626b; font-size: .6875rem; overflow-wrap: anywhere; user-select: all; }
.group-empty-members { margin: .875rem .125rem; color: #718087; font-size: .75rem; }
.openmuse-ui .group-member-content > .task-result { margin-top: .875rem; padding: .8125rem .875rem; border: 1px solid #edf0f2; border-radius: .875rem; background: #f8fafb; }
.openmuse-ui .group-member-content > .group-member-error { border-color: #f1e2df; background: #fdf7f5; color: #965950; }
.group-member-actions { align-items: center; margin-top: .875rem; }
.group-member-actions textarea { width: 100%; background: #fbfcfd; }
.group-member-actions .file-chips:empty { display: none; }
.openmuse-ui .group-member-actions .secondary { border: 1px solid #e9eef1; background: #f8fafb; color: #4a6573; }
.group-member-content > .group-text-action { margin-top: .75rem; }

.group-task-footer { margin-top: 1rem; }
.group-task-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; }
.openmuse-ui .group-task-controls .group-resume-action { min-height: 2.5rem; padding: 0 1rem; background: #c8e7ff; color: #142d3b; font-size: .75rem; box-shadow: 0 .2rem .6rem rgba(95, 155, 185, .08); }
.openmuse-ui .group-task-controls .group-resume-action:hover { background: #b5dcf6; }
.group-text-action { width: fit-content; min-height: 2rem; padding: .25rem .125rem; border: 0; border-radius: .25rem; background: transparent; color: #72818a; cursor: pointer; font-size: .6875rem; font-weight: 600; text-align: left; }
.group-text-action:hover { color: #a95150; text-decoration: underline; text-underline-offset: .1875rem; }
.group-task-footnote { margin: .625rem 0 0; color: #77868e; font-size: .6875rem; line-height: 1.55; }
.group-task-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.125rem; padding-top: .75rem; border-top: 1px solid #e5eaec; }
.group-task-meta details { min-width: 0; }
.group-identity-value { display: flex; align-items: flex-start; gap: .375rem; max-width: 100%; }
.group-copy-id { display: grid; flex: 0 0 1.5rem; width: 1.5rem; height: 1.5rem; margin-top: .175rem; padding: .25rem; place-items: center; border: 0; border-radius: .375rem; background: transparent; cursor: pointer; opacity: .55; }
.group-copy-id:hover, .group-copy-id:focus-visible { background: #e6f1f7; opacity: 1; }
.group-copy-id .muse-icon { width: .875rem; height: .875rem; }
.group-action-list { display: grid; gap: .5rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.group-action-list li { display: flex; align-items: center; flex-wrap: wrap; gap: .375rem .5rem; color: #596b74; font-size: .6875rem; }
.group-action-list small { flex-basis: 100%; color: #906d5d; font-size: .6875rem; line-height: 1.5; overflow-wrap: anywhere; }
.group-action-list .badge { font-size: .625rem; }

@media (max-width: 40rem) {
  .openmuse-ui .thread > .card.group-task-card { padding: 1rem; border-radius: 1.25rem; }
  .group-task-head { gap: .625rem; align-items: flex-start; }
  .group-emblem { flex-basis: 2.375rem; width: 2.375rem; height: 2.375rem; border-radius: .75rem; transform: scale(.86); transform-origin: left top; }
  .group-task-status { max-width: 6rem; white-space: normal !important; text-align: center; }
  .group-task-title { font-size: 1rem; }
  .group-journey { gap: .375rem; }
  .openmuse-ui .group-member-list { padding-inline: .75rem; }
  .openmuse-ui .group-member { gap: .625rem; }
  .group-task-controls .group-resume-action { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .group-task-card *, .group-task-card *::before, .group-task-card *::after { animation: none !important; transition-duration: .01ms !important; }
}
