/* v2: replaces legacy inline panels with a body-mounted floating widget. */
#protection:not([data-widget-version="mobile-v2"]){display:none!important}
#protection[data-widget-version="mobile-v2"]{position:fixed;left:20px;bottom:20px;z-index:55;width:auto;margin:0;padding:0;pointer-events:none;isolation:isolate;color:var(--text,#f1f2e9);font-family:var(--sans,Arial,Helvetica,sans-serif)}
#protection *,#protection *:before,#protection *:after{box-sizing:border-box}
#protection .protection-launch,#protection .protection-shell{pointer-events:auto}
#protection .protection-launch{position:relative;display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:11px 14px;border:1px solid #465449;border-radius:12px;background:#17201b;color:var(--text,#f1f2e9);box-shadow:0 6px 24px #0005;font:500 11px/1.4 var(--sans,Arial,sans-serif)}
#protection .protection-launch svg{color:var(--accent,#c5ee8b);flex-shrink:0}
#protection .protection-launch:hover{border-color:var(--accent,#c5ee8b)}
#protection-mini-total{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;display:grid;place-items:center;padding:0 4px;border-radius:9px;background:var(--accent,#c5ee8b);color:#101512;border:2px solid #101512;font:600 8px/1 var(--sans,Arial,sans-serif)}
#protection-mini-total[hidden]{display:none}
#protection .protection-shell{position:absolute;bottom:60px;left:0;width:min(350px,calc(100vw - 40px));max-height:min(440px,calc(100dvh - 110px));overflow:auto;overscroll-behavior:contain;margin:0;padding:18px;background:#171e19;border:1px solid #415044;border-radius:14px;box-shadow:0 15px 55px #0009;color:var(--text,#f1f2e9);opacity:1}
#protection .protection-shell[hidden]{display:none!important}
#protection .protection-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
#protection .protection-heading .eyebrow{display:block;margin:0 0 5px;font:9px/1.4 var(--mono,monospace);letter-spacing:1px;color:var(--accent,#c5ee8b)}
#protection .protection-heading h2{margin:0;font:500 19px/1.3 var(--sans,Arial,sans-serif);letter-spacing:-.5px}
#protection-minimize{display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;background:transparent;border:1px solid var(--line,#303c32);border-radius:8px;color:var(--muted,#a8b3aa)}
#protection-minimize:hover{color:var(--accent,#c5ee8b);border-color:var(--accent,#c5ee8b)}
#protection .protection-badge{display:inline-flex;align-items:center;gap:6px;margin-top:10px;color:var(--muted,#a8b3aa);font:9px/1.5 var(--mono,monospace)}
#protection .protection-badge:before{content:'';width:5px;height:5px;border-radius:50%;background:#77857c}
#protection [data-state="ready"] .protection-badge:before{background:var(--accent,#c5ee8b)}
#protection .protection-metrics{display:grid;grid-template-columns:1fr;margin:16px 0;padding:0;border-block:1px solid var(--line,#303c32)}
#protection .protection-metrics>div{display:flex;justify-content:space-between;align-items:center;padding:9px 0;gap:16px}
#protection .protection-metrics dt{margin:0;font-size:11px;color:var(--muted,#a8b3aa)}
#protection .protection-metrics dd{margin:0;font-size:18px;color:var(--accent,#c5ee8b)}
#protection .protection-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px}
#protection .protection-bottom p{margin:0;color:var(--muted,#a8b3aa);font:10px/1.5 var(--sans,Arial,sans-serif)}
#protection-refresh{min-height:44px;flex-shrink:0;padding:8px 11px;background:transparent;border:1px solid #465449;border-radius:7px;color:var(--text,#f1f2e9);font-size:10px}
#protection-refresh:disabled{opacity:.45;cursor:default}
#protection .protection-note{margin:10px 0 0;color:#9ba79e;font:9px/1.6 var(--sans,Arial,sans-serif)}
body.assistant-open #protection{visibility:hidden;pointer-events:none}
/* Compact chart inside the existing floating panel. No page layout changes. */
#protection .protection-chart{--blocked-color:#c5ef8d;--challenge-color:#80c7b6;margin:16px 0;padding:16px 0;border-block:1px solid var(--line)}
#protection .protection-chart[hidden]{display:none}
#protection .protection-chart-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px;color:var(--text);font:500 12px/1.5 var(--sans)}
#protection .protection-chart-title>span:last-child{color:var(--muted);font:9px/1.5 var(--mono);letter-spacing:1.1px}
#protection .protection-chart-layout{display:grid;grid-template-columns:126px minmax(0,1fr);gap:18px;align-items:center}
#protection .protection-donut{position:relative;aspect-ratio:1;border-radius:50%;isolation:isolate;--blocked-angle:0deg}
#protection .protection-donut:before{content:'';position:absolute;inset:0;border-radius:50%;background:conic-gradient(var(--blocked-color) 0deg var(--blocked-angle),var(--challenge-color) var(--blocked-angle) 360deg)}
#protection .protection-donut:after{content:'';position:absolute;inset:11px;border-radius:50%;background:var(--panel)}
#protection .protection-donut.is-zero:before{background:var(--line)}
#protection .protection-donut-center{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px}
#protection .protection-donut-center strong{color:var(--text);font:500 28px/1.1 var(--sans);letter-spacing:-1px;max-width:100%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#protection .protection-donut-center>span{margin-top:7px;font:9px/1.5 var(--sans);color:var(--muted)}
#protection .protection-chart-legend{margin:0;display:grid;gap:16px;min-width:0}
#protection .protection-chart-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 8px;align-items:center}
#protection .protection-chart-row dt{display:flex;gap:7px;align-items:center;color:var(--text);font:11px/1.5 var(--sans);margin:0}
#protection .protection-chart-row dt i{width:6px;height:6px;border-radius:2px;flex-shrink:0;background:var(--blocked-color)}
#protection .protection-challenged-row dt i{background:var(--challenge-color)}
#protection .protection-chart-row dd{margin:0;text-align:right;display:flex;flex-direction:column;gap:3px;font-variant-numeric:tabular-nums}
#protection .protection-chart-row dd strong{font:500 17px/1.1 var(--sans);color:var(--text)}
#protection .protection-chart-row dd>span{font:9px/1.4 var(--mono);color:var(--muted)}
#protection .protection-chart-row dd.protection-bar{display:block;margin:0;grid-column:1/-1;height:4px;border-radius:2px;background:var(--line);overflow:hidden}
#protection .protection-bar span{display:block;height:100%;width:0;border-radius:2px;background:var(--blocked-color)}
#protection .protection-challenged-row .protection-bar span{background:var(--challenge-color)}
#protection .protection-chart-caption{font:10px/1.6 var(--sans);color:var(--muted);margin:12px 0 0;text-align:center}
#protection .has-chart .protection-metrics{display:none}

@media(max-width:700px){
 #protection[data-widget-version="mobile-v2"]{left:12px;bottom:calc(16px + env(safe-area-inset-bottom))}
 #protection .protection-launch{width:44px;height:44px;min-height:44px;padding:10px;border-radius:13px}
 #protection .protection-launch-label{display:none}
 #protection .protection-shell{bottom:58px;width:min(300px,calc(100vw - 24px));padding:14px;max-height:min(380px,calc(100dvh - 120px - env(safe-area-inset-bottom)))}
 #protection .protection-heading h2{font-size:17px}
 #protection .protection-chart-layout{grid-template-columns:108px minmax(0,1fr);gap:16px}
 #protection .protection-donut:after{inset:10px}
 #protection .protection-donut-center{padding:17px}
 #protection .protection-donut-center strong{font-size:26px}
 #protection .protection-donut-center>span{font-size:8px}
 #protection .protection-chart-row dt{font-size:10px;gap:5px}
 #protection .protection-chart-row dd strong{font-size:16px}
 body.protection-open .assistant-widget,body.protection-open .avatar-restore{visibility:hidden;pointer-events:none}
}
