/* Brand refinement: retain product colours and make control roles readable. */
.beta-workspace { --beta-card-copy:13px; --beta-detail-copy:12px; }
.beta-build .title-block .beta-intro { max-width:260px; font-size:13px; line-height:1.6; margin:0; }
.beta-build .beta-composition > .category { border-color:transparent; border-bottom-color:var(--border); border-radius:0; margin-bottom:0; }
.beta-build .beta-composition > .category.active { border-color:var(--red); border-radius:var(--ui-radius); background:var(--control-wash); }
.beta-build .beta-composition > .category:not(.active):hover { border-color:var(--line); border-radius:var(--ui-radius); }
.beta-workspace.beta-build .beta-editor { border-color:var(--line); background:transparent; }
.beta-workspace .beta-shape > span { font-size:13px; font-weight:500; }
.beta-workspace .beta-shape small { font-size:12px; line-height:1.45; }
.beta-workspace .beta-shape small:last-child { color:var(--red); font-weight:500; }
.beta-workspace .beta-option-browser .beta-shape { min-width:104px; flex-basis:max(104px,calc((100% - 24px)/3.1)); min-height:156px; }
.beta-workspace .beta-body-designs .beta-shape { height:176px; min-height:176px; }
.beta-workspace .beta-body-category { min-height:86px; gap:6px; }
.beta-workspace .beta-body-category > .beta-tier-action { font-size:13px; font-weight:500; white-space:nowrap; }
.beta-workspace .beta-body-category > small { font-size:12px; }
.beta-body-hint { font-size:12px; color:var(--muted); line-height:1.5; margin:10px 0 0; }
.beta-build .beta-random-block .beta-note { font-size:12px; line-height:1.5; margin:8px 0 0; }
.beta-build .beta-starting-ideas { border-top-color:var(--border); }
.beta-build .beta-missing-data { border-color:var(--border); font-size:12px; }
.beta-build .beta-body-select small { font-size:11px; }
.beta-build .workflow-actions > .primary { white-space:nowrap; }
.beta-build .beta-body-select small { white-space:nowrap; }
.beta-build .beta-body-select > span { min-width:0; line-height:1.3; }
@media (min-width:721px) {
  .beta-build .beta-body-rows > .beta-body-row { gap:3px; }
  .beta-build .beta-body-select { gap:6px; }
  .beta-build .beta-body-select img { width:30px; }
}
@media (min-width:721px) and (pointer:fine) {
  .beta-build .beta-body-list button:not(.beta-body-select):not(.beta-add-body) { width:28px; flex:0 0 28px; }
}
@media (max-width:720px) {
  .has-beta-mobile-preview .beta-editor button { scroll-margin-top:104px; scroll-margin-bottom:100px; }
}
@media (min-width:721px) and (max-height:950px) {
  .beta-build .beta-editor .editor-heading { padding-bottom:8px; margin-bottom:10px; }
  .beta-workspace.beta-build .beta-body-category { min-height:76px; }
  .beta-workspace.beta-build .beta-body-designs .beta-shape { height:160px; min-height:160px; }
}

/* Compact desktop widths get two usable task columns. Landscape iPad retains
   the established three-column workspace from 1024px upward. */
