/* HAERA AI Concierge (simulation) */
.hbot-orb{position:relative;flex:none;width:34px;height:34px;border-radius:50%;background:radial-gradient(circle at 32% 28%,#fff6dd 0,#e2c78f 22%,#c6a15b 48%,#24427f 100%);box-shadow:0 0 0 1px rgba(255,255,255,.35) inset,0 6px 18px -6px rgba(198,161,91,.9);overflow:hidden}
.hbot-orb i{position:absolute;inset:-40%;background:conic-gradient(from 0deg,transparent 0 60%,rgba(255,255,255,.55) 70%,transparent 80%);animation:hbotSpin 4.5s linear infinite;mix-blend-mode:overlay}
.hbot-orb.lg{width:42px;height:42px}
.hbot-orb.sm{width:28px;height:28px}
@keyframes hbotSpin{to{transform:rotate(360deg)}}

/* launcher */
.hbot-fab{position:fixed;right:26px;bottom:26px;z-index:1001;display:flex;align-items:center;gap:12px;height:62px;padding:0 22px 0 14px;border:0;border-radius:999px;cursor:pointer;font-family:var(--sans);color:#fff;
  background:linear-gradient(135deg,#0f1e3b 0%,#0a1428 60%);box-shadow:0 22px 44px -16px rgba(10,20,40,.65),0 0 0 1px rgba(198,161,91,.45) inset;
  transition:transform .4s var(--ease),padding .4s var(--ease),opacity .4s;opacity:0;transform:translateY(24px)}
.hbot-fab.ready{opacity:1;transform:none}
.hbot-fab:hover{transform:translateY(-2px)}
.hbot-fab .hbot-orb{width:38px;height:38px}
.hbot-fab::before{content:"";position:absolute;inset:-6px;border-radius:inherit;border:1px solid rgba(198,161,91,.55);animation:hbotPulse 2.8s var(--ease) infinite;pointer-events:none}
@keyframes hbotPulse{0%{opacity:.9;transform:scale(.96)}70%,100%{opacity:0;transform:scale(1.12)}}
.hbot-fab-txt{display:flex;flex-direction:column;align-items:flex-start;line-height:1.2;white-space:nowrap;max-width:160px;overflow:hidden;transition:max-width .4s var(--ease),opacity .3s}
.hbot-fab-txt b{font-size:14px;font-weight:700;letter-spacing:-.01em}
.hbot-fab-txt small{font-size:11.5px;color:var(--gold-2);opacity:.9}
.hbot-fab.compact{padding:0 12px}
.hbot-fab.compact .hbot-fab-txt{max-width:0;opacity:0}
.hbot-fab-close{display:none;width:38px;height:38px;position:relative}
.hbot-fab-close::before,.hbot-fab-close::after{content:"";position:absolute;left:10px;right:10px;top:18px;height:2px;background:#fff;border-radius:2px;transform:rotate(45deg)}
.hbot-fab-close::after{transform:rotate(-45deg)}
.hbot-open .hbot-fab{padding:0 12px}
.hbot-open .hbot-fab::before,.hbot-open .hbot-fab .hbot-orb,.hbot-open .hbot-fab .hbot-fab-txt{display:none}
.hbot-open .hbot-fab-close{display:block}
.hbot-nudge{position:fixed;right:26px;bottom:100px;z-index:1000;max-width:260px;padding:14px 16px;border-radius:16px 16px 4px 16px;background:#fff;color:var(--ink);font-size:13.5px;line-height:1.55;box-shadow:var(--shadow);border:1px solid var(--line);cursor:pointer;animation:hbotIn .5s var(--ease) both}
.hbot-nudge b{color:var(--navy-4)}
.hbot-nudge button{position:absolute;top:6px;right:8px;border:0;background:none;color:var(--muted-2);font-size:16px;cursor:pointer;line-height:1}

/* panel */
.hbot{position:fixed;right:26px;bottom:102px;z-index:1002;width:400px;height:min(660px,calc(100vh - 132px));display:flex;flex-direction:column;border-radius:24px;overflow:hidden;background:#f7f5f0;
  box-shadow:0 40px 90px -30px rgba(10,20,40,.55),0 0 0 1px rgba(10,20,40,.06);transform-origin:bottom right;opacity:0;transform:translateY(16px) scale(.96);pointer-events:none;visibility:hidden;transition:opacity .35s var(--ease),transform .35s var(--ease),visibility 0s .35s;font-family:var(--sans)}
.hbot-open .hbot{opacity:1;transform:none;pointer-events:auto;visibility:visible;transition:opacity .35s var(--ease),transform .35s var(--ease)}
.hbot-head{position:relative;display:flex;align-items:center;gap:10px;padding:18px 16px 18px 18px;color:#fff;background:radial-gradient(120% 140% at 0% 0%,#24427f 0,#0f1e3b 45%,#0a1428 100%)}
.hbot-head::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:linear-gradient(90deg,transparent,rgba(198,161,91,.7),transparent)}
.hbot-id{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.hbot-id b{font-family:var(--serif);font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600;letter-spacing:.01em}
.hbot-id small{font-size:11.5px;color:#b9c3d8;display:flex;align-items:center;gap:6px}
.hbot-id em{width:7px;height:7px;border-radius:50%;background:#4ade80;box-shadow:0 0 0 3px rgba(74,222,128,.2)}
.hbot-langs{display:flex;gap:2px;padding:3px;border-radius:999px;background:rgba(255,255,255,.08)}
.hbot-langs button{border:0;background:none;color:#b9c3d8;font:600 11px var(--sans);padding:5px 6px;border-radius:999px;cursor:pointer}
.hbot-langs button.on{background:var(--gold);color:#1a1405}
.hbot-x{width:30px;height:30px;border:0;border-radius:50%;background:rgba(255,255,255,.08);position:relative;cursor:pointer;flex:none}
.hbot-x::before,.hbot-x::after{content:"";position:absolute;left:9px;right:9px;top:14px;height:1.6px;background:#fff;transform:rotate(45deg)}
.hbot-x::after{transform:rotate(-45deg)}

.hbot-body{flex:1;overflow-y:auto;padding:18px 16px 8px;display:flex;flex-direction:column;gap:12px;scroll-behavior:smooth;overscroll-behavior:contain}
.hbot-body::-webkit-scrollbar{width:6px}.hbot-body::-webkit-scrollbar-thumb{background:#d9d3c6;border-radius:6px}
.hbot-day{align-self:center;font-size:11px;color:var(--muted-2);letter-spacing:.06em;padding:2px 10px;border-radius:999px;background:#efebe2}
.hbot-row{display:flex;gap:8px;align-items:flex-end;animation:hbotIn .4s var(--ease) both}
.hbot-row.me{justify-content:flex-end}
@keyframes hbotIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.hbot-msg{max-width:84%;display:flex;flex-direction:column;gap:8px}
.hbot-bubble{padding:11px 14px;border-radius:18px 18px 18px 6px;background:#fff;color:var(--text);font-size:14px;line-height:1.6;box-shadow:0 1px 0 rgba(10,20,40,.04),0 0 0 1px rgba(10,20,40,.05);word-break:keep-all;overflow-wrap:anywhere}
.hbot-bubble b{color:var(--ink)}
.hbot-bubble .gold{color:#9a7633;font-weight:700}
.me .hbot-bubble{background:var(--navy);color:#fff;border-radius:18px 18px 6px 18px;box-shadow:none}
.hbot-time{font-size:10.5px;color:var(--muted-2);padding:0 4px}
.me .hbot-time{text-align:right}
.hbot-typing{display:inline-flex;gap:4px;padding:14px 16px}
.hbot-typing i{width:6px;height:6px;border-radius:50%;background:#b5a98f;animation:hbotDot 1.2s infinite}
.hbot-typing i:nth-child(2){animation-delay:.15s}.hbot-typing i:nth-child(3){animation-delay:.3s}
@keyframes hbotDot{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-4px);opacity:1}}
.hbot-src{display:flex;flex-wrap:wrap;gap:4px;font-size:10.5px;color:var(--muted)}
.hbot-src span{padding:2px 8px;border-radius:999px;background:#ece7dc}

/* rich cards */
.hbot-cards{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;scroll-snap-type:x mandatory;margin-right:-16px;padding-right:16px}
.hbot-cards::-webkit-scrollbar{height:0}
.hbot-card{flex:none;width:214px;scroll-snap-align:start;background:#fff;border-radius:16px;padding:14px;box-shadow:0 0 0 1px rgba(10,20,40,.06);display:flex;flex-direction:column;gap:6px;font-size:13px}
.hbot-card .hc-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.hbot-card img{height:20px;width:auto;max-width:100px;object-fit:contain}
.hbot-card .hc-tag{font-size:10.5px;font-weight:700;color:#9a7633;background:var(--gold-weak);padding:2px 7px;border-radius:999px;white-space:nowrap}
.hbot-card .hc-name{font-weight:700;color:var(--ink);font-size:14.5px;line-height:1.3}
.hbot-card .hc-name small{display:block;font-weight:500;color:var(--muted);font-size:11.5px;margin-top:2px}
.hbot-card .hc-price{font-size:12.5px;color:var(--text);line-height:1.5}
.hbot-card .hc-price b{font-size:15px;color:var(--navy)}
.hbot-card .hc-sum{font-size:12px;color:var(--muted);line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hbot-card a{margin-top:auto;text-align:center;font-size:12.5px;font-weight:700;color:var(--navy);padding:8px;border-radius:10px;background:#f2efe8}
.hbot-card a:hover{background:var(--gold-weak)}
.hbot-steps{background:#fff;border-radius:16px;padding:6px 14px;box-shadow:0 0 0 1px rgba(10,20,40,.06)}
.hbot-steps li{list-style:none;display:flex;gap:10px;padding:9px 0;border-bottom:1px dashed var(--line);font-size:13px;line-height:1.5}
.hbot-steps li:last-child{border-bottom:0}
.hbot-steps li i{flex:none;width:22px;height:22px;border-radius:50%;background:var(--navy);color:var(--gold-2);font:700 11px/22px var(--sans);text-align:center;font-style:normal}
.hbot-steps li b{display:block;color:var(--ink)}
.hbot-steps li span{color:var(--muted);font-size:12px}
.hbot-actions{display:flex;flex-wrap:wrap;gap:6px}
.hbot-actions a{font-size:12.5px;font-weight:700;padding:8px 12px;border-radius:999px;background:var(--navy);color:#fff}
.hbot-actions a.line{background:#fff;color:var(--navy);box-shadow:0 0 0 1px var(--line) inset}
.hbot-actions a:hover{opacity:.88}
.hbot-agent{display:flex;align-items:center;gap:10px;background:#fff;border-radius:16px;padding:12px 14px;box-shadow:0 0 0 1px rgba(10,20,40,.06);font-size:13px}
.hbot-agent .av{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#e2c78f,#c6a15b);color:#1a1405;font-weight:800;display:grid;place-items:center;flex:none}
.hbot-agent small{display:block;color:var(--muted);font-size:11.5px}

/* quick replies + input */
.hbot-quick{display:flex;gap:6px;overflow-x:auto;padding:8px 16px 10px;scrollbar-width:none}
.hbot-quick::-webkit-scrollbar{display:none}
.hbot-quick:empty{display:none}
.hbot-quick button{flex:none;border:1px solid #ddd5c4;background:#fff;color:var(--navy);font:600 12.5px var(--sans);padding:8px 13px;border-radius:999px;cursor:pointer;transition:.2s}
.hbot-quick button:hover{border-color:var(--gold);background:var(--gold-weak)}
.hbot-input{display:flex;gap:8px;align-items:center;margin:0 12px;padding:6px 6px 6px 16px;background:#fff;border-radius:999px;box-shadow:0 0 0 1px rgba(10,20,40,.08),0 8px 20px -14px rgba(10,20,40,.4)}
.hbot-input:focus-within{box-shadow:0 0 0 2px var(--gold),0 8px 20px -14px rgba(10,20,40,.4)}
.hbot-input input{flex:1;min-width:0;border:0;outline:0;background:none;font:14px var(--sans);color:var(--ink);height:36px}
.hbot-input button{width:38px;height:38px;border:0;border-radius:50%;background:var(--navy);color:var(--gold-2);display:grid;place-items:center;cursor:pointer;flex:none;transition:.2s}
.hbot-input button svg{width:18px;height:18px}
.hbot-input button:disabled{background:#d9d4c9;color:#fff;cursor:default}
.hbot-foot{font-size:10.5px;color:var(--muted-2);text-align:center;padding:8px 12px 12px}

@media (max-width:760px){
  .hbot-fab{right:16px;bottom:16px;height:56px}
  .hbot-nudge{right:16px;bottom:84px}
  .hbot{right:0;left:0;bottom:0;width:auto;height:100dvh;max-height:none;border-radius:0}
  .hbot-open .hbot-fab{display:none}
  .hbot-open{overflow:hidden}
  .hbot-head{padding-top:max(18px,env(safe-area-inset-top))}
  .hbot-foot{padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .hbot-langs{display:none}
}
@media (prefers-reduced-motion:reduce){.hbot-fab::before{display:none}}
