/* One bounded editing surface; secondary tasks stay below it. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#studio-view{padding-top:12px}.page-heading{margin-bottom:8px}.heading-note,.experience-steps{display:none}
.page-heading #upload-button{margin-left:auto}.page-heading #camera-button{margin-left:0}
.experience{margin-bottom:8px}.intent-row{display:flex;gap:8px}.intent-row button{min-height:42px;flex-direction:row;align-items:center;padding:8px 14px;gap:8px;flex:0 1 auto}.intent-row button strong{font-size:13px}.intent-row button span{font-size:11px}
.photo-help{margin:0 0 8px;font-size:12px}.photo-help>.text-button{margin-left:auto}
.workspace{height:calc(100dvh - 230px);min-height:520px;max-height:880px;gap:16px;grid-template-columns:minmax(0,1fr) minmax(345px,400px)}
.photo-column{display:flex;flex-direction:column;min-height:0;gap:8px}.photo-panel{flex:1;min-height:0;height:auto}
.photo-context{flex:none;padding:9px 12px;border-bottom:1px solid var(--line);background:var(--theme-panel,#fffdfa);border-radius:18px 18px 0 0;font-size:11px}
.photo-context>div{display:flex;align-items:center;gap:8px;justify-content:space-between}.photo-context select{font:inherit;max-width:48%;min-height:36px;padding:4px;border:1px solid var(--line);border-radius:8px;background:var(--theme-panel,#fffdfa);color:inherit}.photo-context p{margin:6px 0 0;line-height:1.4}
.settings-panel{overflow:hidden}.category-tabs{min-height:44px}.category-tabs button{flex:1;min-height:44px;padding:10px 5px}.tools-scroll{padding:14px 18px;overflow:auto;overscroll-behavior:contain;flex:1;min-height:0}
.tool-fold{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:10px 0}.tool-fold>summary{cursor:pointer;min-height:28px;font-size:14px;font-weight:600;align-content:center}.tool-fold[open]>summary{margin-bottom:12px}.tool-fold.eye-details{padding:10px 12px}.quick-shades{padding:10px;margin:10px 0}.quick-shades .rec-explanation{display:none}.quick-shades .rec-chip{min-height:36px;font-size:12px}.quick-shades>strong{font-size:12px}.quick-shades>.hint{display:none}
.palette{gap:8px}.swatch{min-height:54px}.swatch-circle{width:36px;height:36px}.tools-scroll h2{font-size:18px}.tools-scroll .muted{font-size:12px}.economy-note{padding:10px;border-radius:10px;background:var(--theme-hover,#f4ebe4);font-size:12px;line-height:1.5}
.save-area{padding:9px 12px;gap:6px}.save-area .local-note{display:none}.save-area .export-options{margin:0}.save-area .export-options summary{min-height:30px;font-size:12px}.save-area .export-options[open]{position:absolute;bottom:100%;left:0;right:0;padding:16px;background:var(--theme-panel,#fffdfa);border:1px solid var(--line);z-index:15}.save-area #current-master-card{width:100%;margin-top:10px}
.workspace-photos{flex:none;background:var(--theme-panel,#fffdfa);border:1px solid var(--line);border-radius:12px;padding:7px 10px;min-width:0}.workspace-photos-heading{display:flex;justify-content:space-between;gap:10px;font-size:11px;margin-bottom:5px}.workspace-photos-heading span{color:var(--muted)}.photo-slots{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;padding:3px 2px;scroll-snap-type:x proximity}.photo-slot{position:relative;flex:none;scroll-snap-align:start}.photo-slot-select{display:flex;align-items:center;gap:6px;padding:4px 24px 4px 4px;min-height:48px;border:1px solid var(--line);background:transparent;color:inherit;border-radius:8px;cursor:pointer;font:inherit;font-size:11px}.photo-slot-select img{width:35px;height:42px;object-fit:cover;border-radius:5px}.photo-slot-select[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:-2px;background:var(--theme-hover)}.photo-slot-remove{position:absolute;right:0;top:0;border:0;background:transparent;color:inherit;width:24px;height:48px;font-size:19px;cursor:pointer}.photo-slot-add{flex:none;border:1px dashed var(--line);background:transparent;color:var(--accent);border-radius:8px;min-width:66px;font:inherit;font-size:12px;cursor:pointer}
.faq-dialog{width:min(920px,calc(100vw - 24px));max-width:920px;padding:24px}.faq-dialog h2{margin-top:0}.faq-dialog details{border-top:1px solid var(--line);padding:12px 0}.faq-dialog summary{cursor:pointer;min-height:44px;align-content:center;font-weight:600}.faq-dialog video{width:100%;max-height:65dvh;background:#181410;border-radius:12px;display:block}.faq-dialog p{font-size:13px;line-height:1.6}.faq-dialog .faq-close{position:sticky;bottom:0;width:100%;margin-top:12px}.faq-dialog a{display:inline-block;margin:8px 14px 0 0;font-size:13px}
@media(max-width:760px){
  #studio-view{padding:6px 8px 14px}.page-heading{height:auto;padding:0 0 5px;flex-wrap:wrap;gap:6px}.page-heading h1{font-size:16px}.page-heading .button{font-size:12px;min-height:44px;padding:7px 10px}.page-heading #camera-button{margin-left:0}.heading-note{display:none}
  .topbar{min-height:54px}.topbar nav{gap:4px}#faq-button{font-size:11px;padding-inline:4px}.intent-row{gap:6px;overflow-x:auto}.intent-row button{flex:none;min-height:36px;padding:5px 10px}.intent-row button strong{font-size:12px}.intent-row button span{display:none}.photo-help>span,.photo-help>.text-button{display:none}.photo-help{margin-bottom:4px}.photo-help summary{min-height:30px}.photo-help details p{font-size:12px}
  .workspace{height:calc(100dvh - 199px);min-height:600px;max-height:980px;display:grid;grid-template-columns:1fr;grid-template-rows:minmax(235px,43%) minmax(340px,1fr);gap:8px;overflow:visible}
  .photo-column{position:static;top:auto;height:auto;min-height:0;gap:4px;z-index:auto}.photo-panel{border-radius:12px}.photo-toolbar{min-height:36px;padding:0 8px}.photo-toolbar>span{font-size:10px}.view-switch button{font-size:10px;padding:4px 6px}.photo-stage{padding:4px 8px 32px;min-height:60px}.photo-footer{min-height:28px;padding:0 8px}.photo-footer .text-button{min-height:30px;font-size:10px}.photo-footer #image-size{display:none}.status-pill{font-size:10px;line-height:1.3;bottom:4px;max-width:96%}
  .workspace-photos{padding:4px 7px}.workspace-photos-heading{font-size:10px;margin-bottom:2px}.photo-slot-select{font-size:10px;padding-right:29px;min-height:44px}.photo-slot-select img{height:32px;width:27px}.photo-slot-remove{width:29px;height:44px}.photo-slot-add{min-height:44px}.photo-slots{gap:6px}
  .settings-panel{min-height:0;overflow:hidden;border-radius:12px}.photo-context{padding:5px 10px;font-size:10px}.photo-context select{min-height:36px;font-size:12px}.category-tabs{padding:0 6px;position:static;min-height:44px}.category-tabs button{font-size:12px}.tools-scroll{overflow:auto;flex:1;min-height:0;padding:10px 12px;scroll-padding:8px}.tools-scroll :is(button,input,textarea,select,summary){scroll-margin-top:8px}.tools-scroll h2{font-size:16px}.tools-scroll .muted{margin:4px 0 8px;font-size:12px}.palette{grid-template-columns:repeat(4,minmax(0,1fr))}.swatch{font-size:11px;min-height:50px}.swatch-circle{width:32px;height:32px}.tool-fold>summary{min-height:44px}.tool-fold{padding:4px 10px;margin:7px 0}.save-area{padding:6px 10px;grid-template-columns:1fr 1fr;gap:4px}.save-area .button{font-size:12px;min-height:44px}.save-area .export-options{grid-column:1/-1}.save-area .export-options:not([open]) summary{min-height:26px;font-size:11px}.save-area .export-options[open]{position:absolute;bottom:100%;grid-column:1/-1;padding:12px}.mask-tools{max-height:140px;bottom:30px}.mask-tools button{min-height:36px}.restore-ai{bottom:30px}.next-step{font-size:12px;padding:8px 2px}.next-step button{font-size:12px}.faq-dialog{padding:16px}.faq-dialog video{max-height:62dvh}
}
@media(max-width:760px) and (min-height:800px){.workspace{min-height:620px}}
@media(max-width:760px){
  body:not(.admin-body) .topbar{height:54px;min-height:54px;display:flex;flex-wrap:nowrap;padding:0 8px;gap:8px}
  .topbar .brand{font-size:28px}.topbar nav{order:0;width:auto;flex:1;justify-content:flex-end;gap:2px}.topbar .account-nav{order:0;margin-left:0;gap:0}.topbar .account-nav .button{font-size:12px;padding:7px 10px}.topbar #studio-nav,.topbar #ideas-button,.topbar #credits-button{display:none}.topbar #saved-nav{font-size:0;flex:none;padding:0 4px}.topbar #saved-nav:before{content:'♡';font-size:23px}.topbar #saved-nav span{font-size:10px}.topbar #faq-button{flex:none;font-size:11px}.theme-picker{margin:0}.theme-toggle{width:40px;height:44px}
  #studio-view>.experience,#studio-view>.photo-help{display:none}
  .workspace{height:calc(100dvh - 115px);min-height:700px;grid-template-rows:minmax(330px,49%) minmax(350px,1fr)}
  .workspace-photos-heading{display:none}.workspace-photos{padding:4px 7px}.photo-panel .photo-toolbar{min-height:38px;padding:0 8px}.photo-panel .photo-footer{min-height:30px}.photo-panel .photo-stage{padding:4px 8px 30px}.photo-panel .photo-footer .text-button{min-height:30px}.photo-panel .view-switch button{min-height:36px}
}
@media(max-height:540px) and (min-width:600px){.workspace{grid-template-columns:minmax(0,1fr) minmax(290px,42%);grid-template-rows:1fr;min-height:420px;height:calc(100dvh - 110px)}.photo-column{height:auto}.intent-row,.photo-help{display:none}}
@media(max-width:760px) and (max-height:700px){
  .workspace:has(#compare-mode[aria-pressed=true]) .photo-column{position:static;height:auto}
  .workspace:has(#compare-mode[aria-pressed=true]) .category-tabs{position:static}
  .workspace:has(#compare-mode[aria-pressed=true]) :is(.tools-scroll,.save-area) :is(button,input,textarea,select,summary){scroll-margin-top:8px}
}

/* These rules follow the compact toolbar styles, including standalone mode. */
@media(max-width:760px){
  body:not(.admin-body) .topbar{height:calc(54px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)}
}
@media(pointer:coarse){
  .photo-context select{font-size:16px;min-height:44px}
  .photo-panel .photo-footer .text-button,.photo-panel .view-switch button{min-height:44px}
}
#export-dialog .dialog-actions{flex-wrap:wrap}
#export-dialog .dialog-actions>*{min-height:44px;flex:1 1 130px}
@media(max-height:540px) and (min-width:600px){
  .workspace{grid-template-rows:minmax(0,1fr);align-items:stretch}
  .workspace>.photo-column,.workspace>.settings-panel{height:100%;min-height:0}
}
@media(max-width:760px){
  #export-dialog h2{margin:0 0 8px;font-size:21px}
  #export-details{margin:0;font-size:12px}
  #export-preview{max-height:32dvh;margin:12px auto}
  #export-dialog .dialog-actions{margin-top:12px}
  #export-dialog .hint{margin-bottom:0}
}
