.collaboration-room-page {
  background:
    radial-gradient(circle at 12% 5%, rgba(154, 91, 40, .11), transparent 30rem),
    var(--neutral, #f4f3f0);
}

.collaboration-room-main {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.collaboration-room-page [hidden] {
  display: none !important;
}

.collaboration-room-header .kicker::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-radius: 50%;
  background: #9a5b28;
}

.room-purpose-card {
  margin: 22px 0 18px;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid rgba(154, 91, 40, .22);
  background: linear-gradient(135deg, #fff, #f8f1e9);
  box-shadow: var(--shadow);
}

.room-purpose-card h2 {
  max-width: 22em;
  margin: 4px 0 10px;
  font-size: clamp(1.4rem, 3vw, 2.15rem);
}

.room-purpose-card > p:not(.eyebrow) {
  max-width: 55rem;
  color: var(--muted);
}

.room-boundary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.room-boundary-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

.room-boundary-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2f6f67;
  font-weight: 900;
}

.room-status {
  min-height: 42px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.room-access-card {
  max-width: 720px;
  margin: 18px auto 40px;
}

.room-access-card .primary-button {
  display: inline-flex;
  margin-top: 14px;
}

.room-consent-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f8f7f4;
  line-height: 1.65;
}

.room-consent-check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.room-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 40px;
}

