/* Customer messenger. Tokens follow review/brand-kit.md: ink, action, paper, rule and canvas, the extension's
   resting surface, its blue-grey visitor message and pearl reply. Instrument Sans sets names and headings;
   Barlow sets reading and controls. */
@font-face {
  font-family: 'Instrument Sans';
  src: url('/instrument-sans-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url('/barlow-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url('/barlow-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url('/barlow-semibold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #20252c;
  --muted: #555d67;
  --rule: #d6dae0;
  --rule-strong: #bcc4ce;
  --paper: #f8f9fb;
  --page: #e5edf4;
  --panel: #f5f6f7;
  --surface: #fff;
  --action: #294e7a;
  --action-hover: #213f63;
  --on-action: #fff;
  --visitor: #e1e9f2;
  --pearl: #fffefc;
  --canvas: #252930;
  --canvas-end: #171a1f;
  --focus: #294e7a;
  --danger: #8f2424;
  --danger-wash: #fbeeee;
  --shadow-card: 0 1px 2px rgb(27 42 65 / 5%), 0 10px 26px -20px rgb(35 57 81 / 45%);
  --ui: Barlow, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  height: 100%;
  color: var(--ink);
  background: var(--page);
  font: 400 15px/1.45 var(--ui);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e9ecf0;
    --muted: #a7afba;
    --rule: #363c45;
    --rule-strong: #4a525d;
    --paper: #262b32;
    --page: #171a1f;
    --panel: #1b1f24;
    --surface: #22272e;
    --action: #bbd3f1;
    --action-hover: #d3e3f7;
    --on-action: #172231;
    --visitor: #2c3b4e;
    --pearl: #262b32;
    --focus: #bbd3f1;
    --danger: #ffb4ad;
    --danger-wash: #3a2224;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 30%);
  }
}
:root[data-mode='embedded'] {
  background: var(--panel);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  height: 100%;
  margin: 0;
}
h1,
h2,
p,
ol,
ul {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  background: none;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a {
  color: var(--action);
}
:is(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.ui-icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.startup {
  padding: 32px;
  color: var(--muted);
}

/* ---- Frame: a floating panel over a quiet page on the support host, the whole iframe when embedded ---- */
#app {
  height: 100%;
  display: grid;
}
:root[data-mode='page'] #app {
  display: block;
  height: auto;
  min-height: 100%;
}
.messenger {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
}
/* The panel matches support-widget.js: 400 px wide, above a launcher in the bottom-right corner. */
:root[data-mode='page'] .messenger {
  position: fixed;
  z-index: 20;
  right: max(24px, env(safe-area-inset-right, 0px));
  bottom: calc(max(24px, var(--safe-bottom)) + 72px);
  width: 400px;
  height: min(704px, calc(100dvh - 120px));
  min-height: 360px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow:
    0 30px 70px -28px rgb(35 57 81 / 50%),
    0 2px 10px rgb(27 42 65 / 8%);
  transform-origin: 100% 100%;
  transition:
    opacity 0.2s ease,
    transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1),
    visibility 0s;
}
:root[data-mode='page'][data-panel='closed'] .messenger {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transition:
    opacity 0.2s ease,
    transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1),
    visibility 0s linear 0.25s;
}
@media (max-width: 639px) {
  :root[data-mode='page'] .messenger {
    inset: 0;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ---- Page behind the panel ---- */
.site {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  padding: calc(24px + var(--safe-top)) clamp(20px, 5vw, 72px) calc(24px + var(--safe-bottom));
}
.site-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mark {
  display: block;
  flex: none;
  object-fit: contain;
}
/* The supplied blue mark on light surfaces, per the brand kit; dark surfaces keep its original blue. */
.site-mark,
.bar-mark {
  filter: brightness(0.62) saturate(1.55);
}
@media (prefers-color-scheme: dark) {
  .site-mark,
  .bar-mark {
    filter: none;
  }
}
.site-name {
  font: 600 18px/1 var(--display);
  letter-spacing: -0.02em;
}
.site-tag {
  padding-left: 10px;
  border-left: 1px solid var(--rule-strong);
  color: var(--muted);
  font: 500 16px/1 var(--display);
}
.site-main {
  align-self: center;
  max-width: 34rem;
  padding: 48px 0 64px;
}
.site-main h1 {
  font: 480 clamp(32px, 4.2vw, 50px)/1.06 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.site-main p {
  max-width: 30rem;
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.site-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 28px;
}
.site-open {
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  color: var(--on-action);
  background: var(--action);
  font-weight: 600;
}
.site-open:hover {
  background: var(--action-hover);
}
.site-link,
.site-foot a {
  color: var(--action);
  font-weight: 600;
  text-underline-offset: 3px;
}
.site-foot {
  font-size: 14px;
}
.site-foot a {
  color: var(--muted);
  font-weight: 500;
}
/* Leave room for the panel when the page is wide enough to show both. Narrower, the open panel would cover the
   copy, so the page keeps only its header and footer until the panel closes (the menu links the help center). */
@media (min-width: 1000px) {
  .site-main {
    margin-right: 440px;
  }
}
@media (max-width: 999px) {
  :root[data-mode='page'][data-panel='open'] .site-main {
    visibility: hidden;
  }
}

/* ---- Launcher (page mode; support-widget.js draws the same control on the marketing site) ----
   A white round button with one solid dark glyph, white in both schemes like the widget's. */
.launcher {
  position: fixed;
  z-index: 21;
  right: max(24px, env(safe-area-inset-right, 0px));
  bottom: max(24px, var(--safe-bottom));
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #20252c;
  background: #fff;
  box-shadow:
    0 8px 24px -6px rgb(23 26 31 / 32%),
    0 2px 6px rgb(23 26 31 / 12%),
    0 0 0 1px rgb(32 37 44 / 6%);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.launcher:hover {
  transform: scale(1.04);
  box-shadow:
    0 12px 30px -8px rgb(23 26 31 / 38%),
    0 2px 6px rgb(23 26 31 / 14%),
    0 0 0 1px rgb(32 37 44 / 6%);
}
.launcher:active {
  transform: scale(0.96);
}
.launcher:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.launcher-glyph {
  position: absolute;
  width: 28px;
  height: 28px;
  transition:
    opacity 0.2s ease,
    transform 0.3s ease;
}
.launcher-smile {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
}
.launcher-shut {
  width: 24px;
  height: 24px;
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}
:root[data-panel='open'] .launcher-chat {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}
:root[data-panel='open'] .launcher-shut {
  opacity: 1;
  transform: none;
}
.launcher-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e5534b;
}
:root[data-mode='page'][data-panel='open'] .site-open {
  display: none;
}
@media (max-width: 639px) {
  :root[data-mode='page'][data-panel='open'] .launcher {
    visibility: hidden;
  }
}

/* ---- Header bar ---- */
.bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 60px;
  padding: calc(8px + var(--safe-top)) 8px 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
:root[data-fullscreen='false'] .bar {
  padding-top: 8px;
}
.bar-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  padding-left: 4px;
}
.bar-copy {
  min-width: 0;
}
.bar h1 {
  overflow: hidden;
  font: 600 16px/1.2 var(--display);
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar p {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  color: var(--muted);
}
.icon-button:hover {
  color: var(--ink);
}
.icon-button.small {
  width: 28px;
  height: 28px;
}
.icon-button.small .ui-icon {
  width: 16px;
  height: 16px;
}
/* Home: the bar floats over the dark welcome so only its controls show. */
.messenger[data-view='home'] .bar {
  position: absolute;
  inset: 0 0 auto;
  background: transparent;
  border-color: transparent;
}
.messenger[data-view='home'] .bar-identity {
  visibility: hidden;
}
.messenger[data-view='home'] .bar .icon-button {
  color: #e8ecf1;
}
.messenger[data-view='home'] .bar .icon-button:hover {
  background: rgb(255 255 255 / 10%);
}
.messenger[data-view='home'] .bar .icon-button:focus-visible {
  outline-color: #bbd3f1;
}

.screens {
  position: relative;
  display: grid;
  min-height: 0;
  grid-row: 2;
}
.messenger[data-view='home'] .screens {
  grid-row: 1 / -1;
}
.screen {
  min-height: 0;
}

/* ---- Notices and menu ---- */
.notice {
  position: absolute;
  z-index: 6;
  top: 68px;
  left: 12px;
  right: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--paper);
  background: var(--ink);
  font-size: 14px;
  box-shadow: var(--shadow-card);
}
.notice.error {
  color: var(--danger);
  background: var(--danger-wash);
  border: 1px solid currentColor;
}
.menu {
  position: absolute;
  z-index: 7;
  top: 54px;
  right: 10px;
  min-width: 248px;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 40px -18px rgb(23 26 31 / 45%);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  text-align: start;
  font-size: 14.5px;
}
.menu-item span {
  flex: 1;
}
.menu-external {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.menu-item:hover,
.menu-item:focus {
  outline: none;
  background: var(--paper);
}
.menu-item:focus-visible {
  box-shadow: inset 0 0 0 2px var(--focus);
}

/* ---- Home ---- */
.home {
  overflow: auto;
  overscroll-behavior: contain;
}
.hero {
  padding: calc(66px + var(--safe-top)) 24px 54px;
  color: #f8f9fb;
  background:
    repeating-radial-gradient(
      ellipse 170px 100px at 108% -14%,
      transparent 0 12px,
      rgb(187 211 241 / 13%) 12.6px 13.3px,
      transparent 13.9px 24px
    ),
    radial-gradient(ellipse at 100% 0%, #31507a 0, transparent 62%),
    linear-gradient(160deg, var(--canvas) 10%, var(--canvas-end) 100%);
}
:root[data-fullscreen='false'] .hero {
  padding-top: 66px;
}
.hero-mark {
  width: 44px;
  height: 44px;
  margin-left: -4px;
}
.hero-team {
  margin-top: 18px;
  color: #c9cfd7;
  font-size: 14px;
  font-weight: 500;
}
.hero h2 {
  margin-top: 4px;
  font: 560 31px/1.1 var(--display);
  letter-spacing: -0.035em;
}
.hero h2:focus {
  outline: none;
}
.hero-sub {
  margin-top: 6px;
  color: #dde3ea;
  font: 450 19px/1.3 var(--display);
  letter-spacing: -0.02em;
}
.home-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: -26px;
  padding: 0 14px 20px;
}
.card {
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.start-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 16px 16px 18px;
  text-align: start;
}
.start-card:hover {
  border-color: var(--rule-strong);
}
.card-copy {
  display: grid;
  gap: 2px;
  flex: 1;
}
.card-copy strong,
.card-title {
  font: 600 16px/1.25 var(--display);
  letter-spacing: -0.015em;
}
.card-copy span {
  color: var(--muted);
  font-size: 14px;
}
.card-go {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--action);
  transition: transform 0.18s ease;
}
.start-card:hover .card-go {
  transform: translateX(3px);
}
.recent-card {
  padding: 12px 8px 8px;
}
.card-label {
  padding: 0 10px 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.see-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 2px;
  padding: 10px;
  border-top: 1px solid var(--rule);
  border-radius: 0 0 8px 8px;
  color: var(--action);
  font-weight: 600;
  font-size: 14px;
}
.see-all .ui-icon {
  width: 18px;
  height: 18px;
}
.icon-wrap {
  display: inline-flex;
}
.home-foot {
  padding: 6px 0 4px;
  text-align: center;
  font-size: 13.5px;
}

/* ---- Conversation rows ---- */
.conversation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  text-align: start;
}
.conversation-row:hover {
  background: var(--paper);
}
.row-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.row-top,
.row-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.row-subject {
  overflow: hidden;
  flex: 1;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-time {
  flex: none;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.row-preview {
  overflow: hidden;
  flex: 1;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-row[data-unread='true'] .row-preview {
  color: var(--ink);
  font-weight: 500;
}
.unread-dot {
  width: 9px;
  height: 9px;
  flex: none;
  align-self: center;
  border-radius: 50%;
  background: var(--action);
}

/* ---- Messages list ---- */
.list {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.conversations {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px;
}
.conversations li + li {
  border-top: 1px solid var(--rule);
}
.list-empty {
  padding: 32px 20px;
  color: var(--muted);
  text-align: center;
}
.list-foot {
  display: flex;
  justify-content: center;
  padding: 12px 12px calc(16px + var(--safe-bottom));
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--on-action);
  background: var(--action);
  font-weight: 600;
  box-shadow: 0 8px 20px -10px rgb(23 26 31 / 50%);
}
.pill:hover {
  background: var(--action-hover);
}

/* ---- Conversation ---- */
.thread {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto auto;
}
.scroller {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 14px 12px;
}
.scroller:focus-visible {
  outline-offset: -3px;
}
.older {
  display: block;
  margin: 4px auto 8px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--action);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
}
.log {
  display: flex;
  flex-direction: column;
}
.intro {
  display: grid;
  gap: 4px;
  margin: 18px 8px 8px;
  padding: 16px 18px;
  border: 1px dashed var(--rule-strong);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 14.5px;
}
.intro strong {
  color: var(--ink);
  font: 600 16px/1.3 var(--display);
}
.day {
  margin: 16px 0 6px;
  color: var(--muted);
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
}
.message {
  display: grid;
  margin-top: 3px;
}
.message[data-first='true'] {
  margin-top: 12px;
}
.message.mine {
  justify-items: end;
}
.sender {
  margin: 0 0 3px 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}
.message.mine .line {
  justify-content: flex-end;
}
.avatar-slot {
  width: 30px;
  flex: none;
}
/* Initials, where a photo is missing, sit in a plain ring: no colored discs. */
.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--muted);
  font: 650 11px/1 var(--display);
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bubble {
  max-width: min(84%, 320px);
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 18px;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.42;
}
.message.mine .bubble {
  max-width: min(84%, 320px);
  background: var(--visitor);
}
.message.team .bubble {
  border-color: var(--rule);
  background: var(--pearl);
}
.bubble p {
  white-space: pre-wrap;
}
.message.mine:not([data-last='true']) .bubble {
  border-bottom-right-radius: 6px;
}
.message.mine:not([data-first='true']) .bubble {
  border-top-right-radius: 6px;
}
.message.team:not([data-last='true']) .bubble {
  border-bottom-left-radius: 6px;
}
.message.team:not([data-first='true']) .bubble {
  border-top-left-radius: 6px;
}
.message[data-failed='true'] .bubble {
  border-color: var(--danger);
  border-style: dashed;
}
.image {
  display: block;
  margin-top: 6px;
}
.bubble > .image:first-child,
.bubble > .sr-only + .image {
  margin-top: 0;
}
.image img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  border-radius: 10px;
}
.image-pending {
  display: block;
  color: var(--muted);
  font-size: 13.5px;
}
.meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 4px 2px;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.message.team .meta {
  margin-left: 6px;
}
.message[data-photo='true'] .sender,
.message.team[data-photo='true'] .meta {
  margin-left: 42px;
}
.meta span + span::before,
.meta time + span::before {
  content: '·';
  margin-right: 6px;
}
.meta .seen {
  color: var(--action);
  font-weight: 600;
}
.meta .failed {
  color: var(--danger);
  font-weight: 600;
}
.meta .retry {
  padding: 2px 4px;
  color: var(--action);
  font-weight: 600;
  text-decoration: underline;
}
.inline-card {
  margin: 14px 0 4px;
}
.typing {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.dots {
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  background: var(--pearl);
}
.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1.2s infinite ease-in-out;
}
.dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typing {
  0%,
  60%,
  100% {
    opacity: 0.35;
  }
  30% {
    opacity: 1;
  }
}

/* ---- Sign-in ---- */
.signin-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}
.signin-card p {
  color: var(--muted);
  font-size: 14px;
}
.signin-card .fine {
  font-size: 12.5px;
}
.google-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  margin-top: 2px;
  padding: 9px 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  color: #1f1f1f;
  background: #fff;
  font-weight: 600;
}
.google-signin:hover {
  background: #f4f6f8;
}
.google-signin:disabled {
  opacity: 0.6;
}
.google-mark {
  width: 18px;
  height: 18px;
}
.signin-card .not-now {
  justify-self: start;
  padding: 2px 0;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.signin-card .signin-error {
  color: var(--danger);
}
.gate {
  padding: 0 12px 10px;
}
.gate .signin-card {
  gap: 6px;
  padding: 12px 14px;
}
.gate .signin-card > p:not(.fine):not(.signin-error) {
  display: none;
}

/* ---- Composer ---- */
.composer {
  padding: 10px 12px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--rule);
  background: var(--surface);
}
:root[data-fullscreen='false'] .composer {
  padding-bottom: 10px;
}
.compose-row {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 4px 4px 4px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 22px;
  background: var(--surface);
}
.compose-row:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 1px var(--focus);
}
.compose-row textarea:focus-visible {
  outline: none;
}
.compose-row textarea {
  flex: 1;
  min-width: 0;
  max-height: 148px;
  padding: 8px 0;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.4;
}
.compose-row textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
.compose-row .icon-button {
  width: 38px;
  height: 38px;
}
.send {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  color: var(--action);
}
.send:hover:not(:disabled) {
  color: var(--action-hover);
}
.send:disabled {
  color: var(--rule-strong);
}
.compose-note {
  margin: 8px 6px 0;
  color: var(--muted);
  font-size: 12.5px;
}
.attachment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  font-size: 13.5px;
}
.attachment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Dialogs (profile, privacy, email, sign out) ---- */
dialog {
  width: min(380px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 60px -24px rgb(23 26 31 / 55%);
}
dialog::backdrop {
  background: rgb(23 26 31 / 42%);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.dialog-head h2 {
  font: 600 18px/1.25 var(--display);
  letter-spacing: -0.02em;
}
#modal-body {
  display: grid;
  gap: 10px;
}
#modal-body form {
  display: grid;
  gap: 8px;
}
#modal-body label {
  font-size: 14px;
  font-weight: 600;
}
#modal-body :is(input, select, textarea) {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--rule-strong);
  border-radius: 9px;
  background: var(--surface);
}
.dialog-hint {
  color: var(--muted);
  font-size: 14px;
}
.dialog-error {
  margin-top: 8px;
  color: var(--danger);
  font-size: 14px;
}
.dialog-error:empty {
  display: none;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
#modal-body button.action,
#modal-body button.secondary {
  padding: 9px 14px;
  border-radius: 9px;
  font-weight: 600;
}
#modal-body button.action {
  color: var(--on-action);
  background: var(--action);
}
#modal-body button.secondary {
  border: 1px solid var(--rule-strong);
  background: var(--surface);
}
#modal-body .text-action {
  justify-self: start;
  padding: 4px 0;
  color: var(--action);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.profile-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.privacy-receipts {
  display: grid;
  gap: 10px;
}
.privacy-receipts code {
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .dots i {
    animation: none;
    opacity: 0.7;
  }
  :root[data-mode='page'] .messenger,
  :root[data-mode='page'][data-panel='closed'] .messenger {
    transform: none;
    transition:
      opacity 0.12s linear,
      visibility 0s linear 0.12s;
  }
  :root[data-mode='page'][data-panel='open'] .messenger {
    transition: opacity 0.12s linear;
  }
  .card-go {
    transition: none;
  }
  .launcher,
  .launcher-glyph {
    transition: opacity 0.12s linear;
  }
  .launcher:hover,
  .launcher-shut,
  :root[data-panel='open'] .launcher-chat {
    transform: none;
  }
  .start-card:hover .card-go {
    transform: none;
  }
}
@media (forced-colors: active) {
  .bubble,
  .card,
  .compose-row,
  .dots,
  .menu {
    border: 1px solid CanvasText;
  }
  .pill,
  .site-open,
  .launcher {
    border: 1px solid ButtonText;
  }
  .launcher-dot {
    background: Highlight;
  }
  .unread-dot {
    background: Highlight;
  }
}
