/* 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"]>.page-heading{max-width:880px;width:100%;margin:0 auto}
#screen[data-screen="playground"]>.standalone-playground{flex:1 1 0;min-height:0;min-width:0;width:100%;max-width:880px;margin:0 auto;max-height:none;gap:12px}
.standalone-playground>.request-card{flex:0 1 auto;max-height:100%;min-height:0;min-width:0;display:flex;flex-direction:column}
.standalone-playground>.request-card form{flex:0 1 auto;display:flex;flex-direction:column;min-height:0}
.standalone-playground>.request-card textarea{flex:0 1 auto;min-height:160px;max-height:260px;resize:none;height:auto;font-size:18px;padding:18px;overflow:auto}
.standalone-playground .request-card:has(.response:not([hidden])) textarea{height:96px;min-height:88px;max-height:150px}
.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 .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:0 1 auto;min-height:0;max-height:min(46vh,380px);overflow:auto;overscroll-behavior:contain;padding:15px 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 .model-shortcuts{flex-shrink:0;margin:0 0 0 auto;min-width:0;gap:6px}
.standalone-playground .model-shortcut{min-width:0}
.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:52px 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-card textarea{min-height:130px;max-height:200px}
 .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 .model-shortcuts{display:none}
}
/* 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}
 #screen .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}
 #screen .standalone-playground .model-shortcut{width:28px;height:28px}
 .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:500px){
 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}
 #screen .standalone-playground .model-shortcuts{display:none}
}

.provider-initial{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:6px;background:#eef1e5;border:1px solid #dce1cf;font-size:11px;font-weight:750;color:#242521;flex-shrink:0}
.earn-request .model-toolbar,.setup-content .model-toolbar{flex-wrap:wrap;gap:8px}
.live-model-select{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;min-width:0;max-width:100%;margin:0}
.model-select-label{display:flex;align-items:center;justify-content:flex-start;gap:6px;font-size:12px;font-weight:700;color:var(--muted)}
.model-picker-btn{display:flex;align-items:center;gap:9px;width:100%;min-height:40px;padding:7px 12px;border:1px solid #d8e1cd;border-radius:10px;background:#fff;color:var(--ink);font-size:13.5px;font-weight:650;text-align:left;cursor:pointer;transition:border-color 140ms ease,background-color 140ms ease,box-shadow 140ms ease}
.model-picker-btn:hover:not(:disabled){border-color:#9eb55c;background:#fafdf2}
.model-picker-btn:disabled{opacity:.65;cursor:not-allowed}
.model-picker-btn .provider-logo{width:20px;height:20px;flex-shrink:0}
.model-picker-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.model-picker-name.is-mono{font-family:var(--mono);font-size:12.5px;font-weight:600}
.model-picker-btn>.hp-icon{width:16px;height:16px;color:#5a6052;flex-shrink:0}
.live-model-select.is-reasoning{flex:0 0 auto}
.live-model-select.is-reasoning .reasoning-pills{min-height:40px;padding:4px;width:fit-content}
.live-model-select.is-reasoning .reasoning-pill{min-height:30px;padding:5px 11px;font-size:12px}
.live-model-select select{appearance:none;min-width:168px;width:100%;max-width:100%;min-height:40px;padding:8px 34px 8px 12px;border:1px solid #d8e1cd;border-radius:10px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.25 6 7.75l3.5-3.5' fill='none' stroke='%235a6052' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;color:inherit;font:inherit;cursor:pointer;text-overflow:ellipsis}
.live-model-select.is-reasoning select{min-width:146px}
.setup-controls-row{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap}
.integration-panel>.setup-controls-row{margin:12px 0 14px}
.integration-panel>.setup-controls-row>.live-model-select{flex:1 1 240px}
.integration-panel>.setup-controls-row>.live-model-select.is-reasoning{flex:0 0 auto}
.live-settings .setting-row>.live-model-select{flex:1;min-width:0}
.reasoning-pills{display:inline-flex;align-items:center;gap:3px;padding:3px;background:#f3f5ec;border:1px solid #dfe4d3;border-radius:9px;flex-shrink:0}
.reasoning-label{font-size:11px;font-weight:700;color:#626a58;padding:0 6px 0 7px;user-select:none}
.reasoning-pill{border:0;background:transparent;padding:5px 9px;border-radius:6px;font-size:11.5px;font-weight:650;color:#52594a;min-height:28px;transition:background-color 120ms ease,color 120ms ease}
.reasoning-pill:hover:not(:disabled){color:#242521;background:#e8ecdd}
.reasoning-pill.selected{background:#fff;color:#242521;box-shadow:0 1px 2px rgba(36,37,33,.09)}
#modal:has(.model-results)[open]{display:flex;flex-direction:column;max-height:min(680px,calc(100dvh - 32px));overflow:hidden;padding-bottom:0}
#modal:has(.model-results) .model-results{flex:1 1 auto;min-height:0;max-height:none;margin:0 -10px;padding:0 10px 18px}
#model-count{margin:2px 0 6px;flex-shrink:0}
#more-models{align-self:center;flex-shrink:0;margin:6px 0 14px}
.picker-tools input{appearance:none;-webkit-appearance:none}
.picker-context{margin:0 0 10px;flex-shrink:0}
.picker-caps{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:10px 0 6px;flex-shrink:0}
.cap-chip{padding:5px 11px;border-radius:999px;border:1px solid #dce1d1;background:#fafbf7;font-size:11.5px;font-weight:650;color:#555c4c;transition:background-color 120ms ease,border-color 120ms ease}
.cap-chip:hover{background:#f0f4e5}
.cap-chip.selected{background:#e0f580;border-color:#adc44d;color:#263114}
.model-option-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;text-align:left}
.model-option-top{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.model-option-top>strong{font-size:13.5px;font-weight:700}
.model-option-main>small{margin-top:0;font-size:11.5px;color:var(--muted);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.model-badges{display:inline-flex;flex-wrap:wrap;gap:4px;margin:0}
.model-cap{font-style:normal;font-size:10px;font-weight:650;padding:1.5px 6px;border-radius:5px;background:#f0f2ea;color:#4f5646}
.model-cap.is-reasoning{background:#ebe5f9;color:#4c3277}
.model-cap.is-fast{background:#e6f4ea;color:#245937}
.code-toolbar{gap:12px;margin-bottom:8px}
.code-toolbar>div{min-width:0;overflow-x:auto;scrollbar-width:none}
.code-toolbar>div::-webkit-scrollbar{display:none}
.tab,.code-toolbar>.text-button{white-space:nowrap;flex-shrink:0}
@media(max-width:640px){
 .picker-tools{flex-direction:row}
 .picker-tools input,.picker-tools select{height:42px}
 .picker-tools select{flex:0 0 140px;max-width:140px;font-size:14px;padding:8px 28px 8px 10px}
 .picker-tools input{font-size:16px;padding:8px 12px}
 #modal:has(.model-results) .model-results{margin:0 -8px;padding:0 8px 16px}
 .model-option{padding:11px 8px}
 .reasoning-label{display:inline;font-size:10.5px;padding:0 5px}
 .reasoning-pill{min-height:34px;padding:6px 10px}
 .earn-request .model-button{flex:1 1 100%;min-height:40px}
 .earn-request .reasoning-pills{width:100%;justify-content:space-between}
 .earn-request .reasoning-pill{flex:1}
 .setup-controls-row{width:100%}
 .setup-controls-row>.live-model-select{flex:1 1 100%}
 .live-model-select select{font-size:16px}
 .code-toolbar{gap:8px}
 .code-toolbar>div{gap:10px}
 .tab{font-size:11.5px;padding:10px 2px}
 .code-toolbar>.text-button{font-size:11.5px;padding:8px 2px}
}
.response-notice,.model-availability{font-size:12px;line-height:1.5}.response-notice{color:#58634f}

/* Wave 3: Playground streaming caret, visual progressor, Markdown prose & quick-switch transitions. */
.response{position:relative}
.hp-progress{position:relative;width:100%;height:2.5px;border-radius:999px;background:#e3ead3;overflow:hidden;margin:-4px 0 12px}
.hp-progress.is-subtle{height:2px;opacity:.75}
.hp-progress.is-boot{max-width:880px;height:3px;margin:4px auto 16px}
.hp-progress::after{content:"";position:absolute;inset:0 auto 0 0;width:42%;border-radius:999px;background:linear-gradient(90deg,rgba(123,150,50,.15) 0%,#7b9632 50%,rgba(123,150,50,.15) 100%);animation:hp-progress-slide 1.15s cubic-bezier(.4,0,.2,1) infinite}
@keyframes hp-progress-slide{0%{transform:translateX(-110%)}100%{transform:translateX(260%)}}
.hp-skeleton-inline{display:inline-block;width:96px;height:13px;border-radius:5px;vertical-align:middle;background:linear-gradient(90deg,#eaeee0 25%,#f5f7ef 50%,#eaeee0 75%);background-size:200% 100%;animation:hp-shimmer 1.2s ease-in-out infinite}
@keyframes hp-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.md-prose{font-size:14.5px;line-height:1.65;color:var(--ink);overflow-wrap:anywhere}
.md-prose>:first-child{margin-top:0}
.md-prose>:last-child{margin-bottom:0}
.md-prose p{margin:0 0 10px;white-space:normal;line-height:1.65}
.md-prose p:last-child{margin-bottom:0}
.md-prose h3,.md-prose h4{margin:14px 0 6px;font-size:15px;font-weight:750;letter-spacing:-.2px;line-height:1.35}
.md-prose h4{font-size:14px}
.md-prose ul,.md-prose ol{margin:8px 0 10px;padding-left:20px;line-height:1.6}
.md-prose li+li{margin-top:4px}
.md-prose blockquote{margin:8px 0;padding:2px 0 2px 12px;border-left:3px solid #c5d29b;color:#4c5540}
.md-prose hr{border:0;border-top:1px solid #dfe5d1;margin:12px 0}
.md-prose :not(pre)>code{font:600 .9em var(--mono);background:rgba(36,37,33,.07);padding:1.5px 5px;border-radius:5px}
.md-prose pre{margin:10px 0;padding:12px 14px;border-radius:9px;background:#1b1d18;border:1px solid #2b2e26;color:#f1f5e6;font:500 12.5px/1.55 var(--mono);overflow-x:auto;white-space:pre}
.md-prose pre>code{background:none;padding:0;color:inherit;font:inherit}
.md-prose a{color:#3d551e;font-weight:600}
.response.is-entering{animation:hp-resp-in 200ms cubic-bezier(.22,1,.36,1)}
@keyframes hp-resp-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.response.is-streaming #response-output>:last-child:not(pre)::after{content:"";display:inline-block;width:2px;height:1em;margin-left:3px;vertical-align:-.12em;background:#6b8133;animation:hp-caret 900ms steps(2,start) infinite}
@keyframes hp-caret{to{opacity:0}}
.model-shortcut{transition:background-color 140ms ease,border-color 140ms ease,transform 110ms ease}
.model-shortcut:active:not(:disabled){transform:scale(.94)}
@media(prefers-reduced-motion:reduce){.response.is-entering,.response.is-streaming #response-output>:last-child:not(pre)::after,.hp-progress::after,.hp-skeleton-inline{animation:none!important}}
