/* Retire every old avatar at first paint, before the 3D bundle executes.
   Repeated classes intentionally outrank legacy state/holiday sprite rules. */
html body .proto-face.proto-face.proto-face,
html body .proto-workspace-avatar.proto-workspace-avatar.proto-workspace-avatar,
html body .ptw-proto-face.ptw-proto-face.ptw-proto-face {
  background:none!important; border:0!important; border-radius:0!important; box-shadow:none!important;
  animation:none!important; transition:none!important; transform:none!important; filter:none!important;
}
html body .proto-face.proto-face.proto-face::before, html body .proto-face.proto-face.proto-face::after,
html body .proto-workspace-avatar.proto-workspace-avatar.proto-workspace-avatar::before, html body .proto-workspace-avatar.proto-workspace-avatar.proto-workspace-avatar::after,
html body .ptw-proto-face.ptw-proto-face.ptw-proto-face::before, html body .ptw-proto-face.ptw-proto-face.ptw-proto-face::after {
  content:none!important; display:none!important; background:none!important; border:0!important;
  box-shadow:none!important; animation:none!important; transform:none!important;
}
html body :is(.proto-face,.proto-workspace-avatar,.ptw-proto-face) :is(.proto-eye,.proto-mouth,.proto-spark),
html body :is(.proto-face,.proto-workspace-avatar,.ptw-proto-face):not(.erp-proto-mount) > *:not(.proto-launch-fallback) { display:none!important; }
html body :is(.proto-face,.ptw-proto-face):not(.erp-proto-mount) { display:block; position:relative; width:80px!important; height:102px!important; }
html body .proto-workspace-avatar:not(.erp-proto-mount) { display:block; position:relative; width:150px!important; height:182px!important; }
/* A neutral decorative help marker remains if JavaScript is slow or unavailable.
   The existing accessible help button and status text are never replaced. */
