/* A media answer has its own width; short introductory prose cannot shrink it. */
.lw-message:has(.lw-chat-image){width:min(100%,630px);max-width:100%}
.lw-bubble:has(.lw-chat-image){width:100%;box-sizing:border-box;background:transparent;border:0;padding:0}
.lw-chat-image{display:block;margin:10px 0 4px;width:min(100%,600px)}
.lw-chat-image img{display:block;width:100%;height:auto;max-height:640px;object-fit:contain;border-radius:12px}
.lw-chat-image figcaption{display:flex;justify-content:flex-end;margin-top:8px}
.lw-chat-image button{font:inherit;font-size:13px;color:var(--lw-muted,#647079);border:0;background:transparent;padding:7px 0;cursor:pointer}
.lw-chat-image button:hover{color:var(--lw-ink,#202323)}
.lw-chat-image-status{margin:0;color:var(--lw-muted,#647079);font:inherit}
.lw-message:has(.lw-chat-video) { width: min(78%, 630px); }
.lw-bubble:has(.lw-chat-video) { width: 100%; box-sizing: border-box; }
.lw-chat-video { display: block; box-sizing: border-box; width: min(100%, 600px); min-width: 0; margin: 10px 0 4px; overflow: hidden; border: 1px solid var(--lw-line, #deded8); border-radius: 15px; background: var(--lw-bg, #fafaf8); color: var(--lw-ink, #242423); }
.lw-chat-video-player { width: 100%; aspect-ratio: 16 / 9; position: relative; background: var(--lw-paper, #f2f1ec); }
.lw-chat-video-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lw-chat-video-watch { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 100%; overflow: hidden; border: 0; border-radius: 0; background: #25312c; color: white; font: inherit; font-size: .92rem; cursor: pointer; }
.lw-chat-video-thumbnail { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lw-chat-video-thumbnail[hidden] { display: none; }
.lw-chat-video-watch::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, .65)); pointer-events: none; }
.lw-chat-video-watch:hover .lw-chat-video-play { transform: scale(1.07); }
.lw-chat-video-watch:focus-visible, .lw-chat-video-search:focus-visible { outline: 2px solid var(--lw-blue, #668ab2); outline-offset: -3px; }
.lw-chat-video-play { position: relative; z-index: 1; display: grid; place-items: center; width: 68px; height: 48px; border-radius: 13px; background: #e62117; color: white; transition: transform .15s ease; }
.lw-chat-video-play svg { width: 30px; height: 30px; }
.lw-chat-video-watch-label { position: absolute; z-index: 1; bottom: 14px; right: 16px; font-weight: 600; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.lw-chat-video-watch small { position: absolute; z-index: 1; bottom: 15px; left: 16px; font-size: .76rem; color: white; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.lw-chat-video figcaption { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; }
.lw-chat-video figcaption strong { font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
.lw-chat-video figcaption a { font-size: .76rem; color: var(--lw-muted, #777772); }
.lw-chat-video-search { display: inline-flex; gap: 7px; align-items: center; margin: 7px 0; padding: 8px 13px; border: 1px solid var(--lw-line, #deded8); border-radius: 18px; text-decoration: none; font-size: .86rem; }
.lw-message-attribution-name[data-lw-spacebar-profile] { padding: 0; border: 0; background: transparent; cursor: pointer; font-family: inherit; text-align: left; }
.lw-message-attribution-name[data-lw-spacebar-profile]:hover { text-decoration: underline; }
.lw-message-attribution-name[data-lw-spacebar-profile]:focus-visible { outline: 2px solid var(--lw-blue, #668ab2); outline-offset: 3px; }
@media (max-width: 760px) {
  .lw-space-thread .lw-message:has(.lw-chat-video) { width: 100%; max-width: 100%; }
  .lw-chat-video figcaption { padding: 10px 12px; }
  .lw-space-thread .lw-message--attributed .lw-message-attribution { display: inline-flex; }
}
.lw-plugin-action--layout { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; min-width: 88px; max-width: 140px; padding: 8px 10px; font: inherit; font-size: 12px; }
.lw-plugin-layout-preview { display: block; width: 80px; height: 46px; color: var(--lw-blue, #2f6d8f); }
