/* Lumis layout refinement. Existing colors, logos and animation design remain intact. */
body :is(button,summary,nav a,label,h1,h2,h3,h4,.primary,.secondary,.button){text-transform:capitalize}
body :is(input,textarea,[contenteditable=true]){text-transform:none}
body :is(button,.button,.primary,.secondary){max-width:100%;white-space:normal;overflow-wrap:break-word}
body :is(main,section,article,fieldset,form,nav){min-width:0}
body select{max-width:100%;color-scheme:dark}
body select option{color:#e2f1f5;background:#0b202a}
body dialog{box-sizing:border-box;max-width:min(960px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto}
body :is(header nav,.header-actions,.actions,.la-links){flex-wrap:wrap;gap:10px}
body details[open]{z-index:30}
body [role=menu]{max-width:calc(100vw - 32px);max-height:70dvh;overflow:auto;z-index:100}
body [role=menu] :is(a,button){white-space:normal}
.la-panel #account-heading.account-welcome-heading{font-family:monospace;font-size:clamp(16px,1.4vw,19px);font-weight:500;letter-spacing:.13em;line-height:1.6;text-align:center;text-transform:uppercase;color:#8bd3df;margin:4px 0 24px}
[data-filmmaker-navigation][hidden]{display:none!important}
@media(max-width:700px){
 body>header{height:auto;min-height:64px;flex-wrap:wrap;gap:12px;padding:16px}
 body>header nav{justify-content:flex-start;max-width:100%}
 body :is(.la-panel,.profile-group,.beta-card){box-sizing:border-box}
 body .la-links{display:flex;flex-wrap:wrap}
 body .la-links>*{flex:1 1 140px}
 body [role=menu]{max-width:calc(100vw - 24px)}
}
/* Consistent control labels, including older component rules. */
body :is(button,summary,nav a,label,h1,h2,h3,h4,.primary,.secondary,.button){text-transform:capitalize!important}
body .la-panel #account-heading.account-welcome-heading{text-transform:uppercase!important}
body:has(.feature) > header nav a{display:inline-flex}
body .workspace-menu>div{max-height:calc(100dvh - 110px);overflow:auto;max-width:calc(100vw - 24px)}
body .workspace-menu{position:relative}
body .workspace-menu[open]{z-index:120}
@media(max-width:420px){body[data-lumis-page=account] #lumis-account-root .la-panel .la-links{grid-template-columns:1fr!important}}
body[data-lumis-page=account] #lumis-account-root .la-panel h2#account-heading.account-welcome-heading{font:500 18px/1.6 monospace!important;letter-spacing:.13em!important;text-transform:uppercase!important;color:#8bd3df!important;text-align:center!important;margin:4px 0 24px!important}
/* Preserve filmmaker-authored titles and displayed profile names verbatim. */
body :is(#film h1,.home-film h2,.film-card h2,.project-card h2,.identity-preview h2,#name,.card-title,.graph-card h3){text-transform:none!important}

body button p{text-transform:none!important}

/* Junction badges sit above a small connection port and must exceed its width. */
body .surge-junction .junction-label{max-width:none;white-space:nowrap;overflow-wrap:normal;width:max-content}
/* One original, transparent Lumis wordmark for navigation headers. */
body:not(.player-product) header a.brand{display:block!important;flex:0 0 176px!important;width:176px!important;min-width:176px!important;height:42px!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent url('/email-assets/lumis-wordmark-clean-v2.png') center/contain no-repeat!important;font-size:0!important;overflow:visible!important;filter:none!important;clip-path:none!important}
body:not(.player-product) header a.brand>*{display:none!important}
body:not(.player-product) header a.brand::before,body:not(.player-product) header a.brand::after{display:none!important}
body:not(.player-product) header a.brand:focus-visible{outline:2px solid #66dbea;outline-offset:5px}
@media(max-width:600px){body:not(.player-product) header a.brand{flex-basis:148px!important;width:148px!important;min-width:148px!important;height:38px!important}}
body[data-lumis-page=channel] label.visibility{display:flex!important;align-items:center;gap:12px}
body[data-lumis-page=channel] label.visibility input{flex:0 0 20px;width:20px!important;margin:0!important}
body[data-lumis-page=channel] .identity #website{display:inline-block;margin:0 16px 12px 0}
body[data-lumis-page=invites]>main,body[data-lumis-page=beta]>main{max-width:1040px;margin-inline:auto}
body[data-lumis-page=invites] .beta-card,body[data-lumis-page=beta] .beta-card{max-width:none;width:100%;box-sizing:border-box}
body[data-lumis-page=invites] #applications strong,body[data-lumis-page=invites] #invitations{overflow-wrap:anywhere}
body#lumis-browse header a.brand{background:transparent url('/email-assets/lumis-wordmark-clean-v2.png') center/contain no-repeat!important;flex:0 0 160px!important;width:160px!important;min-width:160px!important}
body label:has(input[type=checkbox]){text-transform:none!important}
@media(max-width:600px){body#lumis-browse header a.brand{flex-basis:132px!important;width:132px!important;min-width:132px!important}}

/* Quiet, clearly interactive navigation with an illuminated underline. */
body:not(.player-product)>header nav a:not(.button):not(.primary):not(.secondary){
 display:inline-flex;align-items:center;min-height:38px;padding:4px 7px!important;
 color:#9eb8c4;font:600 12px/18px "Segoe UI",sans-serif;letter-spacing:.03em;
 text-decoration-line:underline!important;text-decoration-color:rgba(101,206,223,.38)!important;
 text-decoration-thickness:1px!important;text-underline-offset:8px!important;
 transition:color .18s ease,text-decoration-color .18s ease,background-color .18s ease
}
body:not(.player-product)>header nav a:not(.button):hover,
body:not(.player-product)>header nav a[aria-current=page]{color:#f3cc86!important;text-decoration-color:#e8bb68!important;background-color:rgba(100,210,230,.045)}
body:not(.player-product)>header nav a:focus-visible{outline:2px solid #6adbea;outline-offset:3px}
@media(prefers-reduced-motion:reduce){body:not(.player-product)>header nav a{transition:none!important}}

/* Keep the minimap above the legend and keyboard-help rows. */
body.studio-product .map-minimap{bottom:90px;max-height:145px}


/* Export actions remain in flow so they cannot cover options. */
body.studio-product .script-export-dialog .script-export-options>[type=submit]{position:static;box-shadow:none;margin-top:16px}


body.studio-product .watch-callout{background:linear-gradient(135deg,#102b35,#071820);border:1px solid #356575;border-radius:3px}
body.studio-product .table-wrap thead{background:#102b35;color:#b9e7ef}


body[data-lumis-page=invites]>main,body[data-lumis-page=beta]>main{max-width:1040px!important;width:calc(100% - 40px)!important;margin-inline:auto!important}
body[data-lumis-page=beta] #owner>details,body[data-lumis-page=invites] #owner>details{margin-block:24px;padding-block:16px;border-block:1px solid #31515e}

@media(max-width:700px){
 body:not(.player-product):not(.studio-product)>header nav{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;white-space:normal!important;gap:6px 10px!important;width:100%;height:auto!important;max-height:none!important}
 body:not(.player-product):not(.studio-product)>header nav a{flex:0 0 auto}
}
/* Keep the footage monitor and timing tools stacked on compact screens. */
@media(max-width:1099px){
 body.lumis-interior.studio-product #admin-workspace .adaptive-preview{display:flex!important;flex-direction:column!important;width:100%;min-width:0;overflow:visible!important}
 body.lumis-interior.studio-product #admin-workspace .precision-player{width:100%;min-width:0;box-sizing:border-box}
 body.lumis-interior.studio-product #admin-workspace .precision-player video{width:100%!important;height:auto!important;aspect-ratio:16/9;max-height:none!important;object-fit:contain}
 body.lumis-interior.studio-product #admin-workspace .transport-row{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
 body.lumis-interior.studio-product #admin-workspace .preview-slate{width:100%;min-width:0;box-sizing:border-box}
}
@media(max-width:520px){
 body.lumis-interior.studio-product #admin-workspace .guided-moment>header{display:grid!important;grid-template-columns:auto minmax(0,1fr) 38px!important;align-items:center!important;gap:8px!important;width:100%;min-height:0!important}
 body.lumis-interior.studio-product #admin-workspace .guided-moment>header input{min-width:0;width:100%!important;margin:0!important}
 body.lumis-interior.studio-product #admin-workspace .guided-moment>header button{width:38px;min-width:0;padding:8px!important}
}
@media(max-width:600px){
 body.studio-product #admin-workspace .precision-tools .slate-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;align-items:end}
 body.studio-product #admin-workspace .precision-tools .slate-controls label{min-width:0!important;width:100%!important}
 body.studio-product #admin-workspace .precision-tools .slate-controls :is(select,input){width:100%!important;min-width:0!important;box-sizing:border-box}
}
@media(max-width:760px){
 body#lumis-browse .browse-nav{overflow:visible!important}
 body#lumis-browse .browse-nav nav{display:flex!important;flex-wrap:wrap!important;min-width:0!important;gap:4px!important}
 body#lumis-browse .browse-nav nav button{flex:0 1 auto;white-space:normal!important}
}
body:not(.player-product) footer.product-footer svg.native-wordmark{width:176px;height:42px;background:url('/email-assets/lumis-wordmark-clean-v2.png') center/contain no-repeat}
body:not(.player-product) footer.product-footer svg.native-wordmark>*{display:none}
body:not(.player-product) :is(.account,.audience-profile-link,.adaptive-heading a,.admin-control-room a){text-transform:capitalize}
@media(max-width:760px){.path-visual>.path-controls{margin:20px 0 12px;justify-content:center;flex-wrap:wrap}.path-visual>.demo-replay{display:block;margin:0 auto 8px}}
body:not(.player-product)>footer>a.brand{display:block;width:176px;height:42px;background:url('/email-assets/lumis-wordmark-clean-v2.png') center/contain no-repeat}
body:not(.player-product)>footer>a.brand>svg{visibility:hidden}
body[data-lumis-page=diagnostics] #test-clip{display:block;max-width:100%;margin:12px 0 20px}
body[data-lumis-page=diagnostics] pre{white-space:pre-wrap;overflow-wrap:anywhere}

body.studio-product .script-export-dialog h2,body.studio-product #view-title{ text-transform:capitalize }
@media(min-width:1100px){
 body.studio-product #admin-workspace .precision-tools[open]{position:fixed!important;left:28px!important;right:auto!important;bottom:100px!important;width:min(580px,calc(100vw - 56px));max-height:65vh!important;box-sizing:border-box;z-index:80}
}

body:not(.player-product) #view-title{text-transform:capitalize!important}
body:not(.player-product) #content .table-wrap th{background:#102b35!important;color:#b9e7ef;text-transform:capitalize}

/* Short landscape screens need the full viewport for content, not a pinned multi-row masthead. */
@media(max-height:500px) and (orientation:landscape){
 body:not(.player-product)>.masthead{position:relative!important;inset:auto!important}
 body:not(.player-product)>.chapter-index{display:none}
 body:not(.player-product) dialog{max-height:calc(100dvh - 20px);margin:10px auto}
}

body:not(.player-product) .nav-session-status{font-size:11px;line-height:1.4;letter-spacing:.04em;color:#aac4ce;border-left:1px solid #35535e;padding-left:12px;white-space:nowrap}
/* Studio library: ordered navigation with a separate Founder utility row. */
body>header.lumis-orderly-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:28px!important;padding:20px clamp(20px,3.5vw,56px)!important}
body>header.lumis-orderly-header>.brand{flex:0 0 164px!important;margin:0!important}
body>header.lumis-orderly-header nav{display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;align-items:center!important;gap:4px 12px!important;max-width:790px!important}
body>header.lumis-orderly-header nav>a{order:3}
body>header.lumis-orderly-header nav>a[href^="/featured"]{order:0}
body>header.lumis-orderly-header nav>a[href^="/cinema-library"]{order:1}
body>header.lumis-orderly-header nav>a[href^="/my-films"]{order:2}
body>header.lumis-orderly-header nav>a[href^="/channel"]{order:3}
body>header.lumis-orderly-header nav>a[href^="/audience-profile"]{order:4}
body>header.lumis-orderly-header nav>a[href^="/account"]{order:5}
body>header.lumis-orderly-header nav:has(.lumis-founder-badge)::after{content:"";order:6;flex-basis:100%;height:4px}
body>header.lumis-orderly-header nav>.lumis-founder-badge{order:7;margin:0!important;padding:4px 9px;box-shadow:none}
body>header.lumis-orderly-header nav>a.lumis-invite-tab{order:8;font-size:11px!important;min-height:30px;padding:3px 10px!important}
body>header.lumis-orderly-header nav>.nav-session-status{order:9}
body>header.lumis-orderly-header nav:has(.lumis-founder-badge)>.nav-session-status{display:none}
@media(max-width:760px){body>header.lumis-orderly-header{flex-direction:column!important;align-items:flex-start!important;gap:12px!important}body>header.lumis-orderly-header>.brand{flex-basis:auto!important;width:150px!important}body>header.lumis-orderly-header nav{justify-content:flex-start!important;width:100%;gap:4px 8px!important}}
body>header.lumis-orderly-header>.brand{height:42px!important;min-height:0!important;max-height:42px!important;padding:0!important;display:block!important}
body>header.lumis-orderly-header>.brand svg{height:42px!important;width:164px!important;max-height:42px!important}
@media(max-width:760px){body>header.lumis-orderly-header{min-height:0!important;padding-top:26px!important;padding-bottom:16px!important}body>header.lumis-orderly-header>.brand{margin:0!important;align-self:flex-start!important}}

body:has(>.lumis-beta-label)>header.lumis-orderly-header>.local{display:none!important}
/* Studio popovers share the panel palette and a consistent hit area. */
body.studio-product .workspace-menu>div{background:#0b202a!important;border:1px solid #355d69!important;border-top:2px solid #6ccfdd!important;border-radius:2px!important;padding:8px!important;box-shadow:0 14px 36px #0007;gap:4px}
body.studio-product .workspace-menu>div>:is(button,a){display:flex;align-items:center;width:100%;min-height:36px;box-sizing:border-box;padding:8px 12px!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#b9d7e1!important;text-align:left;line-height:1.4}
body.studio-product .workspace-menu>div>:is(button,a):hover{background:#153642!important;color:#efc87f!important}
body.studio-product .workspace-menu>div>button:disabled{opacity:.4}
body.studio-product>.lumis-policy-footer{padding:12px 20px!important;margin:16px auto 0!important;gap:12px 24px;min-height:0!important;line-height:1.5}
body.studio-product .watch-callout{background:linear-gradient(130deg,#102c37,#07151e)!important;border:1px solid #355d69!important;border-top:2px solid #70d0dc!important;border-radius:2px!important;max-width:1120px;margin:24px auto!important;padding:clamp(24px,4vw,48px)!important}
body.studio-product .watch-callout>button{border-radius:0!important;border:1px solid #c69b4c!important;box-shadow:none!important}
body.studio-product .overview-heading h1{text-transform:none!important}
body.studio-product .table-wrap{max-width:100%;overflow-x:auto}

/* Status badges follow navigation and account utilities, never split page links. */
body:not(.player-product)>header nav>:is(.badge,.local){order:10!important;flex:0 0 auto;white-space:nowrap;margin-inline-start:8px}
