/* Loaded inside a shadow root so the tracker cannot restyle NoCap. */
:host{position:fixed;inset:0;display:block;z-index:80;pointer-events:none;color:#111827;font:13px/1.3 system-ui,sans-serif;--face-top:76px}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
button,input,select{font:inherit;color:inherit}
button,select,input{pointer-events:auto}
button{cursor:pointer}
button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #0f766e;outline-offset:3px}
.face-toggle{position:absolute;left:32px;bottom:80px;display:grid;place-items:center;width:64px;height:64px;padding:10px;border:0;border-radius:50%;background:#111827;color:#fff;box-shadow:0 16px 28px #11182740;letter-spacing:.08em;font-size:11px;font-weight:600;line-height:1.1}
.face-toggle span{max-width:40px;white-space:normal}
.face-toggle[aria-pressed=true]{background:#207f78}
.tracker-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.face-panel{position:absolute;top:var(--face-top);right:12px;width:260px;max-height:calc(100dvh - var(--face-top) - 16px);overflow:auto;scrollbar-width:thin;pointer-events:none}
.diagnostics{display:none;pointer-events:auto}
.diagnostics>summary{display:none;cursor:pointer}
.mesh-stage{position:relative;width:260px;height:200px;background:transparent;pointer-events:none}
video{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
canvas{display:block;width:100%;height:100%;object-fit:contain;background:transparent;pointer-events:none}
.mood-console{padding:8px 10px;border:1px solid #11182738;border-radius:12px;background:#fffffff0;color:#111827;font:12px/1.25 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.console-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:6px;font-size:10px;letter-spacing:.06em}
.console-heading span:last-child{letter-spacing:0}
dl{margin:0}
dl div{display:flex;justify-content:space-between;gap:10px;padding:2px 0;border-top:1px solid #1118271a}
dt,dd{margin:0;font-weight:400}
dd{text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.reset{width:calc(100% - 4px);margin:13px 2px 0;padding:6px 10px;border:1px solid #11182738;border-radius:10px;background:#fffffff0;font-size:12px}
.mesh-controls{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:9px 12px;margin:12px 2px 0;padding-top:8px;border-top:1px solid #1118271a;font-size:11px}
.mesh-controls select{width:100%;padding:6px 10px;border:1px solid #11182738;border-radius:10px;background:#fffffff0;font-size:12px}
.opacity-control{display:flex;align-items:center;gap:10px}
input[type=range]{width:100%;min-width:0;margin:0;accent-color:#111827}
output{flex:0 0 36px;text-align:right;font:11px ui-monospace,SFMono-Regular,Menlo,monospace}
.note{margin:7px 2px 0;color:#454d5e;font:11px/1.25 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
:host([data-theme=dark]){color:#eceef2}
:host([data-theme=dark]) .mood-console,:host([data-theme=dark]) .reset,:host([data-theme=dark]) select{background:#202829f5;color:#eceef2;border-color:#657574}
:host([data-theme=dark]) dl div,:host([data-theme=dark]) .mesh-controls{border-color:#65757455}
:host([data-theme=dark]) .note{color:#c5cccf}
@media(max-width:760px){.face-toggle{left:16px;bottom:calc(92px + env(safe-area-inset-bottom));width:56px;height:56px;font-size:10px}.face-panel{right:8px;width:240px}.mesh-stage{width:240px;height:110px}.mood-console{font-size:11px}.diagnostics{background:#fff;border:1px solid #c4c9c6;border-radius:12px;padding:8px}.diagnostics>summary{display:list-item;font-size:12px;padding:3px}.diagnostics[open]>summary{margin-bottom:8px}.diagnostics .mood-console{border:0;padding:4px 2px}:host([data-theme=dark]) .diagnostics{background:#202829;border-color:#657574}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

.photo-tools{display:none;pointer-events:auto;margin:0 2px 12px;padding:10px;border:1px solid #c4c9c6;border-radius:12px;background:#fffefa;color:#111827}
.photo-tools button{padding:7px 10px;border:1px solid #b9c6c2;border-radius:8px;background:#eef5f3;font-size:12px;cursor:pointer}
.photo-tools button:disabled{opacity:.6;cursor:default}
.photo-tools p{font-size:11px;line-height:1.4;margin:8px 0 0}
.photo-tools details{margin-top:10px;font-size:12px}
.photo-tools summary{cursor:pointer}
#initial-photo{display:block;width:100%;height:auto;border-radius:8px;margin-top:8px}
:host([data-theme=dark]) .photo-tools{background:#202829;color:#eceef2;border-color:#657574}
@media(max-width:760px){
 .face-panel{right:max(10px,env(safe-area-inset-right));width:104px;max-height:84px;overflow:hidden}
 .mesh-stage{width:104px;height:78px}
 .diagnostics,.photo-tools{display:none!important}
}
