/* All AI guide (animated mascot) for the public, pre-login pages. Based on the MAIN mascot dock (Itachi + Jojo).
   Colours: --mm-* tokens below follow the page theme (html[data-theme]). Blue 8px buttons, no green/yellow UI (her sparkles are silver-blue).
   Strict-CSP friendly: external stylesheet, no inline styles in markup. */
:root {
  --mm-bg: #f2f0ed; --mm-fg: #0b0f1e; --mm-gold: #9fb4d6;
  --mm-pop: #ffffff; --mm-pop-fg: #0b0f1e; --mm-border: #cfcac2; --mm-mute: #575f78;
  --mm-primary: #2563ff; --mm-primary-hover: #1d4ed8; --mm-primary-fg: #ffffff;
  --mm-secondary-fg: #0b0f1e; --mm-secondary-border: #0b0f1e; --mm-ring: #2563ff;
  --mm-shadow: 0 18px 40px -18px rgba(11, 15, 30, .45), 0 2px 6px rgba(11, 15, 30, .08);
}
html[data-theme="dark"] {
  --mm-bg: #080b16; --mm-fg: #eef1f8;
  --mm-pop: #141a30; --mm-pop-fg: #eef1f8; --mm-border: rgba(255, 255, 255, .14); --mm-mute: #a4acc4;
  --mm-secondary-fg: #eef1f8; --mm-secondary-border: rgba(238, 241, 248, .55); --mm-ring: #8fb0ff;
  --mm-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
}
.mm-dock {
  position: fixed; z-index: 2147483000;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--mm-lift, 0px));
  display: flex; align-items: flex-end; gap: 8px; pointer-events: none; transition: bottom .25s ease;
  font-family: 'DM Sans', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}
