/* A live chat owns a stable viewport frame, independently of its message/photo tabs. */
@layer remembrand-buttons {
 .memory-team-dialog {
  --rb-dialog-base:440px;--team-dialog-gutter:16px;--ui-text-entry-size:var(--ui-chat-compose-size);
  box-sizing:border-box!important;inset:auto!important;
  top:calc(var(--team-viewport-top,0px) + var(--team-dialog-gutter))!important;
  right:var(--team-dialog-gutter)!important;margin:0!important;
  height:calc(var(--team-viewport-height,100dvh) - 2 * var(--team-dialog-gutter))!important;
  max-height:calc(var(--team-viewport-height,100dvh) - 2 * var(--team-dialog-gutter))!important;
  padding:var(--overlay-padding-top,28px) var(--overlay-padding-x,28px) var(--overlay-padding-bottom,28px)!important;
  overflow:hidden!important;
 }
 .memory-team-dialog:not([open]) {display:none!important;}
 .memory-team-dialog[open] {display:flex!important;flex-direction:column!important;gap:12px!important;}
 .memory-team-dialog>.memory-team-heading {display:flex!important;flex:0 0 auto!important;align-items:center;min-height:var(--ui-close-control-size,40px);padding:0!important;}
 .memory-team-dialog>:is(.memory-team-status,.memory-team-request,.memory-team-tabs,.memory-team-error) {flex-shrink:0!important;}
 .memory-team-dialog>.memory-team-status:empty {display:none!important;}
 .memory-team-dialog>.memory-team-panel:not([hidden]) {display:flex!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important;}
 .memory-team-dialog :is(.memory-team-messages,.memory-team-photos) {flex:1 1 0!important;min-height:0!important;overflow:auto!important;}
 .memory-team-dialog .memory-team-compose {flex:0 0 auto!important;}
 .memory-team-dialog .memory-team-message {text-align:left!important;}
 .memory-team-dialog .memory-team-tabs[data-rb-group] {grid-template-columns:repeat(var(--rb-group-columns,1),minmax(0,1fr))!important;}
 .memory-team-dialog .memory-team-tabs[data-rb-group]:not(:has(>button[hidden])) {--rb-group-columns:2!important;}
 .memory-team-dialog .memory-team-tabs>[data-rb-button] {width:100%!important;min-width:0!important;white-space:normal!important;}
 @media(max-width:600px) {
  .memory-team-dialog {--team-dialog-gutter:14px;}
  .memory-team-dialog[open],.memory-team-dialog>.memory-team-panel {gap:8px!important;}
  .memory-team-dialog .memory-team-compose textarea {height:clamp(56px,16dvh,120px)!important;min-height:56px!important;}
 }
}
/* Artwork layers are local to the canvas. They cannot overpaint fixed app controls,
   while sticker ordering, contextual tools and overflow inside the memory remain intact. */
#memory-generated {isolation:isolate;}

