.project-format-picker { position:fixed; z-index:45; width:250px; max-width:calc(100vw - 24px); max-height:calc(100vh - 24px); overflow:auto; padding:6px; border:1px solid #c9d1d9; border-radius:7px; background:#fff; box-shadow:0 6px 22px #20212426; }
.project-format-picker[hidden], .project-reference-panel[hidden] { display:none!important; }
.project-format-picker button.control-button { width:100%; justify-content:flex-start; padding:9px; border:0; background:#fff; text-align:left; }
.project-format-picker button:hover { background:#fff3bc; }
.project-format-picker button span { display:grid; gap:3px; }
.project-format-picker button small { color:#616b75; font-size:12px; font-weight:400; }
.project-format-picker > p { margin:6px 9px; color:#616b75; font-size:12px; line-height:1.4; }
.planner-scenes { min-width:0; }
.project-scene-busy { grid-column:1 / -1; display:flex; align-items:center; gap:3px; margin:8px 0; padding:11px 14px; border:1px solid #d6b347; border-radius:6px; background:#fff7d7; color:#63500b; font-size:14px; }
.project-scene-busy[hidden] { display:none!important; }
.project-busy-dots { display:inline-flex; gap:2px; font-size:21px; font-weight:700; line-height:1; }
.project-busy-dots i { font-style:normal; animation:project-busy-dot 1.2s infinite; }
.project-busy-dots i:nth-child(2) { animation-delay:.2s; }
.project-busy-dots i:nth-child(3) { animation-delay:.4s; }
@keyframes project-busy-dot { 0%,80%,100% { opacity:.25; } 40% { opacity:1; } }
@media (prefers-reduced-motion:reduce) { .project-busy-dots i { animation:none; } }
.planner-scenes.has-project-reference { display:grid; grid-template-columns:minmax(0,1fr) minmax(175px,30%); align-items:start; gap:10px; }
.planner-scenes > [data-planner-panel] { min-width:0; }
.planner-scenes > [data-planner-panel][hidden] { display:none!important; }
.project-reference-panel { min-width:0; margin-top:12px; padding:8px; border:1px solid #d5d9de; border-radius:6px; background:#fff; }
.project-reference-panel > header { display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:14px; }
.project-reference-panel .project-reference-preview.control-button { display:block; position:relative; width:100%; min-height:80px; margin-top:8px; padding:0; border:0; border-radius:4px; background:#f5f5f3; overflow:hidden; }
.project-reference-preview > img { display:block; width:100%; max-height:400px; object-fit:contain; }
.project-reference-preview > .control-button-icon { position:absolute; right:5px; bottom:5px; width:26px; height:26px; padding:3px; border-radius:4px; background:#fff; }
.project-reference-name { display:block; margin-top:6px; color:#616b75; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.project-reference-panel > p { margin:5px 0 0; color:#616b75; font-size:12px; line-height:1.4; }
.project-reference-pages { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:8px; }
.project-reference-pages[hidden] { display:none!important; }
.project-reference-pages output { color:#616b75; font-size:12px; text-align:center; }
.planner-scenes .iso-controls, .planner-scenes .iso-wall-controls { flex-wrap:wrap; }
.project-reference-dialog { width:min(1100px,calc(100vw - 32px)); max-width:none; }
.project-reference-dialog > .dialog-card { padding:14px; }
.project-reference-dialog header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.project-reference-dialog h2 { margin:0; font-size:18px; }
.project-reference-dialog img { display:block; width:100%; max-height:75vh; object-fit:contain; }
@media (max-width:650px) {
  .planner-scenes.has-project-reference { grid-template-columns:minmax(0,1fr); }
  .project-reference-panel { margin-top:0; }
  .project-reference-preview > img { max-height:260px; }
}
@media print {
  .project-format-picker, .project-reference-panel, .project-reference-dialog, .project-scene-busy { display:none!important; }
  .planner-scenes.has-project-reference { display:block; }
}
