/* Intake chat inside the contact flow; colours follow magnetic.css (steel blue on light metal). */
.intake[hidden], .contact-form[hidden], .intake-input[hidden] { display: none; }
.map-page #mapa .intake {
  margin: 0 0 2rem;
  padding: 1.1rem 1.2rem 1.2rem;
  max-width: 76ch;
  color: #203c50;
  background: #e3edf3;
  border: 1px solid #a2bacb;
  border-radius: 6px;
}
.map-page #mapa .intake h3 { margin: 0; font-size: 1rem; color: #173246; }
.intake-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.intake-heading h3 { min-width: 0; }
.intake-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid #9aa3aa;
  border-radius: 50%;
  color: #69747b;
  font: italic 700 .85rem Georgia, serif;
  text-decoration: none;
}
.intake-info:hover { color: #3e4a53; background: #69747b10; }
.intake-info:focus-visible { outline: 3px solid #3b82a6; outline-offset: 3px; }
.intake-alternative { margin: .6rem 0 .8rem; font-size: .72rem; line-height: 1.55; color: #3b5568; }
.intake-alternative button { color: #24485e; }
.intake-progress { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; padding: 0; list-style: none; }
.intake-progress li {
  padding: .2rem .55rem;
  font-size: .68rem;
  font-weight: 800;
  color: #4d6779;
  background: #f2f7fa;
  border: 1px dashed #a2bacb;
  border-radius: 999px;
}
.intake-progress li[data-state="known"] { color: #173246; background: #c8e0d0; border: 1px solid #6f9e80; }
.intake-progress li[data-state="known"]::before { content: "✓ "; }
.intake-progress li[data-state="unknown"] { color: #5b4a1c; background: #efe3bf; border: 1px solid #c2a95a; }
.intake-progress li[data-state="unknown"]::before { content: "? "; }
.intake-log {
  display: grid;
  gap: .55rem;
  max-height: min(46vh, 26rem);
  overflow-y: auto;
  padding: .7rem;
  background: #f4f8fb;
  border: 1px solid #c2d3de;
  border-radius: 4px;
  overscroll-behavior: contain;
}
.intake-msg { margin: 0; padding: .6rem .75rem; max-width: 88%; font-size: .82rem; line-height: 1.5; white-space: pre-wrap; border-radius: 6px; }
.intake-msg.is-assistant { justify-self: start; color: #1d3446; background: #dfeaf1; }
.intake-msg.is-user { justify-self: end; color: #f1f8fc; background: #2c536b; }
.intake-speaker { display: block; margin-bottom: .2rem; font-size: .7rem; }
.intake-brief { padding: .7rem .8rem; background: #fff; border-left: 3px solid #54839b; }
.intake-brief-title { margin: 0 0 .4rem; font-size: .75rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.intake-brief pre { margin: 0; font: inherit; font-size: .8rem; line-height: 1.5; white-space: pre-wrap; }
.intake-input { display: grid; grid-template-columns: 1fr auto; gap: .6rem; margin-top: .7rem; }
.map-page #mapa .intake-input textarea {
  width: 100%;
  box-sizing: border-box;
  padding: .7rem;
  color: #203a4b;
  background: #edf4f8;
  border: 1px solid #a2bacb;
  font: inherit;
  font-size: .85rem;
  resize: vertical;
}
.intake-input button {
  align-self: end;
  padding: .75rem 1rem;
  color: #edf8ff;
  background: linear-gradient(130deg,#24485e,#173246);
  border: 1px solid #557d94;
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  font-size: .75rem;
  font-weight: 850;
}
.intake-input :disabled { opacity: .55; cursor: not-allowed; }
.intake :is(button, textarea, a):focus-visible { outline: 3px solid #3b82a6; outline-offset: 2px; }
.intake-status { margin: .6rem 0 0; font-size: .72rem; line-height: 1.45; color: #3b5568; }
.intake-status:empty { display: none; }

@media (max-width: 760px) {
  .map-page #mapa .intake { padding: .9rem; }
  .intake-input { grid-template-columns: 1fr; }
  .intake-msg { max-width: 100%; }
  .intake-log { max-height: 52vh; }
}
@media (prefers-reduced-motion: reduce) {
  .intake-log { scroll-behavior: auto; }
}

/* PTysia is independent of the map inspector. A single minimise action restores her magnet. */
.ptysia-launcher[hidden], .ptysia-panel[hidden] { display:none!important; }
.map-page #mapa .ptysia-launcher { position:fixed;right:24px;bottom:92px;z-index:90;display:flex;align-items:center;gap:4px;padding:0;border:0;background:transparent;box-shadow:none;cursor:pointer;color:#e6f4fb; }
.ptysia-launcher > span { display:grid;gap:3px;padding:9px 16px;background:linear-gradient(120deg,#234358,#152b3e);border:1px solid #7196aa;border-radius:4px;margin-right:-14px;text-align:left; }
.ptysia-launcher strong {font-size:13px;} .ptysia-launcher small {font-size:10px;color:#bfd8e6;}
.ptysia-launcher img {display:block;width:88px;height:88px;} .ptysia-launcher:hover img {filter:brightness(1.08);}
.ptysia-launcher:focus-visible {outline:3px solid #85d9f6;outline-offset:4px;border-radius:5px;}
.map-page #mapa .ptysia-panel {position:fixed;z-index:110;right:24px;bottom:92px;width:min(412px,calc(100vw - 32px));height:min(660px,calc(var(--ptysia-height,100dvh) - 124px));border-radius:10px;box-shadow:4px 8px 24px #07162380;}
.map-page #mapa .ptysia-panel .intake {display:flex;flex-direction:column;gap:0;height:100%;min-height:0;max-width:none;margin:0;padding:12px;box-sizing:border-box;overflow:hidden;border-radius:10px;}
.ptysia-panel .intake-heading {flex:none;gap:6px;padding-bottom:10px;}
.ptysia-panel .intake-heading h3 {flex:1;font-size:14px!important;line-height:1.3;}
.ptysia-avatar {flex:none;width:48px;height:48px;}
.ptysia-panel .intake-info {width:32px;height:40px;border:0;border-radius:4px;}
.ptysia-panel .ptysia-minimize {flex:none;width:40px;height:40px;border:1px solid #98b1c0;border-radius:5px;background:#d9e7ef;color:#25475e;font:24px system-ui;cursor:pointer;}
.ptysia-panel .intake-progress {flex:none;gap:4px;margin-bottom:10px;} .ptysia-panel .intake-progress li {font-size:10px;padding:3px 7px;}
.ptysia-panel .intake-log {flex:1;min-height:60px;max-height:none;padding:8px;align-content:start;}
.ptysia-panel .intake-msg {font-size:12px;padding:8px;max-width:94%;}
.ptysia-panel .intake-input {flex:none;gap:6px;margin-top:10px;grid-template-columns:1fr auto;}
.map-page #mapa .ptysia-panel textarea {min-height:64px;max-height:100px;resize:none;font-size:12px;padding:8px;}
.ptysia-panel .intake-input button {padding:12px 9px;font-size:11px;}
.ptysia-panel .intake-alternative {flex:none;margin:8px 0 6px;}
.ptysia-panel .intake-alternative button {padding:2px 0;background:none;border:0;text-decoration:underline;cursor:pointer;font:inherit;}
.ptysia-remember {font-size:10px;line-height:1.4;color:#486878;}
.ptysia-panel .intake-status {flex:none;font-size:11px;margin-top:5px;max-height:4em;overflow:auto;}
@media(max-width:760px) {
  .map-page #mapa .ptysia-launcher {right:12px;bottom:max(16px,env(safe-area-inset-bottom));}
  .ptysia-launcher img {width:76px;height:76px;}
  .map-page #mapa .ptysia-panel {right:12px;bottom:calc(max(16px,env(safe-area-inset-bottom)) + var(--ptysia-keyboard,0px));width:calc(100vw - 24px);height:min(640px,calc(var(--ptysia-height,100dvh) - 32px),calc(100dvh - 32px));}
}
