/* Desktop keeps the original rail and toolbar. */
.mobile-color-controls{display:contents}
.mobile-color-toggle,.mobile-action-label,.mobile-preview-open{display:none}
.mobile-photo-dialog{color:var(--ink);background:#08090a;border:0;padding:0}
.mobile-scroll-rail{display:contents}.mobile-scroll-arrow{display:none}


  :root:where(.compact-layout){--mobile-preview-height:clamp(260px,48vh,410px);--mobile-preview-height:clamp(260px,48svh,410px)}
  html:where(.compact-layout){scroll-padding-block:12px}
  html:where(.compact-layout):has(.mobile-photo-ready){scroll-padding-top:calc(var(--mobile-preview-height) + 76px + env(safe-area-inset-top,0px))}
  html:where(.compact-layout):has(.studio-library[open],.mobile-photo-dialog[open],.camera-modal:not([hidden]),.live-modal:not([hidden]),.look-compare-modal:not([hidden])){overflow:hidden}
  :where(html.compact-layout) .app{min-height:100vh;min-height:100svh;grid-template-rows:auto 1fr}
  :where(html.compact-layout.compact-narrow) .topbar{padding:8px 10px;padding-top:max(8px,env(safe-area-inset-top));gap:6px;flex-direction:column;align-items:flex-start}
  :where(html.compact-layout.compact-narrow) .studio-mark{height:30px}:where(html.compact-layout) .mark-glyph{width:30px;height:30px}:where(html.compact-layout) .mark-copy span{display:none}
  :where(html.compact-layout.compact-narrow) .top-actions{min-width:0;width:100%;gap:5px;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none;padding:2px 0 4px}
  :where(html.compact-layout.compact-narrow) .top-actions::-webkit-scrollbar{display:none}
  :where(html.compact-layout) .mobile-scroll-rail{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:4px;min-width:0;direction:ltr;width:100%}
  :where(html.compact-layout) .mobile-scroll-rail[data-scrollable=true]{grid-template-columns:44px minmax(0,1fr) 44px}
  :where(html.compact-layout) .mobile-scroll-rail[data-scrollable=true]>.mobile-scroll-arrow{display:grid;place-items:center}
  :where(html.compact-layout) .mobile-scroll-arrow{width:44px;height:44px;min-width:44px;padding:0;border:1px solid var(--line);border-radius:10px;background:var(--gold-soft);color:var(--gold-hi);font-size:28px;line-height:1;cursor:pointer}
  :where(html.compact-layout) .mobile-scroll-arrow:disabled{opacity:.25;cursor:default}
  :where(html.compact-layout) .horizontal-scroll-viewport{min-width:0;direction:rtl;user-select:none}
  :where(html.compact-layout) .mobile-scroll-rail[data-scrollable=true]>.horizontal-scroll-viewport{cursor:grab}
  :where(html.compact-layout) .horizontal-scroll-viewport.is-dragging,:where(html.compact-layout) .horizontal-scroll-viewport.is-dragging *{cursor:grabbing!important}
  :where(html.compact-layout) .horizontal-scroll-viewport:focus-visible{outline:2px solid var(--gold-hi);outline-offset:2px}
  :where(html.compact-layout.compact-narrow) .top-actions .tool-btn{flex:0 0 62px;min-width:62px;min-height:52px;padding:5px 2px;flex-direction:column;gap:4px;border-radius:10px}
  :where(html.compact-layout.compact-narrow) .top-actions .tool-btn>span{display:none}
  :where(html.compact-layout.compact-narrow) .top-actions .tool-btn>.mobile-action-label{display:block;font-size:10px;line-height:1.15}
  :where(html.compact-layout) .workspace{--mobile-preview-height:clamp(260px,48vh,410px);--mobile-preview-height:clamp(260px,48svh,410px);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto auto;grid-template-areas:'stage' 'categories' 'colors' 'layers' 'catalog';align-content:start;gap:8px;padding:8px;padding-inline:max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-left));padding-bottom:max(16px,env(safe-area-inset-bottom))}
  :where(html.compact-layout) .side-rail,:where(html.compact-layout) .main-area{display:contents}
  :where(html.compact-layout) .side-rail>section:first-child{grid-area:categories;min-width:0;background:#151619;border:1px solid var(--line);border-radius:12px;padding:4px;z-index:22}
  :where(html.compact-layout) .rail-label{display:none}
  :where(html.compact-layout) .category-tabs{display:flex;gap:4px;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none;grid-template-columns:none}
  :where(html.compact-layout) .category-tabs::-webkit-scrollbar{display:none}
  :where(html.compact-layout) .category-tab{flex:0 0 auto;min-width:65px;min-height:44px;font-size:12px;padding:6px 12px;gap:6px;border-radius:9px;white-space:nowrap}
  :where(html.compact-layout) .category-icon{display:none}
  :where(html.compact-layout) .stage-card{grid-area:stage;min-width:0;min-height:0;align-self:start;border-radius:15px;overflow:visible;background:#151619;z-index:21}
  :where(html.compact-layout) .stage-card:before{border-radius:15px}
  :where(html.compact-layout) .mobile-photo-ready .mobile-preview-open{display:grid;place-items:center;position:absolute;left:5px;top:4px;z-index:24;width:44px;height:44px;border:1px solid var(--line);border-radius:10px;background:#17191c;color:var(--gold-hi);font-size:25px;cursor:pointer}
  :where(html.compact-layout) .stage-card:not(.has-analysis) .mobile-preview-open{top:auto;bottom:33px}
  :where(html.compact-layout) .mobile-photo-ready .stage-card{position:sticky;top:env(safe-area-inset-top,0px);height:var(--mobile-preview-height);overflow:visible}
  :where(html.compact-layout) .mobile-photo-ready .side-rail>section:first-child{position:sticky;top:calc(var(--mobile-preview-height) + 8px + env(safe-area-inset-top,0px))}
  :where(html.compact-layout) .empty-state{padding:22px 16px}:where(html.compact-layout) .empty-visual{width:56px;height:68px;margin-bottom:12px}:where(html.compact-layout) .empty-state .empty-title{font-size:24px;margin-block:8px}:where(html.compact-layout) .empty-state p{font-size:13px}
  :where(html.compact-layout) .empty-actions{margin-top:16px;display:grid;grid-template-columns:1fr 1fr;gap:8px}:where(html.compact-layout) .empty-actions button{width:100%;min-width:0;padding:8px;font-size:12px;white-space:normal}:where(html.compact-layout) .empty-actions #emptySavedLooks{grid-column:1/-1}
  :where(html.compact-layout) .privacy-note{font-size:11px;line-height:1.5}
  :where(html.compact-layout) .editor-shell.ready{padding:55px 6px 32px;border-radius:15px;overflow:hidden}
  :where(html.compact-layout) .stage-card.has-analysis .editor-shell.ready{grid-row:2}
  :where(html.compact-layout) .face-analysis-strip{height:51px;padding:3px 4px 3px 53px;border-radius:15px 15px 0 0}
  :where(html.compact-layout) .analysis-chip-row{padding:0;height:44px}:where(html.compact-layout) .analysis-chip{min-height:44px;font-size:11px;flex:0 0 auto}:where(html.compact-layout) .analysis-chip b{display:inline;font-size:9px}
  :where(html.compact-layout) .analysis-popover{right:5px;width:calc(100% - 10px)}:where(html.compact-layout) .analysis-popover p{font-size:12px}:where(html.compact-layout) .analysis-popover-close{width:44px;height:44px}
  :where(html.compact-layout) .canvas-toolbar{top:5px;right:5px;left:5px;gap:0}:where(html.compact-layout) .stage-status{display:none}:where(html.compact-layout) .canvas-actions{width:100%;min-width:0;margin:0;padding:2px;gap:0;justify-content:space-between;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}
  :where(html.compact-layout) .canvas-btn{width:44px;min-width:44px;height:44px}:where(html.compact-layout) .canvas-btn .icon{width:19px;height:19px}
  :where(html.compact-layout) .remove-photo-button{padding:0;justify-content:center}:where(html.compact-layout) .remove-photo-button span{display:none}
  :where(html.compact-layout) .photo-stage,:where(html.compact-layout) #basePhoto{max-height:calc(var(--mobile-preview-height) - 91px);max-width:100%}
  :where(html.compact-layout) .has-analysis .photo-stage,:where(html.compact-layout) .has-analysis #basePhoto{max-height:calc(var(--mobile-preview-height) - 142px)}
  :where(html.compact-layout) .photo-stage:not(.adjusting):not(.heal-mode){touch-action:pan-y}:where(html.compact-layout) .overlay{touch-action:none}
  :where(html.compact-layout) .handle{width:44px;height:44px}:where(html.compact-layout) .rotate-handle:after{display:none}
  :where(html.compact-layout) .stage-help{bottom:4px;right:5px;left:5px;padding:4px 6px;font-size:10px;line-height:1.3;text-align:center;max-width:none;pointer-events:none}
  :where(html.compact-layout) .adjust-panel{bottom:32px;width:calc(100% - 14px);max-width:none;display:none;flex-wrap:wrap;gap:6px;padding:8px}:where(html.compact-layout) .adjust-panel.open{display:flex}:where(html.compact-layout) .zoom-control{flex:1 1 100%;min-width:0}:where(html.compact-layout) .adjust-panel .mini-btn{flex:1;min-height:44px}
  :where(html.compact-layout) .mobile-color-controls{grid-area:colors;display:block;min-width:0;border:1px solid var(--line);border-radius:12px;background:#151619;overflow:hidden}
  :where(html.compact-layout) .mobile-color-toggle{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;border:0;background:transparent;padding:8px 12px;text-align:right;cursor:pointer;font-size:13px}
  :where(html.compact-layout) .mobile-current-color{margin-inline-start:auto;color:var(--gold-hi);font-size:12px}:where(html.compact-layout) .mobile-disclosure{font-size:20px}:where(html.compact-layout) .mobile-color-controls:not(.is-collapsed) .mobile-disclosure{transform:rotate(180deg)}
  :where(html.compact-layout) .mobile-color-controls.is-collapsed .color-panel{display:none}
  :where(html.compact-layout) .color-panel{display:block;margin:0;padding:8px 12px 14px;max-height:none;overflow:visible;border:0}:where(html.compact-layout) .color-panel>.panel-heading{display:none}
  :where(html.compact-layout) .hair-mode-switch button,:where(html.compact-layout) .hair-preset,:where(html.compact-layout) .tone-picker,:where(html.compact-layout) .recommended-color{min-height:44px;font-size:11px}:where(html.compact-layout) .hair-mode-switch button{font-size:12px}:where(html.compact-layout) .hair-presets,:where(html.compact-layout) .tone-pickers{grid-template-columns:repeat(2,minmax(0,1fr))}
  :where(html.compact-layout) .swatches{grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:8px;padding:4px 0}:where(html.compact-layout) .swatch{width:44px;height:44px;justify-self:center}:where(html.compact-layout) .recommended-colors{grid-template-columns:repeat(2,minmax(0,1fr))}:where(html.compact-layout) .hair-color-reason,:where(html.compact-layout) .hair-color-note{font-size:11px}:where(html.compact-layout) .intensity{margin-top:12px}:where(html.compact-layout) .intensity-head{font-size:12px}:where(html.compact-layout) .intensity input{min-height:34px}
  :where(html.compact-layout) .layers-panel{grid-area:layers;display:block;min-width:0;border:0;padding:0}:where(html.compact-layout) .layers-panel.mobile-empty{display:none}:where(html.compact-layout) .layers-panel>.panel-heading{display:none}
  :where(html.compact-layout) .layer-list{display:flex;gap:8px;overflow-x:auto;padding:2px;overscroll-behavior-inline:contain}:where(html.compact-layout) .layer-row{flex:0 0 auto;min-width:150px;min-height:50px;padding:3px 5px}:where(html.compact-layout) .layer-row.empty{display:none}:where(html.compact-layout) .layer-name{font-size:12px}:where(html.compact-layout) .layer-type{font-size:10px}:where(html.compact-layout) .layer-fit,:where(html.compact-layout) .layer-remove{width:44px;height:44px;flex:none}
  :where(html.compact-layout) .filmstrip{grid-area:catalog;min-width:0;margin:0;padding:10px;border-radius:14px}:where(html.compact-layout) .filmstrip-head{gap:7px}:where(html.compact-layout) .filmstrip-head strong{font-size:15px}:where(html.compact-layout) .filmstrip-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:7px}:where(html.compact-layout) .filmstrip-tools>span,:where(html.compact-layout) .filmstrip-tools>button{min-width:0;white-space:normal}:where(html.compact-layout) .filmstrip-tools #filmHint{grid-column:1/-1;font-size:12px;line-height:1.5}:where(html.compact-layout) .filmstrip-tools .mini-btn,:where(html.compact-layout) .analysis-request-btn{min-height:44px;font-size:12px}
  :where(html.compact-layout) .filmstrip-head span{font-size:11px}:where(html.compact-layout) .photo-quality{font-size:12px;margin-block:7px}
  :where(html.compact-layout) .recommend-toggle,:where(html.compact-layout) .look-compare-entry,:where(html.compact-layout) .look-compare-actions button,:where(html.compact-layout) .finish-toggle button,:where(html.compact-layout) .camera-actions button{min-height:44px}
  :where(html.compact-layout) .retouch-range input,:where(html.compact-layout) .beauty-main-range input,:where(html.compact-layout) .zoom-control input,:where(html.compact-layout) .intensity input{min-height:44px}
  :where(html.compact-layout) .style-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;overflow:visible;padding:4px 0;scroll-snap-type:none}:where(html.compact-layout) .style-card{min-width:0;width:100%;height:136px;padding:8px;grid-template-columns:1fr;grid-template-rows:1fr auto;gap:6px}:where(html.compact-layout) .style-card img,:where(html.compact-layout) .style-card canvas{width:100%;height:94px;object-fit:contain}:where(html.compact-layout) .style-card span{font-size:12px;text-align:center;white-space:normal}:where(html.compact-layout) .style-card:hover{transform:none}
  :where(html.compact-layout) .gallery-group-title,:where(html.compact-layout) .catalog-recommendation{grid-column:1/-1;width:auto;min-width:0}:where(html.compact-layout) .catalog-recommendation,:where(html.compact-layout) .smart-recommendation{font-size:12px}:where(html.compact-layout) .self-hair-card{grid-column:1/-1;display:flex;width:100%;min-width:0;height:auto;min-height:112px}
  :where(html.compact-layout) .retouch-panel,:where(html.compact-layout) .makeup-panel{grid-template-columns:minmax(0,1fr);gap:10px}:where(html.compact-layout) .retouch-tool,:where(html.compact-layout) .makeup-tool{min-width:0;padding:14px}:where(html.compact-layout) .retouch-title strong,:where(html.compact-layout) .beauty-card-head strong{font-size:16px}:where(html.compact-layout) .retouch-copy{font-size:13px}:where(html.compact-layout) .retouch-action,:where(html.compact-layout) .beauty-option,:where(html.compact-layout) .beauty-remove,:where(html.compact-layout) .fine-tune summary,:where(html.compact-layout) .switch-row button{min-height:44px;font-size:12px}:where(html.compact-layout) .retouch-range,:where(html.compact-layout) .beauty-main-range{font-size:12px}:where(html.compact-layout) .beauty-sliders{grid-template-columns:1fr}:where(html.compact-layout) .look-preset{min-height:96px;font-size:12px}:where(html.compact-layout) .beauty-note{font-size:11px}:where(html.compact-layout) .lens-color{min-height:80px}
  :where(html.compact-layout) .mini-btn,:where(html.compact-layout) .modal-close{min-height:44px}:where(html.compact-layout) .modal-close{width:44px;flex:none}
  :where(html.compact-layout) input:not([type=range]):not([type=checkbox]){font-size:16px}
  :where(html.compact-layout) .studio-library[open]{display:flex;flex-direction:column;position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100vh;height:100dvh;max-height:100dvh;border:0;border-radius:0;overflow:hidden;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
  :where(html.compact-layout) .mobile-photo-dialog[open]{display:flex;flex-direction:column;position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100vh;height:100dvh;max-height:100dvh;overflow:hidden;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
  :where(html.compact-layout) .mobile-photo-dialog::backdrop{background:#08090a}:where(html.compact-layout) .mobile-photo-dialog header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;min-height:60px;flex:none;border-bottom:1px solid var(--line)}:where(html.compact-layout) .mobile-photo-content{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:8px;color:var(--muted)}:where(html.compact-layout) .mobile-photo-content canvas{width:100%;height:100%;object-fit:contain;touch-action:pinch-zoom}
  :where(html.compact-layout) .studio-library header,:where(html.compact-layout) .studio-library footer{flex:none;padding:10px 12px}:where(html.compact-layout) .studio-library header{min-height:64px}:where(html.compact-layout) .studio-library-body{flex:1;min-height:0;max-height:none;padding:12px;overflow-y:auto;overscroll-behavior:contain}:where(html.compact-layout) .studio-library footer{display:grid;grid-template-columns:1fr 1fr;gap:8px}:where(html.compact-layout) .studio-library footer button{white-space:normal;font-size:12px;min-height:44px}:where(html.compact-layout) .studio-library footer .studio-library-status{grid-column:1/-1;margin:0}:where(html.compact-layout) .studio-library footer .studio-library-status:empty{display:none}
  :where(html.compact-layout) .studio-save-form{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}:where(html.compact-layout) .studio-save-form input{width:100%;min-width:0;min-height:44px}:where(html.compact-layout) .studio-save-form button{width:100%}:where(html.compact-layout) .studio-library-note{font-size:13px;line-height:1.6}
  :where(html.compact-layout) .saved-look{display:grid;grid-template-columns:36px 68px minmax(0,1fr);gap:8px}:where(html.compact-layout) .saved-look label{min-height:44px;justify-content:center}:where(html.compact-layout) .saved-look input{width:24px;height:24px}:where(html.compact-layout) .saved-look img{width:68px;height:68px}:where(html.compact-layout) .saved-look-copy strong{font-size:13px}:where(html.compact-layout) .saved-look-actions{grid-column:2/-1;display:flex;flex-wrap:wrap;margin:0}:where(html.compact-layout) .saved-look-actions button{min-height:44px}:where(html.compact-layout) .saved-compare-view{grid-template-columns:1fr!important}:where(html.compact-layout) .saved-compare-view img{height:240px;object-fit:contain}
  :where(html.compact-layout) .look-compare-modal,:where(html.compact-layout) .camera-modal,:where(html.compact-layout) .live-modal{padding:0;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
  :where(html.compact-layout) .look-compare-card,:where(html.compact-layout) .camera-card,:where(html.compact-layout) .live-card{width:100%;height:100%;max-height:100%;border-radius:0;min-height:0}:where(html.compact-layout) .camera-card{display:flex;flex-direction:column}:where(html.compact-layout) .camera-head,:where(html.compact-layout) .live-head,:where(html.compact-layout) .look-compare-head{flex:none;min-height:64px;height:auto;padding:8px 12px}:where(html.compact-layout) .camera-view{flex:1;min-height:0}:where(html.compact-layout) .camera-actions{flex:none;padding:10px 12px;min-height:64px}:where(html.compact-layout) .face-guide span{max-width:calc(100% - 24px);white-space:normal;line-height:1.4;text-align:center;bottom:12px}:where(html.compact-layout) .live-view{min-height:0;aspect-ratio:auto}:where(html.compact-layout) .live-controls{grid-template-columns:1fr;padding:10px 12px;gap:8px}:where(html.compact-layout) .live-capture{grid-column:1;grid-row:1;min-height:48px;width:100%}:where(html.compact-layout) .quality-control{justify-self:center;flex-wrap:wrap}:where(html.compact-layout) .quality-btn{min-height:44px;font-size:12px}:where(html.compact-layout) .live-privacy{justify-self:center;white-space:normal}:where(html.compact-layout) .live-status{font-size:12px}
  :where(html.compact-layout) .look-compare-grid{grid-template-columns:1fr;padding:10px;gap:10px;overscroll-behavior:contain}:where(html.compact-layout) .look-compare-panel{display:block}:where(html.compact-layout) .look-compare-panel canvas{width:100%;height:auto;object-fit:contain}:where(html.compact-layout) .look-compare-panel span{min-height:48px;border-right:0;border-top:1px solid var(--line);flex-direction:row;align-items:center;justify-content:space-between;font-size:13px}:where(html.compact-layout) .look-compare-footer{padding:10px 12px}:where(html.compact-layout) .look-compare-footer p{font-size:12px}:where(html.compact-layout) .look-compare-footer-actions{display:grid;grid-template-columns:1fr 1fr}:where(html.compact-layout) .look-compare-footer-actions button{min-width:0;min-height:44px;white-space:normal}
  :where(html.compact-layout) .toast{max-width:calc(100vw - 24px);width:max-content;bottom:max(16px,env(safe-area-inset-bottom));text-align:center;white-space:normal;font-size:12px}

@media(max-width:360px){.style-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.look-presets{gap:6px}.look-preset{font-size:11px}}
@media(max-height:500px) and (min-width:600px){
  html:where(.compact-layout):has(.mobile-photo-ready){scroll-padding-top:16px}
  :where(html.compact-layout.compact-narrow) .topbar{flex-direction:row;align-items:center;gap:12px}:where(html.compact-layout.compact-narrow) .studio-mark{flex:none}:where(html.compact-layout.compact-narrow) .top-actions{flex:1;min-width:0;width:auto}:where(html.compact-layout.compact-narrow) .top-actions .tool-btn{min-height:44px;flex-basis:58px}:where(html.compact-layout) .mark-copy strong{font-size:12px}
  :where(html.compact-layout.compact-narrow) .topbar>.mobile-scroll-rail{flex:1;min-width:0;width:auto}
  :where(html.compact-layout) .workspace{--mobile-preview-height:calc(100vh - 86px);--mobile-preview-height:calc(100dvh - 86px);grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'stage categories' 'stage colors' 'stage layers' 'stage catalog';align-items:start}
  :where(html.compact-layout) .mobile-photo-ready .stage-card{top:8px}:where(html.compact-layout) .mobile-photo-ready .side-rail>section:first-child{top:8px}:where(html.compact-layout) .empty-state{padding:12px}:where(html.compact-layout) .empty-visual{display:none}:where(html.compact-layout) .empty-actions{margin-top:10px}:where(html.compact-layout) .empty-state .empty-title{font-size:21px}:where(html.compact-layout) .empty-state p{font-size:12px}:where(html.compact-layout) .style-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
  :where(html.compact-layout) .studio-library footer{grid-template-columns:repeat(4,minmax(0,1fr))}:where(html.compact-layout) .studio-library header{min-height:52px;padding:4px 12px}:where(html.compact-layout) .studio-save-form{grid-template-columns:minmax(0,1fr) auto}:where(html.compact-layout) .studio-save-form label{grid-column:1/-1}:where(html.compact-layout) .studio-save-form button{width:auto}
  :where(html.compact-layout) .live-controls{grid-template-columns:1fr 1fr}:where(html.compact-layout) .live-capture{grid-column:1;grid-row:1/3;align-self:stretch}:where(html.compact-layout) .quality-control,:where(html.compact-layout) .live-privacy{grid-column:2}:where(html.compact-layout) .look-compare-grid{grid-template-columns:repeat(var(--compare-count,3),minmax(0,1fr))}:where(html.compact-layout) .look-compare-panel span{flex-direction:column;gap:4px}:where(html.compact-layout) .look-compare-footer{flex-direction:row}:where(html.compact-layout) .look-compare-footer p{flex:1}:where(html.compact-layout) .look-compare-footer-actions{flex:1}
}


  :where(html.compact-layout) .workspace{grid-template-rows:auto auto auto auto auto auto;grid-template-areas:'stage' 'categories' 'colors' 'blend' 'layers' 'catalog'}
  :where(html.compact-layout) .blend-panel{grid-area:blend;min-width:0;margin:0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#151619;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px;align-items:start}
  :where(html.compact-layout) .blend-panel>.panel-heading{grid-column:1/-1;margin:0}:where(html.compact-layout) .blend-panel>.retouch-action{grid-column:1;grid-row:2;min-height:44px;font-size:12px}:where(html.compact-layout) .blend-panel>#hairHideStatus{grid-column:1;grid-row:3}:where(html.compact-layout) .blend-panel>.object-opacity{grid-column:2;grid-row:2/4;padding:0;border:0}:where(html.compact-layout) .object-opacity select{min-height:44px;font-size:12px}:where(html.compact-layout) .object-opacity input{min-height:44px}:where(html.compact-layout) .object-opacity .intensity-head{font-size:12px}:where(html.compact-layout) .blend-note{font-size:11px}
  :where(html.compact-layout) .complete-look-card{grid-column:1/-1;min-height:110px}:where(html.compact-layout) .complete-look-card strong{font-size:15px}:where(html.compact-layout) .complete-look-card small{font-size:12px}

@media(max-height:500px) and (min-width:600px){:where(html.compact-layout) .workspace{grid-template-areas:'stage categories' 'stage colors' 'stage blend' 'stage layers' 'stage catalog'}}
:where(html.compact-layout) .natural-hair-tone{min-height:44px;font-size:12px}

/* Photo-first layout on phones and portrait tablets once a photo is loaded: the photo takes all the height
   between a slim top bar and a bottom tray (categories, then a sideways style strip). Tools and before/after
   sit in a column on the photo's left edge. Landscape phones (height 500px or less) keep the layout above. */
.mobile-panel-buttons,.mobile-panel-close,.mobile-analysis-toggle,.mobile-tools-more{display:none}
.mobile-panel-button{border:1px solid var(--line);background:rgba(255,255,255,.045);color:var(--ink);font:inherit;font-weight:600;cursor:pointer}
.mobile-panel-button[aria-expanded=true]{border-color:var(--gold);color:var(--gold-hi)}

  :where(html.compact-layout) .canvas-actions #compareBtn{width:44px;min-width:44px;height:44px;min-height:44px;flex:none;padding:0;border:0;border-radius:9px;background:transparent;color:var(--muted);display:grid;place-items:center}
  :where(html.compact-layout) .canvas-actions #compareBtn>span{display:none}:where(html.compact-layout) .canvas-actions #compareBtn .icon{width:19px;height:19px}
  :where(html.compact-layout) .canvas-actions #compareBtn[aria-pressed=true]{background:var(--gold);color:#17140c}

@media(min-height:501px){
  :where(html.compact-layout) .mobile-photo-page .app{height:100vh;height:100dvh;min-height:0;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
  :where(html.compact-layout) .mobile-photo-page .site-about{display:none}
  :where(html.compact-layout.compact-narrow) .mobile-photo-page .app .topbar{flex-direction:row;align-items:center;gap:0;padding:4px 6px;padding-top:max(4px,env(safe-area-inset-top))}
  :where(html.compact-layout.compact-narrow) .mobile-photo-page .app .studio-mark{display:none}
  :where(html.compact-layout.compact-narrow) .mobile-photo-page .app .topbar>.mobile-scroll-rail{flex:1;min-width:0;width:auto}
  :where(html.compact-layout.compact-narrow) .mobile-photo-page .app .top-actions{gap:3px;padding:0}
  :where(html.compact-layout.compact-narrow) .mobile-photo-page .app .top-actions .tool-btn{flex:1 0 46px;min-width:46px;min-height:46px;padding:3px 1px;gap:2px}
  :where(html.compact-layout.compact-narrow) .mobile-photo-page .app .top-actions .tool-btn>.mobile-action-label{font-size:9px}
  :where(html.compact-layout) .workspace.mobile-photo-ready{height:100%;min-height:0;grid-template-rows:minmax(0,1fr) auto auto;grid-template-areas:'stage' 'categories' 'tray';gap:6px;padding:6px;padding-inline:max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-left));padding-bottom:max(6px,env(safe-area-inset-bottom))}
  /* The photo fills the stage: container units size it to whatever height the tray leaves. */
  :where(html.compact-layout) .mobile-photo-ready .stage-card{position:relative;top:auto;height:auto;min-height:0;align-self:stretch;display:grid;grid-template-rows:auto minmax(0,1fr);place-items:stretch}
  :where(html.compact-layout) .mobile-photo-ready .editor-shell.ready{grid-row:2;height:auto;min-height:0;padding:4px;container-type:size}
  :where(html.compact-layout) .mobile-photo-ready .photo-stage-wrap{width:100%;height:100%}
  :where(html.compact-layout) .mobile-photo-ready .photo-stage,:where(html.compact-layout) .mobile-photo-ready #basePhoto{max-width:100%;max-height:calc(100svh - 300px)}
  @supports(height:1cqh){:where(html.compact-layout) .mobile-photo-ready .photo-stage,:where(html.compact-layout) .mobile-photo-ready #basePhoto{max-width:100cqw;max-height:100cqh}}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-analysis=open]) .face-analysis-strip{display:none}
  :where(html.compact-layout) .mobile-photo-ready .face-analysis-strip{height:auto;padding:3px 4px}
  :where(html.compact-layout) .mobile-photo-ready .analysis-chip-row{height:40px}:where(html.compact-layout) .mobile-photo-ready .analysis-chip{min-height:40px}
  /* Tool column on the photo's left edge. */
  :where(html.compact-layout) .mobile-photo-ready .canvas-toolbar{top:6px;bottom:6px;left:6px;right:auto;align-items:flex-start}
  :where(html.compact-layout) .mobile-photo-ready .canvas-actions{flex-direction:column;width:auto;max-height:100%;margin:0;padding:3px;gap:2px;justify-content:flex-start;overflow-x:hidden;overflow-y:auto;scrollbar-width:none;background:rgba(15,16,18,.5);backdrop-filter:blur(6px)}
  :where(html.compact-layout) .mobile-photo-ready .canvas-actions::-webkit-scrollbar{display:none}
  :where(html.compact-layout) .mobile-photo-ready .canvas-actions>*{flex:none}
  :where(html.compact-layout) .mobile-photo-ready #undoEdit{order:1}:where(html.compact-layout) .mobile-photo-ready #redoEdit{order:2}:where(html.compact-layout) .mobile-photo-ready #compareBtn{order:3}:where(html.compact-layout) .mobile-photo-ready .mobile-analysis-toggle{order:4}:where(html.compact-layout) .mobile-photo-ready #autoFit{order:5}:where(html.compact-layout) .mobile-photo-ready #adjustPhoto{order:6}:where(html.compact-layout) .mobile-photo-ready #toggleGuides{order:7}:where(html.compact-layout) .mobile-photo-ready #savedLooksBtn{order:8}:where(html.compact-layout) .mobile-photo-ready #demoPhotoButton{order:9}:where(html.compact-layout) .mobile-photo-ready #removePhotoButton{order:10}
  :where(html.compact-layout) .mobile-photo-ready .demo-photo-button{width:44px;padding:0;font-size:10px}
  :where(html.compact-layout) .mobile-photo-ready .remove-photo-button{height:auto;min-height:54px;margin-top:6px;padding:5px 1px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#ec9d97;background:rgba(190,60,55,.14)}
  :where(html.compact-layout) .mobile-photo-ready .remove-photo-button span{display:block;font-size:9px;line-height:1.15;text-align:center;white-space:normal}
  :where(html.compact-layout) .mobile-photo-ready .mobile-tools-more{display:grid;order:11;font-size:22px;line-height:1}
  :where(html.compact-layout) .mobile-photo-ready .mobile-tools-more[aria-expanded=true]{color:var(--gold-hi);background:rgba(201,162,39,.16)}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tools=open]) .canvas-actions>:not(#undoEdit):not(#redoEdit):not(#compareBtn):not(.mobile-analysis-toggle):not(#removePhotoButton):not(.mobile-tools-more){display:none}
  :where(html.compact-layout) .mobile-photo-ready .mobile-analysis-toggle{display:grid}:where(html.compact-layout) .stage-card:not(.has-analysis) .mobile-analysis-toggle{display:none}
  :where(html.compact-layout) .mobile-photo-ready .mobile-analysis-toggle[aria-pressed=true]{color:var(--gold-hi);background:rgba(201,162,39,.16)}
  :where(html.compact-layout) .mobile-photo-ready .stage-card .mobile-preview-open{top:auto;left:auto;right:10px;bottom:10px;background:rgba(15,16,18,.72)}
  /* The advice and realistic preview buttons sit above that 44px corner button (10px + 44px + a 6px gap). */
  :where(html.compact-layout) .mobile-photo-ready .stage-card .stage-fabs{bottom:60px}
  /* Narrow phones: without the free-count badge both buttons fit one row; each dialog still shows the count. */
  @media(max-width:379px){:where(html.compact-layout) .mobile-photo-ready .realistic-fab small{display:none}}
  :where(html.compact-layout) .mobile-photo-ready .stage-help{bottom:8px;left:58px;right:58px}
  :where(html.compact-layout) .mobile-photo-ready .editor-shell:not(:has(.overlay-controls.selected)) .stage-help{display:none}
  :where(html.compact-layout) .mobile-photo-ready .adjust-panel{bottom:8px;left:58px;right:8px;width:auto}
  /* Bottom tray: categories, then the strip, a tool panel, or one of the colour/blend/layer panels. */
  :where(html.compact-layout) .mobile-photo-ready .side-rail>section:first-child{position:static;top:auto;padding:2px;border-radius:12px}
  :where(html.compact-layout) .mobile-photo-ready #mobileCategoriesRail[data-scrollable=true]{grid-template-columns:34px minmax(0,1fr) 34px}
  :where(html.compact-layout) .mobile-photo-ready #mobileCategoriesRail .mobile-scroll-arrow{width:34px;min-width:34px;font-size:24px}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip,:where(html.compact-layout) .mobile-photo-ready .mobile-color-controls,:where(html.compact-layout) .mobile-photo-ready .blend-panel,:where(html.compact-layout) .mobile-photo-ready .layers-panel{grid-area:tray;position:relative}
  :where(html.compact-layout) .mobile-photo-ready .mobile-color-controls,:where(html.compact-layout) .mobile-photo-ready .blend-panel,:where(html.compact-layout) .mobile-photo-ready .layers-panel{display:none}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip{padding:6px;border-radius:14px;display:flex;flex-direction:column;gap:6px;min-height:0}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip-head{display:block;margin:0}
  :where(html.compact-layout) .mobile-photo-ready #filmTitle,:where(html.compact-layout) .mobile-photo-ready #filmHint,:where(html.compact-layout) .mobile-photo-ready #faceShapeChip,:where(html.compact-layout) .mobile-photo-ready .catalog-recommendation{display:none}
  :where(html.compact-layout) .mobile-photo-ready .face-detection-chip:not([data-state=working]):not([data-state=error]),:where(html.compact-layout) .mobile-photo-ready .photo-quality:not([data-state=warning]):not([data-state=error]){display:none}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip-tools{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip-tools::-webkit-scrollbar{display:none}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip-tools>*{flex:0 0 auto}
  :where(html.compact-layout) .mobile-photo-ready .mobile-panel-buttons{display:contents}
  :where(html.compact-layout) .mobile-photo-ready .mobile-panel-button,:where(html.compact-layout) .mobile-photo-ready .filmstrip-tools .recommend-toggle,:where(html.compact-layout) .mobile-photo-ready .filmstrip-tools .look-compare-entry{min-height:36px;padding:0 12px;border-radius:999px;font-size:12px;white-space:nowrap}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip-tools .face-detection-chip,:where(html.compact-layout) .mobile-photo-ready .filmstrip-tools .photo-quality{flex:0 0 260px;white-space:normal}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-tool=true] .mobile-panel-button[data-panel=blend]{display:none}
  /* Style strip: one row of cards that scrolls sideways. */
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-strip{display:flex;flex-direction:row;gap:6px;overflow-x:auto;overflow-y:hidden;padding:0 0 2px;scroll-snap-type:x proximity;overscroll-behavior-inline:contain;scrollbar-width:none}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-strip::-webkit-scrollbar{display:none}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card{flex:0 0 84px;width:84px;min-width:84px;height:104px;padding:5px;gap:3px;scroll-snap-align:start}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card img,:where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card canvas{height:72px}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card span{font-size:11px;white-space:nowrap}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card .recommend-badge{top:4px;right:4px;width:18px;height:18px;padding:0;display:grid;place-items:center;font-size:0}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card .recommend-badge:before{content:'★';font-size:11px}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .gallery-group-title{flex:0 0 46px;width:46px;min-width:46px;margin:0;padding:4px 2px;display:grid;place-items:center;text-align:center;border:0;border-inline-start:1px solid rgba(201,162,39,.3);font-size:10px;line-height:1.25;white-space:normal;scroll-snap-align:start}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .complete-look-card{flex:0 0 236px;width:236px;min-height:0;height:104px;padding:6px;gap:8px;scroll-snap-align:start}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .complete-look-preview{width:70px;height:90px}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .complete-look-card strong{font-size:13px}:where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .complete-look-card small{font-size:11px}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .self-hair-card{flex:0 0 100%;min-height:0;height:104px}
  /* Lenses, makeup and retouch: a taller tray that scrolls. */
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-tool=true] .filmstrip{height:44vh;height:44dvh;overflow-y:auto;overscroll-behavior:contain}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-tool=true] .style-strip{display:block}
  /* Colour, blend and layer panels replace the tray until closed. */
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel] .side-rail>section:first-child,:where(html.compact-layout) .mobile-photo-ready[data-mobile-panel] .filmstrip{display:none}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=color] .mobile-color-controls{display:flex;flex-direction:column;max-height:46vh;max-height:46dvh}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=color] .color-panel{min-height:0;overflow-y:auto;overscroll-behavior:contain}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=color] .mobile-color-toggle{pointer-events:none;padding-left:56px}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=color] .mobile-disclosure{display:none}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=blend] .blend-panel{display:grid;max-height:46vh;max-height:46dvh;overflow-y:auto;padding-left:56px}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=layers] .layers-panel{display:block;max-height:46vh;max-height:46dvh;overflow-y:auto;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:#151619}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=layers] .layers-panel>.panel-heading{display:flex;min-height:40px;align-items:center;gap:8px;padding-left:52px;margin:0 0 6px}
  :where(html.compact-layout) .mobile-photo-ready .mobile-panel-close{display:grid;place-items:center;position:absolute;z-index:2;top:2px;left:2px;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:rgba(255,255,255,.06);color:var(--ink);font-size:26px;line-height:1;cursor:pointer}
}
/* Lenses and makeup with a photo (phones and the desktop column): shade and preset choices are pills, a small dot
   beside the name, instead of tall tiles with a large dot above it, so each card shows a row of choices in the
   height a single tile took. Touch size stays 44px. */
