/* DIAMOND EDIT AI V22 — cinema preview and swipe-first native-feeling editor. */
:root{--v22-ice:#72d3ff;--v22-amber:#f2c47e;--v22-deep:#07121f}
@media(max-width:650px){
 /* Larger preview without stealing all the room from the adjustment deck. */
 body .mode-editor .editor-layout>.stage-panel{flex:0 0 clamp(265px,48dvh,455px)!important;max-height:clamp(265px,48dvh,455px)!important;padding:5px!important;border:1px solid #365f80!important;background:linear-gradient(165deg,#08192d,#02060d)!important;box-shadow:inset 0 1px #ffffff17,0 12px 32px #010810b0!important}
 body .mode-photo .photo-workspace>.photo-stage{flex:0 0 clamp(270px,51dvh,475px)!important;max-height:clamp(270px,51dvh,475px)!important;padding:5px!important;border:1px solid #365f80!important;box-shadow:inset 0 1px #ffffff17,0 12px 32px #010810b0!important}
 body .mode-editor .preview-area,body .mode-photo .photo-stage-view{background:radial-gradient(ellipse at 50% 42%,#19344c 0%,#060d16 65%,#030911 100%)!important;border:1px solid #24425d!important;border-radius:12px!important}
 body .mode-editor .preview-area canvas,body .mode-photo .photo-stage-view canvas{max-width:100%!important;max-height:100%!important;filter:drop-shadow(0 6px 18px #0008)!important}
 body .mode-editor .editor-layout>.timeline-panel{flex:0 0 43px!important;min-height:43px!important;height:43px!important;max-height:43px!important;padding:4px 7px!important;background:#06172a!important}
 body .mode-editor .timeline-panel .timeline-top{height:12px!important}
 body .mode-editor .timeline-panel .timeline-track{height:20px!important;min-height:20px!important}
 body .mode-editor .timeline-panel .v15-cut-track{height:8px!important;min-height:8px!important;margin-top:0!important}
 body .mode-editor .editor-layout>.v20-group-switch,body .mode-photo .photo-workspace>.v20-group-switch{flex-basis:32px!important;min-height:32px!important;height:32px!important;max-height:32px!important;border-radius:11px!important;background:#061729!important}
 body .mode-editor .v20-group-switch button,body .mode-photo .v20-group-switch button{height:27px!important;min-height:27px!important;font-size:11px!important}
 body .mode-editor .editor-layout>.tab-row,body .mode-photo .photo-workspace>.photo-mobile-dock{flex:0 0 57px!important;height:57px!important;min-height:57px!important;max-height:57px!important;background:linear-gradient(95deg,#071828,#0a1c2c)!important;border:1px solid #2c5876!important;box-shadow:inset 0 1px #ffffff13!important;gap:6px!important}
 body .mode-editor .editor-layout>.tab-row .tab,body .mode-photo .photo-workspace>.photo-mobile-dock button{flex:0 0 69px!important;min-width:69px!important;width:69px!important;height:47px!important;min-height:47px!important;max-height:47px!important;border:1px solid #2d5874!important;border-radius:10px!important;background:linear-gradient(145deg,#112c42,#07121e)!important;box-shadow:inset 0 1px #ffffff13!important;transition:background .18s,border-color .18s,transform .18s!important}
 body .mode-editor .editor-layout>.tab-row .tab.selected,body .mode-photo .photo-workspace>.photo-mobile-dock button.active{background:linear-gradient(140deg,#344d62,#1d3149)!important;border-color:#f3c77f!important;box-shadow:0 0 14px #eeb66b24,inset 0 0 15px #eec47f1a!important}
 body .mode-editor .editor-layout>.tab-row .tab:active,body .mode-photo .photo-workspace>.photo-mobile-dock button:active{transform:scale(.95)!important}
 body .mode-editor .editor-layout>.properties-panel,body .mode-photo .photo-workspace>.photo-properties{padding:6px 9px calc(9px + env(safe-area-inset-bottom,0px))!important;background:linear-gradient(168deg,#11283b,#060e1b)!important;border:1px solid #3e708b!important;box-shadow:inset 0 1px #ffffff17!important}
 body .mode-editor .v19-tool-caption,body .mode-photo .v19-tool-caption{height:29px!important;min-height:29px!important;margin-bottom:3px!important;border:1px solid #245c7d!important;border-radius:8px!important;background:#0d2d42f0!important}
 body .mode-photo .photo-filter-grid,body .mode-editor .filter-presets{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity!important;-webkit-overflow-scrolling:touch!important;gap:9px!important;padding:4px 2px 10px!important;max-height:132px!important;scrollbar-width:none!important}
 body .mode-photo .photo-filter-grid .photo-preset,body .mode-editor .filter-presets .filter-preset{flex:0 0 108px!important;width:108px!important;min-width:108px!important;height:105px!important;min-height:105px!important;scroll-snap-align:start!important}
 /* Horizontal adjustment carousel. Cards contain exactly one control, not a giant list. */
 body .mode-photo .v22-rail,body .mode-editor .v22-rail{display:flex!important;flex-flow:row nowrap!important;align-items:stretch!important;gap:0!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory!important;scroll-padding-inline:0!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-x:contain!important;touch-action:pan-x!important;scrollbar-width:none!important;padding:1px 0 3px!important;min-height:97px!important;max-height:150px!important;scroll-behavior:smooth!important}
 body .mode-photo .v22-rail::-webkit-scrollbar,body .mode-editor .v22-rail::-webkit-scrollbar{display:none}
 body .mode-photo .v22-rail>.ctrl,body .mode-editor .v22-rail>.ctrl{flex:0 0 100%!important;box-sizing:border-box!important;width:100%!important;min-width:100%!important;scroll-snap-align:start!important;scroll-snap-stop:always!important;border:0!important;margin:0!important;padding:7px 5px 9px!important;background:transparent!important;min-height:82px!important;height:auto!important}
 body .mode-photo .v22-rail>.ctrl>label,body .mode-editor .v22-rail>.ctrl>label{font-size:13px!important;font-weight:650!important;letter-spacing:.01em!important;display:flex!important;justify-content:space-between!important;gap:8px!important;margin-bottom:11px!important}
 body .mode-photo .v22-rail input[type=range],body .mode-editor .v22-rail input[type=range]{height:30px!important;min-height:30px!important;width:100%!important;touch-action:pan-x!important}
 body .mode-photo .v22-rail-nav,body .mode-editor .v22-rail-nav{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin:0 0 2px!important;min-height:35px!important;padding:2px 4px!important;color:#d6e4f5!important}
 body .mode-photo .v22-rail-tag,body .mode-editor .v22-rail-tag{font-size:9px!important;letter-spacing:.12em!important;color:#7cabc9!important;font-weight:750!important}
 body .mode-photo .v22-rail-arrows,body .mode-editor .v22-rail-arrows{display:flex!important;gap:7px!important;align-items:center!important}
 body .mode-photo .v22-rail-count,body .mode-editor .v22-rail-count{font-size:11px!important;min-width:40px!important;text-align:center!important;color:#f3cb8e!important;font-variant-numeric:tabular-nums!important}
 body .mode-photo .v22-rail-prev,body .mode-photo .v22-rail-next,body .mode-editor .v22-rail-prev,body .mode-editor .v22-rail-next{height:29px!important;min-height:29px!important;width:32px!important;min-width:32px!important;border-radius:9px!important;border:1px solid #527896!important;background:linear-gradient(#1c3a53,#092133)!important;color:#f5d29e!important;font-size:23px!important;line-height:20px!important;display:grid!important;place-items:center!important;padding:0!important}
 body .mode-photo .v22-rail-arrows button:disabled,body .mode-editor .v22-rail-arrows button:disabled{opacity:.3!important}
 body .mode-photo .photo-properties .photo-tool-section.mobile-active,body .mode-editor #control-panel{padding-bottom:2px!important}
 body .mode-photo .photo-properties h3:not(.v19-tool-caption),body .mode-photo .photo-properties>.inline-details,body .mode-editor .properties-panel>.properties-footer{display:none!important}
 body .mode-photo .photo-properties .panel-heading,body .mode-editor #control-panel .panel-heading{margin:0 0 3px!important;padding:2px 0!important;min-height:25px!important}
 body .mode-photo .photo-properties .photo-tool-section .v22-rail~.ctrl-note,body .mode-editor #control-panel .v22-rail~.ctrl-note{font-size:10px!important}
 body .mode-editor .properties-panel .v11-tool-head{display:none!important}
 body .mode-editor #control-panel{padding:1px 0!important}
 body .mode-editor .v15-speed-options,body .mode-editor .v16-caption-styles{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:7px!important;padding:6px 0!important;scrollbar-width:none!important}
 body .mode-editor .v15-speed-options>*{flex:0 0 auto!important}
}
@media(max-width:650px) and (max-height:710px){
 body .mode-editor .editor-layout>.stage-panel{flex-basis:clamp(255px,44dvh,325px)!important;max-height:clamp(255px,44dvh,325px)!important}
 body .mode-photo .photo-workspace>.photo-stage{flex-basis:clamp(265px,47dvh,345px)!important;max-height:clamp(265px,47dvh,345px)!important}
 body .mode-editor .editor-layout>.properties-panel,body .mode-photo .photo-workspace>.photo-properties{min-height:100px!important}
}
/* Launch sequence: restrained cinematic light choreography, not flashy clutter. */
.splash-atmosphere:after{content:"";position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(112deg,transparent 40%,#78bff814 46%,#ffcd891e 49%,transparent 56%);mix-blend-mode:screen;animation:v22-cinemaSweep 9s ease-in-out infinite}
.splash-diamond-frame .splash-mark{filter:drop-shadow(0 0 16px #ffdb9a55) drop-shadow(0 0 42px #2189db55);animation:v22-gem-breathe 6s ease-in-out infinite alternate}
.splash-wordmark{filter:drop-shadow(0 0 11px #326cab3a)}
.tap-cta{border-color:#dfb36d!important;box-shadow:inset 0 0 18px #f3c77d17,0 0 30px #dfa7602e,0 0 52px #2775d82c!important;animation:v22-powerPulse 3.8s ease-in-out infinite alternate!important}
@keyframes v22-cinemaSweep{0%,18%{opacity:0;transform:translateX(-44%)}45%{opacity:.85}75%,100%{opacity:0;transform:translateX(48%)}}
@keyframes v22-gem-breathe{to{filter:drop-shadow(0 0 25px #ffe3a2bd) drop-shadow(0 0 64px #2897ef88);transform:translateY(-3px) scale(1.018)}}
@keyframes v22-powerPulse{to{box-shadow:inset 0 0 20px #f3c77d28,0 0 45px #dfa76061,0 0 74px #2775d859!important}}
@media(prefers-reduced-motion:reduce){.splash-atmosphere:after,.splash-diamond-frame .splash-mark,.tap-cta{animation:none!important}}
/* Short Safari viewports: guarantee the current slider remains touchable without scrolling. */
@media(max-width:650px) and (max-height:710px){
 body .mode-photo .photo-workspace>.photo-stage{flex-basis:clamp(238px,41dvh,305px)!important;max-height:clamp(238px,41dvh,305px)!important}
 body .mode-editor .editor-layout>.stage-panel{flex-basis:clamp(238px,40dvh,305px)!important;max-height:clamp(238px,40dvh,305px)!important}
 body .mode-photo .photo-properties .panel-heading,body .mode-editor #control-panel .panel-heading{margin-bottom:0!important;padding:0!important;min-height:20px!important}
 body .mode-photo .v22-rail-nav,body .mode-editor .v22-rail-nav{min-height:29px!important}
 body .mode-photo .v22-rail>.ctrl>label,body .mode-editor .v22-rail>.ctrl>label{margin-bottom:5px!important}
}
