/* An additive, screen-only helper. Existing screens and print layouts stay intact. */
#np-helper { --np-help-vh:100dvh; --np-help-keyboard:0px; position:fixed; bottom:max(18px,env(safe-area-inset-bottom)); right:max(20px,env(safe-area-inset-right)); z-index:45; font-size:1rem; color:var(--np-ink); }
#np-helper * { box-sizing:border-box; }
#np-helper button, #np-helper textarea, #np-helper summary { font:inherit; }
#np-helper button, #np-helper summary { cursor:pointer; }
#np-helper button:focus-visible, #np-helper textarea:focus-visible, #np-helper summary:focus-visible { outline:3px solid var(--np-accent-strong); outline-offset:3px; }
#np-help-launcher { display:flex; align-items:center; gap:3px; padding:0; border:0; background:transparent; color:var(--np-ink); min-height:80px; }
#np-help-launcher img { width:78px; height:78px; object-fit:contain; filter:drop-shadow(0 4px 6px #21103726); transform-origin:60% 90%; animation:nettis-hello 1.2s ease-out 1; }
#np-help-launcher span { margin-left:-6px; padding:9px 12px; border:1px solid var(--np-border); border-radius:16px 16px 16px 3px; background:var(--np-paper); font-size:.875rem; font-weight:650; box-shadow:0 3px 14px #18213212; }
#np-help-launcher:hover img { transform:rotate(-5deg); }
#np-help-bubble { position:absolute; right:0; bottom:96px; width:min(420px,calc(100vw - 32px)); max-height:min(680px,calc(var(--np-help-vh) - 132px)); border:1px solid var(--np-border); border-radius:20px 20px 6px 20px; background:var(--np-paper); box-shadow:0 16px 60px #11182733; display:flex; flex-direction:column; overflow:hidden; }
#np-help-bubble[hidden] { display:none; }
#np-help-bubble::after { content:''; position:absolute; bottom:0; right:25px; width:25px; height:4px; background:var(--np-accent); border-radius:5px 5px 0 0; }
.np-help-header { display:flex; align-items:center; gap:10px; padding:12px 16px; border-bottom:1px solid var(--np-border); background:var(--np-soft); flex:none; }
.np-help-header img { flex:none; object-fit:contain; }
#np-help-title { margin:0; font-size:1.125rem; line-height:1.3; font-weight:750; color:var(--np-ink); }
#np-help-subtitle { margin:2px 0 0; font-size:.875rem; color:var(--np-secondary); }
#np-help-close { margin-left:auto; border:0; width:44px; height:44px; border-radius:50%; background:transparent; color:var(--np-secondary); font-size:1.6rem!important; flex:none; }
#np-help-close:hover { background:var(--teal-soft); }
#np-help-log { overflow-y:auto; overscroll-behavior:contain; min-height:0; padding:16px; scroll-padding:16px; }
.np-help-answer, .np-help-request { margin-bottom:14px; padding:13px 14px; border:1px solid var(--np-border); border-radius:12px; font-size:1rem; line-height:1.55; overflow-wrap:anywhere; }
.np-help-answer { background:var(--np-soft); }
.np-help-request { margin-left:30px; background:var(--teal-soft); border-color:transparent; }
.np-help-answer h3 { margin:4px 0 8px; font-size:1rem; font-weight:700; color:var(--np-ink); }
.np-help-answer p, .np-help-request p { margin:0 0 10px; }
.np-help-answer p:last-child, .np-help-request p:last-child { margin-bottom:0; }
.np-help-answer ol { padding-left:22px; margin:10px 0; }
.np-help-answer li { padding-left:3px; margin:0 0 9px; }
.np-help-who { display:block; margin-bottom:3px; font-size:.8125rem; font-weight:700; color:var(--np-secondary); }
#np-helper .np-help-note { font-size:.875rem; color:var(--np-secondary); border-top:1px solid var(--np-border); padding-top:10px; }
.np-help-quick { display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }
#np-helper .np-help-quick button, #np-helper .np-help-action, #np-help-numbers { min-height:44px; padding:8px 11px; border:1px solid var(--np-border); border-radius:8px; color:var(--np-accent-strong); background:var(--np-paper); font-size:.875rem; font-weight:600; text-align:left; }
#np-helper .np-help-action { margin-top:10px; }
#np-helper .np-help-quick button:hover, #np-help-numbers:hover, #np-helper .np-help-action:hover { background:var(--teal-soft); }
.np-help-choices { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; padding:8px 16px; border-top:1px solid var(--np-border); flex:none; position:relative; }
#np-help-numbers { flex-shrink:0; }
#np-help-topics { min-width:0; }
#np-help-topics summary { font-size:.875rem; color:var(--np-secondary); padding:10px 0; min-height:44px; }
#np-help-topic-list { position:absolute; bottom:62px; left:16px; right:16px; max-height:min(300px,35dvh); overflow:auto; background:var(--np-paper); border:1px solid var(--np-border); border-radius:12px; box-shadow:0 5px 25px #11182730; padding:6px; }
#np-help-topic-list button { display:block; width:100%; text-align:left; min-height:44px; padding:10px; border:0; border-radius:6px; background:transparent; color:var(--np-ink); font-size:.9375rem; }
#np-help-topic-list button:hover { background:var(--teal-soft); }
#np-help-form { border-top:1px solid var(--np-border); padding:12px 16px; flex:none; margin:0; }
.np-help-compose { display:flex; align-items:stretch; gap:8px; }
body.np-loaded #np-help-question { resize:none; min-width:0; flex:1; margin:0; padding:10px 12px; font-size:1rem!important; line-height:1.4; min-height:64px!important; border:1px solid var(--np-border); border-radius:10px; background:var(--np-soft)!important; color:var(--np-ink)!important; }
body.np-loaded #np-help-question::placeholder { color:var(--np-muted)!important; }
#np-help-send { align-self:stretch; min-width:60px; padding:10px; border:0; border-radius:10px; color:#fff; background:var(--np-accent); font-size:.9375rem; font-weight:650; }
#np-help-send:disabled { opacity:.5; cursor:default; }
.np-help-foot { display:flex; align-items:center; gap:10px; justify-content:space-between; margin-top:8px; }
#np-help-source { font-size:.75rem; line-height:1.4; color:var(--np-muted); }
#np-help-clear { border:0; padding:5px 0 5px 6px; min-height:34px; background:transparent; color:var(--np-secondary); font-size:.8125rem!important; text-decoration:underline; flex-shrink:0; }
.np-help-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
body:has(dialog[open]) #np-helper { visibility:hidden; }
@keyframes nettis-hello { 0%,100%{transform:rotate(0)} 30%{transform:rotate(-8deg)} 65%{transform:rotate(5deg)} }
@media(max-width:600px) {
  #np-helper { right:12px; bottom:max(10px,env(safe-area-inset-bottom)); }
  #np-help-launcher { min-height:66px; }
  #np-help-launcher img { width:66px; height:66px; }
  #np-help-launcher span { font-size:.875rem; padding:8px 10px; }
  #np-help-bubble { position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom) + var(--np-help-keyboard)); width:auto; max-height:calc(var(--np-help-vh) - 24px - env(safe-area-inset-bottom)); border-radius:16px; }
  #np-helper.is-open #np-help-launcher { visibility:hidden; }
  .np-help-header { padding:10px 12px; }
  #np-help-log { padding:12px; }
  #np-help-form { padding:10px 12px; }
  .np-help-choices { padding:6px 12px; }
  .np-help-request { margin-left:18px; }
  .np-help-foot { align-items:flex-start; }
  #np-help-source { max-width:180px; }
}
@media(max-height:540px) and (min-width:601px) {
  #np-help-bubble { bottom:0; max-height:calc(var(--np-help-vh) - 28px); }
  #np-helper.is-open #np-help-launcher { visibility:hidden; }
}
@media(prefers-reduced-motion:reduce) { #np-helper *, #np-help-launcher img { animation:none!important; transition:none!important; } }
@media print { #np-helper { display:none!important; } }

@media screen {
  #np-helper.has-keyboard .np-help-choices { display:none; }
  #np-helper.has-keyboard .np-help-header { padding:6px 12px; }
  #np-helper.has-keyboard .np-help-header img { width:32px; height:32px; }
  #np-helper.has-keyboard #np-help-subtitle { display:none; }
  #np-helper.has-keyboard #np-help-question { min-height:44px!important; height:48px; }
}