.mm-dock > * { pointer-events: auto; }
.mm-avatar { width: 112px; height: 147px; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; border-radius: 16px; -webkit-tap-highlight-color: transparent; }
.mm-avatar:focus-visible { outline: 3px solid var(--mm-ring); outline-offset: 2px; }
.mm-host { display: block; width: 100%; height: 100%; }
.mm-host svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mm-host svg.mm-crop { overflow: hidden; }
/* dark theme: a soft light rim so her black jacket and locs separate from the dark page */
html[data-theme="dark"] .mm-avatar .mm-host svg { filter: drop-shadow(0 0 5px rgba(214, 226, 255, .32)) drop-shadow(0 0 1px rgba(255, 255, 255, .35)); }
.mm-bubble {
  position: relative; max-width: 330px; margin: 0 0 96px; padding: 16px 16px 14px;
  background: var(--mm-pop); color: var(--mm-pop-fg); border: 1px solid var(--mm-border);
  border-radius: 14px 14px 4px 14px; box-shadow: var(--mm-shadow);
  animation: mm-pop .35s cubic-bezier(.2, 1.4, .4, 1);
}
.mm-bubble[hidden], .mm-actions[hidden] { display: none; }
.mm-text { margin: 0 34px 12px 0; font-size: 15px; line-height: 1.45; font-weight: 500; }
.mm-actions { display: flex; flex-wrap: nowrap; gap: 8px; }
.mm-btn {
  flex: 1 1 0; min-height: 44px; padding: 0 14px; margin: 0; border-radius: 8px;
  font: 700 14px/1 inherit; font-family: inherit; white-space: nowrap; cursor: pointer;
  border: 1.5px solid var(--mm-secondary-border); background: transparent; color: var(--mm-secondary-fg);
  transition: background-color .2s, border-color .2s, color .2s;
}
.mm-primary { background: var(--mm-primary); color: var(--mm-primary-fg); border-color: var(--mm-primary); }
@media (hover: hover) {
  .mm-primary:hover { background: var(--mm-primary-hover); border-color: var(--mm-primary-hover); }
  .mm-secondary:hover { background: var(--mm-primary); border-color: var(--mm-primary); color: #fff; }
}
.mm-btn:focus-visible, .mm-x:focus-visible { outline: 3px solid var(--mm-ring); outline-offset: 2px; }
.mm-x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; padding: 0; margin: 0; border: 0; border-radius: 8px; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--mm-mute); }
.mm-x:hover { color: var(--mm-pop-fg); }
.mm-particles { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2147483001; overflow: visible; }
@keyframes mm-pop { from { transform: scale(.85) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 600px) {
  .mm-dock { right: calc(8px + env(safe-area-inset-right, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px) + var(--mm-lift, 0px)); gap: 4px; }
  .mm-avatar { width: 74px; height: 97px; }
  .mm-bubble { max-width: calc(100vw - 74px - 28px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); margin-bottom: 58px; padding: 13px 12px 12px 14px; }
  .mm-text { font-size: 14px; margin-bottom: 10px; }
  .mm-actions { gap: 6px; }
  .mm-btn { padding: 0 8px; font-size: 13.5px; }
}
/* never over the open mobile menu, never in print */
body:has(.drawer.open) .mm-dock, body:has(.drawer.open) .mm-particles { visibility: hidden; }
@media print { .mm-dock, .mm-particles { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .mm-bubble { animation: none; } .mm-dock { transition: none; } }
.mm-reduced .mm-bubble { animation: none; }
.mm-text:has(+ .mm-actions[hidden]) { margin-bottom: 0; }
/* ---- talking guide (greeting -> short chat, captions + optional on-device voice) ---- */
.mm-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mm-bubble--talk { display: flex; flex-direction: column; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); }
.mm-bubble--talk[hidden] { display: none; }
.mm-voice { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0 40px 8px 0; }
.mm-bubble--talk .mm-text { margin-right: 0; }
.mm-voice[hidden] { display: none; }
.mm-hear, .mm-mute {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 10px; margin: 0; border-radius: 8px; cursor: pointer;
  font: 600 13px/1 inherit; font-family: inherit; border: 1.5px solid var(--mm-primary); background: transparent; color: var(--mm-link);
}
.mm-hear.is-speaking { background: var(--mm-primary); color: var(--mm-primary-fg); }
.mm-mute { border-color: var(--mm-secondary-border); color: var(--mm-secondary-fg); width: 36px; padding: 0; justify-content: center; }
.mm-ico { width: 18px; height: 18px; flex: none; }
.mm-ico .mm-slash { display: none; }
.mm-mute.is-muted .mm-ico .mm-wave { display: none; }
.mm-mute.is-muted .mm-ico .mm-slash { display: inline; }
.mm-hear:focus-visible, .mm-mute:focus-visible, .mm-send:focus-visible, .mm-link:focus-visible, .mm-input:focus-visible, .mm-log:focus-visible { outline: 3px solid var(--mm-ring); outline-offset: 2px; }
.mm-log { overflow-y: auto; min-height: 0; flex: 1 1 auto; margin: 0 0 10px; padding-right: 2px; display: flex; flex-direction: column; gap: 8px; border-radius: 8px; }
.mm-log[hidden], .mm-links[hidden], .mm-ask[hidden] { display: none; }
.mm-msg { margin: 0; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.mm-msg--assistant { font-weight: 500; }
.mm-msg--user { align-self: flex-end; max-width: 85%; padding: 7px 11px; border-radius: 12px 12px 4px 12px; background: var(--mm-primary); color: var(--mm-primary-fg); font-weight: 600; }
.mm-msg--note { font-size: 13.5px; color: var(--mm-pop-fg); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--mm-border); }
.mm-msg--error { border-color: var(--mm-error-border); }
.mm-msg--wait { display: inline-flex; gap: 5px; align-self: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--mm-chip); color: transparent; font-size: 0; }
.mm-msg--wait::before, .mm-msg--wait::after { content: ""; }
.mm-msg--wait::before, .mm-msg--wait::after { width: 7px; height: 7px; border-radius: 50%; background: var(--mm-mute); animation: mm-dot 1s ease-in-out infinite; }
.mm-msg--wait::after { animation-delay: .25s; }
@keyframes mm-dot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.mm-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.mm-link {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; border-radius: 8px; text-align: center;
  font-weight: 700; font-size: 13.5px; text-decoration: none; border: 1.5px solid var(--mm-primary); color: var(--mm-link); background: transparent;
}
.mm-link--primary { background: var(--mm-primary); color: var(--mm-primary-fg); }
.mm-ask { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.mm-input { min-width: 0; min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1.5px solid var(--mm-input-border); background: var(--mm-bg); color: var(--mm-fg); font: 400 15px/1.2 inherit; font-family: inherit; }
.mm-input::placeholder { color: var(--mm-mute); }
.mm-send { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1.5px solid var(--mm-primary); background: var(--mm-primary); color: var(--mm-primary-fg); font: 700 14px/1 inherit; font-family: inherit; cursor: pointer; }
.mm-send:disabled { opacity: .6; cursor: progress; }
.mm-left { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--mm-mute); }
.mm-left:empty { display: none; }
:root { --mm-link: #1d4ed8; --mm-chip: #ebe8e3; --mm-input-border: #767b8a; --mm-error-border: #c2410c; }
html[data-theme="dark"] { --mm-link: #a9c1ff; --mm-chip: #1f2742; --mm-input-border: #6b7391; --mm-error-border: #f08a6c; }
@media (hover: hover) {
  .mm-hear:hover, .mm-link:hover { background: var(--mm-primary); color: var(--mm-primary-fg); }
  .mm-mute:hover { border-color: var(--mm-primary); }
  .mm-send:hover:not(:disabled), .mm-link--primary:hover { background: var(--mm-primary-hover); border-color: var(--mm-primary-hover); }
}
@media (max-width: 600px) {
  .mm-bubble--talk { max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); }
  .mm-msg { font-size: 14px; }
  .mm-hear, .mm-mute { min-height: 34px; font-size: 12.5px; }
  .mm-hear { padding: 0 10px 0 8px; }
  .mm-mute { width: 34px; }
  .mm-link { font-size: 13px; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { .mm-msg--wait::before, .mm-msg--wait::after { animation: none; opacity: .8; } }
.mm-reduced .mm-msg--wait::before, .mm-reduced .mm-msg--wait::after { animation: none; opacity: .8; }
.mm-bubble--talk .mm-voice[hidden] + .mm-text { margin-right: 34px; }

/* arcade background (tools/public-mascot/src/arcade): decorative canvas behind the content. No green, no yellow.
   --arc-chomper is the chomper's single colour (one-line swap). */
.arcade-bg{--arc-blue:#2f7bff;--arc-cyan:#38d6ff;--arc-chomper:#7cc4ff;--arc-eye:#bfefff;--arc-dark:#06102a;position:fixed;inset:0;width:100vw;height:100vh;z-index:-1;pointer-events:none;
 -webkit-mask-image:linear-gradient(to right,transparent 0,#000 10%,#000 90%,transparent 100%),linear-gradient(to bottom,transparent 0,#000 10%,#000 90%,transparent 100%);
 -webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent 0,#000 10%,#000 90%,transparent 100%),linear-gradient(to bottom,transparent 0,#000 10%,#000 90%,transparent 100%);mask-composite:intersect}
html[data-theme="light"] .arcade-bg{--arc-blue:#2563ff;--arc-cyan:#1d9bd8;--arc-chomper:#4fa6f0;--arc-eye:#1d4ed8;--arc-dark:#dfe8ff}
@media print{.arcade-bg{display:none}}

/* ---------- FitCheck waitlist strip + sign-up dialog (public pages; All AI blues/navy only; built by public-ui.js) ---------- */
html.fc-on { --fc-h: 38px; }
html.fc-on body { padding-top: var(--fc-h); }
html.fc-on .nav { top: calc(12px + var(--fc-h)); }
@media (min-width: 900px) { html.fc-on .nav { top: calc(16px + var(--fc-h)); } }
.fc-bar {
  --fc-bg: #0b1a4a; --fc-fg: #e6eeff; --fc-hi: #9cc2ff; --fc-line: rgba(156, 194, 255, .22);
  position: fixed; top: 0; left: 0; right: 0; z-index: 85; height: var(--fc-h, 38px); box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 44px 0 12px;
  background: linear-gradient(90deg, #0a1638, var(--fc-bg) 50%, #0a1638); color: var(--fc-fg); border-bottom: 1px solid var(--fc-line);
  font: 500 13px/1.2 'DM Sans', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}
html[data-theme="light"] .fc-bar { --fc-bg: #dfe8ff; --fc-fg: #0b1a4a; --fc-hi: #1d4ed8; --fc-line: rgba(37, 99, 255, .25); background: linear-gradient(90deg, #eaf0ff, var(--fc-bg) 50%, #eaf0ff); }
.fc-bar__msg { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-bar__msg > span {
  background: linear-gradient(100deg, var(--fc-fg) 0%, var(--fc-fg) 40%, var(--fc-hi) 50%, var(--fc-fg) 60%, var(--fc-fg) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fc-shimmer 6s ease-in-out infinite;
}
@keyframes fc-shimmer { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0 0; } }
.fc-short { display: none; }
.fc-bar__btn {
  flex: none; height: 26px; padding: 0 12px; border: 0; border-radius: 8px; cursor: pointer;
  background: #2563ff; color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 26px; white-space: nowrap;
}
.fc-bar__btn:hover { background: #1d4ed8; }
.fc-bar__btn:focus-visible, .fc-bar__x:focus-visible { outline: 2px solid var(--fc-hi); outline-offset: 2px; }
.fc-bar__x {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; color: var(--fc-fg); font-family: inherit; font-size: 20px; line-height: 30px; cursor: pointer; opacity: .8;
}
.fc-bar__x:hover { opacity: 1; background: var(--fc-line); }
@media (max-width: 760px) {
  .fc-bar { gap: 8px; padding: 0 38px 0 10px; justify-content: flex-start; font-size: 12.5px; }
  .fc-long { display: none; } .fc-short { display: inline; }
  .fc-bar__btn { padding: 0 10px; margin-left: auto; }
}
.fc-dlg {
  width: min(440px, calc(100vw - 32px)); box-sizing: border-box; padding: 28px 24px 22px; border: 1px solid var(--mm-border); border-radius: 16px;
  background: var(--mm-pop); color: var(--mm-pop-fg); box-shadow: var(--mm-shadow);
  font: 400 15px/1.5 'DM Sans', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}
.fc-dlg::backdrop { background: rgba(6, 12, 34, .62); }
.fc-dlg__x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 22px; cursor: pointer; }
.fc-dlg__x:focus-visible, .fc-dlg input:focus-visible, .fc-btn:focus-visible { outline: 3px solid var(--mm-ring); outline-offset: 2px; }
.fc-dlg__title { margin: 0 32px 6px 0; font-size: 21px; line-height: 1.25; }
.fc-dlg__desc { margin: 0 0 16px; color: var(--mm-mute); }
.fc-form { display: flex; flex-direction: column; gap: 6px; }
.fc-form[hidden], .fc-done[hidden], .fc-dlg__desc[hidden] { display: none; }
.fc-label { font-weight: 600; font-size: 14px; }
.fc-dlg input { height: 44px; padding: 0 12px; border: 1px solid var(--mm-border); border-radius: 8px; background: var(--mm-bg); color: var(--mm-fg); font: inherit; }
.fc-dlg input[aria-invalid="true"] { border-color: #ff6b81; }
.fc-err { min-height: 1.2em; margin: 0; font-size: 13.5px; color: #ff8a9b; }
html[data-theme="light"] .fc-err { color: #c0213a; }
.fc-btn { height: 44px; border: 0; border-radius: 8px; background: var(--mm-primary); color: var(--mm-primary-fg); font-family: inherit; font-size: 15px; font-weight: 600; line-height: 44px; cursor: pointer; padding: 0 18px; }
.fc-btn:hover { background: var(--mm-primary-hover); } .fc-btn:disabled { opacity: .7; cursor: progress; }
.fc-note { margin: 6px 0 0; font-size: 12.5px; color: var(--mm-mute); }
.fc-done { display: flex; flex-direction: column; gap: 6px; }
.fc-done__h { margin: 0; font-size: 19px; font-weight: 700; }
.fc-done__p { margin: 0 0 12px; color: var(--mm-mute); word-break: break-word; }
@media (prefers-reduced-motion: reduce) { .fc-bar__msg > span { animation: none; background: none; color: var(--fc-fg); } }
@media print { .fc-bar { display: none; } html.fc-on body { padding-top: 0; } }
