.lw-conversation-tools { display: none; }
.lw-conversation-icon { display: inline-grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; }
.lw-conversation-icon svg { display: block; width: 100%; height: 100%; }
.lw-conversation-menu,.lw-conversation-sheet,.lw-conversation-find { box-sizing: border-box; color: var(--lw-ink,#171a1d); font-family: var(--lw-sans,system-ui,sans-serif); }
.lw-conversation-menu *, .lw-conversation-sheet *, .lw-conversation-find * { box-sizing: border-box; }
.lw-conversation-menu {
  position: fixed; z-index: 180; width: min(290px,calc(100vw - 20px)); max-height: min(650px,calc(100dvh - 90px)); overflow-y: auto;
  padding: 9px; border: 1px solid var(--lw-line,#e6e7e8); border-radius: 22px; background: var(--lw-panel,#fff);
  box-shadow: 0 12px 46px rgb(15 24 33 / 12%); overscroll-behavior: contain;
}
.lw-conversation-menu h3 { margin: 0; padding: 9px 11px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.lw-conversation-menu button { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 44px; padding: 11px; border: 0; border-radius: 11px; background: transparent; color: inherit; font: 400 15px/1.35 var(--lw-sans,system-ui,sans-serif); text-align: left; cursor: pointer; }
.lw-conversation-menu button:hover,.lw-conversation-menu button:focus-visible { background: color-mix(in srgb,currentColor 5%,transparent); }
.lw-conversation-menu .is-danger { color: #bc3b3b; }
.lw-conversation-menu .is-danger:hover { background: #fff0f0; }
.lw-conversation-menu button:nth-last-child(2) { margin-top: 5px; }
.lw-conversation-sheet { position: fixed; inset: auto 16px max(12px,var(--lw-safe-bottom,env(safe-area-inset-bottom))); width: min(520px,calc(100vw - 32px)); max-height: 86dvh; margin: 0 auto; padding: 22px; border: 1px solid var(--lw-line,#e6e7e8); border-radius: 30px; background: var(--lw-panel,#fff); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 15px 60px rgb(15 24 33 / 12%); animation: lw-conversation-rise .2s ease-out; }
.lw-conversation-sheet::backdrop { background: rgb(0 0 0 / 20%); }
.lw-conversation-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.lw-conversation-sheet-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.lw-conversation-sheet button { border: 0; border-radius: 13px; background: var(--lw-hover,#f3f4f5); color: inherit; font: 500 15px/1.4 var(--lw-sans,system-ui,sans-serif); cursor: pointer; }
.lw-conversation-sheet-head button { display: grid; place-items: center; width: 34px; height: 34px; padding: 8px; border-radius: 50%; }
.lw-conversation-sheet-head button > span:not(.lw-conversation-icon) { display: none; }
/* A readable response card sits inside a soft color field, matching the
   shared document without exposing attachments or other private context. */
.lw-conversation-share-sheet .lw-conversation-sheet-head { position: relative; justify-content: center; margin-bottom: 5px; padding-inline: 30px; }
.lw-conversation-share-sheet .lw-conversation-sheet-head::before { content: ''; position: absolute; top: -12px; left: calc(50% - 18px); width: 36px; height: 4px; border-radius: 99px; background: #c9cbce; }
.lw-conversation-share-sheet .lw-conversation-sheet-head button { position: absolute; top: -2px; right: -6px; background: transparent; }
.lw-conversation-share-note { margin: 0 3px 21px; color: var(--lw-muted,#747a80); font-size: 13px; line-height: 1.5; text-align: center; }
.lw-conversation-share-carousel{overflow:hidden;min-width:0;border-radius:27px;touch-action:pan-y;overscroll-behavior-x:contain;outline-offset:3px}
.lw-conversation-share-track{display:flex;align-items:stretch;width:100%;min-width:0;transform:translateX(0);transition:transform .24s cubic-bezier(.2,.8,.2,1);will-change:transform}
.lw-conversation-share-slide{flex:0 0 100%;min-width:0}
.lw-conversation-share-carousel.is-dragging .lw-conversation-share-track{transition:none;cursor:grabbing}
.lw-conversation-share-carousel .lw-conversation-share-card{user-select:none;-webkit-user-select:none}
.lw-conversation-share-backdrop { display: grid; place-items: center; min-height: 310px; padding: 32px; overflow: hidden; border-radius: 27px; background: radial-gradient(ellipse at 10% 20%,#b6d071 0,transparent 48%),radial-gradient(ellipse at 90% 0%,#f5c0d1 0,transparent 53%),radial-gradient(ellipse at 75% 100%,#f3d577 0,transparent 53%),#c2d9d7; }
.lw-conversation-share-backdrop[data-theme=paper] { background: radial-gradient(ellipse at 12% 15%,#e1ded5 0,transparent 48%),radial-gradient(ellipse at 85% 90%,#d7dfde 0,transparent 53%),#eeede7; }
.lw-conversation-share-backdrop[data-theme=dusk] { background: radial-gradient(ellipse at 10% 25%,#aebdd4 0,transparent 48%),radial-gradient(ellipse at 95% 10%,#d6c2d5 0,transparent 53%),radial-gradient(ellipse at 70% 95%,#d5bca6 0,transparent 53%),#b6b9cd; }
.lw-conversation-share-card { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; width: 100%; min-height: 246px; padding: 23px; border: 0; border-radius: 24px; background: #fff; color: #1c2023; box-shadow: 0 8px 32px #29352d08; }
.lw-conversation-share-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; color: #24292c; font-size: 13px; font-weight: 600; }
.lw-conversation-share-brand img { width: 25px; height: 25px; object-fit: contain; }
.lw-conversation-share-excerpt { max-height: 250px; overflow: hidden; mask-image: linear-gradient(#000 90%,transparent); }
.lw-conversation-share-excerpt p { margin: 0 0 12px; font-size: 17px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.lw-conversation-share-excerpt p:last-child { margin-bottom: 0; }
.lw-conversation-share-themes { display: flex; justify-content: center; gap: 0; margin: 9px 0 0; }
.lw-conversation-share-themes button { display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.lw-conversation-share-themes button::after { content: ''; display: block; width: 9px; height: 9px; border-radius: 50%; background: #d1d3d4; }
.lw-conversation-share-themes button[aria-pressed=true]::after { background: #22272a; }
.lw-conversation-share-status { min-height: 16px; margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--lw-muted,#747a80); text-align: center; }
.lw-conversation-share-sheet input { width: 100%; min-height: 40px; margin-top: 8px; padding: 9px 12px; border: 1px solid var(--lw-line,#e6e7e8); border-radius: 12px; background: transparent; color: inherit; font: 12px/1.4 var(--lw-sans,system-ui,sans-serif); }
.lw-conversation-sheet-actions { display: flex; gap: 10px; margin-top: 14px; }
.lw-conversation-sheet-actions button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 12px 16px; }
.lw-conversation-sheet-actions .is-primary { background: var(--lw-accent,var(--lw-blue,#2f6d8f)); color: #fff; }
.lw-conversation-sheet-actions .is-danger { background: #c13e3e; color: #fff; }
.lw-conversation-sheet button:disabled { opacity: .5; cursor: default; }
.lw-conversation-delete > p { font-size: 15px; line-height: 1.5; }
.lw-conversation-find { position: fixed; z-index: 140; top: calc(70px + var(--lw-safe-top,env(safe-area-inset-top))); left: 50%; display: flex; align-items: center; gap: 7px; width: min(680px,calc(100vw - 24px)); padding: 8px 10px; border: 1px solid var(--lw-line,#e6e7e8); border-radius: 18px; transform: translateX(-50%); background: var(--lw-panel,#fff); box-shadow: 0 6px 25px rgb(15 24 33 / 8%); }
.lw-conversation-find > .lw-conversation-icon { color: var(--lw-muted,#747a80); width: 18px; flex-basis: 18px; }
.lw-conversation-find input { flex: 1; min-width: 0; width: 100%; min-height: 34px; padding: 4px; border: 0; outline: 0; border-radius: 0; color: inherit; background: transparent; font: 16px/1.4 var(--lw-sans,system-ui,sans-serif); }
.lw-conversation-find output { flex: 0 0 auto; color: var(--lw-muted,#747a80); font-size: 11px; white-space: nowrap; }
.lw-conversation-find button { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 34px; padding: 5px; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.lw-conversation-find button > span:not(.lw-conversation-icon) { display: none; }
.lw-conversation-find button:disabled { opacity: .25; cursor: default; }
.lw-conversation-find .lw-conversation-icon { width: 19px; height: 19px; }
mark[data-lw-find] { color: inherit; background: color-mix(in srgb,currentColor 7%,transparent); border-radius: 2px; }
mark[data-lw-find].is-current { color: inherit; background: color-mix(in srgb,currentColor 13%,transparent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.lw-conversation-menu button:focus-visible,.lw-conversation-sheet button:focus-visible,.lw-conversation-find button:focus-visible { outline: 2px solid var(--lw-ink-2,#72777c); outline-offset: 2px; }
@media (max-width: 760px) {
  .lw-conversation-tools { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid color-mix(in srgb,var(--lw-line,#e6e7e8) 70%,transparent); border-radius: 999px; background: var(--lw-panel,#fff); }
  .lw-conversation-tools button { display: grid; place-items: center; width: 39px; min-width: 39px; height: 39px; min-height: 39px; padding: 9px; border: 0; border-radius: 50%; color: var(--lw-ink,#171a1d); background: transparent; }
  .lw-conversation-tools button:hover { background: var(--lw-hover,#f5f5f5); }
  .lw-conversation-tools svg { width: 21px; height: 21px; }
  .lw-conversation-sheet { inset-inline: 10px; width: calc(100vw - 20px); padding: 20px; }
  .lw-conversation-find { gap: 3px; padding-inline: 8px; }
  .lw-conversation-find button { flex-basis: 27px; width: 27px; }
}
@keyframes lw-conversation-rise { from { transform: translateY(28px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lw-conversation-sheet { animation: none; } }
@media (prefers-reduced-motion: reduce) { .lw-conversation-share-track { transition:none; } }

/* Native iPads use the same mobile surface even above the phone breakpoint. */
.lw-conversation-tools[hidden] { display: none !important; }
body.lw-space-mobile .lw-space-phone-head.has-conversation:not([hidden]) { grid-template-columns: 44px minmax(0,1fr) auto; }
body.lw-space-mobile .lw-space-phone-head .lw-conversation-tools {
  display: flex; grid-column: 3; grid-row: 1; justify-self: end; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid color-mix(in srgb,var(--lw-line,#e6e7e8) 70%,transparent); border-radius: 999px; background: var(--lw-panel,#fff);
}
body.lw-space-mobile .lw-space-phone-head .lw-conversation-tools button { display: grid; place-items: center; width: 39px; min-width: 39px; height: 39px; min-height: 39px; padding: 9px; border: 0; border-radius: 50%; color: var(--lw-ink,#171a1d); background: transparent; }
body.lw-space-mobile .lw-space-phone-head .lw-conversation-tools svg { width: 21px; height: 21px; }
.lw-conversation-menu [hidden],.lw-conversation-sheet [hidden],.lw-conversation-find [hidden] { display: none !important; }

/* Header share buttons have a separate legacy class. A sheet is always a
   stacked dialog, regardless of inherited button or navigation styling. */
dialog.lw-conversation-sheet[open] { display: block; }

/* Sharing actions keep their labels below independent neutral icon bubbles. */
.lw-conversation-sheet-actions.lw-conversation-share-actions { display: flex; justify-content: flex-start; gap: 24px; margin-top: 11px; padding: 0 2px 8px; }
.lw-conversation-sheet-actions.lw-conversation-share-actions button { display: flex; flex: 0 1 82px; flex-direction: column; justify-content: flex-start; gap: 9px; min-height: 95px; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: 13px; font-weight: 400; line-height: 1.3; }
.lw-conversation-share-actions button > .lw-conversation-icon { display: grid; place-items: center; flex: 0 0 62px; width: 62px; height: 62px; padding: 19px; border-radius: 50%; background: color-mix(in srgb,currentColor 5%,transparent); }
.lw-conversation-share-actions button:hover > .lw-conversation-icon { background: color-mix(in srgb,currentColor 9%,transparent); }
.lw-conversation-share-actions button:disabled { opacity: .55; cursor: progress; }
.lw-conversation-share-sheet .lw-conversation-share-status:empty { min-height: 0; }
.lw-composer-find-controls { display: flex; align-items: center; justify-content: flex-end; gap: 3px; color: var(--lw-ink,#202326); }
.lw-composer-find-controls output { margin-inline: 5px; color: var(--lw-ink-2,#72777c); font-size: 11px; line-height: 1.3; white-space: nowrap; }
.lw-composer-find-controls button { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 34px; min-height: 34px; padding: 5px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.lw-composer-find-controls button:disabled { opacity: .3; cursor: default; }
.lw-composer-find-controls svg { width: 19px; height: 19px; }
.lw-composer-find-controls button:focus-visible { outline: 2px solid var(--lw-ink-2,#72777c); outline-offset: 1px; }
@media(max-width:400px) { .lw-conversation-share-backdrop { min-height: 270px; padding: 25px; } .lw-conversation-share-card { min-height: 225px; padding: 21px; } .lw-conversation-share-sheet .lw-conversation-sheet-head h2 { font-size: 17px; } }

@media (min-width: 761px) {
  .lw-conversation-sheet-actions.lw-conversation-share-actions { justify-content: center; }
}