/* The same reply action is used in comments and chat. */
:root {
 --ui-reply-icon-size:18px;
 --ui-reply-artwork:url("assets/material-symbols/reply.svg");
 --ui-chat-message-size:15px;--ui-chat-author-size:12px;--ui-chat-quote-size:13px;--ui-chat-compose-size:17px;
}
@layer remembrand-buttons {
 .ui-reply-action {
  box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;gap:4px!important;
  flex:0 0 auto!important;width:auto!important;min-width:0!important;min-height:32px!important;
  padding:4px 0!important;margin:0!important;border:0!important;border-radius:4px!important;
  background:transparent!important;color:var(--color-action,#574fba)!important;box-shadow:none!important;
  font:600 13px/1.2 var(--font-body,system-ui),sans-serif!important;letter-spacing:normal!important;
  text-transform:none!important;text-decoration:none!important;white-space:nowrap!important;
  opacity:1!important;cursor:pointer;touch-action:manipulation;
 }
 .ui-reply-action::before {
  content:"";flex:0 0 var(--ui-reply-icon-size);width:var(--ui-reply-icon-size);height:var(--ui-reply-icon-size);
  translate:0 -1px;
  background:currentColor;-webkit-mask:var(--ui-reply-artwork) center/contain no-repeat;
  mask:var(--ui-reply-artwork) center/contain no-repeat;pointer-events:none;
 }
 .ui-reply-action:focus-visible {outline:2px solid currentColor!important;outline-offset:3px!important;}
 .memory-team-dialog .memory-team-heading h2:focus {outline:none!important;}
 .memory-team-dialog .memory-team-tabs[hidden] {display:none!important;}
 .memory-team-dialog .memory-team-message {font-size:var(--ui-chat-message-size)!important;}
 .memory-team-dialog .memory-team-message-heading>strong {font-size:var(--ui-chat-author-size)!important;}
 .memory-team-dialog :is(.memory-team-quote,.memory-team-reply-draft) {font-size:var(--ui-chat-quote-size)!important;}
 .memory-team-dialog :is(.memory-team-quote,.memory-team-reply-copy)>strong {font-size:var(--ui-chat-author-size)!important;}
 .memory-team-dialog .memory-team-history-gap {font-size:12px!important;}
 .memory-team-dialog :is(.memory-team-status,.memory-team-help,.memory-team-error) {font-size:14px!important;}
 .memory-team-dialog .memory-team-compose textarea {font-size:var(--ui-chat-compose-size)!important;}
 .ui-chat-send[data-rb-button],.memory-team-dialog .memory-team-compose button[type=submit] {width:100%!important;min-width:0!important;max-width:100%!important;align-self:stretch!important;}
}

/* Chat-only compositions share their production rules with the guide. */
:root {--ui-chat-incoming-surface:var(--app-color-social-ffffff,#fff);--ui-chat-outgoing-surface:var(--app-color-social-e0f6ea,#e0f6ea);--ui-chat-message-side-gap:24px;--ui-chat-message-bottom-gap:12px;--ui-chat-message-padding:4px 12px 16px 16px;}
@layer remembrand-buttons {
 .memory-team-dialog .memory-team-heading h2 {--overlay-title-start-space:0px;margin:0!important;text-align:left!important;}
 .ui-chat-message {box-sizing:border-box!important;width:calc(100% - var(--ui-chat-message-side-gap))!important;margin:0 var(--ui-chat-message-side-gap) var(--ui-chat-message-bottom-gap) 0!important;padding:var(--ui-chat-message-padding)!important;border-radius:16px!important;background:var(--ui-chat-incoming-surface)!important;text-align:left!important;font:400 var(--ui-chat-message-size)/1.5 Geist,system-ui,sans-serif!important;overflow-wrap:anywhere;}
 .ui-chat-message.is-mine {background:var(--ui-chat-outgoing-surface)!important;}
 .ui-chat-message-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px;}
 .ui-chat-message-heading>strong {font-size:var(--ui-chat-author-size);}
 .ui-chat-message>p {margin:0;white-space:pre-wrap;}
 .memory-team-dialog :is(.memory-team-panel,.memory-team-messages) {min-width:0!important;}
 .ui-chat-message {min-width:0!important;max-width:calc(100% - var(--ui-chat-message-side-gap))!important;}
 .ui-chat-message-heading>strong {min-width:0;overflow-wrap:anywhere;}
 .ui-chat-quote {box-sizing:border-box!important;display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;margin:6px 0 10px!important;padding:8px 10px!important;border:0!important;border-left:3px solid var(--color-action,var(--app-color-social-594eb5,#594eb5))!important;border-radius:4px 10px 10px 4px!important;background:var(--color-neutral,var(--app-color-social-eee9e0,#eee9e0))!important;color:var(--color-ink,var(--app-color-social-111111,#111))!important;font:400 var(--ui-chat-quote-size)/1.4 Geist,system-ui,sans-serif!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important;cursor:pointer!important;}
 .ui-chat-quote>strong {display:block!important;margin:0 0 3px!important;font-size:var(--ui-chat-author-size)!important;font-weight:600!important;}
 .ui-chat-quote>span {display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;white-space:normal!important;overflow-wrap:anywhere!important;}
 .ui-chat-quote:focus-visible {outline:2px solid var(--color-ink,var(--app-color-social-111111,#111))!important;outline-offset:2px!important;}
 .ui-chat-composer {--ui-text-entry-size:var(--ui-chat-compose-size);--ui-text-entry-corners:var(--ui-textarea-radius,16px) var(--ui-textarea-radius,16px) 0 0;display:flex!important;flex-direction:column!important;gap:0!important;padding:0!important;border:0!important;border-radius:var(--ui-textarea-radius,16px)!important;background:transparent!important;}
 .ui-chat-composer>textarea {display:block!important;box-sizing:border-box;width:100%!important;min-width:0;resize:vertical;}
 .ui-chat-composer>.ui-chat-send[data-rb-button] {border-radius:0 0 var(--ui-textarea-radius,16px) var(--ui-textarea-radius,16px)!important;}
}
