/* Playground workspace: conversation and composer carry the hierarchy. */
#dashboardOverlay #dash-playground.pg-focus #pgInput {outline:none!important;border:0!important;box-shadow:none!important;background:transparent;resize:none}
#dashboardOverlay #dash-playground.pg-focus .pg-input-wrap {border:0;box-shadow:none}
#dashboardOverlay #dash-playground.pg-focus :is(#pgWebToggle,#pgStopBtn) {width:44px;height:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;flex-shrink:0}
#dash-playground.pg-focus #pgStopBtn {background:var(--d-text);color:var(--d-bg);border:0}
#dash-playground.pg-focus .pg-agent-trace {width:min(100%,780px);margin:0 auto;padding:4px 8px 10px}
#dash-playground.pg-focus .pg-trace-compact {background:transparent;border:0;color:var(--d-muted);font-size:13px}
#dash-playground.pg-focus .pg-trace-compact summary {display:flex;align-items:center;gap:8px;min-height:32px;cursor:pointer;list-style:none;width:fit-content;border-radius:6px}
.pg-trace-compact summary::-webkit-details-marker {display:none}
.pg-trace-chevron {font-size:14px;color:var(--d-faint)}
.pg-trace-compact[open] .pg-trace-chevron {transform:rotate(180deg)}
#dash-playground .pg-trace-compact summary:focus-visible {outline:2px solid var(--d-accent);outline-offset:3px}
.pg-trace-metadata {margin-top:8px;padding:8px 14px;border-left:1px solid var(--d-border);max-height:240px;overflow:auto;overflow-wrap:anywhere}
.pg-trace-metadata>div {padding:8px 0}
.pg-trace-metadata b {display:block;font-weight:500;color:var(--d-text)}
.pg-trace-metadata small {color:var(--d-faint)}
.pg-trace-metadata p {white-space:pre-wrap;font-size:12px;margin-top:4px}
#dash-playground:has(.pg-agent-trace.has-activity) #pgTyping {display:none!important}
@media(max-width:370px){#dash-playground.pg-focus .pg-settings>summary{font-size:0;gap:0;width:44px;justify-content:center}}
#dash-playground.pg-focus .pg-history-head #pgHistoryToggle{display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:8px 12px;border:1px solid var(--d-border);border-radius:10px;background:var(--d-panel);color:var(--d-text);transition:background .15s,border-color .15s}
#dash-playground.pg-focus #pgHistoryToggle b{font-size:13px;font-weight:550;line-height:20px}
#dash-playground.pg-focus #pgHistoryToggle .pg-history-icon{color:var(--d-muted);flex:none}
#dash-playground.pg-focus #pgHistoryToggle .pg-history-chevron{color:var(--d-faint);margin-left:3px;transition:transform .15s;flex:none}
#dash-playground.pg-focus .pg-history-head #pgHistoryToggle:hover{background:var(--d-hover);border-color:var(--d-muted)}
#dash-playground.pg-focus .pg-history-head #pgHistoryToggle[aria-expanded=true]{border-color:color-mix(in srgb,var(--d-accent) 45%,var(--d-border));background:var(--d-accent-soft)}
#dash-playground.pg-focus #pgHistoryToggle[aria-expanded=true] .pg-history-chevron{transform:rotate(180deg)}
#dash-playground.pg-focus .pg-history.open .pg-history-list{top:calc(100% + 8px);width:min(340px,calc(100vw - 32px));padding:8px;border-radius:14px;box-shadow:0 12px 32px #0003}
#dash-playground.pg-focus .pg-history-item{margin:2px 0;padding:3px;gap:4px;border-radius:8px}
#dash-playground.pg-focus .pg-history-item:hover{background:var(--d-hover)}
#dash-playground.pg-focus .pg-history-item>button:first-child{font-size:13px;min-height:44px;padding:8px 10px;color:var(--d-text)}
#dash-playground.pg-focus .pg-history-item>button:last-child{width:36px;min-height:44px;border:0;background:transparent}
#dash-playground.pg-focus .pg-history-empty{font-size:13px;line-height:1.65;margin:0;padding:16px 12px;color:var(--d-muted)}
#dashboardOverlay:has(#dash-playground.active) .topbar-search{display:none}
#dashboardOverlay:has(#dash-playground.active) .dash-topbar-right{margin-left:auto}
#dashboardOverlay .dash-main:has(#dash-playground.active){padding:0 24px 12px;scrollbar-gutter:auto}
#dashboardOverlay #dash-playground.active{max-width:none}
#dash-playground.pg-focus .pg-layout{gap:0}
#dash-playground.pg-focus .pg-wrap{gap:0}
#dash-playground.pg-focus .pg-toolbar{flex-shrink:0}
#dash-playground.pg-focus .pg-chat-wrap>.pg-plan-note{flex-shrink:0;width:100%}
#dash-playground.pg-focus .pg-toolbar{height:58px;min-height:58px;border:0;display:flex;align-items:center;gap:8px;padding:6px 0;margin:0;z-index:22;position:relative}
#dash-playground.pg-focus .pg-model-control{display:none}
#dash-playground.pg-focus .pg-history{margin:0;flex:0 0 auto}
#dash-playground.pg-focus .pg-history-head{gap:4px;display:flex}
#dash-playground.pg-focus .pg-history-head button{border:0;background:transparent;color:var(--d-muted);font-size:13px;font-weight:500;padding:8px 12px;border-radius:8px}
#dash-playground.pg-focus .pg-history-head button:hover{background:var(--d-hover);color:var(--d-text)}
#dash-playground.pg-focus .pg-toolbar-actions{margin-left:auto;display:flex;width:auto;gap:4px}
#dash-playground.pg-focus .pg-settings>summary{padding:10px;color:var(--d-muted);font-size:13px;min-height:44px;display:flex;align-items:center;gap:8px}
#dash-playground.pg-focus .pg-settings-panel{top:calc(100% + 8px);right:0;left:auto;width:min(440px,calc(100vw - 32px));max-height:65dvh;overflow:auto;box-shadow:0 12px 36px #0003}
#dash-playground.pg-focus .pg-settings-panel .pg-stat{display:flex}
#dash-playground .pg-chat-options{position:relative}
#dash-playground .pg-chat-options>summary{cursor:pointer;list-style:none;min-width:44px;min-height:44px;display:grid;place-items:center;font-size:20px;color:var(--d-muted);border-radius:8px}
#dash-playground .pg-chat-options>summary:hover{background:var(--d-hover)}
#dash-playground .pg-options-menu{position:absolute;right:0;top:48px;z-index:30;background:var(--d-panel);border:1px solid var(--d-border);padding:6px;border-radius:10px;width:210px;box-shadow:0 12px 32px #0003}
#dash-playground .pg-options-menu button{display:flex;gap:10px;width:100%;border:0;background:transparent;justify-content:flex-start;text-align:left;padding:10px;font-size:13px;color:var(--d-text)}
#dash-playground .pg-options-menu button:hover{background:var(--d-hover)}
#dash-playground.pg-focus .pg-chat-wrap{position:relative;min-width:0}
#dash-playground.pg-focus .pg-chat{padding:24px max(0px,calc((100% - 760px)/2)) 16px;gap:28px;overscroll-behavior:contain;scrollbar-gutter:stable}
#dash-playground.pg-focus .pg-chat:has(.pg-empty){flex:0 1 auto;overflow:visible;padding:0}
#dash-playground.pg-focus .pg-chat-wrap:has(.pg-empty){justify-content:center;padding-bottom:clamp(12px,10vh,100px)}
#dash-playground.pg-focus .pg-empty{display:block;flex:none;max-width:none;margin:0;padding:20px 12px 28px;text-align:center}
#dash-playground.pg-focus .pg-empty-mark,#dash-playground.pg-focus .pg-empty-line{display:none}
#dash-playground.pg-focus .pg-empty h3{font-size:clamp(25px,3vw,34px);font-weight:550;letter-spacing:-.9px;line-height:1.3;margin:0 0 10px}
#dash-playground.pg-focus .pg-empty p{font-size:14px;line-height:1.6;margin:0 auto;color:var(--d-muted)}
#dash-playground.pg-focus .pg-suggestions{display:flex;flex-direction:row;justify-content:center;gap:8px;flex-wrap:wrap;margin:20px auto 0;max-width:650px}
#dash-playground.pg-focus .pg-suggestion{background:transparent;border:1px solid var(--d-line);font-size:12px;border-radius:999px;padding:8px 13px;color:var(--d-muted);min-height:40px}
#dash-playground.pg-focus .pg-suggestion>span:first-child{display:none}
#dash-playground.pg-focus .pg-suggestion:nth-child(n+4){display:none}
#dash-playground.pg-focus .pg-composer{width:min(100%,780px);border-radius:20px;padding:12px 14px 8px;margin:0 auto;box-shadow:0 2px 6px #0001;background:var(--d-panel);flex-shrink:0}
#dash-playground.pg-focus .pg-composer:focus-within{border-color:var(--d-muted);box-shadow:0 0 0 1px color-mix(in srgb,var(--d-muted) 20%,transparent)}
#dash-playground.pg-focus .pg-input-wrap textarea{min-height:52px;max-height:180px;font-size:16px;line-height:1.6;padding:5px 2px}
#dash-playground.pg-focus .pg-cmd-btn{display:none}
#dash-playground.pg-focus .pg-composer-foot{border:0;padding-top:4px;gap:6px;flex-wrap:nowrap}
#dash-playground.pg-focus .pg-composer-model{margin-left:0;flex:1;min-width:0}
#dash-playground.pg-focus .pg-composer-model .pg-model-picker{width:fit-content;max-width:100%}
#dash-playground.pg-focus .pg-composer-model summary{font-size:12px;font-weight:500;color:var(--d-muted);min-height:44px;padding:6px 8px;max-width:100%}
#dash-playground.pg-focus .pg-composer-model summary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#dash-playground.pg-focus .pg-composer-model .pg-model-menu{left:0;right:auto;min-width:min(360px,calc(100vw - 48px));width:min(400px,calc(100vw - 48px));max-height:min(420px,55dvh);padding:8px}
#dash-playground.pg-focus .pg-model-menu button{border-radius:7px;padding:10px;font-size:13px}
#dash-playground.pg-focus .pg-model-menu button[aria-selected=true]{background:var(--d-accent-soft);color:var(--d-accent)}
#dash-playground .pg-model-search{position:sticky;top:0;z-index:1;width:100%;border:1px solid var(--d-border);border-radius:8px;padding:11px 12px;margin-bottom:6px;background:var(--d-panel);color:var(--d-text);font-size:16px}
#dash-playground .pg-search-empty{padding:12px;color:var(--d-muted);font-size:13px}
#dash-playground [hidden]{display:none!important}
#dash-playground.pg-focus .pg-send{width:40px;height:40px;min-height:40px!important;border-radius:50%;flex-shrink:0}
#dash-playground.pg-focus .pg-composer-web .pg-web-toggle{font-size:12px;white-space:nowrap;min-height:40px;padding:6px 8px}
#dash-playground.pg-focus .pg-attach-btn{width:40px;min-height:40px!important;flex-shrink:0}
#dash-playground.pg-focus .pg-plan-note{display:block;text-align:center;font-size:11px;color:var(--d-faint);padding:8px 0 0;margin:0;line-height:1.4}
#dash-playground.pg-focus .pg-msg{gap:0;max-width:100%;width:100%}
#dash-playground.pg-focus .pg-avatar,#dash-playground.pg-focus .pg-meta{display:none}
#dash-playground.pg-focus .pg-msg.user>div:last-child{display:flex;flex-direction:column;align-items:flex-end}
#dash-playground.pg-focus .pg-msg.user .pg-bubble{background:var(--d-panel);border:1px solid var(--d-line);padding:12px 18px;border-radius:20px;max-width:85%;text-align:left}
#dash-playground.pg-focus .pg-msg.assistant .pg-bubble{max-width:100%;font-size:15px;line-height:1.8;padding:0}
#dash-playground.pg-focus .pg-msg-actions{gap:8px;margin-top:10px;opacity:1}
#dash-playground.pg-focus .pg-msg-actions button{border:0;background:transparent;font-size:12px;min-height:40px;padding:8px;color:var(--d-muted)}
#dash-playground.pg-focus .pg-md pre{background:var(--d-panel);border:1px solid var(--d-border);border-radius:12px;padding:18px;overflow:auto;white-space:pre;line-height:1.6}
#dash-playground.pg-focus .pg-md :is(h1,h2,h3,h4){line-height:1.4;margin:24px 0 12px;letter-spacing:-.3px}
#dash-playground.pg-focus .pg-md p{margin:0 0 14px}
#dash-playground.pg-focus .pg-agent-trace{width:min(100%,780px);align-self:center;max-height:180px;overflow:auto;margin:0 0 8px;font-size:12px}
#dash-playground.pg-focus .pg-trace-summary{border:0;background:transparent}
#dash-playground.pg-focus .pg-typing{width:min(100%,780px);align-self:center;padding:8px 0;font-size:12px}
#dash-playground .pg-latest{position:absolute;bottom:160px;left:50%;transform:translateX(-50%);z-index:12;border:1px solid var(--d-border);border-radius:999px;padding:8px 14px;background:var(--d-panel);color:var(--d-text);font-size:12px;box-shadow:0 3px 16px #0002;cursor:pointer}
@media(max-width:768px){
 #dashboardOverlay .dash-main:has(#dash-playground.active){padding:0 12px 10px}
 #dash-playground.pg-focus .pg-toolbar{height:50px;min-height:50px;padding:2px 0}
 #dash-playground.pg-focus .pg-chat-wrap:has(.pg-empty){padding-bottom:32px}
 #dash-playground.pg-focus .pg-empty{padding:12px 6px 22px}
 #dash-playground.pg-focus .pg-suggestions{gap:6px;margin-top:16px}
 #dash-playground.pg-focus .pg-suggestion{font-size:11px;padding:6px 10px}
 #dash-playground.pg-focus .pg-empty p{font-size:13px;max-width:29ch}
 #dash-playground.pg-focus .pg-composer{padding:10px;border-radius:18px}
 #dash-playground.pg-focus .pg-composer-foot{gap:2px}
 #dash-playground.pg-focus .pg-composer-web .pg-web-toggle{font-size:11px;min-width:0;padding:6px}
 #dash-playground.pg-focus .pg-composer-model summary{font-size:11px;padding:6px 3px}
 #dash-playground.pg-focus .pg-composer-model .pg-model-menu{position:fixed;left:12px;right:12px;bottom:155px;width:auto;min-width:0;max-height:45dvh}
 #dash-playground.pg-focus .pg-chat{padding:16px 0;scrollbar-gutter:auto}
 #dash-playground.pg-focus .pg-msg.user .pg-bubble{max-width:94%;padding:10px 14px}
 #dash-playground.pg-focus .pg-plan-note{font-size:10px;padding-top:6px}
 /* Anchor to the full toolbar, not the narrow Controls trigger. Reset both
    horizontal edges; inherited left + width used to push this off-screen. */
 #dash-playground.pg-focus .pg-settings{position:static}
 #dash-playground.pg-focus .pg-settings-panel{left:0;right:0;width:auto;max-width:100%;margin-top:0;grid-template-columns:minmax(0,1fr);max-height:min(520px,calc(100dvh - 150px))}
 #dash-playground.pg-focus .pg-settings-panel .pg-field{min-width:0;grid-column:auto}
}
@media(max-height:560px){#dash-playground.pg-focus .pg-empty{padding:8px}#dash-playground.pg-focus .pg-empty h3{font-size:22px}#dash-playground.pg-focus .pg-suggestions,#dash-playground.pg-focus .pg-empty p{display:none}#dash-playground.pg-focus .pg-chat-wrap:has(.pg-empty){padding-bottom:0}#dash-playground.pg-focus .pg-input-wrap textarea{min-height:40px;max-height:80px}#dash-playground.pg-focus .pg-plan-note{display:none}}