html body .proto-face.proto-face:not(.erp-proto-mount)::after,
html body .proto-workspace-avatar.proto-workspace-avatar:not(.erp-proto-mount)::after,
html body .ptw-proto-face.ptw-proto-face:not(.erp-proto-mount)::after {
  content:"✦"!important; display:grid!important; position:absolute; inset:0; place-items:center;
  width:auto; height:auto; color:#35bebd; font:28px/1 system-ui,sans-serif; opacity:1; text-shadow:none;
}
/* Local 3D identity: deliberately wins over every retired sprite rule. */
html body .erp-proto-mount.erp-proto-mount,
html body [data-proto-state] .erp-proto-mount.erp-proto-mount,
html body [data-proto-holiday] .erp-proto-mount.erp-proto-mount {
  display:block!important; position:relative; flex:0 0 auto; width:80px!important; height:102px!important;
  background:none!important; border:0!important; border-radius:0!important; box-shadow:none!important;
  animation:none!important; transition:none!important; transform:none!important; filter:none!important;
  overflow:hidden; isolation:isolate; margin:0!important; touch-action:manipulation;
}
html body .erp-proto-mount.proto-workspace-avatar { width:150px!important; height:182px!important; }
html body .erp-proto-mount.proto-face-small { width:84px!important; height:106px!important; }
html body .erp-proto-mount:before, html body .erp-proto-mount:after,
html body .proto-launcher:before, html body .ptw-proto-launch:before,
html body .proto-orbit { display:none!important; animation:none!important; }
.erp-proto-mount .proto-3d-stage,.erp-proto-mount .proto-3d-canvas,.erp-proto-mount canvas { position:absolute; inset:0; display:block; width:100%!important; height:100%!important; }
.erp-proto-mount .proto-3d-loading { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; text-align:center; color:#35bebd; font-size:10px; padding:4px; }
.erp-proto-mount .proto-3d-loading svg { width:25px; height:25px; }
.erp-proto-mount .proto-wardrobe-note { position:absolute; bottom:0; left:0; right:0; color:#54c5c8; font-size:10px; text-align:center; }
.proto-companion .proto-launcher,.ptw-proto .ptw-proto-launch { min-height:104px; padding:0 14px 0 2px; }
.proto-companion .proto-nudge { bottom:145px; }
.ptw-proto .ptw-proto-panel { top:144px; }
.erp-proto-toolbar { display:flex; justify-content:center; gap:6px; padding-top:5px; position:relative; touch-action:manipulation; }
.erp-proto-toolbar button { border:1px solid #427b88; border-radius:20px; background:#102d40; color:#efffff; padding:6px 11px; font-size:12px; min-height:32px; cursor:pointer; font-family:inherit; }
.cx-dock-head { flex-wrap:wrap; }
.cx-dock-head > .proto-dock-identity { flex:1 1 0; min-width:0; }
.cx-dock-head .proto-dock-identity > div { min-width:0; }
.cx-dock-head > .erp-proto-toolbar { flex:1 1 100%; padding-top:0; justify-content:flex-start; }
.cx-dock-head .erp-proto-toolbar button { width:auto; height:auto; min-width:64px; padding:6px 11px; border:1px solid #427b88; }
.erp-proto-play { box-sizing:border-box; position:fixed; z-index:10060; right:18px; bottom:18px; width:min(370px,calc(100vw - 24px)); max-height:calc(100dvh - 30px); overflow:auto; overscroll-behavior:contain; padding:16px; border:1px solid #4c9c9a; border-radius:20px; background:linear-gradient(145deg,#07192d,#123c48); color:#efffff; box-shadow:0 22px 80px #00182766; font:14px/1.4 system-ui,sans-serif; }
.erp-proto-play[hidden],.erp-proto-seasonal[hidden] { display:none!important; }
.erp-proto-play header { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.erp-proto-play header b { font-size:16px; }
.erp-proto-play button,.erp-proto-play select { font:inherit; color:inherit; background:#174553; border:1px solid #467b8f; border-radius:9px; padding:8px; cursor:pointer; min-height:38px; }
.erp-proto-play header button { min-width:36px; font-size:23px; padding:0; }
html body .erp-proto-play .erp-proto-mount.erp-proto-mount { width:100%!important; height:242px!important; background:radial-gradient(ellipse,#23d5d516,transparent 68%)!important; }
.erp-proto-holiday { text-align:center; font-size:12px; color:#a8e7e1; margin:0 0 10px; }
.erp-proto-outfit { display:flex; align-items:center; gap:10px; font-size:12px; margin-bottom:10px; }
.erp-proto-outfit select { flex:1; min-width:0; font-size:12px; }
.erp-proto-tricks { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; margin-bottom:8px; }
.erp-proto-tricks button { padding:7px 4px; font-size:12px; }
.erp-proto-seasonal { grid-template-columns:repeat(2,minmax(0,1fr)); }
.erp-proto-seasonal button { border-color:#60cabc; background:#195448; }
.erp-proto-play button:disabled { opacity:.45; cursor:default; }
.erp-proto-play button:hover:not(:disabled),.erp-proto-toolbar button:hover { background:#246074; }
.erp-proto-play button:focus-visible,.erp-proto-play select:focus-visible,.erp-proto-toolbar button:focus-visible { outline:3px solid #76edd3; outline-offset:2px; }
.erp-proto-play .erp-proto-pause { font-size:12px; width:100%; }
.erp-proto-play > small { display:block; margin-top:10px; color:#b6ced5; font-size:11px; }
@media(max-width:650px) { .erp-proto-play { right:12px; bottom:12px; padding:12px; } html body .erp-proto-play .erp-proto-mount.erp-proto-mount { height:204px!important; } .proto-companion .proto-launcher { padding:0; } .erp-proto-toolbar { gap:3px; } .erp-proto-toolbar button { font-size:11px; padding:5px 8px; } .cx-proto-hero-identity { flex-wrap:wrap; } }
@media(prefers-reduced-motion:reduce) { .erp-proto-mount *, .erp-proto-mount *:before, .erp-proto-mount *:after { animation:none!important; transition:none!important; } }

/* Tricks stay inside the open assistant, never beneath the floating launcher. */
[data-proto-companion]>.erp-proto-toolbar,[data-organizer-proto]>.erp-proto-toolbar{display:none!important}
.erp-proto-play.is-inline{position:relative;inset:auto;z-index:auto;width:100%;max-height:none;margin:0 0 16px;padding:14px;box-shadow:none;flex:0 0 auto}
.erp-proto-play.is-inline .erp-proto-outfit{display:none}
[data-organizer-proto-panel]{max-height:calc(100dvh - 180px);overflow-y:auto}
[data-organizer-proto-panel]>header{flex-wrap:wrap}
[data-organizer-proto-panel]>header>.erp-proto-toolbar{width:100%;justify-content:flex-start}

/* Let the inline scene determine its grid row instead of shrinking to its header. */
html body #erp-proto-play.is-inline{height:auto;min-height:min-content;overflow:visible;align-self:start}

html body .cx-dock-body{grid-template-rows:none;grid-auto-rows:max-content}

html body #erp-proto-play header,html body #erp-proto-play header span,html body #erp-proto-play header button{color:#eefaff!important} html body [data-organizer-proto-panel] .erp-proto-toolbar button{font-size:12px;line-height:1.4;padding:7px 12px;color:#eafaff;background:#145766;border:1px solid #338192;border-radius:999px}

/* Illuminated P.R.O.T.O. launcher shared by the ERP and client organizer. */
html body :is(.proto-companion .proto-launcher,.ptw-proto .ptw-proto-launch){box-sizing:border-box;display:flex;align-items:center;width:340px;min-height:82px;padding:10px 70px 10px 134px;gap:10px;overflow:visible;border:2px solid #31f4e7;border-radius:999px;background:radial-gradient(circle at 14% 22%,rgba(81,255,243,.24),transparent 32%),linear-gradient(145deg,#0b5960 0%,#063940 45%,#031f2d 100%);box-shadow:0 0 0 3px rgba(10,184,178,.22),0 0 26px rgba(13,237,225,.38),0 18px 48px rgba(0,15,28,.5),inset 0 1px rgba(255,255,255,.28);color:#fff;transform:translateZ(0)}
html body :is(.proto-companion .proto-face,.ptw-proto .ptw-proto-face,.proto-companion .erp-proto-mount,.ptw-proto .erp-proto-mount){position:absolute!important;left:-16px!important;bottom:-10px!important;width:154px!important;height:170px!important;overflow:hidden!important;pointer-events:none;filter:drop-shadow(0 12px 18px rgba(17,241,231,.35))}
.proto-launch-fallback{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 10px 16px rgba(0,239,229,.3))}
html body .erp-proto-mount .proto-launch-fallback{display:none!important}
html body :is(.proto-launch-label,.ptw-proto-launch>span:nth-child(2)){display:grid;min-width:0;gap:2px;text-align:left}
html body :is(.proto-launch-label,.ptw-proto-launch>span:nth-child(2)) b{color:#fff;font-size:15px;line-height:1;letter-spacing:.08em;white-space:nowrap;text-shadow:0 0 14px rgba(112,255,247,.8)}
html body :is(.proto-launch-label,.ptw-proto-launch>span:nth-child(2)) small{color:#baf7f3;font-size:10px;line-height:1.25}
html body :is(.proto-launcher,.ptw-proto-launch)::after{content:'›'!important;display:grid!important;position:absolute;right:12px;top:50%;width:48px;height:48px;place-items:center;transform:translateY(-50%);border:1px solid #98fff8;border-radius:50%;background:linear-gradient(145deg,#16d8ce,#068a8b);box-shadow:0 0 0 3px rgba(0,20,29,.42),0 0 18px rgba(45,255,241,.62),inset 0 1px rgba(255,255,255,.5);color:#fff;font:800 32px/1 system-ui,sans-serif;text-indent:2px}
html body .proto-launch-arrow{display:grid!important;flex:0 0 auto;width:48px;height:48px;margin-left:auto;place-items:center;border:1px solid #98fff8;border-radius:50%;background:linear-gradient(145deg,#16d8ce,#068a8b);box-shadow:0 0 0 3px rgba(0,20,29,.42),0 0 18px rgba(45,255,241,.62),inset 0 1px rgba(255,255,255,.5);color:#fff;font:800 32px/1 system-ui,sans-serif;text-indent:2px}
html body .proto-launcher:has(.proto-launch-arrow)::after{display:none!important}
.erp-proto-mount .proto-3d-stage[data-renderer="fallback"] .proto-3d-loading{background:url('../images/proto/proto-launcher-fallback-v2.png') center/contain no-repeat}
.erp-proto-mount .proto-3d-stage[data-renderer="fallback"] .proto-3d-loading>*{opacity:0}
@media(max-width:650px){html body :is(.proto-companion .proto-launcher,.ptw-proto .ptw-proto-launch){width:76px;height:76px;min-height:76px;padding:0;border-radius:24px}html body :is(.proto-launch-label,.ptw-proto-launch>span:nth-child(2),.proto-launch-arrow){display:none!important}html body :is(.proto-launcher,.ptw-proto-launch)::after{display:none!important}html body :is(.proto-companion .erp-proto-mount,.ptw-proto .erp-proto-mount,.proto-companion .proto-face,.ptw-proto .ptw-proto-face){left:-18px!important;bottom:-13px!important;width:110px!important;height:124px!important}}

/* The ERP renderer uses a wider orthographic camera than the public launcher.
   Enlarge only its rendered stage so the articulated character reads as the
   main subject while its button hit-area and page layout stay unchanged. */
html body :is(.proto-companion,.ptw-proto) .erp-proto-mount{overflow:visible!important;z-index:2}
html body :is(.proto-companion,.ptw-proto) .erp-proto-mount .proto-3d-stage{transform:translate3d(-2px,-7px,0) scale(1.72);transform-origin:46% 78%;will-change:transform}
html body :is(.proto-companion,.ptw-proto) .proto-launch-label,
html body .ptw-proto .ptw-proto-launch>span:nth-child(2){position:relative;z-index:3}
html body :is(.proto-companion,.ptw-proto) .proto-launch-arrow,
html body :is(.proto-companion,.ptw-proto) :is(.proto-launcher,.ptw-proto-launch)::after{z-index:4}
@media(max-width:650px){html body :is(.proto-companion,.ptw-proto) .erp-proto-mount .proto-3d-stage{transform:translate3d(0,-2px,0) scale(1.48);transform-origin:46% 80%}}
@media(prefers-reduced-motion:reduce){html body :is(.proto-companion,.ptw-proto) .erp-proto-mount .proto-3d-stage{will-change:auto}}

