/* Read-only communication surfaces; native theme/routing/controllers own truth. */
.lacuna-communication-dialog {
  width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 24px; overflow: auto; border: 1px solid var(--workspace-line);
  border-radius: 16px; background: var(--workspace-bg); color: var(--workspace-text);
}
.lacuna-communication-dialog::backdrop { background: rgb(0 0 0 / 45%); }
[data-communication-principal] { cursor: pointer; }
[data-communication-principal]:focus-visible { outline: 2px solid var(--workspace-blue); outline-offset: 3px; }
.lacuna-profile,.lacuna-branch-list {
  font-family: inherit; font-size: 14px; line-height: 1.5;
  color: var(--workspace-text); background: var(--workspace-bg); min-width: 0; overflow-wrap: anywhere;
  display: grid; gap: 16px;
}
.lacuna-profile *,.lacuna-branch-list * { box-sizing: border-box; }
.lacuna-profile h1,.lacuna-branch-list h1 { font-size: 22px; line-height: 1.3; margin: 0; }
.lacuna-profile h2,.lacuna-branch-list h2 { font-size: 16px; line-height: 1.4; margin: 0; }
.lacuna-profile p,.lacuna-branch-list p { margin: 0; }
.lacuna-profile button,.lacuna-branch-list button,.lacuna-profile-trigger {
  font: inherit; min-height: 36px; padding: 6px 12px; border-radius: 8px;
  color: var(--workspace-text); background: var(--workspace-panel); border: 1px solid var(--workspace-line);
  justify-self: start;
}
.lacuna-profile button:disabled,.lacuna-branch-list button:disabled,.lacuna-profile-trigger:disabled { opacity: .55; }
.lacuna-profile__secondary,.lacuna-branch-list__secondary { font-size: 12px; color: var(--workspace-muted); }
.lacuna-profile__top { display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.lacuna-profile__back { width: 36px; padding: 0!important; font-size: 22px!important; line-height: 1; }
.lacuna-profile__hero { display: grid; grid-template-columns: 80px minmax(0,1fr) 156px; gap: 18px; align-items: center; padding: 8px 0 10px; }
.lacuna-profile__avatar-wrap { display: grid; justify-items: center; gap: 7px; text-align: center; }
.lacuna-profile__initials { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--workspace-line-bright); background: var(--workspace-raised); display: grid; place-items: center; font-size: 22px; }
.lacuna-profile__identity { display: grid; gap: 8px; min-width: 0; }
.lacuna-profile__ctdl { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--workspace-line); border-radius: 12px; background: var(--workspace-raised); }
.lacuna-profile__ctdl-label { color: var(--workspace-blue); font-size: 12px; font-weight: 600; }
.lacuna-profile__ctdl-value { font-size: 20px; font-weight: 600; line-height: 1.3; }
.lacuna-profile__cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.lacuna-profile__card { display: grid; align-content: start; gap: 16px; padding: 16px; min-height: 104px; border: 1px solid var(--workspace-line); border-radius: 12px; background: var(--workspace-panel); }
.lacuna-profile__card-heading { display: flex; align-items: center; gap: 8px; }
.lacuna-profile__card-symbol { color: var(--workspace-blue); width: 24px; font-size: 20px; text-align: center; }
.lacuna-profile__card-state { color: var(--workspace-muted); font-size: 13px; }
.lacuna-profile__native { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 8px 0; }
.lacuna-profile__technical { border-top: 1px solid var(--workspace-line); padding-top: 8px; }
.lacuna-profile__technical > p { margin: 8px 0; }
.lacuna-profile summary { min-height: 36px; padding: 6px 0; }
.lacuna-branch-list__card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--workspace-line); border-radius: 8px; background: var(--workspace-panel); }
.lacuna-branch-list__quote { margin: 0; padding: 8px 12px; border-left: 2px solid var(--workspace-blue); white-space: pre-wrap; }
.lacuna-branch-list__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lacuna-branch-list__warning { color: var(--workspace-amber); }
.lacuna-profile [hidden],.lacuna-branch-list [hidden] { display: none!important; }
@media(max-width:560px) {
  .lacuna-communication-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 16px; border-radius: 14px; }
  .lacuna-profile { gap: 12px; }
  .lacuna-profile__back { width: 44px; min-height: 44px!important; }
  .lacuna-profile__hero { grid-template-columns: 64px minmax(0,1fr); gap: 12px; }
  .lacuna-profile__initials { width: 56px; height: 56px; font-size: 20px; }
  .lacuna-profile__ctdl { grid-column: 1 / -1; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; }
  .lacuna-profile__ctdl .lacuna-profile__secondary { grid-column: 1 / -1; }
  .lacuna-profile__cards { gap: 10px; }
  .lacuna-profile__card { padding: 12px; min-height: 104px; gap: 12px; }
  .lacuna-profile__card-state { font-size: 12px; }
  .lacuna-profile__card-heading { gap: 5px; }
  .lacuna-profile__card-symbol { width: 18px; font-size: 18px; }
  .lacuna-branch-list__card { padding: 12px; }
}
@media(pointer:coarse) { .lacuna-profile button,.lacuna-branch-list button,.lacuna-profile-trigger { min-height: 44px; } }
@media(max-width:380px) {
  .lacuna-profile__card-heading h2 { font-size: 14px; }
  .lacuna-profile__card-symbol { display: none; }
}

