/* Map helper — floating bubble and chat (owner, 4 Nov 2026). Atlas colours from shell.css; design-system type and radii. */
.mh-bubble{position:fixed;right:16px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:12;display:grid;place-items:center;width:52px;height:52px;padding:0;border:0;border-radius:999px;background:var(--ink);color:#fff;box-shadow:0 10px 28px rgba(27,42,65,.14);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .18s ease,bottom .18s ease,opacity .18s ease}
.mh-bubble:hover{transform:translateY(-1px)}
.mh-bubble:active{transform:scale(.96)}
.mh-bubble svg{color:var(--gold)}
.mh-bubble-tip{position:absolute;right:60px;top:50%;transform:translateY(-50%);padding:8px 12px;border-radius:16px;background:var(--card);color:var(--ink);box-shadow:var(--shadow);font:600 14px/17px var(--sans);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s ease}
.mh-bubble.mh-hint .mh-bubble-tip{opacity:1}
body.mh-toasting .mh-bubble{bottom:calc(140px + env(safe-area-inset-bottom))}
body.mb-welcoming .mh-bubble,body.mb-full-open .mh-bubble,body.mb-kbd:not(.mh-open) .mh-bubble,body.mh-open .mh-bubble{opacity:0;pointer-events:none;transform:scale(.8)}
/* keep the last options clear of the bubble when the panel is scrolled to the end */
@media (max-width:1023px){body.mh-on .mb-panel{padding-bottom:calc(104px + env(safe-area-inset-bottom))!important}}

.mh-sheet{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;flex-direction:column;max-height:min(62vh,560px);background:var(--paper);border-radius:16px 16px 0 0;box-shadow:0 10px 28px rgba(27,42,65,.14);padding-bottom:env(safe-area-inset-bottom);transform:translateY(100%);transition:transform .2s ease}
.mh-sheet.is-in{transform:none}
/* keyboard open: the sheet sits just above it (bottom set in JS); hide the extras so the typing box stays in view */
body.mh-kb .mh-sheet{border-radius:16px 16px 0 0;padding-bottom:0;transition:none}
body.mh-kb .mh-note,body.mh-kb .mh-examples{display:none}
body.mh-kb .mh-log{min-height:80px}
.mh-sheet[hidden]{display:none}
.mh-head,.mh-examples,.mh-form,.mh-note{flex:none}
.mh-head{display:flex;align-items:center;gap:8px;padding:12px 12px 8px 16px;border-bottom:1px solid var(--line)}
.mh-head-icon{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:999px;background:var(--ink);color:var(--gold)}
.mh-head-icon svg{width:20px;height:20px}
.mh-head div{flex:1;min-width:0}
.mh-head b{display:block;font:700 16px/20px var(--sans);color:var(--ink)}
.mh-head small{display:block;font:400 14px/17px var(--sans);color:var(--soft)}
.mh-close{flex:none;display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:999px;background:transparent;color:var(--ink);cursor:pointer}
.mh-log{flex:1;min-height:120px;overflow-y:auto;padding:12px 16px 4px;overscroll-behavior:contain}
.mh-msg{margin:0 0 8px;max-width:88%;font:400 16px/21px var(--sans)}
.mh-msg p{margin:0}
.mh-bot{padding:8px 12px;border-radius:4px 16px 16px 16px;background:var(--card);color:var(--ink);box-shadow:0 2px 8px rgba(27,42,65,.08)}
.mh-user{margin-left:auto;padding:8px 12px;border-radius:16px 4px 16px 16px;background:var(--green-tint);color:var(--ink);width:fit-content}
.mh-ops{margin:8px 0 0;padding:0;list-style:none}
.mh-ops li{position:relative;padding:4px 0 4px 16px;font:500 14px/19px var(--sans);border-top:1px solid var(--line)}
.mh-ops li::before{content:"";position:absolute;left:4px;top:11px;width:8px;height:8px;border-radius:999px;background:var(--green)}
.mh-done li{border-top:0;padding-top:4px;padding-bottom:4px}
.mh-done li::before{content:"✓";background:none;width:auto;height:auto;top:3px;left:2px;color:var(--green);font-weight:700}
.mh-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.mh-btn{min-height:44px;padding:0 16px;border:1.2px solid var(--line);border-radius:999px;background:var(--white);color:var(--ink);font:600 14px/1 var(--sans);cursor:pointer}
.mh-btn-main{border-color:var(--action);background:var(--action);color:#fff}
.mh-btn-main:hover{background:var(--action-text)}
.mh-btn[disabled]{opacity:.5;cursor:default}
.mh-btn-quiet{min-height:36px;border-color:transparent;background:transparent;color:var(--action-text);padding:0 4px;text-decoration:underline}
.mh-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.mh-chip{min-height:40px;padding:0 12px;border:1.2px solid var(--line);border-radius:999px;background:var(--paper);color:var(--ink);font:500 14px/1 var(--sans);cursor:pointer}
.mh-chip[aria-pressed="true"]{border-color:var(--green);background:var(--green-tint);font-weight:600}
.mh-chip[aria-pressed="true"]::before{content:"✓ "}
.mh-typing{display:flex;gap:4px;width:fit-content}
.mh-typing i{width:7px;height:7px;border-radius:999px;background:var(--soft);animation:mh-dot 1s infinite ease-in-out}
.mh-typing i:nth-child(2){animation-delay:.15s}.mh-typing i:nth-child(3){animation-delay:.3s}
@keyframes mh-dot{0%,80%,100%{opacity:.3}40%{opacity:1}}
.mh-examples{display:flex;gap:8px;overflow-x:auto;padding:4px 16px 8px;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 85%,transparent);mask-image:linear-gradient(90deg,#000 85%,transparent);scroll-snap-type:x proximity}
.mh-ex{scroll-snap-align:start}
.mh-examples::-webkit-scrollbar{display:none}
.mh-examples[hidden]{display:none}
.mh-ex{flex:none;min-height:36px;padding:0 12px;border:1px dashed var(--line);border-radius:999px;background:transparent;color:var(--soft);font:500 14px/1 var(--sans);cursor:pointer;white-space:nowrap}
.mh-ex-go{border-style:solid;color:var(--ink);background:var(--white)}
.mh-form{display:flex;gap:8px;padding:8px 12px 4px 16px}
.mh-input{flex:1;min-width:0;height:46px;padding:0 12px;border:1.2px solid var(--line);border-radius:999px;background:var(--white);color:var(--ink);font:400 16px/1 var(--sans)}
.mh-input:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 3px var(--green-tint)}
.mh-send{flex:none;display:grid;place-items:center;width:46px;height:46px;border:0;border-radius:999px;background:var(--action);color:#fff;cursor:pointer}
.mh-note{margin:0;padding:4px 16px 8px;font:400 12px/16px var(--sans);color:var(--soft)}
.mh-note a{color:inherit}
@media (min-width:1024px){
  .mh-bubble{right:28px;bottom:112px;width:56px;height:56px;border-radius:999px}
  body.mh-toasting .mh-bubble{bottom:176px}
  .mh-sheet{left:auto;right:24px;bottom:24px;width:390px;max-height:min(70vh,620px);border-radius:16px}
}
@media (prefers-reduced-motion:reduce){.mh-bubble,.mh-sheet{transition:none}.mh-typing i{animation:none}}

/* Phones and tablets: the helper floats just above the builder's bottom bar, on the right, and stays there on
   every step — it no longer sits beside (and over) Next (owner, 9 Nov 2026 01:02). */
@media (max-width:1023px){
  body[data-kind] .mh-bubble,body[data-kind].mh-toasting .mh-bubble{bottom:88px;width:48px;height:48px;border-radius:999px;right:16px}
  body[data-kind] .mh-bubble svg{width:22px;height:22px}
  body[data-kind] .mh-bubble-tip{right:0;top:auto;bottom:58px;transform:none}
  body[data-kind].mh-on .mb-panel{padding-bottom:160px!important}
}
/* Builder on phones: help bubble lines up with the centred Next pill (owner, 12 Nov 2026 10:02) */
@media (max-width:1023px){body[data-kind] .mh-bubble{bottom:calc(16px + env(safe-area-inset-bottom))}}
