/* LoknAdz chat helper (helper.js). Uses site palette from styles.css. */
.nh-launch{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:calc(100px + env(safe-area-inset-bottom));z-index:2147483000;
  display:grid;place-items:center;width:60px;height:60px;padding:0;border-radius:50%;cursor:pointer;
  background:var(--accent,#cc4420);color:#fff;border:3px solid #fff;
  box-shadow:0 12px 28px -8px rgba(204,68,32,.65),0 3px 10px rgba(23,21,18,.25);transition:transform .2s ease,background .15s}
.nh-launch:hover{background:var(--accent-dk,#a93413);transform:translateY(-2px) scale(1.05)}
@media (hover:hover){
  .nh-launch::before{content:attr(data-tip);position:absolute;right:calc(100% + 12px);top:50%;transform:translateY(-50%);white-space:nowrap;
    background:var(--ink,#171512);color:#fff;font:600 .85rem var(--sans,system-ui,sans-serif);padding:7px 11px;border-radius:8px;
    opacity:0;pointer-events:none;transition:opacity .15s}
  .nh-launch:hover::before,.nh-launch:focus-visible::before{opacity:1}
}
.nh-launch:focus-visible,.nh-panel button:focus-visible,.nh-panel a:focus-visible,.nh-panel input:focus-visible{outline:3px solid var(--accent,#cc4420);outline-offset:2px}
.nh-launch:focus-visible{outline-color:var(--ink,#171512)}
.nh-launch .nh-face{font-size:1.6rem;line-height:1}
.nh-launch[aria-expanded="true"]{display:none}
/* Until the first open: soft glow ring + a gentle hop every few seconds */
.nh-launch.nh-pulse{animation:nhHop 5s ease-in-out 2s infinite}
.nh-launch.nh-pulse::after{content:"";position:absolute;inset:-3px;border-radius:50%;pointer-events:none;animation:nhGlow 2.5s ease-out infinite}
@keyframes nhGlow{0%{box-shadow:0 0 0 0 rgba(204,68,32,.55)}80%,100%{box-shadow:0 0 0 16px rgba(204,68,32,0)}}
@keyframes nhHop{0%,84%,100%{transform:none}88%{transform:translateY(-7px)}92%{transform:none}95%{transform:translateY(-3px)}}
.nh-tease{position:fixed;right:max(16px,env(safe-area-inset-right));bottom:calc(170px + env(safe-area-inset-bottom));z-index:2147483000;max-width:240px;
  background:#fff;color:var(--ink,#171512);border:1px solid var(--line,#d9d1c2);border-radius:14px 14px 4px 14px;padding:10px 32px 10px 14px;
  font:500 .92rem/1.4 var(--sans,system-ui,sans-serif);box-shadow:0 10px 26px -12px rgba(23,21,18,.45);cursor:pointer;animation:nhPop .3s ease}
.nh-tease button{position:absolute;top:4px;right:4px;width:26px;height:26px;border:0;background:none;cursor:pointer;font-size:1rem;color:var(--muted,#6b665d)}
.nh-panel{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:calc(100px + env(safe-area-inset-bottom));z-index:2147483646;
  width:min(380px,calc(100vw - 36px));height:min(600px,calc(100vh - 190px));height:min(600px,calc(100dvh - 190px));display:flex;flex-direction:column;
  background:var(--paper,#f4efe6);border:1px solid var(--line,#d9d1c2);border-radius:16px;overflow:hidden;
  box-shadow:0 24px 60px -18px rgba(23,21,18,.5);font-family:var(--sans,system-ui,sans-serif);color:var(--ink,#171512);animation:nhPop .22s ease}
.nh-panel[hidden]{display:none}
@keyframes nhPop{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
.nh-head{display:flex;align-items:center;gap:10px;padding:12px 10px 12px 16px;background:var(--ink,#171512);color:#fff}
.nh-avatar{width:38px;height:38px;border-radius:50%;background:var(--accent,#cc4420);display:grid;place-items:center;font-size:1.25rem;flex:none}
.nh-title{flex:1;min-width:0;line-height:1.25}
.nh-title strong{display:block;font-size:1rem}
.nh-title span{font-size:.8rem;opacity:.75}
.nh-title span::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#5bd16b;margin-right:6px;vertical-align:1px}
.nh-close{width:44px;height:44px;border:0;background:none;color:#fff;font-size:1.5rem;cursor:pointer;border-radius:8px;flex:none}
.nh-close:hover{background:rgba(255,255,255,.1)}
.nh-log{flex:1;overflow-y:auto;padding:16px 14px 8px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.nh-msg{max-width:86%;padding:10px 13px;border-radius:14px;font-size:.95rem;line-height:1.45;word-wrap:break-word}
.nh-msg p{margin:0}
.nh-msg a{color:inherit;font-weight:600}
.nh-bot{align-self:flex-start;background:#fff;border:1px solid var(--line,#d9d1c2);border-bottom-left-radius:4px}
.nh-user{align-self:flex-end;background:var(--accent,#cc4420);color:#fff;border-bottom-right-radius:4px}
.nh-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.nh-acts a,.nh-acts button{display:inline-flex;cursor:pointer;font-family:inherit;align-items:center;min-height:36px;padding:0 12px;border-radius:999px;text-decoration:none;font-size:.86rem;font-weight:600;
  background:var(--accent,#cc4420);color:#fff;border:2px solid var(--accent,#cc4420)}
.nh-acts a.nh-alt,.nh-acts button.nh-alt{background:transparent;color:var(--ink,#171512);border-color:var(--ink,#171512)}
.nh-acts a:hover,.nh-acts button:hover{filter:brightness(.92)}
.nh-typing{display:inline-flex;gap:4px;padding:14px 14px}
.nh-typing i{width:7px;height:7px;border-radius:50%;background:var(--muted,#6b665d);animation:nhB 1s infinite ease-in-out}
.nh-typing i:nth-child(2){animation-delay:.15s}.nh-typing i:nth-child(3){animation-delay:.3s}
@keyframes nhB{0%,60%,100%{transform:none;opacity:.4}30%{transform:translateY(-4px);opacity:1}}
.nh-chips{display:flex;gap:6px;padding:8px 12px;overflow-x:auto;scrollbar-width:none;border-top:1px solid var(--line,#d9d1c2);background:var(--paper-2,#ebe4d7)}
.nh-chips::-webkit-scrollbar{display:none}
.nh-chips button{flex:none;min-height:36px;padding:0 13px;border-radius:999px;border:1px solid var(--ink-2,#3d3a35);background:#fff;color:var(--ink,#171512);
  font:600 .85rem var(--sans,system-ui,sans-serif);cursor:pointer;white-space:nowrap}
.nh-chips button:hover{background:var(--ink,#171512);color:#fff}
.nh-form{display:flex;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:var(--paper,#f4efe6);border-top:1px solid var(--line,#d9d1c2)}
.nh-form input{flex:1;min-width:0;height:44px;padding:0 14px;border:1px solid var(--line,#d9d1c2);border-radius:999px;background:#fff;
  font:16px var(--sans,system-ui,sans-serif);color:var(--ink,#171512)}
.nh-form button{width:44px;height:44px;flex:none;border-radius:50%;border:0;background:var(--accent,#cc4420);color:#fff;font-size:1.15rem;cursor:pointer}
.nh-form button:hover{background:var(--accent-dk,#a93413)}
.nh-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:820px){
  body.menu-open .nh-launch,body.menu-open .nh-tease{display:none}
}
@media (max-width:600px){
  .nh-panel{top:0;left:0;right:0;bottom:0;width:100%;height:100%;height:100dvh;border-radius:0;border:0;animation:none}
  .nh-head{padding-top:max(12px,env(safe-area-inset-top))}
  .nh-panel.nh-kb .nh-chips{display:none}
  .nh-panel.nh-kb .nh-title span{display:none}
  .nh-panel.nh-kb .nh-form{padding-bottom:10px}
  body.nh-open{overflow:hidden}
  .nh-msg{max-width:90%}
}
@media (prefers-reduced-motion:reduce){.nh-launch,.nh-launch::after,.nh-panel,.nh-tease,.nh-typing i{animation:none!important;transition:none!important}}

/* Profanity: the word is never shown, only crossed-out blurred dots */
.nh-bleep{position:relative;display:inline-block;vertical-align:middle;margin:0 2px;padding:1px 6px;border-radius:6px;
  background:rgba(255,255,255,.22);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);overflow:hidden;user-select:none;-webkit-user-select:none;line-height:1.3}
.nh-bleep>span{display:inline-block;filter:blur(2px);-webkit-filter:blur(2px);font-weight:700;letter-spacing:.04em;opacity:.9}
.nh-bleep::after{content:"";position:absolute;left:3px;right:3px;top:50%;height:2px;margin-top:-1px;background:#fff;border-radius:2px;box-shadow:0 0 0 1px rgba(23,21,18,.15)}
.nh-hid{display:block;margin-top:3px;font-size:.72rem;font-style:italic;opacity:.85;text-align:right}
.nh-end{align-self:center;max-width:92%;text-align:center;background:var(--ink,#171512);color:#fff;font-weight:600;font-size:.9rem;border-radius:12px}
.nh-panel.nh-ended .nh-form input{background:var(--paper-2,#ebe4d7);color:var(--muted,#6b665d)}
.nh-panel.nh-ended .nh-form button,.nh-panel.nh-ended .nh-chips button{opacity:.45;cursor:not-allowed}
/* Test-only controls on the locked screen (test site / localhost / ?test=1 only) */
.nh-test{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;padding-top:8px;border-top:1px dashed #c9bfae}
.nh-test button{font:600 .78rem/1.2 var(--sans,system-ui);padding:6px 10px;border:1px dashed #8a8378;border-radius:4px;background:#fff;color:#3d3a35;cursor:pointer;min-height:32px}
