.artw-companion{--artw-c:var(--hud-accent,#55e9ff);position:fixed;z-index:1000;right:clamp(12px,2vw,36px);bottom:clamp(14px,3vh,36px);font:inherit}.artw-avatar{background:transparent;border:0;display:grid;justify-items:center;color:#f5fcff;cursor:pointer;padding:4px}.artw-name{letter-spacing:.23em;font-size:10px}.artw-character{filter:drop-shadow(0 0 9px var(--artw-c));animation:artwfloat 4.4s ease-in-out infinite}.artw-halo{stroke:var(--artw-c);stroke-width:1;fill:rgba(5,13,19,.75);stroke-dasharray:7 4}.artw-body{stroke:var(--artw-c);stroke-width:1.5;fill:#101c26}.artw-eye{fill:var(--artw-c)}.artw-smile,.artw-ears,.artw-accent{fill:none;stroke:var(--artw-c);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.artw-orb .artw-ears{display:none}.artw-scout .artw-accent{display:none}.artw-maker .artw-halo{stroke-dasharray:2 8}.artw-dialog{position:absolute;right:0;bottom:98px;width:min(340px,calc(100vw - 26px));padding:22px;border:1px solid var(--artw-c);border-radius:14px;background:#0a1420f2;box-shadow:0 10px 55px #000a,0 0 28px color-mix(in srgb,var(--artw-c) 16%,transparent);backdrop-filter:blur(10px);color:#e6f3fc}.artw-dialog[hidden]{display:none}.artw-dialog-head{display:flex;align-items:center;justify-content:space-between;font-size:12px;letter-spacing:.1em}.artw-dialog-head button{background:none;color:inherit;border:0;font-size:25px;cursor:pointer}.artw-dialog p{margin:18px 0}.artw-choices{display:grid;gap:7px}.artw-choices a{padding:10px;border:1px solid #7893a250;border-radius:7px;color:#fff;text-decoration:none}.artw-choices a:is(:hover,:focus-visible){border-color:var(--artw-c)}.artw-dialog small{display:block;font-size:11px;color:#9db3c1;margin-top:14px}@keyframes artwfloat{50%{transform:translateY(-7px) rotate(2deg)}}@media(prefers-reduced-motion:reduce){.artw-character{animation:none}}@media(max-width:560px){.artw-character{width:56px;height:56px}.artw-dialog{bottom:79px}}

/* The assistant inherits accent/profile from ARTWINGS; editorial is independently reusable. */
.artw-companion{--artw-glow-mult:var(--hud-glow-scale,1)}
.artw-style-soft{--artw-glow-mult:.45}.artw-style-cinematic{--artw-glow-mult:1}.artw-style-extreme{--artw-glow-mult:1.75}
.artw-companion .artw-character{filter:drop-shadow(0 0 calc(8px * var(--artw-glow-mult)) var(--artw-c))}
.artw-companion .artw-dialog{box-shadow:0 10px 55px #0008,0 0 calc(26px * var(--artw-glow-mult)) color-mix(in srgb,var(--artw-c) 25%,transparent)}
.artw-style-soft .artw-character,.hud-profile-soft .artw-style-inherit .artw-character{animation:none}
.artw-style-editorial,.artw-editorial{--artw-c:#718292;--artw-glow-mult:0;--artw-ui:#f5f7fa}
.artw-style-editorial .artw-dialog,.artw-editorial .artw-dialog{background:#f7f9fb;color:#1e2935;border-color:#becbd7;backdrop-filter:none;box-shadow:0 10px 28px #0003}
.artw-style-editorial .artw-choices a,.artw-editorial .artw-choices a{color:#203246;border-color:#d1dbe4}
.artw-style-editorial .artw-dialog small,.artw-editorial .artw-dialog small{color:#546574}
.artw-style-editorial .artw-dialog-head button,.artw-editorial .artw-dialog-head button{color:#203246}
.artw-editorial .artw-character{animation:none;filter:none}
.artw-press-hat,.artw-press-tie{display:none;stroke:var(--artw-c);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;fill:none}
.artw-journalist .artw-press-hat,.artw-journalist .artw-press-tie{display:block}
.artw-journalist .artw-ears,.artw-journalist .artw-accent{display:none}
.artw-journalist .artw-halo{stroke-dasharray:none;opacity:.55}
@media(prefers-reduced-motion:reduce){.artw-companion .artw-character{animation:none!important}}


/* v0.3.0 – stronger HUD sync and better dialog styling */
.artw-companion{--artw-rgb:var(--hud-accent-rgb,85 233 255);--artw-surface:rgba(8,18,28,.92);--artw-panel-shadow:0 10px 55px rgba(0,0,0,.45),0 0 calc(26px * var(--artw-glow-mult)) rgb(var(--artw-rgb)/.26);right:clamp(14px,2vw,38px);bottom:clamp(18px,3vh,38px)}
.hud-profile-soft .artw-style-inherit{--artw-glow-mult:.45}.hud-profile-cinematic .artw-style-inherit{--artw-glow-mult:1}.hud-profile-extreme .artw-style-inherit{--artw-glow-mult:2.15}
.artw-avatar{position:relative;isolation:isolate;border-radius:999px}
.artw-avatar::before,.artw-avatar::after{content:"";position:absolute;pointer-events:none;inset:auto}
.artw-avatar::before{left:50%;top:50%;width:74px;height:74px;transform:translate(-50%,-50%);border-radius:50%;border:1px solid rgb(var(--artw-rgb)/.28);box-shadow:0 0 calc(15px * var(--artw-glow-mult)) rgb(var(--artw-rgb)/.18);animation:artwpulse 2.6s ease-in-out infinite}
.artw-avatar::after{right:100%;top:50%;width:26px;height:1px;transform:translateY(-50%);background:linear-gradient(270deg,rgb(var(--artw-rgb)/.72),transparent)}
.artw-character{filter:drop-shadow(0 0 calc(12px * var(--artw-glow-mult)) var(--artw-c)) drop-shadow(0 0 calc(24px * var(--artw-glow-mult)) rgb(var(--artw-rgb)/.18));animation:artwfloat 4.4s ease-in-out infinite}
.artw-name{margin-top:3px;color:#f5fbff;text-shadow:0 0 calc(8px * var(--artw-glow-mult)) rgb(var(--artw-rgb)/.18)}
.artw-dialog{position:absolute;right:0;bottom:100px;width:min(380px,calc(100vw - 24px));padding:18px 18px 16px;border:1px solid rgb(var(--artw-rgb)/.58);border-radius:16px;background:linear-gradient(180deg,rgba(10,20,32,.97),rgba(7,16,25,.92));box-shadow:var(--artw-panel-shadow);backdrop-filter:blur(12px);color:#e8f4fd;overflow:hidden;transform:translateY(12px) scale(.96);opacity:0;visibility:hidden;pointer-events:none;transition:transform .32s cubic-bezier(.19,1,.22,1),opacity .22s ease,visibility .22s ease}
.artw-dialog[hidden]{display:block}
.artw-dialog::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(180deg,rgb(var(--artw-rgb)/.10),transparent 26%),repeating-linear-gradient(180deg,transparent 0 11px,rgb(var(--artw-rgb)/.03) 11px 12px)}
.artw-dialog::after{content:"";position:absolute;left:18px;right:18px;bottom:0;height:1px;background:linear-gradient(90deg,transparent,rgb(var(--artw-rgb)/.82),transparent);box-shadow:0 0 calc(13px * var(--artw-glow-mult)) rgb(var(--artw-rgb)/.36)}
.artw-companion.is-open .artw-dialog{transform:translateY(0) scale(1);opacity:1;visibility:visible;pointer-events:auto}
.artw-dialog-head{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--artw-c);margin-bottom:10px}
.artw-dialog-head strong{font-weight:700}
.artw-dialog-head button{background:rgba(255,255,255,.02);color:inherit;border:1px solid rgb(var(--artw-rgb)/.4);width:34px;height:34px;border-radius:50%;font-size:21px;line-height:1;cursor:pointer;box-shadow:0 0 calc(9px * var(--artw-glow-mult)) rgb(var(--artw-rgb)/.18)}
.artw-dialog p{position:relative;z-index:1;margin:0 0 14px;line-height:1.65}
.artw-choices{position:relative;z-index:1;display:grid;gap:9px}
.artw-choices a{position:relative;padding:11px 13px 11px 14px;border:1px solid rgb(var(--artw-rgb)/.22);border-radius:10px;background:linear-gradient(135deg,rgb(var(--artw-rgb)/.08),rgba(10,20,32,.55));color:#fff;text-decoration:none;box-shadow:inset 0 0 10px rgb(var(--artw-rgb)/.05);transition:border-color .22s ease,box-shadow .22s ease,transform .22s ease,background .22s ease}
.artw-choices a::before{content:"";position:absolute;left:10px;top:50%;width:7px;height:7px;border-radius:50%;background:rgb(var(--artw-rgb)/.7);transform:translateY(-50%);box-shadow:0 0 calc(8px * var(--artw-glow-mult)) rgb(var(--artw-rgb)/.45)}
.artw-choices a{padding-left:28px}
.artw-choices a:is(:hover,:focus-visible){border-color:var(--artw-c);background:linear-gradient(135deg,rgb(var(--artw-rgb)/.16),rgba(10,20,32,.78));box-shadow:0 0 calc(16px * var(--artw-glow-mult)) rgb(var(--artw-rgb)/.28),inset 0 0 10px rgb(var(--artw-rgb)/.08);transform:translateX(-2px)}
.artw-dialog small{position:relative;z-index:1;display:block;font-size:11px;color:#a8bfce;margin-top:12px;letter-spacing:.03em}
.artw-style-editorial .artw-avatar::after,.artw-editorial .artw-avatar::after{background:linear-gradient(270deg,#9caaba,transparent)}
.artw-style-editorial .artw-dialog,.artw-editorial .artw-dialog{background:#f7f9fb;color:#1f2936;border-color:#c6d2de;box-shadow:0 10px 28px rgba(0,0,0,.18);backdrop-filter:none}
.artw-style-editorial .artw-dialog::before,.artw-editorial .artw-dialog::before{background:repeating-linear-gradient(180deg,transparent 0 12px,rgba(113,130,146,.04) 12px 13px)}
.artw-style-editorial .artw-dialog::after,.artw-editorial .artw-dialog::after{background:linear-gradient(90deg,transparent,#98aab8,transparent);box-shadow:none}
.artw-style-editorial .artw-dialog-head,.artw-editorial .artw-dialog-head{color:#3f5669}.artw-style-editorial .artw-choices a,.artw-editorial .artw-choices a{color:#203246;border-color:#d1dbe4;background:#fff}.artw-style-editorial .artw-choices a::before,.artw-editorial .artw-choices a::before{background:#718292;box-shadow:none}.artw-style-editorial .artw-choices a:is(:hover,:focus-visible),.artw-editorial .artw-choices a:is(:hover,:focus-visible){background:#eef4f8;box-shadow:none;transform:translateX(-2px)}
@keyframes artwpulse{50%{transform:translate(-50%,-50%) scale(1.08);opacity:.55}}
@media(max-width:560px){.artw-dialog{right:-2px;bottom:82px;width:min(360px,calc(100vw - 16px));padding:16px}.artw-avatar::before{width:64px;height:64px}}
/* 0.4.0: native details controls and contextual DM panel. */
.artw-companion>summary{list-style:none;position:relative;cursor:pointer}
.artw-companion>summary::-webkit-details-marker{display:none}
.artw-companion>summary::marker{content:''}
.artw-companion[open] .artw-dialog{transform:none;opacity:1;visibility:visible;pointer-events:auto}
.artw-companion:not([open]) .artw-dialog{display:none}
.artw-companion .artw-dialog{box-sizing:border-box;max-height:min(65vh,600px);overflow:auto;overscroll-behavior:contain}
.artw-companion:not([data-ready]) [data-artw-close]{display:none}
.artw-companion [hidden]{display:none!important}
.artw-companion :is(a,summary,button):focus-visible{outline:2px solid currentColor;outline-offset:3px}
.artw-companion.artw-contextual{--artw-c:#a71646;--artw-rgb:167 22 70}
.artw-contextual .artw-dialog{background:#fffafc;border-color:#deb6c5;color:#252d3b;box-shadow:0 10px 32px #0003}
.artw-contextual .artw-dialog-head{color:#941540}
.artw-contextual .artw-hub__assistant-content{min-width:0;overflow-wrap:anywhere;line-height:1.55}
.artw-contextual .artw-hub__assistant-content h2{font-size:1.1rem;margin:.5rem 0;color:#252d3b}
.artw-contextual .artw-hub__assistant-content p{font-size:.9rem;margin:.45rem 0}
.artw-contextual .artw-assistant-question{margin:.5rem 0;padding:.65rem;background:white;border:1px solid #e6d3db;border-radius:8px}
.artw-contextual .artw-assistant-question>summary{font-size:.9rem;font-weight:650;cursor:pointer;color:#941540}
.artw-contextual .artw-assistant-question .artw-assistant-note{font-size:.78rem;color:#475569}
.artw-contextual .artw-choices a{display:block;color:#941540;margin:.4rem 0;overflow-wrap:anywhere;font-size:.86rem}
.artw-contextual .artw-assistant-local-nav{display:flex;flex-wrap:wrap;gap:.2rem .4rem}
.artw-contextual .artw-assistant-local-nav a{margin:0;padding:.35rem .5rem}
.artw-contextual .artw-article-context{padding:.5rem 0;border-bottom:1px solid #e6d3db}
.artw-contextual .artw-article-context strong{font-size:1rem}
@media(max-height:500px){.artw-companion .artw-dialog{max-height:calc(100vh - 120px)}}
