/* A bounded workspace: prompt and response scroll independently. */
#open-events[hidden],#preview-controls[hidden]{display:none}
body:has(#screen[data-screen="playground"]){height:var(--playground-viewport-height,100dvh)}
.workspace-shell:has(#screen[data-screen="playground"]){height:100%;grid-template-rows:64px minmax(0,1fr)}
.workspace-shell:has(#screen[data-screen="playground"]) .app-footer{display:none}
#screen[data-screen="playground"]{overflow:hidden;scrollbar-gutter:auto}
#screen[data-screen="playground"]>.standalone-playground{flex:1 1 0;min-height:0;min-width:0;width:100%;max-width:none;max-height:none;gap:12px}
.standalone-playground>.request-card{flex:1 1 0;min-height:0;min-width:0;display:flex;flex-direction:column}
.standalone-playground .model-toolbar{padding:12px 18px;min-width:0}
.standalone-playground .model-button{max-width:100%}
.standalone-playground .model-button .provider-logo{flex-shrink:0}
.standalone-playground form{display:flex;flex-direction:column;flex:1 1 0;min-height:0}
.standalone-playground .request-card:has(.response:not([hidden])) form{flex:0 1 42%;min-height:112px}
.standalone-playground textarea{flex:1 1 0;resize:none;min-height:0;max-height:none;height:auto;font-size:18px;padding:18px;overflow:auto}
.standalone-playground .request-actions{padding:0 16px 12px;gap:10px;flex-shrink:0}
.standalone-playground .request-actions .primary{min-height:40px;padding:10px 15px}
.standalone-playground .response:not([hidden]){flex:1 1 0;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;padding:14px 18px}
.standalone-playground .response p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.standalone-playground .response-meta{gap:12px;flex-wrap:wrap}
.standalone-playground .quick-models{flex-shrink:0;margin:0;min-width:0;gap:8px}
.standalone-playground .quick{min-width:0;padding:10px 6px;font-size:11px}
.standalone-playground .notice,.standalone-playground .reward-banner{flex-shrink:0;margin:0}
.standalone-playground .reward-banner{padding:10px 14px}
/* Tablets retain useful editing space beside the workspace navigation. */
@media(min-width:641px) and (max-width:1000px){
 #screen[data-screen="playground"]{padding:18px;gap:12px}
 .standalone-playground .eyebrow{display:none}
}
@media(max-width:640px){
 .workspace-shell:has(#screen[data-screen="playground"]){height:auto;grid-template-rows:46px minmax(0,1fr)}
 #screen[data-screen="playground"]{padding:12px 14px;gap:10px}
 #screen[data-screen="playground"]>.standalone-playground{gap:9px}
 .standalone-playground .model-toolbar{padding:10px 13px}
 .standalone-playground textarea{font-size:16px;padding:13px}
 .standalone-playground .request-actions{padding:0 12px 10px}
 .standalone-playground .response:not([hidden]){padding:12px 13px}
 .standalone-playground .response p{font-size:13px}
 .standalone-playground .quick-models{gap:5px}
 .standalone-playground .quick{font-size:10px;padding:9px 3px;gap:4px}
}
/* Short windows and keyboards need less chrome, not smaller text inputs. */
@media(max-height:580px){
 #screen[data-screen="playground"]{padding:8px 14px;gap:6px}
 #screen[data-screen="playground"] .page-heading p{display:none}
 #screen[data-screen="playground"] .page-heading h1{font-size:21px}
 #screen[data-screen="playground"]>.standalone-playground{gap:6px}
 .standalone-playground .model-toolbar{padding:6px 12px}
 .standalone-playground .request-actions{padding:0 10px 6px}
 .standalone-playground .request-actions .primary{min-height:34px;padding:7px 12px;font-size:11px}
 .standalone-playground .quick{padding:6px 3px;font-size:10px}
 .standalone-playground .reward-banner{padding:6px 12px;font-size:10px}
 .standalone-playground .request-card:has(.response:not([hidden])) form{min-height:90px}
}
@media(min-width:641px) and (max-height:580px){
 .workspace-shell:has(#screen[data-screen="playground"]){grid-template-rows:46px minmax(0,1fr)}
 body:has(#screen[data-screen="playground"]) .app-header{height:46px}
 .standalone-playground .request-card:has(.response:not([hidden])){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}
 .standalone-playground .model-toolbar,.standalone-playground .reward-banner{grid-column:1/-1}
 .standalone-playground .request-card:has(.response:not([hidden])) form{min-height:0}
 .standalone-playground .response:not([hidden]){border-top:0;border-left:1px solid #e5ebd7;padding:10px 13px}
}
@media(max-width:640px) and (max-height:440px){
 body:has(#screen[data-screen="playground"]) .sidebar>.brand{display:none}
 body:has(#screen[data-screen="playground"]) .sidebar{padding-top:4px}
 #screen[data-screen="playground"]>.page-heading{display:none}
 .standalone-playground .quick-models{display:none}
}