:where(html.compact-layout) .look-presets{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:6px}
:where(html.compact-layout) .look-presets.full-look-presets{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
:where(html.compact-layout) .look-presets .look-preset{min-height:44px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;justify-items:start;align-content:center;column-gap:8px;row-gap:0;padding:6px 10px 6px 8px;border-radius:11px;font-size:12px;line-height:1.2;text-align:start}
:where(html.compact-layout) .look-presets .look-color{grid-row:span 2;width:26px;height:26px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}
:where(html.compact-layout) .look-presets .mini-recommend{grid-column:2;margin-top:2px;font-size:10px}
:where(html.compact-layout) .lens-preview.beauty-card .lens-colors{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:6px}
:where(html.compact-layout) .lens-preview.beauty-card .lens-color{min-height:44px;display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:6px 10px 6px 8px;border-radius:11px;font-size:12px}
:where(html.compact-layout) .lens-preview.beauty-card .lens-dot{flex:none;width:24px;height:24px;box-shadow:inset 0 0 0 4px rgba(0,0,0,.18)}
:where(html.compact-layout) .makeup-tool.beauty-card,:where(html.compact-layout) .lens-preview.beauty-card{padding:12px}
:where(html.compact-layout) .makeup-panel{gap:8px}

/* Phones and portrait tablets with a photo, when PHONE_FIT_PHOTO in mobile-ui.js adds .fit-photo: the photo is as
   wide as the screen and its frame is exactly as tall as the photo, so a square photo leaves no empty bands. The height that
   frees goes to the styles under it, a grid that scrolls down. The tools and the colour, blend and layer panels keep
   the tray of the layout above. */
@media(min-height:501px){
  /* Edge to edge: no frame or margin around the photo, which starts right under the header. */
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-card{margin:-6px calc(-1*max(6px,env(safe-area-inset-left,0px))) 0 calc(-1*max(6px,env(safe-area-inset-right,0px)));border:0;border-radius:0}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .editor-shell.ready{padding:0;border-radius:0}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .photo-stage{border-radius:0;box-shadow:none}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]){grid-template-rows:auto auto minmax(0,1fr)}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .stage-card{align-self:start}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .editor-shell.ready{container-type:inline-size}
  /* As tall as the screen allows while one row of styles stays in view: 274px is the header (55), the categories
     (50), the filters and one row of cards (150) and the gaps between them. The face analysis row adds 46. */
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .photo-stage,:where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) #basePhoto{max-width:100cqw;max-height:calc(100svh - 274px)}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel])[data-mobile-analysis=open] .photo-stage,:where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel])[data-mobile-analysis=open] #basePhoto{max-height:calc(100svh - 320px)}
  /* The photo buttons stay off the face, on the photo's bottom edge (below), and shrink to share one row down to 360px. */
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-card .stage-fabs{left:60px;right:60px;bottom:6px;width:auto;max-width:none;transform:none}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-help{bottom:56px}
  /* With no tool or panel open the photo keeps its full size and the photo buttons sit on its bottom edge, below the
     chin on a normal selfie, in the width beside the enlarge button (the tool column's buttons end higher up). An
     earlier strip under the photo made tall photos up to 11% smaller, and the user wants the biggest photo. */
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .stage-card .stage-fabs{left:6px;right:60px;bottom:6px}
  /* When a close-up puts the chin that low, js/photo.js adds .clear-chin: two round icon buttons in the bottom corners,
     beside the neck. Their names stay readable to screen readers. */
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-card .stage-fabs.clear-chin{left:6px;right:60px;justify-content:space-between}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-fabs.clear-chin .advice-fab,:where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-fabs.clear-chin .realistic-fab{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;justify-content:center;border-radius:50%}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-fabs.clear-chin .advice-fab>span,:where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-fabs.clear-chin .realistic-fab>span,:where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-fabs.clear-chin .realistic-fab small{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-fabs.clear-chin .icon{width:20px;height:20px}
  @media(max-width:599px){
    /* Beside a lens, makeup or retouch tray or an open panel a phone has no room for them off the face; they come back
       with the styles. */
    :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:is([data-mobile-tool=true],[data-mobile-panel]) .stage-fabs{display:none}
    :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .stage-fabs{gap:6px}
    :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .advice-fab,:where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .realistic-fab{min-height:42px;padding:0 11px 0 9px;gap:5px;font-size:12px}
    :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .advice-fab .icon,:where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .realistic-fab .icon{width:17px;height:17px}
    :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready .realistic-fab small{display:none}
  }
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .filmstrip{align-self:stretch;overflow:hidden}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .filmstrip>:not(.style-strip){flex:none}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .style-strip{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));grid-auto-rows:max-content;align-content:start;gap:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:0 0 4px;scroll-snap-type:none}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .style-card{flex:none;width:auto;min-width:0;height:auto;scroll-snap-align:none}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .style-card img,:where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .style-card canvas{height:auto;aspect-ratio:6/5}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .gallery-group-title{grid-column:1/-1;flex:none;width:auto;min-width:0;display:block;margin:4px 0 0;padding:2px 2px 5px;border:0;border-bottom:1px solid rgba(201,162,39,.24);text-align:start;font-size:11px;line-height:1.3;scroll-snap-align:none}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .gallery-group-title:first-child{margin-top:0}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .complete-look-card{grid-column:1/-1;flex:none;width:auto;scroll-snap-align:none}
  :where(html.compact-layout.compact-narrow.fit-photo) .workspace.mobile-photo-ready:not([data-mobile-tool=true]):not([data-mobile-panel]) .self-hair-card{grid-column:1/-1;flex:none;width:auto}
}
/* Desktops with a photo: the photo is the mirror and takes the full height on one side; everything for choosing a
   look sits in one column on the other side (categories, filters, then styles, a tool or a panel), so the photo
   never moves while choosing. The header stays the desktop one (its phone rules need .compact-narrow). */