@media (min-width:721px) and (max-width:1023px) {
  .workspace.beta-build { grid-template-columns:minmax(220px,1fr) minmax(300px,1fr); grid-template-rows:auto auto; gap:22px; }
  .beta-build > .left-column { display:contents; }
  .beta-build .title-block { grid-column:1 / -1; grid-row:1; display:grid; grid-template-columns:1fr 1fr; align-items:end; gap:0 22px; }
  .beta-build .title-block > .eyebrow { grid-column:1; margin-bottom:8px; }
  #main .beta-build .title-block h1 { grid-column:1; font-size:36px; margin:0; }
  .beta-build .title-block .beta-intro { grid-column:2; grid-row:1 / 3; align-self:center; max-width:280px; }
  .beta-build > .beta-stage { grid-column:1; grid-row:2; width:100%; }
  .beta-build > .workflow-column { grid-column:2; grid-row:2 / span 3; }
  .beta-build .beta-composition { grid-column:1; grid-row:3; }
  .beta-build .beta-starting-ideas { grid-column:1; grid-row:4; margin-top:0; }
  .beta-build .beta-stage-surface.beta-stack-surface { height:360px; }
  .beta-build .beta-stack-motion { padding-inline:40px 64px; }
}
@media (max-width:720px) {
  .beta-build .title-block .beta-intro { max-width:100%; font-size:12px; margin:9px 0 0; }
  .beta-workspace .beta-option-browser .beta-shape { flex-basis:112px; min-width:112px; }
  .beta-workspace .beta-body-category { min-height:86px; }
  .beta-build .beta-body-hint { margin-bottom:14px; }
  .beta-build .beta-stage-surface.beta-stack-surface { height:225px; }
}
@media (min-width:1024px) and (max-height:740px) {
  .beta-workspace.beta-build .beta-editor { padding:10px; }
  .beta-build .beta-editor .editor-heading { padding-bottom:6px; margin-bottom:8px; }
  .beta-build .beta-body-categories { margin-bottom:4px; }
  .beta-build .beta-body-categories > .field-label { margin-bottom:4px; }
  .beta-workspace.beta-build .beta-body-category { min-height:68px; }
  .beta-body-hint { margin-top:4px; line-height:1.4; }
  .beta-workspace.beta-build .beta-body-designs .beta-shape { height:144px; min-height:144px; padding:8px 6px; gap:6px; }
  .beta-workspace.beta-build .beta-body-designs .beta-shape img { height:36px; }
}
/* Keep Total/Next visible while compact two-column controls are browsed. */
@media (min-width:721px) and (max-width:1023px) {
  .workspace.beta-build { padding-bottom:90px; }
  .beta-build .workflow-actions { position:fixed; left:12px; right:12px; bottom:0; z-index:11; display:grid; grid-template-columns:1fr 1.7fr; gap:12px; padding:10px 16px calc(10px + env(safe-area-inset-bottom)); background:var(--cream); border:1px solid var(--line); border-radius:8px 8px 0 0; }
  .beta-build .workflow-actions > .primary { grid-column:2; grid-row:1; }
  .beta-build .workflow-actions > .text-btn { display:none; }
  .beta-build .workflow-actions .price-panel { grid-column:1; grid-row:1; border:0; margin:0; }
  .beta-build .workflow-actions .price-panel > summary { min-height:48px; padding:0; grid-template-columns:1fr auto; gap:0 12px; }
  .beta-build .workflow-actions .price-disclosure { display:none; }
  .beta-build .workflow-actions .price-total { grid-column:1; grid-row:2; }
  .beta-build .workflow-actions .beta-price-rows { position:absolute; bottom:100%; left:0; right:0; max-height:45svh; overflow:auto; padding:14px; background:var(--cream); border:1px solid var(--line); border-radius:8px 8px 0 0; }
  body:has(dialog[open]) .beta-build .workflow-actions { visibility:hidden; }
}
@media (min-width:721px) and (max-width:1023px) and (max-height:500px) {
  .beta-build .beta-stage-surface.beta-stack-surface { height:240px; }
}
@media (max-width:360px) {
  .site-header .product-label { white-space:normal; min-width:0; }
  .site-header .steps { gap:4px; }
  .site-header .step { gap:4px; padding-inline:0; font-size:9px; }
  .site-header .step-dot { width:24px; height:24px; min-width:24px; flex-basis:24px; }
  .site-header .step-divider { width:8px; }
  .beta-build .workflow-actions { grid-template-columns:minmax(0,1fr) minmax(0,1.8fr); }
  .beta-build .workflow-actions .price-panel { min-width:0; }
  .beta-build .price-panel > summary { grid-template-columns:minmax(0,1fr) 12px; }
  .beta-build .price-total { font-size:16px; }
}

/* Category symbols are a relative size guide, with stable label baselines. */
.beta-workspace .beta-body-category[data-body-category="s"] img { max-width:44px; }
.beta-workspace .beta-body-category[data-body-category="m"] img { max-width:60px; }
.beta-workspace .beta-body-category[data-body-category="l"] img { max-width:83px; }
/* Keep desktop controls in a content-sized row. The lamp has its own bounded
   presentation zone, independent of fullscreen height or expanded price rows. */
@media (min-width:1024px) and (hover:hover) and (pointer:fine) {
  .beta-build { align-content:start; }
  .beta-build > .beta-stage {
    align-self:start;
    block-size:clamp(480px,calc(100svh - 160px),620px);
    justify-content:center;
  }
}
