/* The live generation status sits beside the model, never over the canvas. */
body.mapstl-prototype .prototype-builder #panel-preview{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(0,1.2fr);grid-template-areas:'status viewer' 'details viewer';grid-template-rows:auto 1fr;gap:20px 28px;align-items:start;padding:26px 28px}
body.mapstl-prototype .prototype-builder #preview-status-panel{grid-area:status;min-width:0}
body.mapstl-prototype .prototype-builder #preview-details-panel{grid-area:details;min-width:0}
body.mapstl-prototype .prototype-builder #panel-preview>.actual-model-panel{grid-area:viewer;min-width:0;margin:0;background:#f4f8f4;border:1px solid #dce6e1;border-radius:9px;overflow:visible}
body.mapstl-prototype .prototype-builder .preview-heading{margin:0 0 16px}
body.mapstl-prototype .prototype-builder .preview-heading h3{margin:0;color:#294555;font-size:24px;line-height:1.3;font-weight:700}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading{position:static;inset:auto;z-index:auto;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;width:100%;height:auto;min-height:0;max-height:none;padding:0;margin:0;border:0;border-radius:0;background:transparent;overflow:visible;text-align:left;gap:12px;scroll-margin-top:16px}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading>.spinner{align-self:center;margin-top:20px}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading>strong{font-size:20px;line-height:1.4;max-width:none}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading>span{max-width:none;font-size:14px;color:#52697b;line-height:1.55}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-card{width:100%;max-width:none;min-width:0;margin:0;padding:18px;border:1px solid #dce6eb;border-radius:9px;background:#fafcfd;box-shadow:none;text-align:left}
body.mapstl-prototype .prototype-builder #preview-status-panel .progress-card-heading{display:flex;align-items:center;gap:12px;min-width:0}
body.mapstl-prototype .prototype-builder #preview-status-panel .progress-symbol{flex:0 0 40px;width:40px;height:40px;border-radius:8px;background:#eaf7e2}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-eyebrow{display:block;font-size:11px;font-weight:650;letter-spacing:.08em;color:#59748a}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-stage{font-size:20px;line-height:1.35;color:#294555;overflow-wrap:anywhere}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-meter{margin:18px 0 10px;gap:10px}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-track{min-width:0;height:6px;border-radius:5px;background:#e5eee2}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-bar{background:#299a48}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-percent{font-size:14px;color:#23713e}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-detail{margin:0 0 16px;font-size:14px;line-height:1.55;color:#52697b}
body.mapstl-prototype .prototype-builder #preview-status-panel .progress-metrics{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px;min-width:0;padding:12px;border-radius:6px;background:#eef5ea}
body.mapstl-prototype .prototype-builder #preview-status-panel .progress-metrics>div{min-width:0}
body.mapstl-prototype .prototype-builder #preview-status-panel .progress-metrics>div+div{padding-left:10px;border-left:1px solid #d9e5d3}
body.mapstl-prototype .prototype-builder #preview-status-panel .progress-metrics p{font-size:11px;line-height:1.4;color:#587063;overflow-wrap:anywhere}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-metrics strong{font-size:18px;line-height:1.4;color:#2f7144;white-space:normal;overflow-wrap:anywhere}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-more{margin-top:14px;padding-top:12px;border-top:1px solid #e0e8ec}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-more summary{font-size:13px;color:#52697b}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-more-body p{font-size:13px;line-height:1.5;color:#52697b}
body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .recovery-card{width:100%;max-width:none;min-width:0;margin:0;padding:18px;border-radius:9px;box-shadow:none}
body.mapstl-prototype .prototype-builder #generation-cancel{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:40px;margin:0 0 10px;padding:9px 14px;border:1px solid #e4c8c4;border-radius:5px;background:#fff5f3;color:#a54d43;font-size:14px;font-weight:600;box-shadow:none}
body.mapstl-prototype .prototype-builder #generation-cancel:hover{background:#ffebe7;border-color:#d8ada7}
body.mapstl-prototype .prototype-builder #generation-cancel .icon{width:17px;height:17px}
body.mapstl-prototype .prototype-builder #preview-ready{padding:18px;border:1px solid #b9dcad;border-radius:9px;background:#eff9e8;color:#2a693c}
body.mapstl-prototype .prototype-builder .preview-success-heading{display:flex;align-items:flex-start;gap:12px;min-width:0}
body.mapstl-prototype .prototype-builder .preview-success-icon{display:grid;place-items:center;flex:0 0 39px;width:39px;height:39px;border-radius:50%;background:#2d9a48;color:#fff}
body.mapstl-prototype .prototype-builder .preview-success-icon .icon{width:24px;height:24px;stroke-width:2.3}
body.mapstl-prototype .prototype-builder #preview-ready h3{margin:0;font-size:23px;line-height:1.3;font-weight:750;color:#226b37}
body.mapstl-prototype .prototype-builder #preview-ready p{margin:8px 0 0;font-size:14px;line-height:1.55;color:#4d7154}
body.mapstl-prototype .prototype-builder #preview-download{display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;gap:10px;margin-top:18px;padding:12px 15px;border:1px solid transparent;border-radius:5px;background:linear-gradient(135deg,#169f35,#078b3e);color:#fff;font-size:16px;font-weight:650;white-space:normal;box-shadow:none}
body.mapstl-prototype .prototype-builder #preview-download:hover{background:#087d34}
body.mapstl-prototype .prototype-builder #preview-download .icon{width:20px;height:20px;flex-shrink:0}
body.mapstl-prototype .prototype-builder #preview-status-panel .generation-cancelled{display:grid;gap:12px;min-width:0;padding:18px;border:1px solid #dce6eb;border-radius:9px;background:#fafcfd;text-align:left}
body.mapstl-prototype .prototype-builder #preview-status-panel .generation-cancelled>strong{font-family:var(--heading-font);font-size:21px;line-height:1.35;color:#294555}
body.mapstl-prototype .prototype-builder #preview-status-panel .generation-cancelled p{font-size:14px;line-height:1.55;color:#52697b}
body.mapstl-prototype .prototype-builder #preview-status-panel .generation-cancelled .button{min-height:42px;padding:10px 12px;font-size:15px;white-space:normal;border-radius:5px}
body.mapstl-prototype .prototype-builder #preview-status-panel .generation-cancelled .secondary{border:1px solid #cddce5;background:#fff;color:#466579}
body.mapstl-prototype .prototype-builder #preview-model-meta{display:grid;gap:12px;margin:0 0 16px;min-width:0}
body.mapstl-prototype .prototype-builder #model-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;margin:0;padding:13px 15px;background:#fafcfd;border:1px solid #dce6eb;border-radius:7px;font-size:13px}
body.mapstl-prototype .prototype-builder #model-meta #meta-measurements{min-width:0;display:flex;flex-direction:column;gap:5px}
body.mapstl-prototype .prototype-builder #meta-size{font-size:15px;line-height:1.4;color:#294555;overflow-wrap:anywhere}
body.mapstl-prototype .prototype-builder #model-state{color:#2d7442;font-size:13px;line-height:1.4;overflow-wrap:anywhere}
body.mapstl-prototype .prototype-builder #model-details{margin:0;border:1px solid #dce6eb;border-radius:7px;background:#fafcfd;min-width:0;overflow:hidden}
body.mapstl-prototype .prototype-builder #model-details>summary{padding:13px 15px;font-size:14px;line-height:1.5;color:#39596b;min-height:46px;cursor:pointer}
body.mapstl-prototype .prototype-builder #model-details .model-detail-alerts{display:grid;gap:6px;margin:11px 0 0 16px;padding-top:11px;border-top:1px solid #dce6eb}
body.mapstl-prototype .prototype-builder #model-details .model-detail-alert{display:block;margin:0;padding:7px 10px;border:1px solid #ebd9b0;border-radius:5px;background:#fff5df;color:#795a23;font-size:13px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
body.mapstl-prototype .prototype-builder #model-details .model-warnings,
body.mapstl-prototype .prototype-builder #model-details .print-report{padding:13px 15px;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
body.mapstl-prototype .prototype-builder #model-data-info{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin:0;padding:13px 15px;border-top:1px solid #dce6eb;font-size:13px;line-height:1.5}
body.mapstl-prototype .prototype-builder #model-data-info>div{min-width:0}
body.mapstl-prototype .prototype-builder #model-data-info dt{color:#607687}
body.mapstl-prototype .prototype-builder #model-data-info dd{margin:3px 0 0;color:#294555;overflow-wrap:anywhere}
body.mapstl-prototype .prototype-builder #print-detail-notice{margin:0;padding:0;min-width:0;border:1px solid #e7d9ad;border-radius:7px;background:#fff9e9;font-size:13px;line-height:1.55;overflow:hidden}
body.mapstl-prototype .prototype-builder #print-detail-notice>summary{padding:13px 15px;font-size:14px;line-height:1.5;cursor:pointer}
body.mapstl-prototype .prototype-builder #print-detail-notice .print-detail-body{padding:0 15px 15px}
body.mapstl-prototype .prototype-builder #preview-details-panel .preview-settings-card{margin:0;padding:15px;border:1px solid #dce6eb;border-radius:9px;background:#fafcfd}
body.mapstl-prototype .prototype-builder #preview-details-panel .model-summary{margin:0}
body.mapstl-prototype .prototype-builder #preview-details-panel .model-summary>div{display:grid;grid-template-columns:minmax(95px,.8fr) minmax(0,1.2fr);gap:10px;padding:10px 0;border-color:#e0e8ed;font-size:14px;line-height:1.5}
body.mapstl-prototype .prototype-builder #preview-details-panel .model-summary dd{min-width:0;text-align:right;overflow-wrap:anywhere;color:#294555}
body.mapstl-prototype .prototype-builder #preview-details-panel .saved-model-actions{grid-template-columns:1fr}
body.mapstl-prototype .prototype-builder #panel-preview .model-topbar{width:100%;align-self:stretch;display:flex;flex-wrap:wrap;align-items:center;padding:16px 18px;gap:14px 20px;border-bottom:1px solid #dce6e1;background:#fff;border-radius:9px 9px 0 0}
body.mapstl-prototype .prototype-builder #panel-preview .model-topbar>div:first-child{flex:1 1 200px;min-width:0;width:auto}
body.mapstl-prototype .prototype-builder #panel-preview .model-topbar h2{font-size:20px;line-height:1.35;overflow-wrap:anywhere}
body.mapstl-prototype .prototype-builder #panel-preview .model-topbar .eyebrow{display:block;margin:0 0 5px;font-size:10px;line-height:1.4}
body.mapstl-prototype .prototype-builder #panel-preview .preview-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-left:auto;min-width:0;max-width:100%}
body.mapstl-prototype .prototype-builder #panel-preview #report-model{display:inline-flex;flex:0 0 auto;gap:6px;min-height:38px;padding:8px 10px;border:1px solid #e7c9c4;border-radius:5px;background:#fff3f1;color:#ab4d42;font-size:13px;font-weight:600;white-space:nowrap;box-shadow:none}
body.mapstl-prototype .prototype-builder #panel-preview #report-model:hover{background:#ffe8e3}
body.mapstl-prototype .prototype-builder #panel-preview #report-model .icon{width:16px;height:16px}
body.mapstl-prototype .prototype-builder #panel-preview .model-tools{display:flex;align-items:center;gap:8px;margin-left:0;width:auto}
body.mapstl-prototype .prototype-builder #panel-preview .model-actions-menu{position:relative}
body.mapstl-prototype .prototype-builder #panel-preview .model-actions-menu>summary{display:flex;align-items:center;gap:6px;min-height:38px;padding:8px 10px;border:1px solid #bfd6e5;border-radius:5px;background:#edf6fb;color:#3d6e8d;font-size:13px;font-weight:600;cursor:pointer;list-style:none}
body.mapstl-prototype .prototype-builder #panel-preview .model-actions-menu>summary::-webkit-details-marker{display:none}
body.mapstl-prototype .prototype-builder #panel-preview .model-actions-menu>summary::after{content:none}
body.mapstl-prototype .prototype-builder #panel-preview .model-actions-menu>summary .icon{width:16px;height:16px}
body.mapstl-prototype .prototype-builder #panel-preview .model-actions-menu>summary .icon:last-child{transform:rotate(90deg)}
body.mapstl-prototype .prototype-builder #panel-preview .model-actions-menu[open]>summary .icon:last-child{transform:rotate(270deg)}
body.mapstl-prototype .prototype-builder #panel-preview .model-actions-panel{z-index:10;right:0;left:auto;min-width:210px;max-width:calc(100vw - 50px);padding:8px;border:1px solid #dce6eb;border-radius:7px;background:#fff;box-shadow:0 8px 24px #19324618}
body.mapstl-prototype .prototype-builder #panel-preview .model-tools .icon-button{display:inline-flex;align-items:center;justify-content:flex-start;gap:7px;height:auto;min-height:35px;padding:7px 9px;border:1px solid #c7dce9;border-radius:5px;background:#eef6fc;color:#3e7293;font-size:13px;line-height:1.4;white-space:normal}
body.mapstl-prototype .prototype-builder #panel-preview .model-tools .icon-button .icon{width:17px;height:17px}
body.mapstl-prototype .prototype-builder #panel-preview #view-dimensions{border-color:#c5ddbc;background:#eff8e9;color:#3d7c45}
body.mapstl-prototype .prototype-builder #panel-preview #view-full{justify-content:center;width:38px;min-width:38px;min-height:38px;padding:8px}
body.mapstl-prototype .prototype-builder #panel-preview #viewer{width:100%;height:500px;min-height:360px;border:0;border-radius:0 0 9px 9px;background:#f4f8f4;overflow:hidden}
body.mapstl-prototype .prototype-builder #panel-preview #viewer:fullscreen,
body.mapstl-prototype .prototype-builder #panel-preview #viewer:-webkit-full-screen{height:100%;min-height:100%;background:#f4f8f4;border-radius:0}
body.mapstl-prototype .prototype-builder #panel-preview .viewer-help{font-size:12px;color:#70847b;pointer-events:none}
body.mapstl-prototype .prototype-builder .builder-brand #new-model{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-height:31px;padding:6px 9px;margin-top:6px;border:1px solid transparent;border-radius:5px;background:linear-gradient(135deg,#169f35,#078b3e);color:#fff;font-size:12px;font-weight:650;line-height:1.4;text-decoration:none;white-space:nowrap;box-shadow:none}
body.mapstl-prototype .prototype-builder .builder-brand #new-model>span{font:inherit;white-space:nowrap}
body.mapstl-prototype .prototype-builder .builder-brand #new-model:hover{background:#087d34}
body.mapstl-prototype .prototype-builder .builder-brand #new-model .icon{width:15px;height:15px;flex-shrink:0}
@media(max-width:1100px){body.mapstl-prototype .prototype-builder #panel-preview{grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr);gap:20px;padding:22px}}
@media(max-width:900px){
 body.mapstl-prototype .prototype-builder #panel-preview{grid-template-columns:minmax(0,1fr);grid-template-areas:'status' 'viewer' 'details';grid-template-rows:auto;gap:18px;padding:20px}
 body.mapstl-prototype .prototype-builder #panel-preview #viewer{height:420px;min-height:320px}
 body.mapstl-prototype .prototype-builder #preview-status-panel .progress-metrics{grid-template-columns:1.2fr 1fr 1fr}
}
@media(max-width:480px){
 body.mapstl-prototype .prototype-builder #panel-preview{padding:16px;gap:16px}
 body.mapstl-prototype .prototype-builder .preview-heading h3{font-size:22px}
 body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-card,
 body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .recovery-card,
 body.mapstl-prototype .prototype-builder #preview-status-panel .generation-cancelled,
 body.mapstl-prototype .prototype-builder #preview-ready{padding:14px}
 body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-stage{font-size:18px}
 body.mapstl-prototype .prototype-builder #preview-status-panel .progress-symbol{flex-basis:34px;width:34px;height:34px}
 body.mapstl-prototype .prototype-builder #preview-status-panel .progress-metrics{padding:10px 8px;gap:7px}
 body.mapstl-prototype .prototype-builder #preview-status-panel .progress-metrics>div+div{padding-left:7px}
 body.mapstl-prototype .prototype-builder #preview-status-panel #viewer-loading .progress-metrics strong{font-size:15px}
 body.mapstl-prototype .prototype-builder #preview-status-panel .recovery-actions{display:grid;grid-template-columns:minmax(0,1fr)}
 body.mapstl-prototype .prototype-builder #preview-ready h3{font-size:20px}
 body.mapstl-prototype .prototype-builder #preview-download{font-size:15px;padding:11px 10px;gap:8px}
 body.mapstl-prototype .prototype-builder #model-data-info{grid-template-columns:1fr}
 body.mapstl-prototype .prototype-builder #panel-preview .model-topbar{padding:12px;gap:8px}
 body.mapstl-prototype .prototype-builder #panel-preview .model-topbar>div:first-child{flex-basis:100%}
 body.mapstl-prototype .prototype-builder #panel-preview .preview-toolbar-actions{width:100%;justify-content:flex-start;margin-left:0}
 body.mapstl-prototype .prototype-builder #panel-preview #viewer{height:330px;min-height:280px}
 body.mapstl-prototype .prototype-builder #panel-preview .viewer-help{font-size:11px}
}