.room-project-brief {
  grid-column: 1 / -1;
  margin: 0;
  border-color: rgba(47, 111, 103, .24);
  background: linear-gradient(135deg, #fff, #f1f8f6);
}

.room-brief-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.room-brief-heading h2 {
  margin-top: 2px;
}

.room-brief-source {
  max-width: 24rem;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.room-brief-current {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 3px solid #2f6f67;
  background: rgba(255, 255, 255, .82);
}

.room-brief-current-label {
  margin: 0 0 4px;
  color: #2f6f67;
  font-size: 12px;
  font-weight: 800;
}

.room-brief-current-summary {
  margin: 0;
  line-height: 1.7;
}

.room-brief-details {
  margin-top: 12px;
  border-top: 1px solid rgba(47, 111, 103, .2);
}

.room-brief-details > summary,
.room-topic-replies > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: #24554f;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.room-brief-details > summary::-webkit-details-marker,
.room-topic-replies > summary::-webkit-details-marker {
  display: none;
}

.room-brief-details > summary::after,
.room-topic-replies > summary::after {
  content: "⌄";
  margin-left: auto;
  font-size: 17px;
  line-height: 1;
  transition: transform .16s ease;
}

.room-brief-details[open] > summary::after,
.room-topic-replies[open] > summary::after {
  transform: rotate(180deg);
}

.room-brief-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.room-brief-details-body {
  padding-bottom: 4px;
}

.room-brief-timeline {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.room-brief-timeline li {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 14px;
  padding: 12px 14px;
  border-left: 3px solid #2f6f67;
  background: rgba(255, 255, 255, .82);
}

.room-brief-meta {
  color: #2f6f67;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.room-brief-summary {
  margin: 0;
  line-height: 1.7;
}

.room-brief-open {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(154, 91, 40, .2);
  background: #fff8ef;
}

.room-brief-open h3 {
  margin-bottom: 8px;
}

.room-brief-open ul {
  margin: 0;
  padding-left: 1.3rem;
}

.room-brief-open li + li {
  margin-top: 6px;
}

.room-brief-use-button {
  margin-top: 14px;
}

.room-brief-use-note {
  margin: 0;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.room-sidebar,
.room-chat-card {
  margin-top: 0;
}

.room-sidebar {
  position: sticky;
  top: 12px;
}

.room-verification,
.room-owner-tools p,
.room-ai-note {
  color: var(--muted);
  font-size: 13px;
}

.room-participants {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.room-participants li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  font-weight: 700;
}

.room-participants small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 500;
}

.participant-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.participant-owner { background: #9a5b28; }
.participant-guest { background: #2f6f67; }
.participant-ai { background: #6750a4; }

.room-owner-tools {
  display: grid;
  gap: 10px;
}

.room-invite-result {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(47, 111, 103, .25);
  background: rgba(47, 111, 103, .06);
}

.room-invite-result label {
  font-size: 12px;
  font-weight: 800;
}

.room-invite-result input {
  width: 100%;
  min-width: 0;
  font-size: 12px;
}

.danger-text {
  color: #8f3b32;
}

.room-export-link {
  display: inline-flex;
  width: fit-content;
}

.room-sidebar-library {
  display: grid;
  gap: 8px;
}

.room-sidebar-library > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.room-sidebar-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-sidebar-jump-button,
.room-artifact-select-button {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(103, 80, 164, .22);
  border-radius: var(--radius-sm, 6px);
  background: #faf8ff;
  color: #493675;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  text-align: left;
}

.room-sidebar-jump-button:hover,
.room-sidebar-jump-button:focus-visible,
.room-artifact-select-button:hover,
.room-artifact-select-button:focus-visible,
.room-artifact-select-button[aria-pressed="true"] {
  border-color: rgba(103, 80, 164, .62);
  background: #eee7ff;
}

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

.room-chat-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.room-chat-heading h2 {
  margin-top: 2px;
}

.room-artifact-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(103, 80, 164, .30);
  border-radius: var(--radius-sm, 6px);
  background: linear-gradient(135deg, #fcfaff 0%, #f5f1ff 100%);
}

.room-artifact-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.room-artifact-heading h3 {
  margin: 2px 0 0;
}

.room-artifact-version {
  flex: none;
  padding: 4px 8px;
  border: 1px solid rgba(103, 80, 164, .24);
  border-radius: 999px;
  color: #58418f;
  font-size: 11px;
  font-weight: 850;
}

.room-artifact-meta,
.room-artifact-note {
  margin: 9px 0 0;
  color: #655f57;
  font-size: 12px;
  line-height: 1.6;
}

.room-artifact-content {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(103, 80, 164, .16);
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.room-artifact-content .room-message-link-button {
  white-space: normal;
}

.room-live-pill {
  flex: none;
  padding: 5px 9px;
  border: 1px solid rgba(47, 111, 103, .22);
  border-radius: 999px;
  background: rgba(47, 111, 103, .07);
  color: #2f6f67;
  font-size: 11px;
  font-weight: 800;
}

.room-messages {
  min-height: 330px;
  max-height: 60vh;
  margin-top: 18px;
  padding: 18px;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: #f8f7f4;
}

.room-message-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 320px);
  align-items: center;
  gap: 9px 12px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(103, 80, 164, .2);
  border-radius: var(--radius-sm, 6px);
  background: #faf8ff;
  color: #514b5f;
  font-size: 12px;
}

.room-message-filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 12px;
}

.room-message-filter label {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-weight: 800;
}

.room-message-filter select {
  min-height: 36px;
  border: 1px solid rgba(103, 80, 164, .35);
  border-radius: var(--radius-sm, 6px);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.room-message-filter p {
  margin: 0;
  line-height: 1.5;
}

.room-message {
  max-width: min(82%, 640px);
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.room-message-owner {
  margin-left: auto;
  border-color: rgba(154, 91, 40, .28);
  background: #fff8ef;
}

.room-message-guest {
  border-color: rgba(47, 111, 103, .26);
  background: #f1faf7;
}

.room-message-ai {
  max-width: 92%;
  border-color: rgba(103, 80, 164, .24);
  background: #f7f3ff;
}

.room-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.room-message-meta strong {
  color: var(--ink);
  font-size: 12px;
}

.room-message-meta-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.room-message-new {
  box-shadow: inset 3px 0 0 #9a5b28;
}

.room-message-new-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff0d8;
  color: #87501e;
  font-size: 10px;
  font-weight: 850;
}

.room-message-content {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.75;
}

.room-ai-record-context {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(103, 80, 164, .2);
  border-radius: var(--radius-sm, 6px);
  background: rgba(255, 255, 255, .56);
  color: #514b5f;
  font-size: 12px;
  line-height: 1.55;
}

.room-ai-record-context summary {
  color: #58418f;
  font-weight: 800;
  cursor: pointer;
}

.room-ai-record-context ul {
  margin: 7px 0 0;
  padding-left: 1.2em;
}

.room-message-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 2px 3px;
  padding: 4px 10px;
  border: 1px solid rgba(103, 80, 164, .4);
  border-radius: 999px;
  background: #eee7ff;
  color: #58418f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  vertical-align: middle;
}

.room-message-link-button:hover,
.room-message-link-button:focus-visible {
  border-color: #6750a4;
  background: #e4d9ff;
  color: #493675;
}

.room-message-audience {
  margin: 0 0 8px;
  color: #655f57;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.room-message-reply-quote {
  display: grid;
  gap: 2px;
  margin: 0 0 9px;
  padding: 8px 10px;
  border-left: 3px solid rgba(103, 80, 164, .42);
  background: rgba(255, 255, 255, .62);
  color: #655f57;
  font-size: 11px;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .room-message-filter {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .room-message-filter select {
    width: 100%;
  }

  .room-message-filter-controls {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.room-message-reply-quote strong,
.room-message-reply-quote span {
  overflow-wrap: anywhere;
}

.room-topic-single-reply {
  margin-left: 24px;
}

.room-topic-replies {
  max-width: min(92%, 700px);
  margin: -3px 0 14px 24px;
  padding: 0 12px;
  border: 1px solid rgba(103, 80, 164, .26);
  border-radius: var(--radius-sm, 6px);
  background: rgba(247, 243, 255, .55);
}

.room-topic-replies > summary {
  color: #58418f;
}

.room-topic-reply-list {
  display: grid;
  gap: 10px;
  padding: 3px 0 12px;
}

.room-topic-reply {
  max-width: none;
  margin: 0;
}

.room-topic-reply .room-message-reply-quote {
  display: none;
}

.room-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 9px;
}

.room-message-ai-result {
  --consultation-accent: #6750a4;
  --consultation-bg: #f5f1ff;
  --consultation-text: #493675;
  display: grid;
  gap: 2px;
  margin: 10px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--consultation-accent);
  border-radius: var(--radius-sm, 6px);
  background: var(--consultation-bg);
  color: var(--consultation-text);
  font-size: 12px;
  line-height: 1.55;
}

.room-message-ai-result strong {
  font-weight: 850;
}

.room-message-ai-result span {
  overflow-wrap: anywhere;
}

.room-message-ai-result-pending {
  --consultation-accent: #9a6a20;
  --consultation-bg: #fff8e8;
  --consultation-text: #6d4812;
}

.room-message-ai-result-completed {
  --consultation-accent: #2f6f67;
  --consultation-bg: #eef8f5;
  --consultation-text: #24554f;
}

.room-message-ai-result-failed {
  --consultation-accent: #a34843;
  --consultation-bg: #fff2f1;
  --consultation-text: #7a302c;
}

.room-message-hidden {
  border-style: dashed;
  background: #f7f5f1;
  color: var(--muted);
}

.room-message-hidden .room-message-content {
  font-style: italic;
}

.room-message-reply-button,
.room-message-ai-request-button,
.room-message-hide-button,
.room-message-restore-button,
.room-message-acknowledgement-button,
.room-message-record-button,
.room-ai-feedback-button,
.room-message-delete-button {
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid rgba(103, 80, 164, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  color: #58418f;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.room-image-reuse-button {
  min-height: 36px;
  margin-top: 8px;
  padding: 6px 11px;
  border: 1px solid rgba(103, 80, 164, .4);
  border-radius: var(--radius-sm, 6px);
  background: #eee7ff;
  color: #58418f;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.room-image-reuse-button:hover,
.room-image-reuse-button:focus-visible {
  border-color: #6750a4;
  background: #e4d9ff;
}

.room-message-reply-button:hover,
.room-message-reply-button:focus-visible,
.room-message-ai-request-button:hover,
.room-message-ai-request-button:focus-visible,
.room-message-restore-button:hover,
.room-message-restore-button:focus-visible {
  border-color: #6750a4;
  background: #eee7ff;
}

.room-message-acknowledgement-button {
  border-color: rgba(47, 111, 103, .38);
  background: #f0f8f5;
  color: #24554f;
}

.room-message-acknowledgement-button[aria-pressed="true"] {
  border-color: #2f6f67;
  background: #dcefe9;
}

.room-message-acknowledgement-button:hover,
.room-message-acknowledgement-button:focus-visible {
  border-color: #2f6f67;
  background: #dcefe9;
}

.room-message-record-button {
  border-color: rgba(154, 91, 40, .42);
  background: #fff8ef;
  color: #7a471d;
}

.room-message-record-button:hover,
.room-message-record-button:focus-visible {
  border-color: #9a5b28;
  background: #f9ead8;
}

.room-ai-feedback-button {
  border-color: rgba(47, 111, 103, .3);
  background: #f7fbfa;
  color: #24554f;
}

.room-ai-feedback-button[aria-pressed="true"] {
  border-color: #2f6f67;
  background: #dcefe9;
}

.room-ai-feedback-button:hover,
.room-ai-feedback-button:focus-visible {
  border-color: #2f6f67;
  background: #e9f5f1;
}

.room-record-summary {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.room-feedback-metrics li {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
}

.room-message-delete-button {
  border-color: rgba(139, 47, 47, .58);
  background: #fff2f1;
  color: #7a302c;
}

.room-message-delete-button:hover,
.room-message-delete-button:focus-visible {
  border-color: #8b2f2f;
  background: #fde3e1;
}

.room-message-ai-request-button {
  border-color: rgba(103, 80, 164, .48);
  background: #eee7ff;
}

.room-message-hide-button {
  border-color: rgba(139, 47, 47, .34);
  background: transparent;
  color: #7a302c;
}

.room-message-hide-button:hover,
.room-message-hide-button:focus-visible {
  border-color: #8b2f2f;
  background: #fff2f1;
}

.room-message-restore-button {
  border-color: rgba(47, 111, 103, .4);
  background: #eef8f5;
  color: #24554f;
}

.room-visibility-dialog {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--radius, 10px);
  background: transparent;
  color: var(--ink);
}

.room-visibility-dialog::backdrop {
  background: rgba(31, 28, 25, .52);
}

.room-visibility-dialog-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius, 10px);
  background: #fff;
  box-shadow: var(--shadow);
}

.room-visibility-dialog-card h2,
.room-visibility-dialog-card p {
  margin: 0;
}

.room-record-dialog-card label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.room-record-dialog-card input,
.room-record-dialog-card select,
.room-record-dialog-card textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(103, 80, 164, .35);
  border-radius: var(--radius-sm, 6px);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.room-record-dialog-card textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.65;
}

.room-record-edit-button {
  min-height: 32px;
  margin-top: 7px;
  padding: 4px 9px;
  border: 1px solid rgba(154, 91, 40, .36);
  border-radius: 999px;
  background: #fff8ef;
  color: #7a471d;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.room-record-edit-button:hover,
.room-record-edit-button:focus-visible {
  border-color: #9a5b28;
  background: #f9ead8;
}

#roomVisibilityExcerpt {
  max-height: 8em;
  padding: 10px 12px;
  overflow: auto;
  border-left: 3px solid #9a5b28;
  background: #f8f7f4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.room-visibility-ai-choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  line-height: 1.55;
}

.room-visibility-ai-choice input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.room-visibility-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.room-visibility-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.room-composer {
  margin-top: 14px;
}

.room-reply-composer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
  padding: 11px 12px;
  border-left: 4px solid #6750a4;
  background: #f7f3ff;
}

.room-reply-composer > div {
  min-width: 0;
}

.room-reply-composer span {
  display: block;
  color: #655f57;
  font-size: 11px;
  font-weight: 700;
}

.room-reply-composer strong {
  display: block;
  margin-top: 2px;
  color: #58418f;
}

.room-reply-composer p {
  margin: 4px 0 0;
  color: #655f57;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.room-reply-composer button {
  flex: none;
}

.room-composer textarea {
  width: 100%;
  resize: vertical;
}

.room-attachment-picker {
  display: flex;
  gap: 10px 14px;
  align-items: center;
  margin-top: 12px;
}

.room-file-button {
  flex: none;
  cursor: pointer;
}

.room-attachment-picker > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.room-pending-attachments {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.room-attachment-card {
  padding: 12px;
  border: 1px solid rgba(47, 111, 103, .24);
  background: #f5fbf9;
}

.room-attachment-card[data-state="failed"] {
  border-color: rgba(143, 59, 50, .32);
  background: #fff7f5;
}

.room-attachment-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.room-attachment-heading strong {
  overflow-wrap: anywhere;
}

.room-attachment-meta,
.room-attachment-state {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.room-attachment-extract {
  margin-top: 10px;
}

.room-attachment-extract summary {
  color: #2f6f67;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.room-attachment-extract textarea {
  min-height: 112px;
  margin-top: 8px;
  font-size: 13px;
}

.room-attachment-ai-choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
}

.room-attachment-ai-choice input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #6750a4;
}

.room-message-attachments {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.room-message-attachment {
  padding: 9px 10px;
  border: 1px solid rgba(47, 111, 103, .2);
  background: rgba(255, 255, 255, .7);
}

.room-message-attachment strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.room-message-image {
  margin: 9px 0 0;
}

.room-message-image a {
  display: block;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(47, 111, 103, .2);
  background: #fff;
}

.room-message-image img {
  display: block;
  width: auto;
  max-width: min(100%, 520px);
  max-height: 360px;
  object-fit: contain;
}

.room-message-image figcaption,
.room-message-image-error {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.room-message-attachment summary {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.room-message-attachment pre {
  max-height: 240px;
  margin: 8px 0 0;
  padding: 9px;
  overflow: auto;
  background: #f8f7f4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 12px;
}

.room-ai-choice {
  display: inline-grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(103, 80, 164, .28);
  border-radius: var(--radius-sm, 6px);
  background: #f7f3ff;
  color: var(--ink);
  cursor: pointer;
}

.room-ai-choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #6750a4;
}

.room-ai-choice strong {
  color: #58418f;
}

.room-ai-choice:has(input:focus-visible) {
  outline: 3px solid rgba(103, 80, 164, .24);
  outline-offset: 2px;
}

.room-ai-choice:has(input:checked) {
  border-color: #6750a4;
  background: #eee7ff;
}

.room-ai-attachment-scope {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(103, 80, 164, .28);
  border-radius: var(--radius-sm, 6px);
  background: #fbf9ff;
  color: var(--ink);
  cursor: pointer;
}

.room-ai-attachment-scope input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #6750a4;
}

.room-ai-attachment-scope strong,
.room-ai-attachment-scope small {
  display: block;
}

.room-ai-attachment-scope strong {
  color: #58418f;
  font-size: 13px;
}

.room-ai-attachment-scope small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.room-ai-attachment-scope:has(input:focus-visible) {
  outline: 3px solid rgba(103, 80, 164, .24);
  outline-offset: 2px;
}

.room-ai-attachment-scope:has(input:checked),
.room-ai-attachment-scope:has(input:indeterminate) {
  border-color: #6750a4;
  background: #eee7ff;
}

.room-composer-audience {
  margin: 10px 0 0;
  color: #2f6f67;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.room-composer-actions {
  justify-content: flex-end;
}

.collaboration-room-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

@media (max-width: 760px) {
  .collaboration-room-main,
  .collaboration-room-footer {
    width: min(100% - 20px, 1180px);
  }

  .room-boundary-list,
  .room-workspace {
    grid-template-columns: 1fr;
  }

  .room-sidebar {
    position: static;
  }

  .room-brief-heading {
    display: grid;
  }

  .room-brief-source {
    max-width: none;
    text-align: left;
  }

  .room-brief-timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .room-brief-use-button {
    width: 100%;
  }

  .room-topic-single-reply,
  .room-topic-replies {
    max-width: none;
    margin-left: 12px;
  }

  .room-reply-composer {
    display: grid;
  }

  .room-reply-composer button {
    width: fit-content;
  }

  .room-message,
  .room-message-ai {
    max-width: 94%;
  }

  .room-messages {
    min-height: 280px;
    max-height: 56vh;
    padding: 12px;
  }

  .room-composer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .room-composer-actions button {
    width: 100%;
  }

  .room-attachment-picker,
  .room-attachment-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .room-file-button {
    width: 100%;
    text-align: center;
  }
}