/* Native Chat/branches port. No read/ACL/draft/controller state is encoded. */
.shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-messages { min-width:0;gap:14px; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-message-row { min-width:0;align-items:start;gap:10px; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-message { min-width:0;max-inline-size:820px;border-radius:9px; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-message-head { display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;min-width:0;margin-block-end:6px; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-message-sender { font-size:12px;line-height:1.5;overflow-wrap:anywhere; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-card-meta { font-size:10px;line-height:1.5;color:var(--workspace-muted); }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-message-footer { display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;min-width:0; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .semantic-message-block-shell:has(> .semantic-block--idea) { display:block;min-width:0;max-width:100%;margin-block:8px; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .semantic-block--idea { position:relative;display:grid;grid-template-columns:minmax(0,1fr);max-width:100%;min-width:0;padding:9px 11px;gap:7px;border-radius:8px; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .semantic-block--idea>.semantic-block__head { min-width:0;grid-template-columns:minmax(0,1fr) auto;gap:6px; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .semantic-block--idea .semantic-block__title { font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;word-break:normal; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .semantic-block__idea-content { min-width:0;font-size:12px;line-height:1.65;overflow-wrap:anywhere; }
.shell[data-lacuna-native=true][data-native-chat-profile=true] .semantic-block__idea-footer { position:static;display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding-block-start:6px;border-block-start:1px solid var(--workspace-line);min-width:0; }
.lacuna-branch-list[data-native-chat-profile=true] { display:grid;gap:14px;min-width:0; }
.lacuna-branch-list[data-native-chat-profile=true]>h1 { font-size:20px;line-height:1.35;margin:0; }
.lacuna-branch-list[data-native-chat-profile=true] .lacuna-branch-list__card { gap:10px;padding:15px;min-width:0;max-width:100%; }
.lacuna-branch-list[data-native-chat-profile=true] .lacuna-branch-list__card>h2 { font-size:12px;color:var(--workspace-muted); }
.lacuna-branch-list[data-native-chat-profile=true] .r14-native-branch-source { border:1px solid var(--workspace-line);border-radius:7px;background:var(--workspace-bg);min-width:0; }
.lacuna-branch-list[data-native-chat-profile=true] .r14-native-branch-source>summary { min-height:38px;padding:9px 11px;color:var(--workspace-text);font-size:12px;line-height:1.5;cursor:pointer; }
.lacuna-branch-list[data-native-chat-profile=true] .r14-native-branch-source .lacuna-branch-list__quote { margin:0;padding:10px 12px;font-size:12px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere; }
.lacuna-branch-list[data-native-chat-profile=true] .lacuna-branch-list__actions { gap:7px; }
.lacuna-branch-list[data-native-chat-profile=true] :is(button,.lacuna-profile-trigger) { min-height:38px;font-size:12px;line-height:1.5;max-width:100%;white-space:normal;overflow-wrap:anywhere; }
@media(pointer:coarse) { .lacuna-branch-list[data-native-chat-profile=true] :is(button,.lacuna-profile-trigger) { min-height:44px; } }
@media(max-width:600px){
  .shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-message-row { gap:8px; }
  .shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-message { max-inline-size:100%; }
  .shell[data-lacuna-native=true][data-native-chat-profile=true] .chat-command-message-head { gap:4px 8px; }
  .shell[data-lacuna-native=true][data-native-chat-profile=true] .semantic-block--idea { padding:9px; }
  .shell[data-lacuna-native=true][data-native-chat-profile=true] .semantic-block--idea>.semantic-block__head { grid-template-columns:minmax(0,1fr); }
  .shell[data-lacuna-native=true][data-native-chat-profile=true] .semantic-block__idea-footer { gap:5px; }
  .lacuna-branch-list[data-native-chat-profile=true] .lacuna-branch-list__card { padding:12px; }
  .lacuna-branch-list[data-native-chat-profile=true] .lacuna-branch-list__actions { display:grid;grid-template-columns:minmax(0,1fr); }
  .lacuna-branch-list[data-native-chat-profile=true] :is(button,.lacuna-profile-trigger) { min-height:44px; }
}
