/* DAASS live chat — the Messenger (LC2; docs/livechat_widget_notes.md). Intercom's structure in DAASS tokens: a 56 px
   launcher, a 400 × 680 window (radius 20, --shadow-xl), Home · Messages tabs, a conversation with grouped bubbles,
   a composer with attachments, a lightbox and a preview card above the launcher. The accent comes from the live
   support settings (--lcw-accent, set by livechat_widget.js with a contrasting --lcw-on-accent). Everything is scoped
   under .lcw. One light Messenger on both surfaces; the website variant (.lcw-website) only changes the hero, the type
   and the shadows (it floats over the night site). Full screen on phones. Hover effects are for real pointers only
   (@media (hover: hover)), so a tap never leaves a sticky highlight on a phone. */

.lcw {
  --lcw-accent: var(--indigo-600, #4F46E5);
  --lcw-accent-rgb: 79, 70, 229;
  --lcw-accent-strong: var(--indigo-700, #4338CA);
  --lcw-accent-text: var(--indigo-700, #4338CA);
  --lcw-on-accent: #FFFFFF;
  --lcw-bg: #FFFFFF;
  --lcw-body: var(--gray-50, #F8F9FA);
  --lcw-card: #FFFFFF;
  --lcw-text: var(--gray-900, #111318);
  --lcw-text-2: var(--gray-700, #383D49);
  --lcw-text-3: var(--gray-500, #6B7180);
  --lcw-text-4: var(--gray-400, #9BA1AC);
  --lcw-line: var(--gray-150, #E9EBEE);
  --lcw-line-2: var(--gray-200, #E3E5E9);
  --lcw-hover: var(--gray-75, #F4F5F7);
  --lcw-theirs: var(--gray-100, #EEF0F3);
  --lcw-theirs-text: var(--gray-900, #111318);
  --lcw-hero: var(--navy-900, #0A2540);
  --lcw-hero-2: var(--navy-800, #13345A);
  --lcw-hero-text: #FFFFFF;
  --lcw-hero-muted: rgba(255, 255, 255, .62);
  --lcw-gold: #E2CA9B;
  --lcw-danger: var(--danger-fill, #D92D20);
  --lcw-danger-text: var(--danger, #B42318);
  --lcw-success: var(--success-fill, #12B76A);
  --lcw-radius: 20px;
  --lcw-shadow: 0 24px 64px -12px rgba(17, 19, 24, .28), 0 8px 16px -8px rgba(17, 19, 24, .1), 0 0 0 1px rgba(17, 19, 24, .06);
  --lcw-ease: cubic-bezier(.16, 1, .3, 1);
  --lcw-spring: cubic-bezier(.34, 1.4, .64, 1);
  --lcw-gap: 20px;
  --lcw-launcher: 56px;
  --lcw-lift: 0px;          /* raised above bottom bars (Academy tab bar, lesson dock) on small screens */
  --lcw-font: var(--font-sans, "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  position: relative;
  z-index: 120;             /* above page content, menus and drawers; below the command palette, toasts and tooltips */
  font-family: var(--lcw-font);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: normal;
  text-transform: none;
  color: var(--lcw-text);
  -webkit-font-smoothing: antialiased;
}
.lcw[hidden] { display: none !important; }
.lcw *, .lcw *::before, .lcw *::after { box-sizing: border-box; }
/* resets with no weight (:where), so every .lcw-* class below wins over them */
:where(.lcw) button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; margin: 0; }
:where(.lcw) a { color: inherit; }
:where(.lcw) :is(p, h2, h3) { margin: 0; }
:where(.lcw) img { max-width: 100%; display: block; }
.lcw-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lcw-sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.lcw :focus { outline: none; }
.lcw :focus-visible { outline: none; box-shadow: 0 0 0 2px var(--lcw-bg), 0 0 0 4px rgba(var(--lcw-accent-rgb), .9); }

/* toasts and the phone tab bar make room for the launcher */
body.has-lcw .toast-stack { bottom: calc(var(--lcw-gap, 20px) + 72px); }
body.lcw-lock { overflow: hidden; }

/* ------------------------------------------------------------------ launcher */
.lcw-launcher {
  position: fixed; right: var(--lcw-gap); bottom: calc(var(--lcw-gap) + var(--lcw-lift) + env(safe-area-inset-bottom, 0px));
  width: var(--lcw-launcher); height: var(--lcw-launcher); border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--lcw-accent); color: var(--lcw-on-accent);
  box-shadow: 0 10px 28px -8px rgba(var(--lcw-accent-rgb), .55), 0 3px 8px rgba(17, 19, 24, .16), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform .32s var(--lcw-spring), box-shadow .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
  animation: lcw-pop .5s var(--lcw-spring) backwards;
}
@media (hover: hover) { .lcw-launcher:hover { transform: scale(1.06); box-shadow: 0 14px 34px -8px rgba(var(--lcw-accent-rgb), .6), 0 4px 10px rgba(17, 19, 24, .18); } }
.lcw-launcher:active { transform: scale(.94); transition-duration: .1s; }
.lcw-launcher:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--lcw-accent), 0 10px 28px -8px rgba(var(--lcw-accent-rgb), .55); }
.lcw-glyph { position: absolute; transition: transform .36s var(--lcw-spring), opacity .2s ease; }
.lcw-glyph-chat { width: 30px; height: 30px; }
.lcw-glyph-close { width: 24px; height: 24px; opacity: 0; transform: rotate(-90deg) scale(.5); }
.lcw.is-open .lcw-glyph-chat { opacity: 0; transform: rotate(90deg) scale(.5); }
.lcw.is-open .lcw-glyph-close { opacity: 1; transform: none; }
.lcw-badge {
  position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; background: var(--lcw-danger); color: #fff; font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1; box-shadow: 0 0 0 2.5px #fff; animation: lcw-pop .45s var(--lcw-spring) backwards;
}
.lcw.is-open .lcw-badge { opacity: 0; transform: scale(.4); transition: opacity .15s, transform .15s; }
.lcw-left .lcw-launcher, .lcw-left .lcw-panel, .lcw-left .lcw-preview { right: auto; left: var(--lcw-gap); }
@keyframes lcw-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------------ the window */
.lcw-panel {
  position: fixed; right: var(--lcw-gap); bottom: calc(var(--lcw-gap) + var(--lcw-launcher) + 16px + var(--lcw-lift) + env(safe-area-inset-bottom, 0px));
  width: 400px; height: min(680px, calc(100dvh - var(--lcw-gap) - var(--lcw-launcher) - 16px - 24px - var(--lcw-lift)));
  min-height: 360px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--lcw-bg); border-radius: var(--lcw-radius); box-shadow: var(--lcw-shadow);
  transform-origin: calc(100% - 28px) calc(100% + 44px);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(14px) scale(.94);
  transition: opacity .2s ease, transform .3s var(--lcw-ease), visibility 0s linear .3s;
}
.lcw-left .lcw-panel { transform-origin: 28px calc(100% + 44px); }
.lcw.is-open .lcw-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity .18s ease, transform .34s var(--lcw-ease), visibility 0s; }
.lcw-instant .lcw-panel, .lcw-instant .lcw-glyph, .lcw-instant .lcw-launcher, .lcw-instant .lcw-badge { transition: none !important; animation: none !important; }
.lcw-views { position: relative; flex: 1; min-height: 0; display: flex; }
.lcw-view { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; background: var(--lcw-bg); }
.lcw-view.lcw-in { animation: lcw-in .26s var(--lcw-ease) both; }
.lcw-view.lcw-in-back { animation: lcw-in-back .26s var(--lcw-ease) both; }
@keyframes lcw-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes lcw-in-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.lcw-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--lcw-line-2) transparent; }

/* ------------------------------------------------------------------ shared parts */
.lcw-icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; flex: none; border: 0; border-radius: 10px;
  background: transparent; color: var(--lcw-text-3); cursor: pointer; transition: background .12s, color .12s;
}
.lcw-icon-btn:active { background: var(--lcw-hover); }
.lcw-icon-btn .lcw-i { width: 20px; height: 20px; }
.lcw-on-dark { color: rgba(255, 255, 255, .72); }
.lcw-on-dark:active { background: rgba(255, 255, 255, .12); color: #fff; }
@media (hover: hover) {
  .lcw-icon-btn:hover { background: var(--lcw-hover); color: var(--lcw-text); }
  .lcw-on-dark:hover { background: rgba(255, 255, 255, .12); color: #fff; }
}
.lcw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--lcw-line-2); background: var(--lcw-card); color: var(--lcw-text); font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, transform .1s;
}
.lcw-btn:active { transform: scale(.98); }
.lcw-btn .lcw-i { width: 16px; height: 16px; }
.lcw-btn-primary { background: var(--lcw-accent); border-color: transparent; color: var(--lcw-on-accent); box-shadow: 0 1px 2px rgba(17, 19, 24, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
.lcw-btn-danger { background: var(--lcw-danger); border-color: transparent; color: #fff; }
@media (hover: hover) {
  .lcw-btn:hover { background: var(--lcw-hover); }
  .lcw-btn-primary:hover { background: var(--lcw-accent-strong); }
  .lcw-btn-danger:hover { background: var(--danger, #B42318); }
}
.lcw-btn-ghost { background: transparent; border-color: transparent; color: var(--lcw-text-2); }
.lcw-btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.lcw-btn-block { width: 100%; }

.lcw-av {
  --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  background: var(--indigo-50, #EEF2FF); color: var(--indigo-700, #4338CA); font-size: calc(var(--s) * .36); font-weight: 650; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(17, 19, 24, .06); user-select: none;
}
.lcw-av img { width: 100%; height: 100%; object-fit: cover; }
.lcw-av[data-tone="1"] { background: #E0F2FE; color: #075985; }
.lcw-av[data-tone="2"] { background: #DCFCE7; color: #166534; }
.lcw-av[data-tone="3"] { background: #FCE7F3; color: #9D174D; }
.lcw-av[data-tone="4"] { background: #FEF3C7; color: #92400E; }
.lcw-av-brand { background: #141A21; border-radius: 30%; box-shadow: none; }
.lcw-av-brand img { width: 100%; height: 100%; }
.lcw-stack { display: inline-flex; align-items: center; flex: none; }
.lcw-stack .lcw-av + .lcw-av { margin-left: calc(var(--s) * -.3); }
.lcw-ring { box-shadow: 0 0 0 2px var(--lcw-ring, #fff); }
/* the team as two overlapping avatars on a diagonal (an unassigned conversation in a list) */
.lcw-duo { position: relative; display: block; width: var(--s); height: var(--s); flex: none; }
.lcw-duo .lcw-av { position: absolute; }
.lcw-duo .lcw-av:first-child { top: 0; left: 0; }
.lcw-duo .lcw-av:last-child { right: 0; bottom: 0; }
.lcw-row .lcw-duo .lcw-av { --lcw-ring: var(--lcw-card); }
.lcw-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--lcw-text-4); }
.lcw-dot.is-on { background: var(--lcw-success); box-shadow: 0 0 0 3px rgba(18, 183, 106, .16); }

/* bars (Messages, conversation, form) */
.lcw-bar { display: flex; align-items: center; gap: 4px; min-height: 64px; padding: 10px 10px 10px 8px; border-bottom: 1px solid var(--lcw-line); background: var(--lcw-bg); flex: none; position: relative; z-index: 2; }
.lcw-bar-center { justify-content: space-between; padding-left: 10px; }
.lcw-bar-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.lcw-bar-side { width: 36px; display: flex; justify-content: flex-end; }
.lcw-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding-left: 2px; }
.lcw-who .lcw-stack .lcw-av { --lcw-ring: var(--lcw-bg); }
.lcw-who-text { min-width: 0; }
.lcw-who-name { font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the status line wraps to a second line rather than cutting "back today at 9:00 AM" short */
.lcw-who-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 1px; font-size: 12.5px; line-height: 16px; color: var(--lcw-text-3); overflow-wrap: anywhere; text-wrap: balance; }
.lcw-who-sub .lcw-dot { width: 7px; height: 7px; margin-right: 6px; vertical-align: 1px; }

/* menus (sound) */
.lcw-menu-wrap { position: relative; }
.lcw-menu {
  position: absolute; z-index: 20; min-width: 200px; padding: 6px; border-radius: 12px; background: var(--lcw-card);
  box-shadow: 0 16px 40px -10px rgba(17, 19, 24, .22), 0 4px 10px -4px rgba(17, 19, 24, .08), 0 0 0 1px rgba(17, 19, 24, .07);
  animation: lcw-fade .14s ease both;
}
.lcw-menu { top: calc(100% + 4px); right: 0; }
.lcw-menu-item { width: 100%; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; color: var(--lcw-text); font-size: 13.5px; }
.lcw-menu-item:focus-visible, .lcw-menu-item:active { background: var(--lcw-hover); box-shadow: none; }
@media (hover: hover) { .lcw-menu-item:hover { background: var(--lcw-hover); } }
.lcw-menu-item span:not(.lcw-switch) { flex: 1; }
.lcw-menu-item .lcw-i { width: 16px; height: 16px; color: var(--lcw-text-3); }
.lcw-menu-item.is-danger { color: var(--lcw-danger-text); }
.lcw-menu-item.is-danger .lcw-i { color: currentColor; }
.lcw-switch { position: relative; width: 30px; height: 18px; border-radius: 999px; background: var(--lcw-line-2); transition: background .15s; flex: none; }
.lcw-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .18s var(--lcw-ease); }
.lcw-switch.is-on { background: var(--lcw-accent); }
.lcw-switch.is-on::after { transform: translateX(12px); }
@keyframes lcw-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ Home */
.lcw-home { background: var(--lcw-body); }
.lcw-home-scroll { background: var(--lcw-body); }
.lcw-hero {
  position: relative; padding: 20px 20px 84px; color: var(--lcw-hero-text);
  background: var(--lcw-hero);
  background-image: radial-gradient(120% 90% at 100% 0%, rgba(var(--lcw-accent-rgb), .38), rgba(var(--lcw-accent-rgb), 0) 60%);
}
.lcw-hero-top { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.lcw-wordmark { color: var(--lcw-gold); display: inline-flex; align-items: center; margin-right: auto; }
.lcw-wordmark svg { height: 18px; width: auto; display: block; }
.lcw-hero-team { display: inline-flex; --lcw-ring: var(--lcw-hero); }
.lcw .lcw-hero-title { margin-top: 48px; font-size: 28px; line-height: 34px; font-weight: 650; letter-spacing: -.024em; display: flex; flex-direction: column; color: var(--lcw-hero-text); }
.lcw .lcw-hero-title > span { color: var(--lcw-hero-text); }
.lcw .lcw-hero-title > .lcw-hero-hi { color: var(--lcw-hero-muted); }
.lcw-home-body { position: relative; margin-top: -52px; padding: 0 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.lcw-card {
  display: block; width: 100%; text-align: left; border: 0; border-radius: 14px; background: var(--lcw-card);
  box-shadow: 0 1px 2px rgba(17, 19, 24, .05), 0 0 0 1px rgba(17, 19, 24, .06);
}
button.lcw-card { cursor: pointer; transition: box-shadow .16s ease, transform .16s ease; }
button.lcw-card:active { transform: scale(.99); }
.lcw-send-card { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 18px; }
.lcw-send-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lcw-card-title { font-size: 14.5px; font-weight: 650; letter-spacing: -.005em; }
.lcw-card-sub { display: flex; align-items: center; gap: 7px; color: var(--lcw-text-3); font-size: 13px; line-height: 18px; }
.lcw-card-sub .lcw-dot { width: 7px; height: 7px; }
.lcw-send-go { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--lcw-accent-text); background: rgba(var(--lcw-accent-rgb), .09); flex: none; transition: background .15s, color .15s, transform .2s var(--lcw-spring); }
.lcw-send-go .lcw-i { width: 17px; height: 17px; }
@media (hover: hover) {
  button.lcw-card:hover { box-shadow: 0 8px 20px -8px rgba(17, 19, 24, .16), 0 0 0 1px rgba(17, 19, 24, .08); }
  .lcw-send-card:hover .lcw-send-go { background: var(--lcw-accent); color: var(--lcw-on-accent); transform: translateX(2px); }
}
.lcw-away-note { display: flex; align-items: flex-start; gap: 8px; padding: 0 6px; color: var(--lcw-text-3); font-size: 12.5px; line-height: 18px; }
.lcw-away-note .lcw-i { width: 15px; height: 15px; margin-top: 1px; }
.lcw-card-list { padding: 6px; }
.lcw-card-label { padding: 8px 10px 6px; font-size: 12px; font-weight: 600; color: var(--lcw-text-3); }
.lcw-link-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px;
  background: none; color: var(--lcw-text); font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
}
.lcw-link-row span { flex: 1; min-width: 0; }
.lcw-row-ico { color: var(--lcw-text-3); width: 18px; height: 18px; }
.lcw-row-go { color: var(--lcw-text-4); width: 16px; height: 16px; transition: transform .15s, color .15s; }

/* conversation rows (Home's recent message, the Messages list) */
.lcw-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.lcw-link-row:active, .lcw-row:active { background: var(--lcw-hover); }
@media (hover: hover) {
  .lcw-link-row:hover, .lcw-row:hover { background: var(--lcw-hover); }
  .lcw-link-row:hover .lcw-row-go, .lcw-row:hover .lcw-row-go { color: var(--lcw-text-2); transform: translateX(2px); }
}
.lcw-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lcw-row-top, .lcw-row-bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lcw-row-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcw-row-time { flex: none; font-size: 12px; color: var(--lcw-text-3); font-variant-numeric: tabular-nums; }
.lcw-row-preview { flex: 1; min-width: 0; font-size: 13.5px; color: var(--lcw-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcw-row.is-unread .lcw-row-name { font-weight: 700; }
.lcw-row.is-unread .lcw-row-preview { color: var(--lcw-text); font-weight: 500; }
.lcw-row.is-unread .lcw-row-time { color: var(--lcw-accent-text); font-weight: 600; }
.lcw-unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lcw-accent); flex: none; }
.lcw-tag { flex: none; height: 20px; padding: 0 7px; border-radius: 6px; display: inline-flex; align-items: center; background: var(--lcw-hover); color: var(--lcw-text-3); font-size: 11.5px; font-weight: 600; }

/* ------------------------------------------------------------------ tabs */
.lcw-tabs { flex: none; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--lcw-line); background: var(--lcw-bg); padding: 6px 8px calc(6px + var(--lcw-safe-b, 0px)); }
.lcw-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 52px; border: 0; border-radius: 12px; background: none; color: var(--lcw-text-3); font-size: 12px; font-weight: 550; cursor: pointer; transition: color .12s, background .12s; }
@media (hover: hover) { .lcw-tab:hover { color: var(--lcw-text); background: var(--lcw-hover); } .lcw-tab.is-active:hover { color: var(--lcw-accent-text); } }
.lcw-tab .lcw-i { width: 22px; height: 22px; stroke-width: 1.8; }
.lcw-tab.is-active { color: var(--lcw-accent-text); font-weight: 650; }
.lcw-tab.is-active .lcw-i { stroke-width: 2.1; }
.lcw-tab-icon { position: relative; display: grid; place-items: center; }
.lcw-tab-badge { position: absolute; top: -5px; right: -10px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--lcw-danger); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--lcw-bg); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Messages */
.lcw-list .lcw-scroll { padding: 8px 8px 88px; }
.lcw-rows { display: flex; flex-direction: column; gap: 2px; }
.lcw-rows .lcw-row { padding: 12px 12px; }
.lcw-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 72px 32px 24px; color: var(--lcw-text-3); font-size: 13.5px; line-height: 20px; }
.lcw-empty strong { color: var(--lcw-text); font-size: 15px; font-weight: 650; }
.lcw-empty-mark { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(var(--lcw-accent-rgb), .08); color: var(--lcw-accent-text); margin-bottom: 8px; }
.lcw-empty-mark .lcw-i { width: 22px; height: 22px; }
.lcw-fab {
  position: absolute; left: 50%; bottom: calc(76px + var(--lcw-safe-b, 0px)); transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 20px; border: 0; border-radius: 999px;
  background: var(--lcw-accent); color: var(--lcw-on-accent); font-size: 14px; font-weight: 650; white-space: nowrap; cursor: pointer;
  box-shadow: 0 10px 24px -8px rgba(var(--lcw-accent-rgb), .6), 0 2px 6px rgba(17, 19, 24, .14);
  transition: transform .2s var(--lcw-spring), background .15s;
}
@media (hover: hover) { .lcw-fab:hover { background: var(--lcw-accent-strong); transform: translateX(-50%) translateY(-1px); } }
.lcw-fab:active { transform: translateX(-50%) scale(.97); }
.lcw-fab .lcw-i { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ conversation */
.lcw-thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 12px; scrollbar-width: thin; scrollbar-color: var(--lcw-line-2) transparent; }
.lcw-items { display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.lcw-item.is-new { animation: lcw-rise .28s var(--lcw-ease) both; }
@keyframes lcw-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lcw-intro { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 16px 20px; margin-bottom: auto; }
.lcw-intro .lcw-stack .lcw-av { --lcw-ring: var(--lcw-bg); }
.lcw-intro-title { margin-top: 10px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.lcw-intro-sub { margin-top: 2px; max-width: 280px; font-size: 13px; line-height: 18px; color: var(--lcw-text-3); }
.lcw-day { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; color: var(--lcw-text-3); font-size: 12px; font-weight: 600; }
.lcw-day::before, .lcw-day::after { content: ""; flex: 1; height: 1px; background: var(--lcw-line); }
/* system lines ("Quality joined the conversation", "…was closed") flow as one centred sentence: icon, text, time */
.lcw-line { max-width: 304px; margin: 12px auto; padding: 0 8px; color: var(--lcw-text-3); font-size: 12.5px; line-height: 18px; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
.lcw-line .lcw-i { display: inline-block; width: 14px; height: 14px; margin-right: 5px; vertical-align: -2.5px; color: var(--lcw-text-4); }
.lcw-line time { color: var(--lcw-text-4); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lcw-line time::before { content: "· "; }

/* bubbles */
.lcw-msg { position: relative; display: flex; align-items: flex-end; gap: 8px; margin-top: 2px; }
.lcw-msg.is-first { margin-top: 10px; }
.lcw-msg.is-mine { justify-content: flex-end; padding-left: 48px; }
.lcw-msg.is-theirs { padding-right: 40px; }
.lcw-msg-av { --s: 28px; margin-bottom: 2px; }
.lcw-msg-av-gap { width: 28px; flex: none; }
.lcw-msg-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
.lcw-msg.is-mine .lcw-msg-col { align-items: flex-end; }
.lcw-msg.is-theirs .lcw-msg-col { align-items: flex-start; }
.lcw-bubble {
  padding: 9px 14px; border-radius: 18px; font-size: 14.5px; line-height: 21px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
  max-width: 100%;
}
.lcw-bubble a { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.lcw-msg.is-mine .lcw-bubble { background: var(--lcw-accent); color: var(--lcw-on-accent); }
.lcw-msg.is-theirs .lcw-bubble { background: var(--lcw-theirs); color: var(--lcw-theirs-text); }
.lcw-msg.is-theirs .lcw-bubble a { color: var(--lcw-accent-text); }
.lcw-msg.is-auto .lcw-bubble { background: var(--lcw-card); color: var(--lcw-text); box-shadow: inset 0 0 0 1px var(--lcw-line-2); }
/* grouped corners: the joined side is tight, between messages of a group and between the parts of one message (text,
   images, files). The column starts with the screen-reader label, so the first visible part is `.lcw-sr + *`. */
.lcw-msg.is-mine:not(.is-first) .lcw-msg-col > .lcw-sr + *, .lcw-msg.is-mine .lcw-msg-col > .lcw-sr ~ * ~ * { border-top-right-radius: 6px; }
.lcw-msg.is-mine:not(.is-last) .lcw-msg-col > :last-child, .lcw-msg.is-mine .lcw-msg-col > :not(:last-child) { border-bottom-right-radius: 6px; }
.lcw-msg.is-theirs:not(.is-first) .lcw-msg-col > .lcw-sr + *, .lcw-msg.is-theirs .lcw-msg-col > .lcw-sr ~ * ~ * { border-top-left-radius: 6px; }
.lcw-msg.is-theirs:not(.is-last) .lcw-msg-col > :last-child, .lcw-msg.is-theirs .lcw-msg-col > :not(:last-child) { border-bottom-left-radius: 6px; }
.lcw-msg.is-sending .lcw-bubble { opacity: .78; }
.lcw-msg.is-failed .lcw-bubble { opacity: .55; }
.lcw-bubble-deleted { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; background: transparent !important; color: var(--lcw-text-3) !important; box-shadow: inset 0 0 0 1px var(--lcw-line-2); font-size: 13px; line-height: 18px; }
.lcw-bubble-deleted .lcw-i { width: 14px; height: 14px; }
.lcw-msg-time {
  position: absolute; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--lcw-text-4); font-variant-numeric: tabular-nums;
  opacity: 0; pointer-events: none; transition: opacity .12s; white-space: nowrap;
}
.lcw-msg.is-mine .lcw-msg-time { left: 0; }
.lcw-msg.is-theirs .lcw-msg-time { right: 0; }
.lcw-msg:focus-within .lcw-msg-time, .lcw-msg.is-touched .lcw-msg-time { opacity: 1; }
@media (hover: hover) {
  .lcw-msg:hover .lcw-msg-time { opacity: 1; }
}

/* meta lines under groups */
.lcw-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; line-height: 16px; color: var(--lcw-text-3); }
.lcw-meta-theirs { padding-left: 36px; }
.lcw-meta-mine { justify-content: flex-end; }
.lcw-meta.is-error { color: var(--lcw-danger-text); font-weight: 500; }
.lcw-meta.is-error .lcw-i { width: 13px; height: 13px; }
.lcw-meta button { border: 0; background: none; padding: 0 2px; color: var(--lcw-accent-text); font-weight: 650; cursor: pointer; font-size: 11.5px; }
.lcw-meta button:hover { text-decoration: underline; }
.lcw-meta button + button { color: var(--lcw-text-3); }

/* attachments in bubbles */
/* the media block carries the bubble corners (and the grouped ones) and clips the images to them */
.lcw-media { display: grid; gap: 3px; width: 240px; max-width: 100%; border-radius: 18px; overflow: hidden; isolation: isolate; }
.lcw-media.n2, .lcw-media.n3, .lcw-media.n4 { grid-template-columns: 1fr 1fr; }
.lcw-media.n3 > :first-child { grid-column: span 2; }
.lcw-img { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: var(--lcw-hover); cursor: zoom-in; aspect-ratio: var(--r, 1.333); max-height: 320px; }
.lcw-img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(17, 19, 24, .07); pointer-events: none; }
.lcw.lcw .lcw-img:focus-visible { box-shadow: none; }
.lcw-img:focus-visible::after { box-shadow: inset 0 0 0 3px rgba(var(--lcw-accent-rgb), .9); }
.lcw-media.n1 .lcw-img { aspect-ratio: var(--r, 1.333); }
.lcw-media:not(.n1) .lcw-img { aspect-ratio: 1; }
.lcw-media.n3 > .lcw-img:first-child { aspect-ratio: 2; }
.lcw-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--lcw-ease), filter .2s; }
@media (hover: hover) { .lcw-img:hover img { transform: scale(1.025); } }
.lcw-img.is-busy { cursor: progress; }
.lcw-img.is-busy img { filter: saturate(.6) brightness(.8); }
.lcw-img.is-error img { filter: grayscale(1) brightness(.7); }
.lcw-img-progress { position: absolute; inset: 0; display: grid; place-items: center; }
.lcw-pring { --p: 0; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .28) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); transition: background .2s; }
.lcw-files { display: flex; flex-direction: column; gap: 3px; width: 260px; max-width: 100%; border-radius: 16px; }
.lcw-file {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 10px; border-radius: inherit; text-decoration: none;
  background: var(--lcw-card); box-shadow: inset 0 0 0 1px var(--lcw-line-2); color: var(--lcw-text); position: relative; overflow: hidden;
}
@media (hover: hover) { a.lcw-file:hover { background: var(--lcw-hover); } a.lcw-file:hover .lcw-file-go { color: var(--lcw-accent-text); } }
.lcw-file-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--lcw-accent-rgb), .08); color: var(--lcw-accent-text); flex: none; }
.lcw-file-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lcw-file-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcw-file-size { font-size: 12px; color: var(--lcw-text-3); font-variant-numeric: tabular-nums; }
.lcw-file-go { color: var(--lcw-text-3); width: 16px; height: 16px; }
.lcw-bar-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--lcw-line); }
.lcw-bar-progress > span { display: block; height: 100%; background: var(--lcw-accent); transition: width .2s; }

/* typing */
.lcw-dots { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 15px; }
.lcw-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--lcw-text-3); opacity: .5; animation: lcw-blink 1.3s infinite ease-in-out; }
.lcw-dots span:nth-child(2) { animation-delay: .16s; }
.lcw-dots span:nth-child(3) { animation-delay: .32s; }
@keyframes lcw-blink { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: .9; } }

/* topic chips (the first step of a new conversation) */
.lcw-quick { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin: 12px 0 4px; padding-left: 48px; }
.lcw-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid rgba(var(--lcw-accent-rgb), .55);
  background: var(--lcw-card); color: var(--lcw-accent-text); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
  transition: background .14s, color .14s, transform .14s var(--lcw-spring), border-color .14s;
}
@media (hover: hover) { .lcw-chip:hover { background: var(--lcw-accent); border-color: var(--lcw-accent); color: var(--lcw-on-accent); } }
.lcw-chip:active { transform: scale(.97); }
.lcw-chip .lcw-i { width: 16px; height: 16px; }

/* skeleton and errors */
.lcw-skel { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.lcw-skel-b { height: 38px; border-radius: 18px; background: linear-gradient(90deg, var(--lcw-hover), var(--lcw-line), var(--lcw-hover)); background-size: 200% 100%; animation: lcw-shimmer 1.2s infinite linear; }
.lcw-skel-b.w1 { width: 62%; } .lcw-skel-b.w2 { width: 48%; align-self: flex-end; } .lcw-skel-b.w3 { width: 72%; }
@keyframes lcw-shimmer { to { background-position: -200% 0; } }
.lcw-load-error { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 12px; color: var(--lcw-text-3); font-size: 13.5px; text-align: center; }
.lcw-load-error > .lcw-i { width: 22px; height: 22px; color: var(--lcw-danger); }

/* closed + rating */
.lcw-rating { margin: 16px 0 6px; padding: 18px 16px 12px; border-radius: 16px; background: var(--lcw-card); box-shadow: inset 0 0 0 1px var(--lcw-line-2); text-align: center; }
.lcw-rating-title { font-size: 14.5px; font-weight: 650; letter-spacing: -.005em; }
.lcw-stars { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
.lcw-star { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--lcw-line-2); padding: 0; cursor: pointer; transition: transform .18s var(--lcw-spring), color .12s; }
.lcw-star .lcw-i { width: 30px; height: 30px; stroke-width: 1.5; fill: currentColor; }
span.lcw-star { width: 28px; height: 28px; cursor: default; }
span.lcw-star .lcw-i { width: 22px; height: 22px; }
.lcw-star.is-on, .lcw-star.is-hover { color: #F5B83D; }
.lcw-stars:hover .lcw-star.is-on:not(.is-hover) { color: var(--lcw-line-2); }
@media (hover: hover) { button.lcw-star:hover { transform: scale(1.14); } }
button.lcw-star:active { transform: scale(.92); }
.lcw-star-label { margin-top: 4px; min-height: 18px; font-size: 12.5px; font-weight: 600; color: var(--lcw-text-3); }
.lcw-rating-more { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.lcw-rating-actions { display: flex; justify-content: flex-end; gap: 6px; }
.lcw-rating.is-done .lcw-stars { margin: 0 0 8px; }
.lcw-rating-comment { margin-top: 6px; color: var(--lcw-text-3); font-size: 13px; }
.lcw-closed { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px calc(16px + var(--lcw-safe-b, 0px)); border-top: 1px solid var(--lcw-line); }
.lcw-closed p { display: flex; align-items: center; gap: 6px; color: var(--lcw-text-3); font-size: 13px; }
.lcw-closed p .lcw-i { width: 15px; height: 15px; color: var(--lcw-success); }
.lcw-closed .lcw-btn { width: 100%; height: 44px; }
.lcw-reopen { border: 0; background: none; color: var(--lcw-text-3); font-size: 12.5px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.lcw-reopen:hover { color: var(--lcw-text); text-decoration: underline; }

/* jump to latest, notices */
.lcw-jump { position: relative; height: 0; display: flex; justify-content: center; z-index: 3; }
.lcw-jump button { position: absolute; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border: 0; border-radius: 999px; background: var(--lcw-card); color: var(--lcw-text); font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 18px -6px rgba(17, 19, 24, .25), 0 0 0 1px rgba(17, 19, 24, .08); animation: lcw-rise .2s var(--lcw-ease) both; }
.lcw-jump .lcw-i { width: 14px; height: 14px; color: var(--lcw-accent-text); }
.lcw-notice { display: flex; align-items: flex-start; gap: 8px; margin: 0 12px 8px; padding: 9px 6px 9px 12px; border-radius: 12px; background: var(--danger-bg, #FEF3F2); color: var(--danger-text, #912018); font-size: 13px; line-height: 18px; animation: lcw-rise .2s var(--lcw-ease) both; }
.lcw-notice > .lcw-i { width: 16px; height: 16px; margin-top: 1px; }
.lcw-notice span { flex: 1; }
.lcw-notice .lcw-icon-btn { width: 24px; height: 24px; color: inherit; margin: -3px 0; }
.lcw-notice .lcw-icon-btn .lcw-i { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ composer */
.lcw-foot { flex: none; background: var(--lcw-bg); }
/* one row, like Intercom: the text grows up to six lines on the left, the tools sit at its bottom right */
.lcw-composer { padding: 6px 12px calc(12px + var(--lcw-safe-b, 0px)); }
.lcw-box {
  display: flex; align-items: flex-end; gap: 2px; padding: 5px 5px 5px 16px; border: 1px solid var(--lcw-line-2); border-radius: 22px;
  background: var(--lcw-card); box-shadow: 0 1px 2px rgba(17, 19, 24, .04); transition: border-color .15s, box-shadow .15s;
}
.lcw-box:focus-within { border-color: rgba(var(--lcw-accent-rgb), .45); box-shadow: 0 0 0 3px rgba(var(--lcw-accent-rgb), .1); }
.lcw-input {
  display: block; flex: 1; min-width: 0; min-height: 34px; max-height: 136px; margin: 0; padding: 6.5px 4px 6.5px 0; border: 0; outline: 0; resize: none; overflow-y: hidden;
  background: transparent; color: var(--lcw-text); font: inherit; font-size: 14.5px; line-height: 21px; scrollbar-width: thin;
}
.lcw-input.is-scrolling { overflow-y: auto; }
.lcw-input::placeholder { color: var(--lcw-text-4); opacity: 1; }
.lcw-input:focus-visible { box-shadow: none; }
.lcw-tools { display: flex; align-items: center; gap: 2px; flex: none; min-height: 34px; }
.lcw-attach { width: 34px; height: 34px; border-radius: 50%; }
.lcw-attach .lcw-i { width: 19px; height: 19px; }
.lcw-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lcw-count { font-size: 11.5px; color: var(--lcw-text-3); font-variant-numeric: tabular-nums; padding: 0 4px; }
.lcw-count.is-over { color: var(--lcw-danger-text); font-weight: 600; }
.lcw-send {
  width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; flex: none;
  background: var(--lcw-accent); color: var(--lcw-on-accent); transition: background .15s, color .15s, transform .2s var(--lcw-spring), opacity .15s;
}
.lcw-send .lcw-i { width: 18px; height: 18px; stroke-width: 2.4; }
.lcw-send:active:not(:disabled) { transform: scale(.92); }
@media (hover: hover) { .lcw-send:hover:not(:disabled) { background: var(--lcw-accent-strong); transform: scale(1.06); } }
.lcw-send:disabled { background: var(--lcw-hover); color: var(--lcw-text-4); cursor: default; }
.lcw-send.is-waiting:not(:disabled) { opacity: .8; }
.lcw-legal { padding: 0 16px 10px; text-align: center; font-size: 11.5px; line-height: 16px; color: var(--lcw-text-4); }
.lcw-legal a { color: var(--lcw-text-3); text-decoration: underline; text-underline-offset: 2px; }

/* the tray (attachments before sending) */
.lcw-tray { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.lcw-tray-item { position: relative; flex: none; height: 64px; border-radius: 12px; background: var(--lcw-card); box-shadow: inset 0 0 0 1px var(--lcw-line-2); animation: lcw-pop .3s var(--lcw-spring) backwards; }
.lcw-tray-item.is-image { width: 64px; overflow: hidden; }
.lcw-tray-item.is-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.lcw-tray-file { display: flex; flex-direction: column; justify-content: center; width: 168px; height: 100%; padding: 8px 30px 8px 40px; position: relative; }
.lcw-tray-file > .lcw-i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--lcw-accent-text); width: 20px; height: 20px; }
.lcw-tray-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcw-tray-size { font-size: 11.5px; color: var(--lcw-text-3); }
.lcw-tray-item.is-error { box-shadow: inset 0 0 0 1.5px var(--lcw-danger); }
.lcw-tray-item.is-error .lcw-tray-size { color: var(--lcw-danger-text); font-weight: 600; }
.lcw-tray-progress { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(17, 19, 24, .38); border-radius: 12px; }
.lcw-tray-item:not(.is-image) .lcw-tray-progress { background: rgba(255, 255, 255, .55); }
.lcw-tray-item:not(.is-image) .lcw-pring { background: conic-gradient(var(--lcw-accent) calc(var(--p) * 1%), rgba(var(--lcw-accent-rgb), .18) 0); }
.lcw-tray-progress .lcw-pring { width: 26px; height: 26px; }
.lcw-tray-err { position: absolute; left: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--lcw-danger); color: #fff; }
.lcw-tray-item:not(.is-image) .lcw-tray-err { display: none; }
.lcw-tray-err .lcw-i { width: 13px; height: 13px; }
.lcw-tray-x, .lcw-tray-retry {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: rgba(17, 19, 24, .72); color: #fff; opacity: .92; transition: opacity .12s, transform .12s;
}
.lcw-tray-retry { right: 30px; background: var(--lcw-accent); }
.lcw-tray-x:hover, .lcw-tray-retry:hover { opacity: 1; transform: scale(1.08); }
.lcw-tray-x .lcw-i, .lcw-tray-retry .lcw-i { width: 12px; height: 12px; stroke-width: 2.6; }

/* drag and drop */
.lcw-drop { position: absolute; inset: 8px; z-index: 30; display: grid; place-items: center; border-radius: 16px; border: 2px dashed rgba(var(--lcw-accent-rgb), .6); background: rgba(255, 255, 255, .94); pointer-events: none; animation: lcw-fade .12s ease both; }
.lcw-drop-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--lcw-text-3); font-size: 13px; }
.lcw-drop-inner strong { color: var(--lcw-text); font-size: 15px; }
.lcw-drop-inner .lcw-i { width: 28px; height: 28px; color: var(--lcw-accent-text); margin-bottom: 6px; }

/* ------------------------------------------------------------------ pre-chat form */
.lcw-form { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.lcw-form-head h3 { font-size: 18px; line-height: 24px; font-weight: 650; letter-spacing: -.015em; }
.lcw-form-head p { margin-top: 4px; font-size: 13.5px; line-height: 20px; color: var(--lcw-text-3); }
.lcw-field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.lcw-label { display: flex; align-items: baseline; gap: 4px; font-size: 13px; font-weight: 600; color: var(--lcw-text-2); padding: 0; }
.lcw-req { color: var(--lcw-danger-text); }
.lcw-opt { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--lcw-text-4); }
.lcw-help { font-size: 12.5px; color: var(--lcw-text-3); margin-top: -2px; }
.lcw-control, .lcw-textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--lcw-line-2); background: var(--lcw-card); color: var(--lcw-text);
  font: inherit; font-size: 14.5px; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
select.lcw-control { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7180' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.lcw-textarea { height: auto; min-height: 72px; padding: 10px 12px; line-height: 20px; resize: vertical; }
.lcw-control::placeholder, .lcw-textarea::placeholder { color: var(--lcw-text-4); }
.lcw-control:hover, .lcw-textarea:hover { border-color: var(--gray-300, #D1D5DB); }
.lcw-control:focus, .lcw-textarea:focus, .lcw-control:focus-visible, .lcw-textarea:focus-visible { border-color: rgba(var(--lcw-accent-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--lcw-accent-rgb), .14); }
.lcw-control[aria-invalid="true"], .lcw-textarea[aria-invalid="true"] { border-color: var(--lcw-danger); box-shadow: 0 0 0 3px rgba(217, 45, 32, .1); }
.lcw-field-error { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; line-height: 17px; color: var(--lcw-danger-text); }
.lcw-field-error .lcw-i { width: 14px; height: 14px; margin-top: 1px; }
.lcw-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.lcw-choice { position: relative; }
.lcw-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lcw-choice span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--lcw-line-2); background: var(--lcw-card); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.lcw-choice:hover span { border-color: var(--gray-300, #D1D5DB); }
.lcw-choice input:checked + span { background: rgba(var(--lcw-accent-rgb), .09); border-color: rgba(var(--lcw-accent-rgb), .7); color: var(--lcw-accent-text); font-weight: 600; }
.lcw-choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(var(--lcw-accent-rgb), .25); }
.lcw-field.has-error .lcw-choice span { border-color: rgba(217, 45, 32, .5); }
.lcw-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 20px; color: var(--lcw-text-2); cursor: pointer; }
.lcw-check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 1px 0 0; flex: none; border: 1.5px solid var(--gray-300, #D1D5DB); border-radius: 5px; background: var(--lcw-card); display: grid; place-items: center; cursor: pointer; transition: background .12s, border-color .12s; }
.lcw-check input::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--lcw-on-accent); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .14s var(--lcw-spring); }
.lcw-check input:checked { background: var(--lcw-accent); border-color: var(--lcw-accent); }
.lcw-check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.lcw-check input[aria-invalid="true"] { border-color: var(--lcw-danger); }
.lcw-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.lcw-form-error { color: var(--lcw-danger-text); font-size: 13px; }
.lcw-form-foot { flex: none; padding: 12px 20px calc(14px + var(--lcw-safe-b, 0px)); border-top: 1px solid var(--lcw-line); background: var(--lcw-bg); display: flex; flex-direction: column; gap: 8px; }
.lcw-form-foot .lcw-btn { height: 46px; font-size: 15px; border-radius: 14px; }
.lcw-form-foot .lcw-legal { padding: 0; }

/* ------------------------------------------------------------------ preview card above the launcher */
.lcw-preview { position: fixed; right: var(--lcw-gap); bottom: calc(var(--lcw-gap) + var(--lcw-launcher) + 14px + var(--lcw-lift) + env(safe-area-inset-bottom, 0px)); width: 328px; max-width: calc(100vw - 2 * var(--lcw-gap)); opacity: 0; transform: translateY(10px) scale(.97); transform-origin: bottom right; transition: opacity .2s ease, transform .3s var(--lcw-ease); }
.lcw-preview.is-in { opacity: 1; transform: none; }
.lcw-preview-card {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-radius: 18px; text-align: left; cursor: pointer;
  background: var(--lcw-card); color: var(--lcw-text); box-shadow: 0 16px 40px -10px rgba(17, 19, 24, .26), 0 4px 10px -4px rgba(17, 19, 24, .08), 0 0 0 1px rgba(17, 19, 24, .06);
  transition: transform .2s var(--lcw-ease), box-shadow .2s;
}
@media (hover: hover) { .lcw-preview-card:hover { transform: translateY(-2px); } }
.lcw-preview-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lcw-preview-top { display: flex; align-items: baseline; gap: 6px; }
.lcw-preview-name { font-size: 13.5px; font-weight: 650; }
.lcw-preview-time { font-size: 12px; color: var(--lcw-text-3); }
.lcw-preview-text { font-size: 14px; line-height: 20px; color: var(--lcw-text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lcw-preview-x { position: absolute; top: -10px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--lcw-card); color: var(--lcw-text-3); box-shadow: 0 2px 8px rgba(17, 19, 24, .16), 0 0 0 1px rgba(17, 19, 24, .06); opacity: 0; transition: opacity .15s; }
.lcw-preview:hover .lcw-preview-x, .lcw-preview:focus-within .lcw-preview-x { opacity: 1; }
.lcw-preview-x .lcw-i { width: 14px; height: 14px; }
@media (hover: none) { .lcw-preview-x { opacity: 1; } }

/* ------------------------------------------------------------------ lightbox (near-black behind media is allowed, AG-5) */
.lcw-lightbox { position: fixed; inset: 0; z-index: 10; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; grid-template-rows: 64px minmax(0, 1fr) 24px; background: rgba(8, 10, 14, .94); color: #fff; opacity: 0; transition: opacity .18s ease; }
.lcw-lightbox.is-open { opacity: 1; }
.lcw-lb-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 24px; }
.lcw-lb-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcw-lb-count { font-size: 13px; color: rgba(255, 255, 255, .6); margin-right: 8px; font-variant-numeric: tabular-nums; }
.lcw-lb-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; text-decoration: none; }
.lcw-lb-btn:hover { background: rgba(255, 255, 255, .16); }
.lcw-lb-btn .lcw-i { width: 20px; height: 20px; }
.lcw-lb-stage { grid-column: 2; grid-row: 2; margin: 0; display: grid; place-items: center; min-height: 0; }
.lcw-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); animation: lcw-zoom .22s var(--lcw-ease) both; }
@keyframes lcw-zoom { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.lcw-lb-nav { grid-row: 2; align-self: center; justify-self: center; width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
@media (hover: hover) { .lcw-lb-nav:hover { background: rgba(255, 255, 255, .2); } }
.lcw-lb-nav:active, .lcw-lb-btn:active { background: rgba(255, 255, 255, .24); }
.lcw-lb-nav.is-prev { grid-column: 1; }
.lcw-lb-nav.is-next { grid-column: 3; }
.lcw-lb-nav .lcw-i { width: 24px; height: 24px; }
.lcw-lightbox :focus-visible { box-shadow: 0 0 0 2px rgba(8, 10, 14, 1), 0 0 0 4px #fff; }

/* ------------------------------------------------------------------ the website variant
   The same light Messenger as the Academy. Only the hero (the site's night with its champagne wordmark and serif), the
   type (the site's Manrope, already loaded there) and the depth change: over the dark pages the window and the launcher
   carry a deeper shadow and a faint light rim, so their edges read against black. */
.lcw-website {
  --lcw-font: var(--ivy-sans, "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --lcw-hero: #0B0E12;
  --lcw-hero-muted: rgba(226, 202, 155, .82);
  --lcw-shadow: 0 32px 80px -12px rgba(0, 0, 0, .7), 0 12px 28px -10px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .12);
  color-scheme: light;
}
.lcw-website .lcw-hero { background-image: radial-gradient(90% 80% at 85% 0%, rgba(55, 68, 85, .85), rgba(55, 68, 85, 0) 65%), radial-gradient(70% 70% at 0% 100%, rgba(var(--lcw-accent-rgb), .16), transparent 70%); }
.lcw-website .lcw-hero-title span:last-child { font-family: var(--ivy-serif, "Cormorant Garamond", Georgia, serif); font-weight: 600; font-size: 32px; line-height: 36px; letter-spacing: -.01em; }
.lcw-website .lcw-launcher { box-shadow: 0 14px 34px -8px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 28px -10px rgba(var(--lcw-accent-rgb), .6), inset 0 1px 0 rgba(255, 255, 255, .14); }
.lcw-website .lcw-launcher:focus-visible { box-shadow: 0 0 0 3px #0B0E12, 0 0 0 5px #F5DAA7; }
.lcw-website .lcw-badge { box-shadow: 0 0 0 2.5px #0B0E12; }
.lcw-website .lcw-preview-card { box-shadow: 0 24px 56px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .12); }
.lcw-website .lcw-preview-x { box-shadow: 0 2px 10px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .12); }

/* ------------------------------------------------------------------ small screens */
/* raised above the Academy's phone tab bar and the lesson dock */
@media (max-width: 1000px) { body.has-tabbar .lcw { --lcw-lift: 64px; } }
@media (max-width: 767px) { body:not(.has-tabbar).academy-portal .lcw { --lcw-lift: 60px; } }
body.nav-open .lcw-launcher, body.nav-open .lcw-preview { visibility: hidden; }

@media (max-width: 640px) {
  .lcw { --lcw-gap: 16px; --lcw-launcher: 54px; }
  .lcw-panel {
    inset: 0; right: 0; bottom: 0; width: 100%; height: var(--lcw-vvh, 100dvh); min-height: 0; border-radius: 0;
    --lcw-safe-b: env(safe-area-inset-bottom, 0px); padding-top: env(safe-area-inset-top, 0px);
    transform: translateY(24px); transform-origin: bottom center;
  }
  .lcw-left .lcw-panel { left: 0; }
  .lcw.is-open .lcw-launcher { opacity: 0; pointer-events: none; transform: scale(.6); }
  .lcw-hero { padding-top: calc(16px + env(safe-area-inset-top, 0px)); margin-top: calc(-1 * env(safe-area-inset-top, 0px)); }
  .lcw-bar { padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .lcw-lightbox { grid-template-columns: 0 minmax(0, 1fr) 0; grid-template-rows: calc(56px + env(safe-area-inset-top, 0px)) minmax(0, 1fr) calc(88px + env(safe-area-inset-bottom, 0px)); }
  .lcw-lb-bar { padding: env(safe-area-inset-top, 0px) 8px 0 16px; }
  .lcw-lb-nav { grid-row: 3; position: relative; }
  .lcw-lb-nav.is-prev { grid-column: 2; justify-self: start; margin-left: 24px; }
  .lcw-lb-nav.is-next { grid-column: 2; justify-self: end; margin-right: 24px; }
  .lcw-lb-stage { grid-column: 1 / -1; padding: 0 8px; }
  .lcw-msg-time { display: none; }
  .lcw-preview { right: 12px; left: 12px; width: auto; max-width: none; }
  .lcw-left .lcw-preview { left: 12px; }
  body.has-lcw .toast-stack { bottom: calc(var(--lcw-gap, 16px) + 70px + var(--lcw-lift, 0px)); }
}
@media (max-height: 560px) and (min-width: 641px) { .lcw-panel { min-height: 0; } }

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lcw *, .lcw *::before, .lcw *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .lcw-panel { transform: none !important; }
  .lcw-dots span { animation: none !important; opacity: .7; }
  .lcw-skel-b { animation: none !important; }
}

/* ------------------------------------------------------------------ print: never */
@media print { .lcw { display: none !important; } }

/* the host page's own heading and focus styles (the website's night headings, outlines) never reach the widget */
.lcw.lcw :is(h2, h3) { color: var(--lcw-text); font-family: inherit; text-transform: none; letter-spacing: inherit; }
.lcw.lcw .lcw-hero-title, .lcw.lcw .lcw-hero-title > span { color: var(--lcw-hero-text); }
.lcw.lcw .lcw-hero-title > .lcw-hero-hi { color: var(--lcw-hero-muted); }
.lcw.lcw :focus, .lcw.lcw :focus-visible { outline: none; }
.lcw.lcw .lcw-input:focus, .lcw.lcw .lcw-input:focus-visible { box-shadow: none; outline: none; }

/* "Not you? Start over" for a returning website visitor (LC6) */
.lcw-notyou { margin: 2px 4px 0; font-size: 13px; color: var(--lcw-text-2, #475467); }
.lcw-linkbtn { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--lcw-accent, #4F46E5);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.lcw-linkbtn:disabled { opacity: .6; cursor: default; }