/* chat.css — Make Me A Proposal concierge chat
   All concierge styles live here. Uses the site design tokens from app.css
   (--ink, --ink-2, --sage, --paper, --paper-tint, --pine, --line, --muted,
   --font-display, --font-ui). No sparkle icons; the launcher is a paper chat
   glyph on ink. No em dashes in any copy. */

:root {
  --mmap-z: 2147000000;
  --mmap-on-dark: #F4F1E7;
  --mmap-on-dark-soft: rgba(244, 241, 231, .74);
  --mmap-ink-text: #1A241D;
}

/* ---- Launcher pill ---- */
.mmap-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: var(--mmap-z);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  /* Paper launcher: the ink circle vanished on the dark hero (Adam, mobile). */
  background: #FFFFFF;
  color: var(--ink, #0E1B14);
  border: 1px solid rgba(14, 27, 20, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(14, 27, 20, .34);
  transition: transform .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.mmap-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(14, 27, 20, .34); }
.mmap-launcher:active { transform: translateY(0); }
.mmap-launcher svg { width: 27px; height: 27px; display: block; }
.mmap-launcher .mmap-dot {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sage, #A9C79B);
  border: 2px solid var(--ink, #0E1B14);
}
.mmap-launcher:focus-visible { outline: 3px solid var(--sage, #A9C79B); outline-offset: 3px; }
.mmap-launcher[hidden] { display: none; }

/* ---- Panel ---- */
.mmap-chat {
  position: fixed;
  box-sizing: border-box;
  right: 22px;
  bottom: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: var(--mmap-z);
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100dvh - 44px);
  background: var(--paper-tint, #F3F6F2);
  border: 1px solid var(--line, #E3E8E1);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(14, 27, 20, .32);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  opacity: 0;
  transform: scale(.92) translateY(16px);
  visibility: hidden;
  pointer-events: none;
  /* Slower, softer open (Adam: the snap-open felt abrupt). */
  transition: opacity .42s cubic-bezier(.22, .9, .3, 1), transform .42s cubic-bezier(.22, .9, .3, 1), visibility .42s;
  font-family: var(--font-ui, sans-serif);
}
.mmap-chat.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  visibility: visible;
  pointer-events: auto;
}

/* ---- Header ---- */
.mmap-head {
  background: var(--ink, #0E1B14);
  color: var(--mmap-on-dark);
  padding: 15px 16px 13px;
  flex: 0 0 auto;
}
.mmap-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mmap-min { margin-left: auto; }
.mmap-title {
  font-family: var(--font-display, sans-serif);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -.01em;
  margin: 0;
  line-height: 1.15;
  color: var(--mmap-on-dark);
}
.mmap-sub {
  margin: 3px 0 0;
  font-size: .78rem;
  color: var(--mmap-on-dark-soft);
}
.mmap-sub a { color: var(--sage, #A9C79B); text-decoration: none; border-bottom: 1px solid rgba(169, 199, 155, .4); }
.mmap-sub a:hover { border-bottom-color: var(--sage, #A9C79B); }
.mmap-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-dark, rgba(169, 199, 155, .16));
  background: transparent;
  color: var(--mmap-on-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.mmap-close:hover { background: rgba(169, 199, 155, .12); }
.mmap-close svg { width: 16px; height: 16px; }

/* Desk link (signed-in only): the chat sheet covers the site nav on mobile, so
   this is the signed-in user's route to the dashboard. */
.mmap-desk {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--sage, #A9C79B);
  border: 1px solid rgba(169, 199, 155, .34);
  border-radius: 999px;
  padding: 6px 12px;
  transition: background .15s ease, border-color .15s ease;
}
.mmap-desk:hover { background: rgba(169, 199, 155, .12); border-color: var(--sage, #A9C79B); }
.mmap-desk svg { width: 14px; height: 14px; }
.mmap-desk[hidden] { display: none; }

/* ---- Messages ---- */
.mmap-log {
  flex: 1 1 auto;
  min-height: 0; /* let the log shrink below its content so overflow-y actually scrolls */
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}
/* The log is a flex column with a bounded height, so its children would SHRINK
   to fit rather than scroll (the tallest card, the recap, collapsed to a line).
   Pin every entry to its natural height and let the log scroll. */
.mmap-log > * { flex: 0 0 auto; }
.mmap-msg { display: flex; }
.mmap-msg.user { justify-content: flex-end; }
.mmap-msg.assistant { justify-content: flex-start; }
.mmap-bubble {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: .95rem;
  line-height: 1.42;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.mmap-msg.assistant .mmap-bubble {
  background: var(--ink-2, #15291E);
  color: var(--mmap-on-dark);
  border-bottom-left-radius: 5px;
}
/* A widget answer plus its "Change this" affordance, stacked and right-aligned. */
.mmap-usercol { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 84%; }
.mmap-usercol .mmap-bubble { max-width: 100%; }
.mmap-change {
  background: none;
  border: none;
  font: 500 .74rem/1 var(--font-ui, sans-serif);
  color: var(--muted, #5F6B60);
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 4px;
}
.mmap-change:hover { color: var(--pine, #25543B); }
.mmap-msg.user .mmap-bubble {
  background: #fff;
  color: var(--mmap-ink-text);
  border: 1px solid var(--line, #E3E8E1);
  border-bottom-right-radius: 5px;
}
/* Formatted assistant copy (bold + short lists) instead of raw markdown. */
.mmap-bubble.mmap-rich { white-space: normal; }
.mmap-bubble.mmap-rich p { margin: 0 0 .5em; }
.mmap-bubble.mmap-rich p:last-child { margin-bottom: 0; }
.mmap-bubble.mmap-rich strong { font-weight: 600; color: #fff; }
.mmap-ul { margin: 0 0 .5em; padding: 0; list-style: none; }
.mmap-ul:last-child { margin-bottom: 0; }
.mmap-ul li { position: relative; padding-left: 14px; margin-bottom: 3px; }
.mmap-ul li:before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage, #A9C79B);
}

.mmap-note {
  align-self: center;
  max-width: 90%;
  text-align: center;
  font-size: .82rem;
  color: var(--muted, #5F6B60);
  padding: 4px 6px;
}
.mmap-note a { color: var(--pine, #25543B); }

/* ---- Typing indicator ---- */
.mmap-typing { display: flex; gap: 4px; padding: 12px 14px; }
.mmap-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--sage, #A9C79B);
  opacity: .5;
  animation: mmap-bounce 1.1s infinite ease-in-out;
}
.mmap-typing span:nth-child(2) { animation-delay: .15s; }
.mmap-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mmap-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* ---- Widgets (options, upload, auth, submit) ---- */
.mmap-widget {
  align-self: flex-start;
  max-width: 92%;
  width: 92%;
  background: #fff;
  border: 1px solid var(--line, #E3E8E1);
  border-radius: 16px;
  padding: 13px;
}
.mmap-widget-q { font-size: .9rem; font-weight: 600; color: var(--mmap-ink-text); margin: 0 0 10px; }

/* chips */
.mmap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Confirm row under multi-select pills: clear separation from the choices. */
.mmap-chips + .mmap-chips { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #E3E8E1); }
.mmap-chip {
  font-family: var(--font-ui, sans-serif);
  font-size: .9rem;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line, #E3E8E1);
  background: var(--paper-tint, #F3F6F2);
  color: var(--mmap-ink-text);
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}
.mmap-chip:hover { border-color: var(--pine, #25543B); background: #fff; }
.mmap-chip:disabled { opacity: .5; cursor: default; }
.mmap-chip.picked { background: var(--ink, #0E1B14); color: var(--mmap-on-dark); border-color: var(--ink, #0E1B14); }
.mmap-chip-done { background: var(--pine, #25543B); color: #fff; border-color: var(--pine, #25543B); font-weight: 600; }
.mmap-chip-done:hover { background: var(--ink, #0E1B14); border-color: var(--ink, #0E1B14); color: #fff; }
.mmap-chip-done:disabled { opacity: .45; }

/* choice cards (design-direction / taste picker) */
.mmap-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mmap-choice {
  font-family: var(--font-ui, sans-serif);
  text-align: left;
  min-height: 74px;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line, #E3E8E1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  transition: box-shadow .14s ease, transform .12s ease;
}
.mmap-choice:hover { transform: translateY(-1px); }
.mmap-choice:disabled { cursor: default; opacity: .55; }
.mmap-choice.sel { box-shadow: 0 0 0 2.5px var(--sage, #A9C79B); }
.mmap-choice.sel:disabled { opacity: 1; }
.mmap-choice-sample { font-size: 1.05rem; line-height: 1.1; display: block; }
.mmap-choice-meta { display: block; }
.mmap-choice-label { display: block; font-weight: 600; font-size: .82rem; }
.mmap-choice-desc { display: block; font-size: .72rem; opacity: .72; margin-top: 1px; }
.mmap-choice-confirm { margin-top: 14px; }

/* card treatments (each option previews its own look) */
.mmap-choice.ink { background: var(--ink, #0E1B14); color: var(--mmap-on-dark); border-color: var(--ink, #0E1B14); }
.mmap-choice.ink .mmap-choice-sample { font-family: var(--font-display, sans-serif); font-weight: 600; letter-spacing: -.01em; }
.mmap-choice.ink .mmap-choice-desc { color: var(--mmap-on-dark-soft); opacity: 1; }

.mmap-choice.warm { background: #EFE7D8; color: #2c2318; border-color: #e3d9c5; }
.mmap-choice.warm .mmap-choice-sample { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.1rem; }

.mmap-choice.editorial { background: #fff; color: var(--mmap-ink-text); border-color: var(--line, #E3E8E1); border-top: 3px solid var(--pine, #25543B); }
.mmap-choice.editorial .mmap-choice-sample { font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; }

.mmap-choice.minimal { background: #fff; color: var(--mmap-ink-text); }
.mmap-choice.minimal .mmap-choice-sample { font-family: var(--font-ui, sans-serif); font-weight: 500; text-transform: uppercase; letter-spacing: .07em; font-size: .82rem; }

.mmap-choice.bold { background: var(--sage, #A9C79B); color: var(--ink, #0E1B14); border-color: var(--sage, #A9C79B); }
.mmap-choice.bold .mmap-choice-sample { font-family: var(--font-display, sans-serif); font-weight: 600; font-size: 1.25rem; letter-spacing: -.01em; }

.mmap-choice.playful { background: var(--paper-tint, #F3F6F2); color: var(--pine, #25543B); }
.mmap-choice.playful .mmap-choice-sample { font-family: var(--font-ui, sans-serif); font-weight: 600; }
.mmap-choice.playful .mmap-choice-label { color: var(--mmap-ink-text); }

@media (max-width: 340px) {
  .mmap-choices { grid-template-columns: 1fr; }
}

/* upload tile */
.mmap-drop {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1.5px dashed var(--line, #E3E8E1);
  border-radius: 12px;
  padding: 13px;
  cursor: pointer;
  background: var(--paper-tint, #F3F6F2);
  transition: border-color .14s ease;
}
.mmap-drop:hover { border-color: var(--pine, #25543B); }
.mmap-drop svg { width: 22px; height: 22px; color: var(--pine, #25543B); flex: 0 0 auto; }
.mmap-drop-txt { font-size: .88rem; color: var(--mmap-ink-text); }
.mmap-drop-txt small { display: block; color: var(--muted, #5F6B60); font-size: .76rem; margin-top: 1px; }
.mmap-skip {
  margin-top: 9px;
  background: none;
  border: none;
  color: var(--muted, #5F6B60);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
}
.mmap-skip:hover { color: var(--pine, #25543B); }
.mmap-werr { color: #9a2b2b; font-size: .8rem; margin-top: 8px; }

/* auth card */
.mmap-auth label { display: block; font-size: .8rem; font-weight: 600; color: var(--mmap-ink-text); margin: 0 0 4px; }
.mmap-auth input {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px; /* 16px+ so iOS does not auto-zoom */
  font-family: var(--font-ui, sans-serif);
  padding: 11px 12px;
  border: 1.5px solid var(--line, #E3E8E1);
  border-radius: 11px;
  background: #fff;
  color: var(--mmap-ink-text);
  margin-bottom: 10px;
}
.mmap-auth input:focus { outline: none; border-color: var(--pine, #25543B); }
.mmap-btn {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-ui, sans-serif);
  font-size: .95rem;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mmap-btn-ink { background: var(--ink, #0E1B14); color: var(--mmap-on-dark); }
.mmap-btn-ink:hover { background: #16281d; }
.mmap-btn-google {
  background: #fff;
  color: var(--mmap-ink-text);
  border: 1.5px solid var(--line, #E3E8E1);
  margin-top: 9px;
}
.mmap-btn-google:hover { border-color: var(--pine, #25543B); }
.mmap-btn-google svg { width: 17px; height: 17px; }
.mmap-btn:disabled { opacity: .6; cursor: default; }
.mmap-divider { text-align: center; font-size: .76rem; color: var(--muted, #5F6B60); margin: 11px 0 2px; }

/* "Something else" escape: an inline answer field under any chip set, so a
   none-of-these answer costs no extra turn. */
.mmap-else { display: flex; gap: 8px; margin-top: 11px; }
.mmap-else[hidden] { display: none; }
.mmap-else-in {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  font-size: 16px; /* 16px+ so iOS does not auto-zoom */
  font-family: var(--font-ui, sans-serif);
  color: var(--mmap-ink-text);
  background: #fff;
  border: 1.5px solid var(--line, #E3E8E1);
  border-radius: 11px;
  padding: 10px 12px;
  min-height: 44px;
}
.mmap-else-in:focus { outline: none; border-color: var(--pine, #25543B); }
.mmap-else-go {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--ink, #0E1B14);
  color: var(--mmap-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mmap-else-go:hover { background: #16281d; }
.mmap-else-go:disabled { opacity: .55; cursor: default; }
.mmap-else-go svg { width: 17px; height: 17px; }

/* timeline picker: real dates, with a loose option per half */
.mmap-dates-row + .mmap-dates-row { margin-top: 13px; }
.mmap-dates-label {
  display: block;
  font: 600 .6875rem/1 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pine, #25543B);
  margin-bottom: 6px;
}
.mmap-dates-row { min-width: 0; }
.mmap-dates-input {
  display: block;
  width: 100%;
  max-width: 100%;
  /* iOS Safari sizes a native date input to its own intrinsic content width and
     refuses to shrink, so the field ran outside the widget card. Dropping the
     native appearance and clearing the min-width is what lets width:100% win
     (Adam 2026-07-21). */
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  box-sizing: border-box;
  font-size: 16px; /* 16px+ so iOS does not auto-zoom */
  font-family: var(--font-ui, sans-serif);
  color: var(--mmap-ink-text);
  background: #fff;
  border: 1.5px solid var(--line, #E3E8E1);
  border-radius: 11px;
  padding: 10px 12px;
  min-height: 44px;
}
.mmap-dates-input::-webkit-date-and-time-value { text-align: left; margin: 0; }
/* appearance:none costs us iOS's own empty text and glyph, so both are drawn
   here instead, layered behind the (transparent when empty) input. */
.mmap-dates-field { position: relative; min-width: 0; }
.mmap-dates-input { position: relative; z-index: 1; background: transparent; padding-right: 40px; }
.mmap-dates-field:before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: 11px;
}
.mmap-dates-ph,
.mmap-dates-cal {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted, #5F6B60);
}
.mmap-dates-input:not(.has-value)::-webkit-datetime-edit { opacity: 0; }
.mmap-dates-ph { left: 13px; font: 400 16px/1 var(--font-ui, sans-serif); }
.mmap-dates-ph[hidden] { display: none; }
.mmap-dates-cal { right: 13px; opacity: .55; display: flex; }
.mmap-dates-cal svg { width: 17px; height: 17px; }
.mmap-dates-input::-webkit-calendar-picker-indicator { opacity: 0; }
.mmap-dates-input:focus { outline: none; border-color: var(--pine, #25543B); }
.mmap-dates-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.mmap-dates-chip { font-size: .82rem; padding: 7px 12px; }
.mmap-dates .mmap-btn-ink { margin-top: 14px; }

/* recap: the close-out brief, styled like a document rather than a chat bubble */
.mmap-recap {
  width: 96%;
  max-width: 96%;
  padding: 0;
  overflow: hidden;
  border-color: rgba(14, 27, 20, .14);
}
.mmap-recap-kicker {
  margin: 0;
  padding: 11px 15px 9px;
  background: var(--ink, #0E1B14);
  color: var(--sage, #A9C79B);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.mmap-recap-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--mmap-ink-text);
  margin: 0;
  padding: 13px 15px 11px;
}
.mmap-recap-list { border-top: 1px solid var(--line, #E3E8E1); }
.mmap-recap-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 15px;
  border-bottom: 1px solid rgba(227, 232, 225, .7);
}
.mmap-recap-row:last-child { border-bottom: none; }
.mmap-recap-k {
  flex: 0 0 34%;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted, #5F6B60);
}
.mmap-recap-v {
  flex: 1 1 auto;
  font-size: .9rem;
  line-height: 1.35;
  color: var(--mmap-ink-text);
  word-wrap: break-word;
}
.mmap-recap .mmap-btn-ink { width: calc(100% - 30px); margin: 13px 15px 0; }
.mmap-recap .mmap-skip { display: block; margin: 9px auto 13px; }

/* desk created: the route to the dashboard, inside the chat */
.mmap-deskcard {
  align-self: flex-start;
  width: 96%;
  max-width: 96%;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  background: var(--paper-tint, #F3F6F2);
  border: 1px solid var(--line, #E3E8E1);
  border-radius: 16px;
  padding: 13px 14px;
}
.mmap-deskcard-ico {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink, #0E1B14);
  color: var(--sage, #A9C79B);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mmap-deskcard-ico svg { width: 15px; height: 15px; }
.mmap-deskcard-copy { flex: 1 1 150px; min-width: 0; }
.mmap-deskcard-t { margin: 0; font-weight: 600; font-size: .92rem; color: var(--mmap-ink-text); }
.mmap-deskcard-s { margin: 2px 0 0; font-size: .78rem; color: var(--muted, #5F6B60); word-wrap: break-word; }
.mmap-deskcard-btn {
  flex: 1 1 100%;
  text-align: center;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 600;
  color: var(--mmap-on-dark);
  background: var(--ink, #0E1B14);
  border-radius: 11px;
  padding: 10px 14px;
}
.mmap-deskcard-btn:hover { background: #16281d; }

/* submit success */
.mmap-done {
  align-self: flex-start;
  width: 96%;
  max-width: 96%;
  box-sizing: border-box;
  background: var(--ink, #0E1B14);
  color: var(--mmap-on-dark);
  border-radius: 16px;
  padding: 15px 16px;
}
.mmap-done .mmap-done-t { font-family: var(--font-display, sans-serif); font-weight: 600; font-size: 1.05rem; margin: 0 0 4px; }
.mmap-done .mmap-done-s { font-size: .86rem; color: var(--mmap-on-dark-soft); margin: 0; }
.mmap-done a { color: var(--sage, #A9C79B); }
/* Specificity: .mmap-done a (sage text) would otherwise win over this button. */
.mmap-done a.mmap-done-btn {
  display: block;
  margin-top: 12px;
  text-align: center;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink, #0E1B14);
  background: var(--sage, #A9C79B);
  border-radius: 11px;
  padding: 10px 14px;
}
.mmap-done a.mmap-done-btn:hover { background: #b9d4ac; }

/* resolved-tool summary chip */
.mmap-resolved {
  align-self: flex-end;
  font-size: .82rem;
  color: var(--muted, #5F6B60);
  background: #fff;
  border: 1px solid var(--line, #E3E8E1);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ---- Composer ---- */
.mmap-composer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line, #E3E8E1);
  background: #fff;
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.mmap-input {
  flex: 1 1 auto;
  resize: none;
  border: 1.5px solid var(--line, #E3E8E1);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 16px; /* 16px+ so iOS does not auto-zoom */
  font-family: var(--font-ui, sans-serif);
  line-height: 1.4;
  max-height: 120px;
  color: var(--mmap-ink-text);
  background: #fff;
}
.mmap-input:focus { outline: none; border-color: var(--pine, #25543B); }
.mmap-input:disabled { background: var(--paper-tint, #F3F6F2); color: var(--muted, #5F6B60); }
.mmap-send {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--ink, #0E1B14);
  color: var(--mmap-on-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, opacity .15s ease;
}
.mmap-send:hover { background: #16281d; }
.mmap-send:disabled { opacity: .4; cursor: default; }
.mmap-send svg { width: 19px; height: 19px; }

/* busy spinner shared */
.mmap-spin {
  width: 16px; height: 16px;
  border: 2px solid rgba(244, 241, 231, .35);
  border-top-color: var(--mmap-on-dark);
  border-radius: 50%;
  animation: mmap-rot .7s linear infinite;
}
.mmap-spin.dark { border-color: rgba(14, 27, 20, .2); border-top-color: var(--ink, #0E1B14); }
@keyframes mmap-rot { to { transform: rotate(360deg); } }

/* ---- Mobile: full-screen sheet ---- */
@media (max-width: 720px) {
  .mmap-chat {
    right: 0;
    bottom: 0;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    border: none;
    transform-origin: center;
    transform: scale(1) translateY(14px);
  }
  .mmap-chat.open { transform: translateY(0); }
  .mmap-head { padding-top: calc(15px + env(safe-area-inset-top, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .mmap-chat, .mmap-launcher, .mmap-typing span, .mmap-spin { transition: none; animation: none; }
}

/* ---- Intake chooser modal ----
   Shown when a CTA is clicked and no conversation exists yet: chat or walkthrough.
   Light card on an ink scrim (the site's light world), Clash Display heading with a
   pine accent span. No italic accent word (DESIGN.md: the italic serif was the
   "Claude tell"), no sparkle glyphs. */
.mmap-choose {
  position: fixed;
  inset: 0;
  z-index: calc(var(--mmap-z) + 10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mmap-choose[hidden] { display: none; }
.mmap-choose-scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 27, 20, .62);
  opacity: 0;
  transition: opacity .18s ease;
}
.mmap-choose.is-open .mmap-choose-scrim { opacity: 1; }
.mmap-choose-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #FFFFFF;
  color: var(--mmap-ink-text);
  border: 1px solid var(--line, #E4DED0);
  border-radius: 22px;
  padding: 34px 32px 30px;
  box-shadow: 0 24px 60px rgba(14, 27, 20, .3);
  transform: translateY(10px) scale(.985);
  opacity: 0;
  transition: transform .2s cubic-bezier(.2, .7, .3, 1), opacity .2s ease;
}
.mmap-choose.is-open .mmap-choose-card { transform: none; opacity: 1; }
.mmap-choose-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted, #5F6B60);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mmap-choose-x:hover { background: var(--paper-tint, #F3F6F2); color: var(--ink, #0E1B14); }
.mmap-choose-x svg { width: 18px; height: 18px; }
.mmap-choose-eyebrow {
  margin: 0 0 12px;
  font: 600 .75rem/1 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--pine, #25543B);
}
.mmap-choose-title {
  margin: 0 0 10px;
  font: 600 clamp(1.6rem, 4.4vw, 2.05rem)/1.1 var(--font-display);
  letter-spacing: -.02em;
  color: var(--ink, #0E1B14);
}
.mmap-choose-accent { color: var(--pine, #25543B); }
.mmap-choose-sub {
  margin: 0 0 24px;
  font: 400 1rem/1.5 var(--font-ui);
  color: var(--muted, #5F6B60);
}
.mmap-choose-opts { display: grid; gap: 12px; }
.mmap-pick {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  text-align: left;
  padding: 17px 18px;
  border: 1px solid var(--line, #E4DED0);
  border-radius: 15px;
  background: #FFFFFF;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.mmap-pick:hover {
  border-color: var(--pine, #25543B);
  background: var(--paper-tint, #F3F6F2);
  transform: translateY(-1px);
}
.mmap-pick:focus-visible { outline: 2px solid var(--pine, #25543B); outline-offset: 2px; }
.mmap-pick-ico {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--paper-tint, #F3F6F2);
  color: var(--pine, #25543B);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mmap-pick:hover .mmap-pick-ico { background: #FFFFFF; }
.mmap-pick-ico svg { width: 23px; height: 23px; }
.mmap-pick-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mmap-pick-title {
  font: 600 1.0625rem/1.25 var(--font-ui);
  color: var(--ink, #0E1B14);
}
.mmap-pick-sub {
  font: 400 .9375rem/1.4 var(--font-ui);
  color: var(--muted, #5F6B60);
}
.mmap-pick-go { flex: none; color: var(--muted, #5F6B60); display: flex; }
.mmap-pick-go svg { width: 20px; height: 20px; }
.mmap-pick:hover .mmap-pick-go { color: var(--pine, #25543B); }

@media (max-width: 560px) {
  .mmap-choose { padding: 0; align-items: flex-end; }
  .mmap-choose-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateY(16px);
  }
  .mmap-pick { padding: 15px 15px; gap: 13px; }
  .mmap-pick-ico { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .mmap-choose-scrim, .mmap-choose-card { transition: none; }
}

/* ---- look_up_site widget ---- */
.mmap-look-row { display: flex; gap: 8px; margin-bottom: 10px; }
.mmap-look-url {
  flex: 1 1 auto;
  min-width: 0;
  font: 400 1rem/1.3 var(--font-ui);   /* 16px: below this iOS zooms the page */
  color: var(--mmap-ink-text);
  background: #FFFFFF;
  border: 1px solid rgba(14, 27, 20, .16);
  border-radius: 11px;
  padding: 11px 13px;
  outline: none;
}
.mmap-look-url:focus { border-color: var(--pine, #25543B); box-shadow: 0 0 0 3px rgba(169, 199, 155, .32); }
.mmap-look-go {
  flex: none;
  font: 600 .9375rem/1 var(--font-ui);
  color: #F4F1E7;
  background: var(--ink, #0E1B14);
  border: 0;
  border-radius: 11px;
  padding: 0 15px;
  min-height: 44px;
  cursor: pointer;
}
.mmap-look-go:disabled { opacity: .55; cursor: default; }
.mmap-look-status { font: 500 .8125rem/1.4 var(--font-ui); color: var(--muted, #5F6B60); margin-bottom: 8px; }
.mmap-look-status[hidden] { display: none; }
.mmap-look-status.is-warn { color: #B4432F; }
.mmap-look-card {
  background: #FFFFFF;
  border: 1px solid rgba(14, 27, 20, .14);
  border-radius: 13px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mmap-look-card[hidden] { display: none; }
.mmap-look-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
/* Logo slot inside the lookup card: preview + upload/replace in one row. The
   lookup reads names well and logos badly, so the fallback lives right here. */
.mmap-logoslot {
  display: flex;
  align-items: center;
  gap: 11px;
  background: #FFFFFF;
  border: 1px dashed rgba(14, 27, 20, .22);
  border-radius: 11px;
  padding: 10px 11px;
}
.mmap-logoslot.has-logo { border-style: solid; border-color: rgba(14, 27, 20, .16); }
.mmap-logoslot-thumb {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 9px;
  background: var(--paper-tint, #F3F6F2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.mmap-logoslot-thumb img { display: none; max-width: 32px; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.mmap-logoslot-thumb svg { width: 18px; height: 18px; color: var(--muted, #5F6B60); opacity: .6; }
.mmap-logoslot.has-logo .mmap-logoslot-thumb img { display: block; }
.mmap-logoslot.has-logo .mmap-logoslot-thumb svg { display: none; }
.mmap-logoslot-copy { flex: 1 1 auto; min-width: 0; }
.mmap-logoslot-t { margin: 0; font: 600 .875rem/1.2 var(--font-ui); color: var(--mmap-ink-text); }
.mmap-logoslot-s { margin: 2px 0 0; font: 400 .76rem/1.35 var(--font-ui); color: var(--muted, #5F6B60); }
.mmap-logoslot-btn {
  flex: none;
  font: 600 .8125rem/1 var(--font-ui);
  color: var(--mmap-ink-text);
  background: var(--paper-tint, #F3F6F2);
  border: 1px solid rgba(14, 27, 20, .16);
  border-radius: 999px;
  padding: 9px 14px;
  min-height: 38px;
  cursor: pointer;
}
.mmap-logoslot-btn:hover { border-color: var(--pine, #25543B); }
.mmap-logoslot-btn:disabled { opacity: .6; cursor: default; }
.mmap-look-caption { font: 400 .8125rem/1.4 var(--font-ui); color: var(--muted, #5F6B60); }
.mmap-look-label {
  font: 600 .6875rem/1 var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pine, #25543B);
}
.mmap-look-field {
  width: 100%;
  font: 400 1rem/1.4 var(--font-ui);
  color: var(--mmap-ink-text);
  background: #FFFFFF;
  border: 1px solid rgba(14, 27, 20, .16);
  border-radius: 10px;
  padding: 9px 11px;
  outline: none;
}
.mmap-look-field:focus { border-color: var(--pine, #25543B); }
.mmap-look-desc { min-height: 74px; resize: vertical; line-height: 1.45; }
.mmap-look-use {
  margin-top: 4px;
  font: 600 .9375rem/1 var(--font-ui);
  color: #F4F1E7;
  background: linear-gradient(135deg, #2B6146, #0E1B14);
  border: 0;
  border-radius: 11px;
  min-height: 44px;
  cursor: pointer;
}

/* Saved-clients picker (show_clients). One tap fills the buyer's company,
   contact, site and logo from the user's studio roster, so a returning customer
   never retypes a client we already have (Adam 2026-07-28). Cards, not chips:
   a client carries a logo and a contact line, which a pill cannot hold. */
.mmap-clients {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mmap-client {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  font-family: var(--font-ui, sans-serif);
  background: #FFFFFF;
  border: 1.5px solid var(--line, #E3E8E1);
  border-radius: 13px;
  padding: 11px 12px;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}
.mmap-client:hover { border-color: var(--pine, #25543B); }
.mmap-client:disabled { opacity: .5; cursor: default; }
.mmap-client.picked { border-color: var(--ink, #0E1B14); background: var(--paper-tint, #F3F6F2); }
.mmap-client-logo {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--paper-tint, #F3F6F2);
  border: 1px solid rgba(14, 27, 20, .10);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mmap-client-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mmap-client-logo.no-logo {
  font-weight: 600;
  font-size: 1rem;
  color: var(--pine, #25543B);
}
.mmap-client-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mmap-client-name {
  font-size: .93rem;
  font-weight: 600;
  color: var(--mmap-ink-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mmap-client-sub {
  font-size: .78rem;
  /* --mmap-muted-text is referenced elsewhere in this file but never defined,
     so carry an explicit fallback rather than inherit the ink colour. */
  color: var(--mmap-muted-text, #5B6B60);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mmap-client-new { border-style: dashed; background: transparent; }
.mmap-client-new .mmap-client-logo { background: transparent; border-style: dashed; }
