/* The original Moves/DCC nodes keep their own visibility and state underneath. */
.workspace-display.is-deep-analysis > :not(.deep-panel){display:none!important}
.deep-panel[hidden]{display:none}
.deep-panel{box-sizing:border-box;width:100%;min-width:0;padding:3px;color:var(--ui-text,#edf2fa);color-scheme:dark}
.deep-panel *{box-sizing:border-box}
.deep-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.deep-header h2{font-size:17px;margin:0 0 4px}
.deep-header p,.deep-intro,.deep-note{font-size:12px;line-height:1.5;color:var(--ui-muted,#aebdd2)}
.deep-header p{margin:0;font-size:11px}
.deep-header>button{font-size:22px;min-width:34px;padding:2px 8px}
.deep-panel button,.deep-panel select,.deep-panel input{font:inherit;color:inherit;background:var(--ui-raised,#202d45);border:1px solid var(--ui-border,#45526c);border-radius:6px;padding:7px 9px;max-width:100%}
.deep-panel button{cursor:pointer;min-height:34px}
.deep-panel button:disabled{opacity:.5;cursor:default}
.deep-panel button:hover:not(:disabled){border-color:var(--ui-accent,#7fbcff)}
.deep-panel :focus-visible{outline:2px solid var(--ui-accent,#8ec5ff);outline-offset:2px}
.deep-panel a{color:var(--ui-accent,#9dcaff)}
.deep-position{margin:12px 0;font-size:12px}
.deep-position summary{cursor:pointer}
.deep-position code{display:block;overflow-wrap:anywhere;margin:8px 0;line-height:1.6}
.deep-settings{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.deep-settings label{display:flex;flex-direction:column;gap:5px;font-size:12px;min-width:0}
.deep-settings label:first-child{flex:1;min-width:140px}
.deep-root-moves{display:block;font-size:12px}
.deep-root-moves span,.deep-root-moves small{color:var(--ui-muted,#aebdd2)}
.deep-root-moves input{display:block;width:100%;margin:6px 0}
.deep-root-moves small{display:block;font-size:11px;line-height:1.5}
.deep-actions{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.deep-actions button{font-size:12px;flex:1 1 auto}
.deep-actions button:first-child{background:#26638a;border-color:#528db8;color:#fff}
.deep-status{font-size:12px;min-height:20px;line-height:1.5;overflow-wrap:anywhere}
.deep-lines{min-width:0}
.deep-line{padding:10px 0;border-top:1px solid var(--ui-border,#3e4c64);display:grid;grid-template-columns:62px minmax(0,1fr);gap:8px}
.deep-line-meta{display:flex;flex-direction:column;gap:5px;font-variant-numeric:tabular-nums}
.deep-line-meta strong{font-size:17px}
.deep-line-meta span{font-size:11px;color:var(--ui-muted,#aebdd2)}
.deep-pv{position:relative;line-height:28px;height:84px;overflow:hidden;overflow-wrap:anywhere}
.deep-pv button{display:inline;height:28px;min-height:28px;line-height:20px;vertical-align:top;padding:4px;background:transparent;border:0;border-radius:3px;font-size:12px}
.deep-pv.is-clipped::after{content:"…";position:absolute;right:0;bottom:0;min-width:22px;height:28px;line-height:28px;text-align:right;padding-left:8px;background:linear-gradient(90deg,transparent,var(--ui-inset,#172238) 42%);color:var(--ui-muted,#aebdd2);pointer-events:none}
.deep-preview{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;border-top:1px solid var(--ui-border,#3e4c64);margin-top:12px;padding-top:12px}
.deep-preview[hidden]{display:none}
.deep-preview>div:first-child{width:min(260px,100%);margin:auto}
.deep-preview h3{font-size:14px;margin:0}
.deep-preview p{font-size:12px;line-height:1.6}
.deep-note{margin-bottom:0}
body.light-theme .deep-panel{color-scheme:light}

/* Desktop tabs hide Deep visually without stopping its engine/follow state. */
body:not(.app-mobile)[data-desktop-view]:not([data-desktop-view="deep"]) #deepAnalysisPanel{display:none!important}
body:not(.app-mobile)[data-desktop-view="moves"] .workspace-display.is-deep-analysis > #moves{display:block!important}
body:not(.app-mobile)[data-desktop-view="dcc"] .workspace-display.is-deep-analysis > #dccAnalysisPanel{display:block!important}
body:not(.app-mobile)[data-desktop-view="review"] .workspace-display.is-deep-analysis > .game-review-drawer{display:block!important}
body:not(.app-mobile)[data-desktop-view="library"] .workspace-display.is-deep-analysis > #popularGamesPanel{display:flex!important}
