.draft-status{font-size:13px;line-height:1.4;color:var(--secondary);margin:12px 0 16px}
.draft-status[data-error=true]{color:#8b2b13}
.choice-content{display:contents}
.mobile-panel{display:none}
.snap-control{display:flex;gap:10px;align-items:center;min-height:44px;margin-top:16px;font-size:14px}
.snap-control input{width:20px;height:20px;accent-color:var(--gold)}
.selection-tools{position:absolute;z-index:3;bottom:14px;left:20px;right:20px;max-width:620px;margin:auto;padding:8px 12px 12px;background:var(--paper);border-radius:var(--radius);box-shadow:0 8px 24px rgba(28,25,23,.14)}
.selection-heading{display:flex;align-items:center;gap:12px;min-height:44px}
.selection-heading strong{flex:1;font-size:16px;overflow-wrap:anywhere}
.selection-heading button{display:flex;align-items:center;justify-content:center;flex:0 0 44px;height:44px;border:0;background:none;border-radius:8px}
.selection-tools p{font-size:13px;font-variant-numeric:tabular-nums;color:var(--secondary);margin:0 0 8px}
.selection-actions{display:flex;gap:6px}
.selection-actions button{flex:1;min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--soft);font-size:14px;padding:6px 8px}
.selection-actions button:hover:not(:disabled){border-color:var(--gold);background:var(--paper)}
.room.has-selection .room-tools,.room.has-selection .room-hint{visibility:hidden}
.room.has-selection:not(.photo-mode) #viewport{bottom:164px}
@media(max-width:720px),(max-width:960px) and (max-height:500px) and (orientation:landscape){
  /* One document scroll keeps the bottom reachable with Safari bars or a keyboard. */
  html,body{height:auto;min-height:100%;overflow:visible}
  .masthead{height:60px;min-height:60px;flex-wrap:nowrap;padding:0 14px;gap:6px}
  .masthead img{width:108px}.history-controls button{font-size:13px;min-width:64px}
  .studio{height:auto;min-height:0;display:block;overflow:visible}
  .studio .room,.studio .room.photo-mode{min-height:260px;max-height:none;height:320px!important;height:clamp(260px,44svh,380px)!important;position:relative;top:auto}
  .panel-expanded .studio .room,.panel-expanded .studio .room.photo-mode{height:260px!important}
  .studio .choices{height:auto;min-height:0;padding:0;display:block;border:0;border-radius:16px 16px 0 0;box-shadow:0 -4px 20px rgba(28,25,23,.08);z-index:5;overflow:visible}
  .choice-content{display:block;min-height:0;overflow:visible;padding:0 18px max(28px,env(safe-area-inset-bottom));scroll-padding-top:112px}
  .mobile-panel{display:flex;position:sticky;top:0;z-index:4;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:48px;padding:0 18px;border:0;background:var(--soft);font:inherit;font-size:15px;text-align:left}
  .panel-action{font-size:14px;color:var(--gold);text-decoration:underline;text-underline-offset:3px}
  .choice-content>h1,.choice-content>.intro,.choice-content>p.small{display:none}
  .design-steps{position:sticky;top:48px;z-index:3;background:var(--paper);margin:0 -2px 14px;padding:6px 2px}
  .design-steps a{font-size:14px;min-height:44px}
  .draft-status{margin:8px 0 12px}
  .room .room-caption,.room.photo-mode .room-caption{top:8px;left:14px;max-width:calc(100% - 160px)}
  .room-caption span:first-child{display:none}.room-caption span:nth-child(2){font-size:13px}
  .room #room-dimensions{margin-top:2px;font-size:12px}
  .room #place-mode,.room.photo-mode #place-mode{top:8px;right:12px;min-height:44px;font-size:13px;padding:6px 10px}
  .room:not(.photo-mode) #viewport{top:58px;bottom:72px}
  .room.has-selection:not(.photo-mode) #viewport{bottom:155px}
  .room .room-tools{bottom:12px;gap:4px;left:8px;right:8px}
  .room .room-tools button{font-size:13px;padding:7px 9px;min-height:44px}
  .room:not(.photo-mode) .room-hint{display:none}
  .selection-tools{left:8px;right:8px;bottom:8px;padding:0 10px 10px}
  .selection-heading strong{font-size:14px}.selection-tools p{font-size:12px;margin-bottom:6px}
  .selection-actions button{font-size:13px;padding:5px 3px}
  .room.photo-mode .photo-fit{display:none}
  .room.photo-mode .room-hint{font-size:12px;line-height:1.3;min-height:38px}
  .config-fields input,.config-fields select,.designer-section input,.designer-section select,.designer-section textarea{font-size:16px}
  .choice-content input,.choice-content select,.choice-content textarea,.choice-content button,.choice-content summary,#photo-options label{scroll-margin-top:112px;scroll-margin-bottom:24px}
}
@media(max-width:960px) and (max-height:500px) and (orientation:landscape){
  .masthead{height:52px;min-height:52px}
  .studio .room,.studio .room.photo-mode{height:280px!important}
}
