/* Shared site chat styles, isolated for native map pages. */
:root{
  --primary:#2A6172;
  --primary-deep:#173E49;
  --soft:#E9EFF2;
  --ink:#4A4F59;
  --accent:#C98B47;
  --white:#fff;
  --bg:#F6F8F9;
  --line:#D7E0E5;
  --shadow:0 18px 50px rgba(27,55,67,.12);
  --radius:24px;
  --max:1180px;
}
.chat-launcher{position:fixed;right:22px;bottom:22px;z-index:80;width:66px;height:66px;border-radius:50%;border:0;background:var(--primary);box-shadow:0 14px 34px rgba(17,62,73,.28);cursor:pointer;overflow:hidden;color:#fff;font-weight:900}
.chat-launcher img{width:100%;height:100%;object-fit:cover}
.chat-window{position:fixed;right:22px;bottom:100px;width:min(380px,calc(100vw - 28px));height:min(600px,calc(100vh - 130px));z-index:80;background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 22px 70px rgba(23,62,73,.25);display:none;overflow:hidden}
.chat-window.open{display:grid;grid-template-rows:auto 1fr auto}
.chat-head{display:grid;grid-template-columns:56px 1fr auto;align-items:center;gap:12px;padding:16px;background:var(--primary-deep);color:#fff}
.chat-face{width:56px;height:56px;border-radius:50%;overflow:hidden;background:var(--primary);display:grid;place-items:center;font-weight:900}
.chat-face img{width:100%;height:100%;object-fit:cover}
.chat-close{border:0;background:transparent;color:#fff;font-size:1.3rem;cursor:pointer}
.chat-log{padding:16px;overflow:auto;background:#f7fafb}
.bubble{max-width:86%;padding:11px 13px;border-radius:16px;margin:8px 0;white-space:pre-wrap}
.bubble.bot{background:#fff;border:1px solid var(--line)}
.bubble.user{background:var(--primary);color:#fff;margin-left:auto}
.chat-form{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px;border-top:1px solid var(--line)}
.chat-form input{border:1px solid var(--line);border-radius:999px;padding:11px 14px}
.chat-form button{border:0;border-radius:999px;background:var(--accent);color:#fff;padding:0 16px;font-weight:800}
@media (max-width:620px){.chat-window{right:14px;bottom:92px}
.chat-launcher{right:14px;bottom:14px}}
.chat-message{display:flex;align-items:flex-start;gap:10px;margin:10px 0}
.chat-message.user{justify-content:flex-end}
.chat-message-body{display:flex;flex-direction:column;align-items:flex-start;max-width:calc(100% - 52px)}
.chat-message.user .chat-message-body{align-items:flex-end;max-width:86%}
.chat-avatar{width:40px;height:40px;flex:0 0 40px;border-radius:50%;overflow:hidden;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:900;font-size:.95rem;box-shadow:0 4px 12px rgba(17,62,73,.14)}
.chat-avatar img{display:block;width:100%;height:100%;object-fit:cover}
.chat-message .bubble{max-width:100%;margin:0}
.chat-action{display:inline-flex;margin-top:7px;padding:7px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--primary);font-size:.78rem;font-weight:800;text-decoration:none}
.chat-action:hover{border-color:var(--primary);background:var(--soft)}
@media (max-width:620px){.chat-avatar{width:36px;height:36px;flex-basis:36px;font-size:.86rem}
.chat-message{gap:8px}
.chat-message-body{max-width:calc(100% - 44px)}}
.chat-window{color:var(--ink)}
.chat-window .bubble.bot{color:var(--ink)}
.chat-window .chat-form input{color:var(--ink);background:#fff}
body.chat-open{overscroll-behavior:none}
.chat-log{min-height:0}
.chat-form{background:#fff}
.chat-form input{font-size:16px;min-width:0}
@media (max-width:620px){body.chat-input-active{overflow:hidden}
body.chat-input-active .chat-window.open{
    top:calc(var(--chat-vv-top,0px) + 8px);
    right:10px;
    bottom:auto;
    left:10px;
    width:auto;
    height:calc(var(--chat-vv-height,100dvh) - 16px);
    max-height:calc(var(--chat-vv-height,100dvh) - 16px);
    border-radius:20px;
    grid-template-rows:auto minmax(0,1fr) auto;
  }
body.chat-input-active .chat-head{
    grid-template-columns:46px minmax(0,1fr) auto;
    gap:10px;
    padding:11px 13px;
  }
body.chat-input-active .chat-face{width:46px;height:46px}
body.chat-input-active .chat-head strong{font-size:1rem;line-height:1.15}
body.chat-input-active .chat-head strong+div{font-size:.66rem!important;line-height:1.35}
body.chat-input-active .chat-log{padding:12px;scroll-padding-bottom:82px}
body.chat-input-active .chat-form{
    padding:10px 10px max(10px,env(safe-area-inset-bottom));
  }
body.chat-input-active .chat-launcher{display:none}}
.chat-suggestions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 4px;padding-left:50px}
.chat-suggestions button{border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--primary-deep);padding:8px 11px;font-size:.78rem;font-weight:800;cursor:pointer}
.chat-suggestions button:hover{border-color:var(--primary);background:var(--soft)}
.chat-typing{display:flex;align-items:center;gap:4px;min-width:50px}
.chat-typing i{width:6px;height:6px;border-radius:50%;background:#9aabb1;animation:chatTyping 1s infinite ease-in-out}
.chat-typing i:nth-child(2){animation-delay:.14s}
.chat-typing i:nth-child(3){animation-delay:.28s}
@keyframes chatTyping{0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-4px);opacity:1}}
@media (max-width:620px){.chat-suggestions{padding-left:44px;gap:7px}
.chat-suggestions button{font-size:.74rem;padding:7px 10px}}
.chat-form button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
@media (max-width:620px){.chat-launcher{width:56px;height:56px}}
.chat-launcher{transition:opacity .18s ease,transform .18s ease,box-shadow .18s ease}
@media (max-width:620px){.chat-launcher.chat-launcher--scrolling{opacity:0;transform:translateY(14px);pointer-events:none}}
.chat-launcher img,.chat-face img,.chat-avatar img{
  transform:scale(1.2);
  transform-origin:center 46%;
}
.chat-launcher{width:72px;height:72px}
.chat-head{grid-template-columns:68px minmax(0,1fr) 44px;gap:12px;padding:12px 14px}
.chat-head>div:nth-child(2){min-width:0}
.chat-head strong{display:block;font-size:1rem;line-height:1.25}
.chat-head strong+div{line-height:1.4}
.chat-face{width:68px;height:68px}
.chat-close{display:grid;place-items:center;min-width:44px;min-height:44px}
.chat-avatar{width:48px;height:48px;flex-basis:48px}
.chat-message-body{max-width:calc(100% - 58px)}
.chat-suggestions{padding-left:58px}
body.chat-open .chat-launcher{opacity:0;pointer-events:none}
@media (max-width:620px){.chat-launcher{width:66px;height:66px;right:12px;bottom:12px}
.chat-window.open,
  body.chat-input-active .chat-window.open{
    top:calc(var(--chat-vv-top,0px) + 10px);
    left:10px;right:10px;bottom:auto;width:auto;
    height:calc(var(--chat-vv-height,100dvh) - 20px);
    max-height:calc(var(--chat-vv-height,100dvh) - 20px);
    border-radius:20px;
    grid-template-rows:auto minmax(0,1fr) auto;
  }
.chat-head,
  body.chat-input-active .chat-head{
    grid-template-columns:62px minmax(0,1fr) 44px;
    gap:10px;padding:12px;
  }
.chat-face,body.chat-input-active .chat-face{width:62px;height:62px}
.chat-head strong,body.chat-input-active .chat-head strong{
    font-size:clamp(.82rem,3.9vw,1rem);
    line-height:1.3;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
.chat-head strong+div,body.chat-input-active .chat-head strong+div{
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    overflow:hidden;font-size:.64rem!important;line-height:1.35;
  }
.chat-avatar{width:46px;height:46px;flex-basis:46px}
.chat-message-body{max-width:calc(100% - 54px)}
.chat-suggestions{padding-left:54px}
.chat-form,body.chat-input-active .chat-form{
    display:grid;grid-template-columns:minmax(0,1fr) auto;
    align-items:center;gap:8px;
    padding:10px 12px max(12px,env(safe-area-inset-bottom));
  }
.chat-form input{min-width:0;min-height:48px;padding:10px 14px}
.chat-form button{min-height:48px;min-width:68px;padding:0 14px}}
@media (max-width:360px){.chat-head,body.chat-input-active .chat-head{grid-template-columns:54px minmax(0,1fr) 40px;gap:8px;padding:10px}
.chat-face,body.chat-input-active .chat-face{width:54px;height:54px}
.chat-close{min-width:40px}}
.chat-form input:focus{outline:2px solid var(--primary);outline-offset:1px;border-color:var(--primary)}

/* U: recommendations use only the published map catalog. */
.chat-food-cards{display:grid;gap:8px;width:100%;margin-top:8px;min-width:0}
.chat-food-card{border:1px solid #d5e3e7;border-radius:13px;padding:11px 12px;background:#fff;overflow-wrap:anywhere;line-height:1.55;color:#173e49;text-align:left}
.chat-food-card strong{font-size:.92rem;display:block;line-height:1.4;color:#173e49}
.chat-food-card p{margin:5px 0;font-size:.79rem;line-height:1.6}
.chat-food-card .chat-food-meta,.chat-food-card .chat-food-details{font-size:.73rem;color:#52646b}
.chat-food-card a{display:inline-block;margin-top:5px;font-size:.79rem;font-weight:800;color:#2a6172;text-decoration:underline;text-underline-offset:3px}


/* Keep chat above the map, its controls and store detail overlay. */
#chatbotMount{position:relative;z-index:20000;font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;color:#173e49}
#chatbotMount *{box-sizing:border-box}
#chatbotMount .chat-launcher,#chatbotMount .chat-window{z-index:20001}
#chatbotMount .chat-launcher{right:16px;bottom:calc(16px + env(safe-area-inset-bottom))}
#chatbotMount .chat-window{right:16px;bottom:calc(88px + env(safe-area-inset-bottom))}
#chatbotMount .chat-window:not(.open){display:none}
#chatbotMount .chat-window.open{display:grid}
#chatbotMount .chat-window a{overflow-wrap:anywhere}
.map-u-trigger{border:1px solid rgba(255,255,255,.6);border-radius:999px;padding:5px 10px;background:#fff;color:#173e49;cursor:pointer;font-weight:800;white-space:nowrap;font:inherit}
@media(max-width:620px){#chatbotMount .chat-window{right:12px;bottom:calc(78px + env(safe-area-inset-bottom));width:calc(100vw - 24px);max-height:calc(100dvh - 100px)}#chatbotMount .chat-launcher{right:12px;bottom:calc(10px + env(safe-area-inset-bottom))}body.chat-open{overflow:hidden}}

/* U food search: removable conditions */
.chat-food-actions{display:flex;flex-wrap:wrap;gap:6px;margin:7px 0 4px;max-width:100%;min-width:0}.chat-food-actions>span{flex-basis:100%;font-size:.73rem;font-weight:700;color:#52646b}.chat-food-actions button{font:inherit;font-size:.75rem;font-weight:700;line-height:1.45;border:1px solid #c4d6dd;border-radius:16px;padding:6px 10px;background:#fff;color:#2a6172;cursor:pointer;white-space:normal;text-align:left}.chat-food-actions button:hover,.chat-food-actions button:focus-visible{background:#e9eff2;border-color:#2a6172}
