/* Dock positions follow Editor/MainFrm.cpp::RestoreDefaultDockLayout and the
   original help screenshot: documents left, Resources right, Information below. */
:root { --bg:#151919; --panel:#222929; --line:#3b4847; --muted:#9cada9; --accent:#b5dc78; --green:#83d8b5; --text:#e2eae6; }
[hidden] { display:none!important; }
button,input,select { border-radius:2px; }
header { height:47px; padding:0 12px; gap:22px; background:#202726; }
.brand { font-size:20px; gap:7px; }.brand img { flex:0 0 auto; width:32px; height:32px; object-fit:contain; }.brand small { display:inline; margin-left:8px; font-size:8px; letter-spacing:2px; }
.toolbar { padding:6px 10px; background:#29312f; }.toolbar button { padding:5px 10px; }.toolbar>div { gap:5px; }
.release-badge { background:#283427; border-color:#627751; color:#d2e9b5; }
main { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 302px; grid-template-rows:minmax(260px,1fr) 170px; gap:5px; padding:5px; background:#111615; }
.workbench { grid-column:1 / 3; min-width:0; min-height:0; display:flex; flex-direction:column; border:1px solid var(--line); }
.dock-heading { flex-shrink:0; height:29px; display:flex; align-items:center; justify-content:space-between; padding:0 9px; background:#303d39; border-bottom:1px solid #52615b; font-size:12px; font-weight:600; }
.dock-heading .quiet { font-size:11px; padding:3px 5px; color:#d1dfd7; }.dock-heading>div { display:flex; gap:2px; }
.documents { --source-width:48%; flex:1; min-height:0; min-width:0; display:grid; grid-template-columns:minmax(0,var(--source-width)) 5px minmax(0,1fr); overflow:hidden; }
.editor-panel { border:0; }.panel-heading { height:28px; padding:0 9px; background:#232d29; font-size:11px; }
.editor-wrap { background:#0b1310; }#editor { color:#aee3c2; padding-top:10px; padding-left:7px; }#gutter { padding-top:10px; background:#111b16; color:#61796b; width:42px; }
.editor-foot { padding:4px 8px; background:#1c2721; }.editor-foot span:last-child { display:none; }
#source-divider { background:#394a42; cursor:col-resize; touch-action:none; }#source-divider:focus-visible { background:var(--accent); outline:0; }
.stage { padding:10px; background:#121b18; gap:10px; }.stage-note { font-size:10px; max-width:300px; }
.stage canvas { border-color:#50635a; box-shadow:0 5px 20px #0006; max-height:calc(100% - 40px); }
.document-tabs,.resource-tabs { display:flex; background:#26322c; border-top:1px solid var(--line); flex-shrink:0; overflow:auto; }
.document-tabs button,.resource-tabs button { border:0; border-right:1px solid var(--line); border-radius:0; background:transparent; color:#a8bbb0; white-space:nowrap; font-size:11px; padding:7px 12px; }
.document-tabs .active,.resource-tabs .active { background:#405440; color:#edf8df; box-shadow:inset 0 -2px var(--accent); }
.workbench[data-layout=source] .documents,.workbench[data-layout=stage] .documents,.workbench[data-layout=banks] .documents { grid-template-columns:minmax(0,1fr); }
.workbench:not([data-layout=split]) #source-divider,.workbench[data-layout=source] .output-panel,.workbench[data-layout=stage] .editor-panel,.workbench[data-layout=banks] .editor-panel,.workbench[data-layout=banks] .output-panel { display:none; }
.workbench[data-layout=banks] #banks-pane { width:100%; background:var(--panel); }
.resources { grid-column:3; grid-row:1 / 3; padding:0; display:flex; flex-direction:column; border:1px solid var(--line); overflow:hidden; background:#1b2520; }
.resource-body { flex:1; min-height:0; overflow:auto; }.resource-body>div { padding:10px; }.resource-body #resource-banks { padding:0; }.resource-body #debug-pane { padding:5px; }
.resources .section-label { margin:5px 0 9px; }.resources .section-label:not(:first-child) { margin-top:20px; }.resources .file-selected { font-size:11px; background:#34482f; border-color:#5f7452; }
.resource-tabs button { flex:1; padding:7px 5px; }
.bank-columns,.bank-row { display:grid; grid-template-columns:45px 52px 45px minmax(0,1fr); align-items:center; gap:5px; }
.bank-columns { background:#37453b; padding:7px 8px; color:#cbdacb; font-size:10px; position:sticky; top:0; }
#bank-list { padding:0; font:11px/1.7 Consolas,monospace; }.bank-row { width:100%; border:0; border-bottom:1px solid #2d3c31; border-radius:0; margin:0; padding:7px 8px; text-align:left; background:#202e24; font:inherit; }
.bank-row:hover { background:#3a503a; }.bank-row span:first-child { color:#c6e9a0; }.bank-row span:last-child { text-align:right; color:#a2b59f; }
.resource-hint { color:var(--muted); padding:6px 9px; font-size:11px; line-height:1.6; }
#feature-examples { display:block; }.resources .example { padding:10px 5px; border-bottom:1px solid var(--line); }.resources .example small { line-height:1.5; }
#workshop-search { width:100%; padding:7px; margin-bottom:4px; }.file-row { font-size:11px; }
.information { grid-column:1; grid-row:2; }.console-dock { grid-column:2; grid-row:2; }
.information,.console-dock { display:flex; flex-direction:column; min-height:0; min-width:0; border:1px solid var(--line); background:#19221b; }
.information #messages { flex:1; max-height:none; margin:0; padding:10px 12px; color:#c1d6bc; overflow:auto; }.dock-foot { color:#8fa189; font-size:10px; padding:4px 9px; border-top:1px solid var(--line); }
.console-dock .pane { padding:8px; }#console { min-height:60px; font-size:11px; color:#bce7bf; }#input-form { flex-wrap:wrap; margin-top:8px; }#input-form input { width:130px; flex:1; padding:4px; }#input-form label { width:100%; font-size:10px; }
footer { background:#29372e; height:25px; font-size:10px; }
.bank-elements { grid-template-columns:repeat(auto-fill,minmax(105px,1fr)); }#bank-preview { justify-content:flex-start; max-height:290px; min-height:100px; background:#121b16; }#bank-preview pre { margin:auto 0; }
select,input { background:#101b15; }.example-card { background:linear-gradient(125deg,#2a382e,#1d2922); border-color:#506249; }dialog { border-radius:3px; }#viewer-surface { background:#131b16; }
@media (min-width:1700px) { main { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 350px; grid-template-rows:minmax(260px,1fr) 200px; } }
@media (max-width:1050px) and (min-width:801px) { main { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 255px; }.brand small,.tag { display:none; }.document-tabs button { padding:7px; font-size:10px; } }
@media (max-width:800px),(pointer:coarse) {
  body { height:auto; min-height:100dvh; }header { height:48px; gap:6px; }.brand { font-size:18px; }.brand small { display:none; }.toolbar { padding:6px; }.toolbar>div { flex-wrap:wrap; }.toolbar button { font-size:10px; padding:6px 8px; }
  main { grid-template-columns:minmax(0,1fr); grid-template-rows:auto; gap:5px; }.resources { grid-column:1; grid-row:2; max-height:245px; width:100%; display:flex; padding:0; }.resources .dock-heading { min-height:32px; }.resource-body { max-height:162px; }.resources #bank-list,.resources #feature-examples,.resources #asset-list,.resources .file-selected,.resources .section-label { display:block; }.resources .section-label { display:flex; }.resources .example { min-width:0; }
  .workbench { grid-column:1; grid-row:1; height:760px; }.documents { display:flex; flex-direction:column; }.editor-panel { flex:1; height:auto; min-height:240px; }.output-panel { flex:1; height:auto; min-height:280px; }#source-divider { display:none; }.document-tabs button { flex:1; font-size:9px; padding:8px 4px; }.workbench:not([data-layout=split]) { height:540px; }.workbench[data-layout=banks] #banks-pane { flex:1; }
  .information { grid-column:1; grid-row:3; height:120px; }.console-dock { grid-column:1; grid-row:4; height:190px; }.resource-tabs { overflow:visible; }.resource-tabs button { font-size:11px; }.resource-body #resource-project { display:block; }.bank-row { display:grid; }.bank-columns { position:static; }.stage-note { font-size:9px; }.stage canvas { max-height:220px; }footer { height:auto; gap:8px; padding:7px; }
}

.breakpoint-entry{padding:8px 0;border-bottom:1px solid var(--line)}.breakpoint-entry>small{display:inline-block;margin:4px 8px;color:var(--muted)}.breakpoint-entry>input{width:auto;vertical-align:middle}.breakpoint-options{display:grid;gap:7px;padding:8px 0}.breakpoint-options label{display:grid;gap:3px;font-size:11px}.breakpoint-options input,.breakpoint-options select{width:100%;min-width:0;padding:6px}#debug-log{max-height:180px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.5 monospace}
/* Touch landscapes can exceed the narrow-screen breakpoint. Keep every toolbar
   action reachable without overflowing and triggering mobile viewport scaling. */
@media(pointer:coarse){.toolbar,.toolbar>div{flex-wrap:wrap;min-width:0;max-width:100%}.project-title{min-width:0;overflow:hidden}footer{height:auto;flex-wrap:wrap;gap:8px}}

@media(pointer:coarse){.toolbar button{min-height:44px}.panel-heading,.dock-heading,.surface-heading{flex-wrap:wrap;min-width:0;height:auto;min-height:36px}.tabs{flex-wrap:wrap;gap:8px}.panel-heading>*,.editor-foot>*{min-width:0;overflow-wrap:anywhere}}
/* The Help and learning links also share the header on wide touch screens. */
@media(pointer:coarse){header{height:auto;min-height:48px;flex-wrap:wrap;gap:6px;padding:6px 12px}header button,header .learning-launch{min-height:44px}}

.output-dock { display:flex; flex-direction:column; min-height:0; min-width:0; overflow:hidden; }
@media (max-width:800px),(pointer:coarse) {
  .output-dock:not([data-folded=true]) { height:190px; }
}
#output-panels { flex:1 1 0; min-height:0; display:grid; grid-template:minmax(0,1fr)/minmax(0,1fr); }
#output-panels pre { overflow:auto; margin:0; max-height:none; min-height:0; padding:10px 12px; white-space:pre-wrap; overflow-wrap:anywhere; }
#graphics-output-panel { display:grid; grid-template:minmax(0,1fr)/minmax(0,1fr); }
#output-tabs { flex:none; display:flex; overflow:auto; border-top:1px solid var(--line); }
#output-tabs button { flex:none; border:0; border-radius:0; border-bottom:2px solid transparent; padding:5px 10px; background:transparent; }
#output-tabs button[aria-selected="true"] { border-bottom-color:currentColor; font-weight:bold; }
#output-tabs button[data-error]::after { content:""; display:inline-block; width:6px; height:6px; margin-inline-start:7px; border-radius:50%; background:#e78176; }
#output-tabs button:focus-visible { outline-offset:-2px; }
.output-source-link { cursor:pointer; }
.output-source-link:hover,.output-source-link:focus-visible { text-decoration:underline; }
