/* DIAMOND EDIT AI V19 — cinematic entrance + accessible editing workspace.
   Scope intentionally excludes the approved studio selection screen. */
:root{--v19-deep:#05101d;--v19-glass:#0d2034;--v19-gold:#f0ca89;--v19-blue:#6bc7ff}
/* CINE OPENING: depth and physical light, not a static poster */
.splash-screen{background:radial-gradient(ellipse 60% 48% at 50% 44%,#103a64 0%,#081725 49%,transparent 78%),linear-gradient(145deg,#030509,#081221 53%,#030409)!important}
.splash-atmosphere{isolation:isolate}
.v19-cinema-horizon{position:absolute;inset:0;z-index:0;pointer-events:none;background:radial-gradient(ellipse 92% 7% at 50% 72%,#ecb96e22,transparent 70%),linear-gradient(180deg,transparent 62%,#1e629016 62.2%,transparent 62.4%);animation:v19-horizon 7s ease-in-out infinite alternate}
.v19-cinema-horizon:after{content:"";position:absolute;left:0;right:0;top:66%;height:1px;background:linear-gradient(90deg,transparent,#64b9ff8f,#f7d499,transparent);box-shadow:0 0 30px #6fc6ff55;opacity:.8}
.v19-light-sweep{position:absolute;z-index:0;top:-36%;left:24%;height:160%;width:2px;transform:rotate(43deg);filter:blur(.5px);opacity:.45;background:linear-gradient(180deg,transparent 8%,#3776af00 25%,#75c7ffbb 47%,#f7d094a6 50%,transparent 75%);box-shadow:0 0 28px #408fea80;animation:v19-light 8s ease-in-out infinite alternate;pointer-events:none}
.v19-light-sweep-two{left:72%;transform:rotate(-45deg);opacity:.3;animation-delay:-4s}
.v19-prism-beams{position:absolute;inset:-37%;pointer-events:none;z-index:-1;animation:v19-prism-rotate 22s linear infinite}
.v19-prism-beams i{position:absolute;top:50%;left:50%;height:1px;width:75%;transform-origin:0 50%;background:linear-gradient(90deg,#efca8866,#65c1fb72,transparent 80%);box-shadow:0 0 13px #f0c58d31}
.v19-prism-beams i:nth-child(1){transform:rotate(0deg)}.v19-prism-beams i:nth-child(2){transform:rotate(60deg)}.v19-prism-beams i:nth-child(3){transform:rotate(120deg)}.v19-prism-beams i:nth-child(4){transform:rotate(180deg)}.v19-prism-beams i:nth-child(5){transform:rotate(240deg)}.v19-prism-beams i:nth-child(6){transform:rotate(300deg)}
.splash-diamond-frame{position:relative!important}
.splash-mark{filter:drop-shadow(0 0 32px #e6c28a43)!important;animation:v19-diamond-glow 4s ease-in-out infinite alternate!important}
.splash-ready .splash-diamond-frame{animation:v19-levitate 4.7s ease-in-out infinite!important}
.splash-center{width:min(96vw,600px);padding:10px 16px 90px!important;gap:0}
.splash-wordmark{font-weight:950!important;letter-spacing:.12em!important;color:#fff7e8!important}
.splash-tagline{margin:15px 0 11px!important;font-size:9px!important;letter-spacing:.28em!important;color:#b4ccdc!important}
.v19-cinema-message{display:flex;align-items:center;flex-direction:column;gap:9px;max-width:440px;margin:12px auto 15px;animation:v19-rise 1.05s .45s both}
.v19-cinema-message>span{font:800 9px/1.4 ui-monospace,monospace;letter-spacing:.22em;color:#91cbef}
.v19-cinema-message strong{font-size:clamp(17px,4.6vw,26px);line-height:1.23;letter-spacing:-.035em;color:#f5f8ff;font-weight:780;max-width:320px}
.v19-cinema-message strong em{font-style:normal;background:linear-gradient(115deg,#fff2c6,#dbaa63);background-clip:text;-webkit-background-clip:text;color:transparent}
.v19-cinema-message small{font-size:9px!important;letter-spacing:.16em!important;color:#d7e4f2!important;margin:0!important}
.v19-cinema-message b{font-size:7px;color:#eabb77;padding:0 7px}
.splash-progress{height:3px!important;box-shadow:0 0 18px #57b8ff45!important}
.splash-center .intro-loading{margin-top:4px}
.splash-bottom{letter-spacing:.18em!important;color:#819caf!important}
.tap-cta{border-color:#e9c895!important;background:linear-gradient(120deg,#102b43,#061221 52%,#33271c)!important;box-shadow:0 0 0 1px #62c5ff2d,inset 0 1px #fff6d384,0 0 24px #407dab2b!important}
.tap-cta-arrow{width:39px;height:39px;display:grid;place-items:center;border:1px solid #79b7e37d;border-radius:9px;background:#193b54a8;color:#f2d29c!important}
.splash-exiting .v19-cinema-message{animation:v19-cinema-exit .38s ease-in both}
@keyframes v19-horizon{to{opacity:.52;transform:translateY(-14px)}}
@keyframes v19-light{to{opacity:.15;left:48%}}
@keyframes v19-prism-rotate{to{transform:rotate(360deg)}}
@keyframes v19-diamond-glow{to{filter:drop-shadow(0 0 40px #ffd49a9a) drop-shadow(0 0 67px #57b9fd4c)}}
@keyframes v19-levitate{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-10px) scale(1.045)}}
@keyframes v19-rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@keyframes v19-cinema-exit{to{opacity:0;filter:blur(8px);transform:translateY(12px) scale(1.05)}}
/* Editor controls: clear labels, strong legibility, consistent touch targets */
.v19-editor-lead{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px 15px;padding:12px 16px;margin:0 0 12px;border:1px solid #3465839c;border-radius:13px;background:linear-gradient(100deg,#102b3c,#081723);color:#b8d1e6;font-size:11px;line-height:1.45}
.v19-signal{color:#93ddff;font:800 10px/1.5 ui-monospace,monospace;letter-spacing:.1em;white-space:nowrap}
.v19-preview-toggle{flex:none;min-height:34px;min-width:88px;padding:7px 11px;border-radius:9px;background:#17334b;border:1px solid #6295b8;color:#ebd4a7;font-size:11px;font-weight:800;letter-spacing:0;cursor:pointer}
.v19-preview-toggle[aria-pressed=true]{background:#3b2a1a;border-color:#e7bb70}
.stage-header,.photo-stage-header{flex-wrap:wrap;gap:9px!important}
.photo-stage-header>span{margin-right:auto}
.v19-tool-caption{display:flex;align-items:center;gap:8px;padding:12px;margin:4px 0 12px;background:linear-gradient(105deg,#15304b,#071c2a);border:1px solid #457ca0;border-radius:12px;color:#c5d6e6;font-size:11px;flex-wrap:wrap}
.v19-tool-caption b{font-size:14px;color:#f6dfb6;letter-spacing:-.015em}.v19-tool-caption>span:last-child{margin-left:auto;font-size:10px;color:#a8c6db}
.v19-tool-dot{width:7px;height:7px;border-radius:50%;background:#65d8ff;box-shadow:0 0 10px #4dc7ff;flex:none}
.photo-properties,.properties-panel{min-width:0}
.photo-control label,.properties-panel .ctrl label{color:#dbe7f3!important;font-weight:650}
.photo-properties input[type=range],.properties-panel input[type=range]{accent-color:#edbf81!important;touch-action:pan-y}
.photo-properties .photo-mobile-dock button,.properties-panel .tab-row button{touch-action:manipulation}
.photo-stage-view,.preview-area{background:radial-gradient(ellipse at 50% 45%,#12253e,#02050b 84%)!important}
.photo-stage-view canvas,.preview-area canvas{object-fit:contain!important;max-width:100%!important}
/* Desktop: editing screen preserves a generous media monitor; controls scroll independently */
@media(min-width:851px){
 .editor-layout{grid-template-columns:minmax(0,1fr) minmax(345px,380px)!important;gap:18px!important;align-items:start}
 .editor-layout>section{min-width:0}
 .stage-panel{position:sticky;top:18px;z-index:3}
 .preview-area{min-height:min(65vh,625px)!important}
 .preview-area canvas{max-height:min(60vh,590px)!important}
 .photo-workspace{grid-template-columns:minmax(0,1fr) minmax(350px,400px)!important;align-items:start;gap:18px!important}
 .photo-stage{position:sticky;top:18px;z-index:3}
 .photo-stage-view{min-height:min(62vh,620px)!important}
 .photo-stage-view canvas{max-height:min(58vh,580px)!important}
 .properties-panel .tab-row{max-height:185px;overflow-y:auto}
 .photo-properties,.properties-panel{padding:20px!important}
}
/* Mobile: PREVIEW stays visible while any tool is manipulated below it.
   Main is the scroll container established in V14. No floating drawers. */
@media(max-width:650px){
 .v19-editor-lead{padding:9px 11px;margin-bottom:9px;font-size:10px}
 .v19-signal{font-size:9px}
 .mode-photo .content-shell main{height:100dvh!important;padding:8px 9px calc(44px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}
 .mode-editor .content-shell main{height:calc(100dvh - 42px)!important;padding:8px 9px calc(44px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}
 .mode-photo .photo-heading{margin-bottom:4px!important}
 .mode-photo .photo-page-header{padding:3px 2px!important;margin:0 0 7px!important}
 .mode-photo .photo-page-header h1{font-size:21px!important;margin-bottom:2px}
 .mode-photo .photo-page-header .v16-direct-import{min-height:40px!important;font-size:11px!important}
 .mode-photo .photo-page-header .eyebrow{font-size:9px;margin-bottom:5px}
 .mode-photo .photo-workspace,.mode-editor .editor-layout{overflow:visible!important;gap:9px!important}
 .mode-editor .editor-layout>section{display:contents!important}
 .mode-photo .photo-stage,.mode-editor .stage-panel{position:sticky!important;top:0!important;z-index:14!important;border:1px solid #7b9bb6a8!important;background:#06111ef7!important;box-shadow:0 15px 30px #000c,0 0 0 1px #d6b77d1b!important;padding:8px!important;backdrop-filter:blur(20px)}
 .mode-photo .photo-stage-view{height:clamp(202px,31dvh,300px)!important;min-height:202px!important;max-height:none!important;padding:5px!important}
 .mode-photo .photo-stage-view canvas{max-height:calc(clamp(202px,31dvh,300px) - 10px)!important}
 .mode-editor .preview-area{height:clamp(202px,31dvh,300px)!important;min-height:202px!important;max-height:none!important}
 .mode-editor .preview-area canvas{max-height:calc(clamp(202px,31dvh,300px) - 10px)!important}
 .mode-photo .photo-stage-header,.mode-editor .stage-header{font-size:10px!important;margin-bottom:6px!important;padding-bottom:5px!important;letter-spacing:.04em}
 .mode-photo .photo-stage-header #photo-file-name{max-width:36%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .mode-photo .photo-stage .v16-import-strip{display:none!important}
 .mode-photo .photo-stage-actions{margin-top:6px!important;display:flex!important;gap:5px!important;flex-wrap:nowrap!important}
 .mode-photo .photo-stage-actions .btn,.mode-photo .photo-stage-actions .btn:first-child{min-height:36px!important;max-height:39px!important;flex:1 1 0!important;grid-column:auto!important;font-size:10px!important;padding:4px!important}
 .mode-photo .studio-quickbar{margin:4px 0 0!important;padding:0!important;min-height:0!important;gap:5px!important}
 .mode-photo .studio-quickbar #photo-tip{font-size:9px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .mode-photo .studio-quickbar .compare-button{font-size:10px!important;min-height:30px!important;padding:5px 7px!important}
 .mode-photo .photo-mobile-dock{position:sticky!important;top:calc(clamp(202px,31dvh,300px) + 104px)!important;z-index:13!important;height:68px!important;min-height:68px!important;margin:0!important;box-shadow:0 8px 18px #0009!important}
 .mode-photo .photo-mobile-dock button{height:52px!important;min-height:52px!important;min-width:75px!important;flex-basis:75px!important}
 .mode-photo .photo-mobile-dock button small{font-size:11px!important}
 .mode-photo .photo-properties,.mode-editor .properties-panel{position:relative!important;z-index:1!important;margin:0!important;border-radius:15px!important;box-shadow:0 14px 38px #0008!important;padding:11px!important;overflow:visible!important}
 .mode-photo .photo-properties{min-height:360px!important}
 .mode-editor .stage-panel .transport{padding:2px 2px!important;margin:3px 0!important}
 .mode-editor .stage-panel .transport .play{min-width:35px!important;min-height:35px!important;width:35px!important;height:35px!important}
 .mode-editor .stage-panel .seek-row{margin:1px 0!important}
 .mode-editor .v16-import-strip{padding:7px 8px!important;margin:0!important}
 .mode-editor .v16-import-main{min-height:43px!important;font-size:12px!important;padding:7px 9px!important}
 .mode-editor .v16-import-help{display:none!important}
 .mode-editor .timeline-panel{padding:8px!important}
 .mode-editor .timeline-help{font-size:10px!important}
 .mode-editor .properties-panel>h3,.mode-photo .photo-properties>h3{font-size:14px!important;margin:7px 0!important}
 .mode-editor .properties-panel .tab-row{min-height:80px!important;height:80px!important;padding:5px!important;gap:6px!important;margin-bottom:8px!important}
 .mode-editor .properties-panel .tab-row .tab{min-height:64px!important;height:64px!important;min-width:82px!important;flex-basis:82px!important;font-size:12px!important}
 .mode-editor .properties-panel .tab-row .tab small{font-size:11px!important;color:inherit}
 .mode-editor #control-panel .ctrl{padding:5px 0!important}
 .mode-editor #control-panel input[type=range],.mode-photo .photo-properties input[type=range]{min-height:35px!important}
 .mode-photo .photo-control-grid{gap:8px!important}
 .v19-tool-caption{margin:0 0 7px;padding:8px 10px;gap:6px}
 .v19-tool-caption b{font-size:13px}.v19-tool-caption>span:last-child{font-size:9px}
 .mode-photo .photo-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .mode-photo .photo-preset{min-height:58px!important}
 .mode-photo.v19-preview-theater .photo-stage-view,.mode-editor.v19-preview-theater .preview-area{height:clamp(270px,46dvh,440px)!important;max-height:440px!important}
 body.v19-preview-theater .mode-photo .photo-stage-view,body.v19-preview-theater .mode-editor .preview-area{height:clamp(270px,46dvh,440px)!important;max-height:440px!important}
 body.v19-preview-theater .mode-photo .photo-stage-view canvas,body.v19-preview-theater .mode-editor .preview-area canvas{max-height:calc(clamp(270px,46dvh,440px) - 10px)!important}
 body.v19-preview-theater .mode-photo .photo-mobile-dock{top:calc(clamp(270px,46dvh,440px) + 104px)!important}
}
@media(max-width:380px){.mode-photo .studio-quickbar #photo-tip{display:none}.v19-cinema-message strong{font-size:18px}.v19-cinema-message{gap:7px}.splash-center{padding-bottom:78px!important}}
@media(prefers-reduced-motion:reduce){.v19-light-sweep,.v19-cinema-horizon,.v19-prism-beams,.splash-ready .splash-diamond-frame,.splash-mark,.v19-cinema-message{animation:none!important}}
/* Keep the photo category strip completely below the pinned preview, not under it. */
@media(max-width:650px){
 body .mode-photo .photo-mobile-dock{top:calc(clamp(202px,31dvh,300px) + 153px)!important}
 body.v19-preview-theater .mode-photo .photo-mobile-dock{top:calc(clamp(270px,46dvh,440px) + 153px)!important}
}
/* V06 constrained the video grid to one viewport, ending sticky positioning too early.
   Let the editor expand naturally inside its single scroll container. */
@media(max-width:650px){
 body .mode-editor .content-shell main#screen{display:block!important;height:calc(100dvh - 52px)!important;overflow-y:auto!important;overflow-x:hidden!important;}
 body .mode-editor .editor-layout{display:flex!important;flex:0 0 auto!important;height:auto!important;min-height:max-content!important;overflow:visible!important;flex-direction:column!important;}
 body .mode-editor .editor-layout>section{display:contents!important;}
 body .mode-editor .stage-panel{position:sticky!important;top:0!important;z-index:15!important;}
}
/* Put the video tool rail directly under the pinned monitor in mobile view.
   This prevents the category buttons from disappearing behind the video. */
@media(max-width:650px){
 body .mode-editor .editor-layout>.tab-row{display:flex!important;position:sticky!important;top:calc(clamp(202px,31dvh,300px) + 214px)!important;order:4!important;z-index:18!important;flex:0 0 auto!important;width:100%!important;height:78px!important;min-height:78px!important;align-items:center!important;gap:7px!important;padding:7px!important;margin:0!important;overflow-x:auto!important;overflow-y:hidden!important;background:linear-gradient(115deg,#0e2033f7,#091725f7)!important;border:1px solid #49779a!important;border-radius:14px!important;box-shadow:0 12px 22px #000b!important;scroll-snap-type:x proximity}
 body .mode-editor .editor-layout>.tab-row .tab{flex:0 0 80px!important;width:80px!important;min-width:80px!important;min-height:61px!important;height:61px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;border:1px solid #355878!important;border-radius:10px!important;background:#101e2f!important;color:#cfe4f8!important}
 body .mode-editor .editor-layout>.tab-row .tab.selected{border-color:#f0c783!important;color:#ffe5bd!important;background:linear-gradient(130deg,#47331d,#173651)!important}
 body .mode-editor .editor-layout>.tab-row .tab span{font-size:20px!important}
 body .mode-editor .editor-layout>.tab-row .tab small{font-size:11px!important;color:inherit}
 body .mode-editor .editor-layout>.properties-panel{order:5!important;z-index:1!important;min-height:210px!important}
 body.v19-preview-theater .mode-editor .editor-layout>.tab-row{top:calc(clamp(270px,46dvh,440px) + 214px)!important}
}
/* Editing first: video categories immediately follow the monitor on mobile.
   Import and timeline remain one swipe away below. */
@media(max-width:650px){
 body .mode-editor .editor-layout>.tab-row{order:2!important;top:calc(clamp(202px,31dvh,300px) + 164px)!important}
 body .mode-editor .editor-layout>.v16-import-strip{order:3!important}
 body .mode-editor .editor-layout>.timeline-panel{order:4!important}
 body.v19-preview-theater .mode-editor .editor-layout>.tab-row{top:calc(clamp(270px,46dvh,440px) + 164px)!important}
}
.splash-ready #intro-loading small{color:#99d4fa!important;opacity:1}
/* Desktop photo editing is now a real workspace, not a list of every setting at once. */
@media(min-width:651px){
 body .mode-photo .photo-properties>.photo-mobile-dock{display:flex!important;position:relative!important;inset:auto!important;width:100%!important;height:76px!important;min-height:76px!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;margin:0 0 13px!important;padding:7px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity;border:1px solid #49799a!important;border-radius:13px!important;background:linear-gradient(115deg,#0f293f,#0b1b2b)!important;box-shadow:none!important}
 body .mode-photo .photo-properties>.photo-mobile-dock button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;flex:0 0 76px!important;width:76px!important;min-width:76px!important;height:59px!important;min-height:59px!important;border:1px solid #365f7c!important;border-radius:10px!important;background:#0c2133!important;color:#c9dff3!important;gap:3px!important}
 body .mode-photo .photo-properties>.photo-mobile-dock button.active{background:linear-gradient(140deg,#4b3520,#173b54)!important;color:#ffe4af!important;border-color:#f2c885!important}
 body .mode-photo .photo-properties>.photo-mobile-dock button span{font-size:19px!important;line-height:1!important}
 body .mode-photo .photo-properties>.photo-mobile-dock button small{font-size:10px!important;white-space:nowrap!important;color:inherit!important}
 body .mode-photo .photo-properties>.photo-tabs{display:none!important}
 body .mode-photo .photo-properties .photo-tool-section{display:none!important}
 body .mode-photo .photo-properties .photo-tool-section.mobile-active{display:block!important}
 body .mode-photo .photo-properties{min-height:430px}
}
