/* Construction 2.0: one scroll surface, fixed header and editing tools. */
#app #buildPanel{overflow:hidden}
#app #buildPanel .build-groups{padding:6px;gap:4px;border:1px solid #d4bf96;background:#eee2ca;border-radius:14px}
#app #buildPanel .build-groups button{font-size:14px;line-height:1.25;min-height:48px;padding:6px;gap:6px;word-break:normal;overflow-wrap:normal;border:1px solid transparent;background:transparent}
#app #buildPanel .build-groups button.active{background:#e4eccf;border-color:#809555;box-shadow:none;color:#40592c}
#app #buildPanel .build-category-icon{width:26px;height:26px;flex:0 0 26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;color:#79603b;filter:none}
#app #buildPanel .build-help{font-size:14px;line-height:1.4;margin:12px 2px}
#app #buildPanel .catalog-items button{border:1px solid #d5bb8b;border-radius:14px;background:#fff9ed;color:#55452f;box-shadow:none;min-width:0;gap:10px;padding:10px}
#app #buildPanel .catalog-items .item-art{width:80px;height:64px;flex:0 0 80px;background:#f0e6ce;border-radius:10px;display:flex;align-items:center;justify-content:center;box-shadow:none}
#app #buildPanel .item-art img{width:80px;height:64px;object-fit:contain}
#app #buildPanel .item-copy{display:grid;gap:4px;min-width:0;white-space:normal;word-break:normal;overflow-wrap:normal}
#app #buildPanel .item-copy strong{font-size:16px;line-height:1.25}
#app #buildPanel .item-copy small{font-size:14px;line-height:1.3;color:#79684d;margin:0}
#app #buildPanel .catalog-price{font-size:15px;font-weight:800;color:#566d33}
#app #buildPanel .catalog-group{grid-column:1/-1;font-size:14px;text-transform:uppercase;letter-spacing:.04em;margin:4px 0;color:#776344}
/* The shared grid already excludes the HUD and safe areas. A relative bottom
   offset moves this panel out of that grid and clips both ends on touch screens. */
#app .interface #buildPanel[data-placing=true]{inset:auto;align-self:end;width:min(430px,100%);height:auto;max-height:min(100%,380px)}
#app #buildPanel[data-placing=true] #catalog{font-size:14px}
#app .interface #buildPanel>.lighting-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;flex:0 0 auto;max-height:none;overflow:visible;padding:8px 10px}
#app .interface #buildPanel>.lighting-actions[hidden]{display:none}
#app #buildPanel .lighting-actions button{min-width:0;min-height:44px;margin:0;font-size:14px;white-space:normal}
#app #buildPanel #catalog>button{min-height:44px;background:#f2e3c4;color:#55452f;border:1px solid #cbb382;border-radius:10px;padding:8px;font:inherit;font-weight:700;margin:4px}
@media(max-width:480px){#app #buildPanel .build-groups{grid-template-columns:repeat(2,minmax(0,1fr))}#app #buildPanel .catalog-items{grid-template-columns:1fr}#app #buildPanel .build-category-icon{width:22px;height:22px;flex-basis:22px}}
@media(max-height:500px){#app .interface #buildPanel>#catalog{display:grid;grid-template-columns:155px minmax(0,1fr);gap:10px;align-items:start}#app #buildPanel .build-groups{display:grid;grid-template-columns:1fr;padding:3px;gap:4px}#app #buildPanel .build-groups button{min-height:44px}#app #buildPanel .build-help{margin:2px 0 8px}#app #buildPanel .catalog-items{grid-template-columns:1fr}#app #buildPanel .catalog-items button{min-height:64px;padding:6px}#app #buildPanel .item-art,#app #buildPanel .item-art img{width:64px;height:52px}#app #buildPanel .item-art{flex-basis:64px}#app #buildPanel .catalog-content{min-width:0}}
#app .interface #buildPanel[data-lighting=true]>#catalog{display:block}
#app #buildPanel[data-lighting=true] #catalog h3{margin:6px 0;font-size:17px}
#app #buildPanel[data-lighting=true] #catalog p{margin:8px 0;line-height:1.4}
#app #buildPanel .lighting-location{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:0 10px}
#app #buildPanel[data-lighting=true] #catalog .lighting-location :is(h3,p){margin:2px 0}
@media(max-height:500px){#app .interface #buildPanel[data-placing=true]>#catalog{padding:6px 10px}}