@media(min-width:1024px) and (min-height:501px){
  :where(html.compact-layout) .mobile-photo-page .app>.topbar{padding-block:6px}
  /* Below about 1180px the full button names push the last actions off the bar; the short names (the phone ones)
     fit, and each button keeps its full name as its tooltip and accessible name. */
  @media(max-width:1179px){
    :where(html.compact-layout) .mobile-photo-page .top-actions .tool-btn>span:not(.mobile-action-label){display:none}
    :where(html.compact-layout) .mobile-photo-page .top-actions .tool-btn>.mobile-action-label{display:block}
  }
  :where(html.compact-layout) .workspace.mobile-photo-ready{--drawer:clamp(320px,28vw,500px);grid-template-columns:minmax(0,1fr) var(--drawer);grid-template-rows:auto minmax(0,1fr);grid-template-areas:'stage categories' 'stage tray';gap:0 6px;padding:6px}
  /* One surface behind the categories and the tray, drawn by the grid itself so the two read as one column. */
  :where(html.compact-layout) .workspace.mobile-photo-ready::before{content:'';grid-column:2;grid-row:1/3;border:1px solid var(--line);border-radius:16px;background:rgba(21,22,25,.92);box-shadow:0 14px 36px rgba(0,0,0,.23)}
  /* The original desktop spotlight behind the photo. */
  :where(html.compact-layout) .mobile-photo-ready .stage-card{border-radius:16px;background:radial-gradient(ellipse at center,#292a2f 0,#18191c 52%,#111215 100%)}
  /* Categories: all ten at once, icon over name, five to a row. */
  :where(html.compact-layout) .mobile-photo-ready .side-rail>section:first-child{margin:1px 1px 0;padding:10px 10px 9px;border:0;border-bottom:1px solid var(--line);border-radius:15px 15px 0 0;background:none}
  :where(html.compact-layout) .mobile-photo-ready .category-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;overflow:visible;direction:rtl}
  :where(html.compact-layout) .mobile-photo-ready .category-tab{min-width:0;min-height:62px;flex-direction:column;justify-content:center;gap:5px;padding:7px 2px 6px;border-radius:11px;font-size:12px;line-height:1.15;white-space:normal;text-align:center}
  :where(html.compact-layout) .mobile-photo-ready .category-icon{display:grid;width:26px;height:26px}
  :where(html.compact-layout) .mobile-photo-ready .category-icon .icon{width:17px;height:17px}
  /* The tray fills the rest of the column; the filters stay put and only the styles or the tool scroll. */
  :where(html.compact-layout) .mobile-photo-ready .filmstrip,:where(html.compact-layout) .mobile-photo-ready[data-mobile-tool=true] .filmstrip{align-self:stretch;height:auto;max-height:none;min-height:0;margin:0 1px 1px;padding:10px 10px 0;gap:10px;border:0;border-radius:0 0 15px 15px;background:none;box-shadow:none;overflow:hidden}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip-tools{flex-wrap:wrap;overflow:visible}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip-tools .face-detection-chip,:where(html.compact-layout) .mobile-photo-ready .filmstrip-tools .photo-quality{flex:1 1 100%}
  :where(html.compact-layout) .mobile-photo-ready .filmstrip>:not(.style-strip){flex:none}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-strip,:where(html.compact-layout) .mobile-photo-ready[data-mobile-tool=true] .style-strip{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:2px 2px 12px;scroll-snap-type:none;scrollbar-width:thin;scrollbar-color:rgba(201,162,39,.45) transparent}
  /* Styles: a grid of large cards, three or four to a row. The cards clip their content, so the rows are sized to
     it; otherwise the grid would squeeze them to fit the column. */
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));grid-auto-rows:max-content;align-content:start;gap:8px}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card{flex:none;width:auto;min-width:0;height:auto;padding:6px 6px 7px;gap:5px;scroll-snap-align:none}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card img,:where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card canvas{height:auto;aspect-ratio:6/5}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card span{font-size:11px}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .style-card:hover{border-color:rgba(255,255,255,.2)}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .gallery-group-title{grid-column:1/-1;flex:none;width:auto;min-width:0;display:block;margin:6px 0 0;padding:4px 2px 6px;border:0;border-bottom:1px solid rgba(201,162,39,.24);text-align:start;font-size:12px;line-height:1.3;white-space:normal;scroll-snap-align:none}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .gallery-group-title:first-child{margin-top:0}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .complete-look-card{grid-column:1/-1;flex:none;width:auto;height:auto;min-height:100px;padding:8px;gap:12px;scroll-snap-align:none}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .complete-look-preview{width:72px;height:84px}
  :where(html.compact-layout) .mobile-photo-ready:not([data-mobile-tool=true]) .self-hair-card{grid-column:1/-1;flex:none;width:auto;height:auto;min-height:104px}
  /* Colour, blend and layer panels take the whole column until closed, on the same surface. */
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=color] .mobile-color-controls,:where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=blend] .blend-panel,:where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=layers] .layers-panel{grid-row:1/3;max-height:none;align-self:stretch;margin:1px;border:0;border-radius:15px;background:none}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=blend] .blend-panel,:where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=layers] .layers-panel{padding:10px 14px 14px;align-content:start}
  :where(html.compact-layout) .mobile-photo-ready .mobile-panel-close{top:8px;left:8px}
  /* One column: the blend controls stack, and each layer gets a full-width row. */
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=blend] .blend-panel{grid-template-columns:minmax(0,1fr);row-gap:12px}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=blend] .blend-panel>*{grid-column:1;grid-row:auto}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=blend] .blend-panel>.panel-heading{display:flex;align-items:center;min-height:44px;padding-left:56px}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=blend] .blend-panel>.object-opacity{padding-top:14px;border-top:1px solid var(--line)}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=layers] .layers-panel>.panel-heading{min-height:44px;padding-left:56px}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=layers] .layer-list{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;overflow:visible}
  :where(html.compact-layout) .mobile-photo-ready[data-mobile-panel=layers] .layer-row{min-width:0;min-height:52px;padding:8px 10px}
}
