/* V27 — incremental polish on the supplied V25. */
.splash-diamond-frame::after{content:"";position:absolute;inset:-7%;border:1px solid #68d9ff45;border-radius:50%;border-left-color:#8be9ff;border-right-color:#e8bf76;box-shadow:0 0 25px #1599ff26,inset 0 0 18px #1a9df51a;animation:diamondOrbit27 18s linear infinite;pointer-events:none}
.splash-atmosphere::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 26% 33%,#007aff24,transparent 45%),radial-gradient(ellipse at 75% 65%,#38d9ff16,transparent 40%);animation:diamondGlow27 7s ease-in-out infinite alternate;pointer-events:none}
.splash-mark{filter:drop-shadow(0 0 18px #37baff65)}
.tap-cta{box-shadow:0 0 24px #1eb8ff30,inset 0 0 18px #008bff18!important}
@keyframes diamondOrbit27{to{transform:rotate(360deg)}}
@keyframes diamondGlow27{to{opacity:.5;transform:translate3d(0,-1.5%,0)}}
.v27-history{display:flex;align-items:center;gap:4px;margin-left:auto;flex-shrink:0}
.v27-history button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;background:transparent;color:#e7c58a;font-size:25px;border-radius:8px;cursor:pointer}
.v27-history button:disabled{opacity:.25;cursor:default}
.v27-fine{display:flex;justify-content:center;align-items:center;gap:16px;margin-top:2px}
.v27-fine button{background:#202631;border:1px solid #384354;color:#d5dfeb;border-radius:7px;padding:5px 10px;min-height:32px;font-size:11px;cursor:pointer}
.v27-fine button:first-child,.v27-fine button:last-child{font-size:18px;min-width:36px}
.v27-adjust-icon{display:none}
.filter-swatch canvas,.photo-preset>span>canvas{width:100%;height:100%;object-fit:cover;border-radius:7px;display:block}
button:focus-visible,label:focus-visible{outline:2px solid #66d4ff!important;outline-offset:2px}
@media(max-width:650px){
 /* Fixed geometry: no inherited transforms or wrapping on export. */
 body .mode-editor .content-shell .editor-top{grid-template-columns:minmax(40px,1fr) 64px 138px!important;height:52px!important;min-height:52px!important;max-height:52px!important;flex:0 0 52px!important;padding:4px 10px!important;gap:6px!important;overflow:visible!important}
 body .mode-editor .editor-top .editor-actions{display:flex!important;width:138px!important;max-width:138px!important;gap:6px!important;height:42px!important;margin:0!important;transform:none!important;position:static!important}
 body .mode-editor .editor-top .editor-actions label{flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:40px!important;min-height:40px!important;max-height:40px!important}
 body .mode-editor .editor-top .editor-actions [data-action="export"],body .mode-photo .photo-heading [data-v24-photo-menu]{position:static!important;transform:none!important;rotate:none!important;float:none!important;align-self:center!important;margin:0!important;box-sizing:border-box!important;flex:0 0 96px!important;width:96px!important;min-width:96px!important;max-width:96px!important;height:40px!important;min-height:40px!important;max-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;padding:0 8px!important;line-height:1!important;white-space:nowrap!important;font-size:12px!important;border-radius:10px!important;background:linear-gradient(125deg,#f3d29b,#c99e60)!important;color:#17120b!important;box-shadow:0 2px 12px #d6ad6520!important}
 body .mode-editor .editor-top .editor-actions [data-action="export"] span{font-size:12px!important}
 body .mode-photo .photo-heading{display:grid!important;grid-template-columns:30px minmax(0,1fr) 52px 96px!important;gap:6px!important;align-items:center!important;padding:4px 10px!important;min-height:52px!important;height:52px!important;max-height:52px!important;flex:0 0 52px!important;overflow:visible!important}
 body .mode-photo .photo-heading .v20-editor-name{min-width:0!important;overflow:hidden!important}
 body .mode-photo .photo-heading .v20-editor-name strong{font-size:12px!important;white-space:nowrap!important}
 body .mode-photo .photo-heading .v16-direct-import{width:52px!important;padding:0!important;height:40px!important;min-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:11px!important;margin:0!important}
 body .mode-photo .photo-heading .v24-photo-back{width:30px!important;min-width:30px!important;padding:0!important}
 /* Categories stay available above the selected controls, as in the reference. */
 body .mode-editor.v24-tool-open .editor-layout>.tab-row,body .mode-photo.v24-tool-open .photo-workspace>.photo-mobile-dock{display:flex!important;order:3!important;flex:0 0 61px!important;height:61px!important;min-height:61px!important;max-height:61px!important;padding:3px 6px!important;border-top:1px solid #27303a!important;background:#12161d!important}
 body .mode-editor .editor-layout>.tab-row,body .mode-photo .photo-workspace>.photo-mobile-dock{flex:0 0 calc(70px + env(safe-area-inset-bottom,0px))!important;height:calc(70px + env(safe-area-inset-bottom,0px))!important;max-height:calc(70px + env(safe-area-inset-bottom,0px))!important;min-height:70px!important;padding-left:7px!important;padding-right:7px!important}
 body .mode-editor .editor-layout>.tab-row .tab,body .mode-photo .photo-workspace>.photo-mobile-dock button{flex-basis:62px!important;min-width:62px!important;width:62px!important}
 body .mode-editor.v24-tool-open .editor-layout>.properties-panel,body .mode-photo.v24-tool-open .photo-workspace>.photo-properties{height:clamp(224px,29dvh,290px)!important;min-height:224px!important;max-height:290px!important;flex:0 0 clamp(224px,29dvh,290px)!important;padding:0 12px calc(8px + env(safe-area-inset-bottom,0px))!important;background:#15191f!important;overscroll-behavior:contain}
 body .mode-editor.v24-tool-open.v27-visual-panel .editor-layout>.timeline-panel{display:none!important}
 body .mode-editor .v24-tool-head,body .mode-photo .v24-tool-head{height:36px!important;min-height:36px!important;background:#15191f!important;z-index:6!important}
 body .mode-editor .v24-tool-head button,body .mode-photo .v24-tool-head button{height:34px!important;min-height:34px!important;min-width:34px!important}
 body .mode-editor .v24-tool-head .v27-done,body .mode-photo .v24-tool-head .v27-done{margin-left:auto!important;color:#f1d19d!important;font-size:23px!important}
 body .mode-editor .v24-tool-advice,body .mode-photo .v24-tool-advice{font-size:10px!important;max-width:none!important}
 body .mode-editor #control-panel .v24-adjust-picker,body .mode-photo .photo-properties .v24-adjust-picker{height:82px!important;min-height:82px!important;max-height:82px!important;gap:8px!important;align-items:stretch!important;margin:6px 0 2px!important;padding:0!important}
 body .mode-editor .v24-adjust-chip,body .mode-photo .v24-adjust-chip{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;flex:0 0 70px!important;width:70px!important;height:80px!important;min-height:80px!important;max-height:80px!important;padding:0!important;font-size:10px!important;white-space:normal!important;line-height:1.15!important;background:transparent!important;text-align:center!important}
 .v27-adjust-icon{display:grid!important;place-items:center;width:43px;height:43px;flex:0 0 43px;border:1px solid #46505c;border-radius:50%;font-size:23px;color:#d0d8e4}
 .v24-adjust-chip[aria-pressed="true"] .v27-adjust-icon{border-color:#edc786;background:#d9ad6420;color:#ffe0ab;box-shadow:0 0 12px #ddb45c12}
 body .mode-editor #control-panel .v22-rail,body .mode-photo .photo-properties .v22-rail,body .mode-editor #control-panel .v24-adjust-picker~.v22-rail,body .mode-photo .photo-properties .v24-adjust-picker~.v22-rail{height:100px!important;min-height:100px!important;max-height:100px!important;gap:0!important;padding:0!important;align-items:start!important;scrollbar-width:none!important}
 body .mode-editor #control-panel .v22-rail>.ctrl,body .mode-photo .photo-properties .v22-rail>.ctrl{box-sizing:border-box!important;flex:0 0 100%!important;width:100%!important;min-width:100%!important;min-height:98px!important;padding:2px 6px!important;margin:0!important}
 body .mode-editor .properties-panel input[type=range],body .mode-photo .photo-properties input[type=range]{touch-action:pan-y!important;height:34px!important;min-height:34px!important}
 body .mode-editor .v22-rail-nav,body .mode-photo .v22-rail-nav{display:none!important}
 body .mode-editor .filter-presets,body .mode-photo .photo-filter-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;max-height:none!important;overflow:visible!important;gap:10px!important;padding:8px 0 12px!important}
 body .mode-editor .filter-presets .filter-preset,body .mode-photo .photo-filter-grid .photo-preset{width:100%!important;min-width:0!important;height:110px!important;min-height:110px!important;max-height:110px!important;flex:none!important;border-radius:9px!important}
 body .mode-editor .filter-swatch,body .mode-photo .photo-preset>span:first-child{height:78px!important;min-height:78px!important;width:100%!important;overflow:hidden!important}
 body .mode-editor .transport{gap:6px!important;padding:0 10px!important;height:40px!important;min-height:40px!important;flex:0 0 40px!important}
 body .mode-photo .studio-quickbar #photo-tip{display:none!important}
 .v27-fine button{min-height:30px!important;height:30px!important;padding:2px 9px!important}
 body .mode-editor .v24-photo-menu,body .mode-photo .v24-photo-menu{z-index:50!important}
}
@media(max-width:650px) and (max-height:680px){
 body .mode-editor.v24-tool-open .editor-layout>.properties-panel,body .mode-photo.v24-tool-open .photo-workspace>.photo-properties{height:194px!important;min-height:194px!important;max-height:194px!important;flex-basis:194px!important}
 body .mode-editor #control-panel .v24-adjust-picker,body .mode-photo .photo-properties .v24-adjust-picker{height:66px!important;min-height:66px!important;max-height:66px!important}
 .v27-adjust-icon{width:32px;height:32px;flex-basis:32px;font-size:20px}
}
@media(prefers-reduced-motion:reduce){.splash-diamond-frame::after,.splash-atmosphere::after{animation:none!important}}
@media(max-width:650px){
 body .mode-editor .content-shell .editor-top{grid-template-columns:minmax(30px,1fr) 70px 138px!important}
 body .mode-editor .editor-top .v24-format-host,body .mode-editor .editor-top .v24-format-host label,body .mode-editor .editor-top #ratio-select{width:70px!important;max-width:70px!important}
 body .mode-editor .editor-top #ratio-select{padding:0 4px!important;font-size:12px!important}
 body .mode-editor.v24-tool-open .editor-layout>.properties-panel,body .mode-photo.v24-tool-open .photo-workspace>.photo-properties{height:clamp(270px,34dvh,320px)!important;min-height:270px!important;max-height:320px!important;flex-basis:clamp(270px,34dvh,320px)!important}
 body .mode-editor #control-panel .panel-heading,body .mode-photo .photo-properties .panel-heading{min-height:30px!important;height:30px!important}
 body .mode-editor .v24-adjust-chip[aria-pressed="true"],body .mode-photo .v24-adjust-chip[aria-pressed="true"]{background:transparent!important}
}
@media(max-width:650px) and (max-height:680px){
 body .mode-editor.v24-tool-open .editor-layout>.properties-panel,body .mode-photo.v24-tool-open .photo-workspace>.photo-properties{height:240px!important;min-height:240px!important;max-height:240px!important;flex-basis:240px!important}
}

@media(max-width:650px){body .mode-photo .photo-properties .photo-filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(min-width:651px){
 body .mode-photo .photo-heading{position:relative}
 body .mode-photo .v24-photo-menu:not([hidden]){position:absolute;top:100%;right:0;z-index:50;display:grid;gap:4px;background:#10171e;border:1px solid #af8c59;border-radius:11px;padding:6px;min-width:145px;box-shadow:0 14px 35px #000c}
 body .mode-photo .v24-photo-menu button{min-height:40px;background:#172432;border:0;border-radius:7px;color:#eee8df;font-size:12px;text-align:left;padding:7px 10px}
}
