/* Extends the Phantom and Entrenar components with the NQ paper, ink and mint palette. */
:root { --nq-ink:#11120f; --nq-paper:#f4f1e5; --nq-mint:#bcf8cc; --nq-line:#505a50; }
.nq-bmu,.nq-live-room { font-family:DM,'DM Sans',system-ui,sans-serif; }
dialog.nq-bmu.j-modal { width:min(550px,calc(100% - 24px)); padding:clamp(20px,5vw,38px); border-radius:6px; background:var(--nq-ink); }
.nq-bmu header,.nq-bmu-back { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.nq-bmu header p { margin:0; }
.nq-icon,.nq-live-menu summary { background:#11120f; color:var(--nq-paper); border:1px solid #697469; border-radius:4px; min-height:44px; min-width:44px; font:600 24px/1 DM,system-ui,sans-serif; }
.nq-bmu h2,.nq-class-next h2 { font-size:clamp(24px,5vw,34px); line-height:1.1; letter-spacing:-.03em; }
.nq-bmu h3,.nq-class-next h3 { font-size:clamp(19px,4vw,27px); line-height:1.22; }
.nq-bmu-answers { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-block:20px 10px; }
.nq-choice,.nq-segments button,.nq-tool { color:var(--nq-paper); background:#1e241e; border:1px solid var(--nq-line); border-radius:4px; min-height:48px; padding:10px 12px; font:650 .94rem/1.2 DM,system-ui,sans-serif; }
.nq-choice:hover,.nq-choice[aria-pressed=true],.nq-segments button[aria-pressed=true] { background:var(--nq-mint); border-color:var(--nq-mint); color:var(--nq-ink); }
.nq-pain-link { color:#ffccaa; }
.nq-bmu-back { justify-content:flex-end; }
.nq-bmu-back [data-bmu-back] { margin-right:auto; }
.nq-class-next { border-inline-start:3px solid #8bc9a0; }
.nq-bmu .nq-class-next { padding-inline-start:16px; }
.nq-class-next ul { list-style:none; padding:0; }
.nq-class-next li { padding-block:12px; border-top:1px solid #79877966; }
.nq-class-next li p { margin:4px 0 0; }
.nq-method.g-details { padding:7px 0; margin:14px 0 0; border:0; }
.nq-method summary { color:inherit; cursor:pointer; width:fit-content; font-weight:600; font-size:.83rem; padding:7px 2px; }
.nq-method p { margin:4px 0; color:inherit; }
.nq-segments { display:flex; flex-wrap:wrap; gap:4px; }
.nq-segments button { flex:1; white-space:nowrap; font-size:.82rem; min-height:44px; }
.nq-variant,.nq-coach-mode { margin:12px 0; border:0; padding:0; }
.nq-variant legend,.nq-coach-mode legend { font-size:.82rem; font-weight:700; margin-bottom:5px; }
.nq-form-options { display:flex; gap:8px; flex-wrap:wrap; }
.nq-form-options label { position:relative; flex:1; cursor:pointer; text-align:center; display:grid; place-items:center; }
.nq-form-options label:has(:checked) { background:var(--nq-mint); border-color:var(--nq-mint); color:var(--nq-ink); }
.nq-form-options label:has(:focus-visible),.nq-switch:has(:focus-visible) { outline:2px solid var(--nq-mint); outline-offset:3px; }
.nq-visually-hidden,.nq-form-options input,.nq-switch input { position:absolute!important; width:1px!important; height:1px!important; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }

/* The view has a full-bleed camera, with a separate result surface after termination. */
dialog.j-modal.nq-live-room { padding:0; isolation:isolate; background:#101410; font-size:16px; color:var(--nq-paper); }
.nq-live-room [hidden] { display:none!important; }
.nq-live-room .nq-live-layout { display:block; position:relative; min-height:100%; max-width:none; width:100%; }
.nq-live-room .nq-live-stage { position:absolute; inset:0; width:100%; height:100%; max-width:none; aspect-ratio:auto; border-radius:0; }
.nq-live-stage > video { position:absolute; inset:0; object-fit:contain; }
.nq-live-room .nq-live-hud { display:block; text-align:center; position:relative; z-index:1; padding:clamp(14px,2.4vh,28px) 16px 28px; background:linear-gradient(#101410eb,#101410a3 65%,transparent); pointer-events:none; }
.nq-live-hud h2 { font:650 12px/1.4 DM,system-ui,sans-serif; color:#e3ebe2; margin:0 0 4px; }
.nq-live-room .nq-live-count { font:400 clamp(3.15rem,8vw,6rem)/.95 Anton,DM,system-ui,sans-serif; color:var(--nq-mint); letter-spacing:-.035em; }
.nq-live-hud p { line-height:1.28; margin:6px 0 0; text-shadow:0 1px 6px #0a0b09; }
.nq-live-hud [data-status] { font-weight:750; color:#eff8f0; }
.nq-live-hud [data-coach-reason]:empty,.nq-live-panel p:empty,.nq-live-menu-body p:empty { display:none; }
.nq-live-hud [data-coach-reason] { font-size:.83rem; color:#ffdb9e; margin-inline:auto; }
.nq-live-panel { position:absolute; inset:auto 0 max(112px,calc(env(safe-area-inset-bottom) + 106px)); padding-inline:18px; z-index:1; pointer-events:none; }
.nq-live-panel button,.nq-live-panel details,.nq-live-panel [data-analysis-review] { pointer-events:auto; }
.nq-live-controls { position:absolute; z-index:2; inset:auto 0 0; padding:18px max(16px,calc((100vw - 420px)/2)) max(10px,env(safe-area-inset-bottom)); background:linear-gradient(transparent,#101410ea 24%,#101410); }
.nq-live-controls .nq-live-actions,.nq-live-result .nq-live-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0; }
.nq-live-room .nq-live-actions > button { min-height:49px; border-radius:4px; font-size:1rem; font-weight:750; width:100%; }
.nq-live-room .nq-live-actions > .g-primary,.nq-live-room [data-analysis-invite] { color:var(--nq-ink); background:var(--nq-mint); border-color:var(--nq-mint); }
.nq-live-room .nq-live-actions > .g-choice { color:var(--nq-paper); background:#1b251f; border-color:#7d8a80; }
.nq-live-tools { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:6px; }
.nq-live-tools .nq-tool,.nq-live-menu summary { border:0; background:transparent; min-height:44px; }
.nq-live-menu summary { list-style:none; display:grid; place-items:center; cursor:pointer; }
.nq-live-menu summary::-webkit-details-marker { display:none; }
.nq-live-menu-body { position:absolute; bottom:57px; right:max(14px,calc((100% - 420px)/2)); width:min(410px,calc(100% - 28px)); max-height:calc(100dvh - 95px); overflow:auto; background:#172019; border:1px solid #637464; border-radius:6px; padding:14px; box-shadow:0 12px 45px #000a; }
.nq-live-menu-body p { margin:4px 0 10px; font-size:.85rem; }
.nq-live-menu-body > button { margin:4px 4px 2px 0; font-size:.82rem; }
.nq-switch { display:flex; align-items:center; min-height:44px; gap:10px; font-size:.85rem; cursor:pointer; }
.nq-switch span { width:38px; height:22px; background:#434c45; border:1px solid #a6b6a8; border-radius:18px; position:relative; flex:none; }
.nq-switch span:after { content:''; position:absolute; width:14px; height:14px; left:3px; top:3px; background:var(--nq-paper); border-radius:50%; }
.nq-switch input:checked+span { background:var(--nq-mint); }
.nq-switch input:checked+span:after { left:19px; background:var(--nq-ink); }
.nq-legend { font-size:.82rem; margin-block:6px; }
.nq-legend summary { cursor:pointer; padding:6px 0; }
.nq-live-panel [data-analysis-status]:not(:empty) { display:table; border-radius:4px; background:#161f19db; padding:4px 9px; color:#dbe7dc; font-size:.75rem; margin:0 auto; }
.nq-live-room[data-coach-phase=result] .nq-live-panel { position:relative; inset:auto; width:min(100%,680px); margin:0 auto; align-self:start; pointer-events:auto; }
.nq-live-room[data-coach-phase=result] .nq-live-hud { padding-bottom:12px; }
.nq-live-room:has([data-analysis-review]:not([hidden])) .nq-live-hud { display:none; }
.nq-live-room:has([data-analysis-review]:not([hidden])) .nq-live-panel { padding-top:16px; }
.nq-live-room:has([data-analysis-review]:not([hidden])) [data-summary] { display:none; }
.nq-live-result { background:#172019f5; border:1px solid #566858; border-radius:5px; padding:14px; margin-top:12px; }
.nq-live-room [data-analysis-invite] { width:100%; font-size:1rem; margin-block:10px 2px; }
.nq-live-room [data-analysis-review] { background:#172019fa; border:1px solid #566858; border-radius:5px; padding:clamp(12px,3vw,22px); margin-top:8px; }
.nq-live-room [data-analysis-title] { font-size:clamp(1.3rem,4vw,1.9rem); letter-spacing:-.025em; margin:0; }
.nq-review-correction { border-radius:4px; border-inline-start:3px solid var(--nq-mint); color:var(--nq-mint); background:#22352a; margin-block:10px 4px; font-weight:750; padding:9px 12px; font-size:clamp(.98rem,2vw,1.23rem); }
.nq-review-frame { position:relative; background:#0b1010; width:100%; aspect-ratio:var(--frame-ratio,4/3); max-height:44dvh; }
.nq-review-frame :is(canvas,img,video) { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.nq-review-frame canvas { pointer-events:none; }
.nq-review-timeline { position:relative; margin-top:8px; display:grid; }
.nq-review-timeline input { width:100%; min-height:44px; accent-color:var(--nq-mint); margin:0; }
.nq-review-timeline [data-analysis-moments] { position:relative; margin:0 22px; height:44px; }
.nq-live-room [data-analysis-moments] button { position:absolute; transform:translateX(-50%); width:44px; height:44px; min-height:44px; padding:0; border:0; background:transparent; }
.nq-live-room [data-analysis-moments] button::before { content:''; display:block; margin:auto; border-radius:99px; width:8px; height:8px; background:var(--nq-mint); }
.nq-live-room [data-analysis-at] { display:inline-block; font-variant-numeric:tabular-nums; font-size:.78rem; }
.nq-eric-preview .nq-video-player { --nq-video-max:min(46svh,420px); }
.nq-eric-preview .nq-video-frame { min-height:140px; }
.nq-eric-preview .nq-video-media { object-fit:contain; }
.nq-eric-preview [data-nq-eric-play] { width:100%; margin-block:0 8px; }
@media(max-width:480px){
 .nq-live-room [data-analysis-review] .nq-method { margin-top:0; }
 .nq-live-room .nq-live-result { padding:8px; }
 .nq-live-room .nq-live-result .g-primary { line-height:1.1; }
}
.nq-live-room .nq-live-hud h2 { display:block; }
.nq-live-menu-body .nq-legend summary { display:list-item; font:650 .84rem/1.4 DM,system-ui,sans-serif; min-height:44px; }
.nq-live-hud [data-coach-reason] { max-width:42ch; }

.nq-live-room .nq-live-layout {
 display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; grid-template-columns:minmax(0,1fr);
 block-size:100dvh; min-height:100%; gap:0;
}
.nq-live-room .nq-live-hud { grid-column:1; padding:8px 12px 28px; }
.nq-live-room .nq-live-count { font-size:clamp(2.75rem,8vw,5rem); }
.nq-live-hud [data-status] { min-block-size:1.5em; margin:0; }
.nq-live-guidance,.nq-conversion-hud {
 position:relative; z-index:1; pointer-events:none;
}
.nq-live-hud [data-coach-fix],.nq-conversion-hud [data-coach-fix] {
 font-size:clamp(28px,8vw,56px); font-weight:750; line-height:1.06;
 display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; overflow-wrap:anywhere;
 margin:.2rem auto 0; max-width:32ch; text-shadow:0 1px 6px #0a0b09,0 1px 12px #0a0b09;
}
[data-coach-fix]:empty { display:none; }
[data-coach-hint] { display:block; margin-top:4px; color:inherit; font-size:.85rem; }
[data-coach-hint]:empty { display:none; }
.nq-live-media {
 display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto;
 gap:6px; padding-inline:12px; min-height:0; min-width:0;
}
.nq-live-room .nq-live-media { display:contents; }
.nq-live-room .nq-live-camera { position:absolute; inset:0; }
.nq-live-room .nq-live-setup { position:relative; z-index:1; grid-row:3; margin:0 12px 4px; }
.nq-live-room:has(.nq-live-reference:not([hidden])) .nq-live-hud { padding-inline-end:calc(min(36%,160px) + 12px); }
.nq-live-camera { position:relative; min-width:0; min-height:0; container-type:size; background:#0b110d; }
.nq-live-camera > :is(.nq-live-stage,.conv-stage) {
 position:absolute; inset:0; width:100%; height:100%; max-width:none; aspect-ratio:auto; margin:0;
}
.nq-live-setup {
 min-width:0; overflow-wrap:anywhere; font-size:.85rem; line-height:1.25;
 background:#18231b; padding:.5rem .7rem; border-radius:5px;
}
.nq-live-setup ol { margin:0; padding-inline-start:1.15rem; }
.nq-live-setup li+li { margin-top:.22rem; }
.nq-live-setup p { margin:.25rem 0 0; }
.nq-live-reference {
 position:absolute; inset:4px 4px auto auto; margin:0; width:min(36%,160px);
 text-align:center; font-size:.8rem; overflow-wrap:anywhere; pointer-events:none;
}
.nq-live-reference img {
 width:100%; max-height:min(30cqh,180px); display:block; object-fit:contain; border-radius:5px;
}
.nq-live-reference [data-reference-toggle] {
 position:relative; display:block; width:min(100%,16.875cqh,101.25px); aspect-ratio:9 / 16;
 margin-inline:auto; padding:0; border:0; border-radius:5px; overflow:hidden;
 background:#11120f; pointer-events:auto;
}
.nq-live-reference [data-reference-toggle] img,
.nq-live-reference [data-reference-toggle] [data-reference-clip] {
 position:absolute; inset:0; width:100%; height:100%; max-height:none;
 object-fit:cover; background:transparent; border-radius:inherit;
}
.nq-live-reference [data-reference-toggle]:enabled { cursor:pointer; }
.nq-live-reference [data-reference-toggle]:focus-visible { outline:2px solid var(--nq-mint); outline-offset:2px; }
.nq-live-reference [data-reference-toggle][data-state="paused"]:enabled::after {
 content:'▶' / ''; position:absolute; inset:50% auto auto 50%; transform:translate(-50%,-50%);
 display:grid; place-items:center; width:28px; height:28px; border-radius:50%;
 background:rgb(17 18 15 / 78%); color:white; font:14px/1 sans-serif; pointer-events:none;
}
.nq-live-reference [hidden] { display:none; }
.nq-live-reference[data-pizarra] { mix-blend-mode:screen; }
.nq-live-reference[data-pizarra] img { filter:invert(1) contrast(1.15); }
[data-count-status]::before { display:inline-block; margin-inline-end:.4em; }
[data-count-status=counting]::before { content:'▶' / ''; }
[data-count-status=out]::before { content:'Ⅱ' / ''; }
[data-count-status=capture]::before { content:'◇' / ''; }
[data-front-camera] > video { transform:scaleX(-1); }
.nq-camera-switch {
 display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px;
 min-width:0; flex:1; max-width:27rem;
}
.nq-camera-switch button { min-width:44px; min-height:44px; white-space:normal; overflow-wrap:anywhere; padding:4px 6px; }
.nq-live-tools { gap:6px; }
.nq-live-room .nq-live-controls {
 position:relative; inset:auto; grid-row:4;
 padding:6px max(12px,calc((100vw - 520px)/2)) max(6px,env(safe-area-inset-bottom));
}
.nq-live-room[data-coach-phase=result] .nq-live-media,.nq-live-room[data-coach-phase=rest] .nq-live-media { display:none; }
.nq-live-room[data-coach-phase=result] .nq-live-layout { grid-template-rows:auto auto 1fr auto; block-size:auto; min-height:100dvh; }
.nq-live-room[data-coach-phase=result] .nq-live-panel { grid-row:2; }
@media (max-width:360px) {
 .nq-live-setup { padding:.4rem .5rem; font-size:.8rem; }
 .nq-live-media { gap:4px; padding-inline:8px; }
}
@media (orientation:landscape) and (max-height:480px) {
 .nq-live-room .nq-live-hud { padding-block:4px 0; }
 .nq-live-room .nq-live-count { font-size:2.5rem; }
 .nq-live-setup ol { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.4rem; }
 .nq-live-setup li+li { margin-top:0; }
 .nq-live-room .nq-live-controls { display:flex; align-items:center; justify-content:center; gap:12px; padding-inline:12px; }
 .nq-live-room .nq-live-controls > * { flex:1; max-width:27rem; }
 .nq-live-tools { margin-top:0; }
 .nq-live-room[data-coach-phase=result] .nq-live-panel { grid-row:2; }
}
