/* Creatorbase visual system. Presentation only; existing controls and handlers remain intact. */
:root{--ink:#202124;--graphite:#686b70;--gray:#85888d;--paper:#f7f7f5;--line:#e3e5e1;--red:#e7463d;--dark:#202124;--lime:var(--red);--muted:var(--graphite);--workspace-rail:214px}
body{background:var(--paper);color:var(--ink)}
body,button,input,select,textarea{font-family:Arial,Helvetica,sans-serif}
h1,h2,h3,h4{font-family:inherit;line-height:1.2}h1{font-weight:600;letter-spacing:-1.3px}h2{letter-spacing:-.6px}p{line-height:1.6}
body .button{min-height:42px;line-height:1.3;padding:11px 16px;border-radius:8px;font-size:13px;font-weight:600;text-decoration:none;vertical-align:middle;white-space:normal;text-align:center;box-sizing:border-box}
body .button.dark,body .button.lime,body .workflow-generate{background:var(--red)!important;color:#fff!important;border:1px solid transparent}
body .button.subtle{background:#fff;border:1px solid var(--line);color:var(--ink)}
body :is(input,select,textarea){border-color:var(--line);border-radius:8px;color:var(--ink);font-size:13px;line-height:1.5}
body select,body input:not([type=range]):not([type=color]):not([type=file]):not([type=checkbox]):not([type=radio]){min-height:42px}
body textarea{padding:13px;max-width:100%;resize:vertical}body label{font-size:12px;line-height:1.5}
body :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--red);outline-offset:3px}
body .rail{background:#fff;color:var(--ink);border-right:1px solid var(--line);padding:24px 18px 0}
body .rail .brand{margin:10px 8px 32px}body .rail .brand img{width:158px;max-width:100%;height:auto}
body .rail .rail-label{font-size:9px;letter-spacing:1.8px;color:var(--gray);margin:0 10px 14px}
body .rail nav{gap:7px}body .rail nav .nav{min-height:46px;padding:12px 10px;gap:9px;color:var(--graphite);background:transparent;border:0;border-radius:9px;font-size:12px;line-height:20px}
body .rail nav .nav.active{background:#f0f1ed;color:var(--ink);font-weight:600}body .rail nav .nav:hover{background:#f5f5f2}
body .rail nav .rail-ai-label{font-size:8px;line-height:12px;padding:2px 3px;border:1px solid var(--red);border-radius:4px;color:var(--red);background:transparent;order:3;margin-left:auto;flex-shrink:0}
.cb-icon{width:19px;height:19px;display:inline-block;flex-shrink:0;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body .rail-nav-icon{width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center}body .nav.active .rail-nav-icon{color:var(--red)}
body .rail .profile{border-color:var(--line);color:var(--ink)}body .rail .avatar{background:#eee8e3;color:var(--ink)}body .rail .rail-bottom p{color:var(--gray)}
body .sidebar-personal summary,body .workspace-projects-heading button{font-size:12px;color:var(--graphite)}
body .app>header{background:#fff;border-bottom:1px solid var(--line);height:74px;padding:0 32px;gap:16px}body .breadcrumb{font-size:12px;color:var(--gray)}body .breadcrumb strong{color:var(--ink)}
body .app>main{padding:32px;max-width:1500px}body .page-heading{gap:20px;align-items:center}body .page-heading p{font-size:14px;color:var(--graphite)}
body :is(.settings-card,.ai-card,.workflow-form,.workflow-summary,.brandbase-welcome,.brand-import-panel,.brand-font-card,.brand-product,.studio-form,.studio-results){background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:none}
body :is(.workflow-heading,.brandbase-heading){background:transparent;border-color:var(--line)}
body .workflow-heading h1{font-size:36px;line-height:1.15;font-weight:600}body .workflow-heading p{font-size:14px;color:var(--graphite)}
body .workflow-cards{gap:22px}body .workflow-card{border:1px solid var(--line);border-radius:14px;box-shadow:none}body .workflow-card h2{font-size:20px;line-height:1.3}body .workflow-card p{font-size:14px;color:var(--graphite)}body .workflow-card strong{color:var(--red)}
body .workflow-brand-callout{background:#eef0eb;border-radius:14px;border:1px solid var(--line);gap:20px}
body .flow-composer{grid-template-columns:165px minmax(0,1fr);padding:24px;gap:24px;border:1px solid var(--line);border-radius:15px;box-shadow:0 8px 24px #20212403}
body .flow-slot{border:1px dashed #d8dcd6;border-radius:10px;background:#fafbf8;padding:14px;min-width:0}body .flow-slot>strong{font-size:12px}body .flow-slot .button{display:flex;width:100%;margin:8px 0 0;min-height:36px;padding:8px;font-size:11px}
body .flow-main textarea{border-color:var(--line);border-radius:10px;font-size:14px;line-height:1.6}
body .flow-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:16px 0}
body .flow-toolbar>label{display:flex;flex-direction:column;gap:6px;flex:1 1 130px;min-width:0;margin:0;font-size:11px}
body .flow-toolbar :is(select,.button){min-height:42px;height:42px;margin:0;border-radius:8px;padding:10px 12px;font-size:12px}body .flow-toolbar>button{flex:0 0 auto;align-self:end;margin:0}
body .flow-template-grid{columns:unset;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;align-items:stretch}
body .flow-template-grid button{margin:0;display:flex;flex-direction:column;border-radius:12px;border:1px solid var(--line);background:#fff;min-width:0}body .flow-template-grid img{aspect-ratio:4/5;object-fit:cover;width:100%;height:auto}body .flow-template-grid strong{font-size:12px;line-height:1.5;padding:13px;text-align:left}
body .flow-gallery{margin-top:32px}body .flow-gallery input{margin:0;max-width:100%}
body :is(.workflow-fields,.two-col){align-items:end;gap:16px}body :is(.workflow-fields,.two-col)>label{margin:0;min-width:0}body .workflow-fields{row-gap:18px}
body :is(.brand-import-actions,.brand-font-actions,.account-actions,.workflow-navigation,.workflow-preview-controls,.header-actions){display:flex;flex-wrap:wrap;align-items:center;gap:10px}
body :is(.brand-import-actions,.brand-font-actions,.account-actions,.workflow-navigation,.workflow-preview-controls)>.button{margin:0}
body .brand-color-add{align-items:end;gap:12px}body .brand-color-add>label{margin:0}body .brand-color-add>button{margin:0;min-height:42px}
body .workflow-asset-grid article{display:flex;flex-direction:column;gap:8px;min-width:0}body .workflow-asset-grid article .button{width:100%;margin:0}body .workflow-asset-grid article small{overflow-wrap:anywhere}
body .brand-font-card{display:flex;flex-direction:column;gap:10px}body .brand-font-actions{margin-top:auto}
body .tool-card{border-color:var(--line);border-radius:12px}body .tool-card h3{font-size:15px}body .tool-card p{font-size:13px;color:var(--graphite)}body .category-pills{gap:8px}body .category-pills button{border-radius:25px;font-size:12px;padding:9px 14px}
body .editor-shell{border-color:var(--line);border-radius:15px;box-shadow:none}body .canvas-area{background:#eeefec}body .controls{background:#fff;border-color:var(--line)}
body.photo-focused .photo-topbar{border-color:var(--line);gap:12px}body.photo-focused .canvas-area{background:#f0f1ee}body .photo-dock .photo-ai-prompt{border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 24px #20212408;padding:16px}
body .photo-categories button{border-radius:8px}body .photo-dock #photo-ai-continue{min-height:42px;border-radius:8px}body .photo-topbar .button{min-height:38px}
body dialog{border:1px solid var(--line);border-radius:18px;box-shadow:0 20px 70px #20212424;max-width:calc(100vw - 24px)}body dialog::backdrop{background:#20212488;backdrop-filter:blur(4px)}body .flow-template-dialog{padding:28px;border-radius:18px}body .flow-close{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#f2f3ef;font-size:22px}
body .public-nav{background:#fff;border-color:var(--line)}body .public-nav button,body .public-nav a{font-family:inherit}body .public-main{background:var(--paper)}body .home-feature{border-color:var(--line)}body .public-main :is(h1,h2,h3){font-family:inherit}body .public-main .button{min-height:44px}body .home-footer{border-color:var(--line)}
@media(min-width:901px){body:not(.sidebar-collapsed){--workspace-rail:214px}body .rail{width:var(--workspace-rail)}body .app{margin-left:var(--workspace-rail)}body.sidebar-collapsed .rail{padding-left:12px;padding-right:12px}}
@media(max-width:1100px){body .flow-template-grid{grid-template-columns:repeat(3,minmax(0,1fr))}body .flow-composer{grid-template-columns:140px minmax(0,1fr);gap:18px}body .app>main{padding:24px}}
@media(max-width:900px){body .rail{padding:16px;width:100%;border-right:0;border-bottom:1px solid var(--line)}body .rail nav .nav{flex-shrink:0}body .app{margin-left:0}body .app>header{padding:0 20px;min-height:68px;height:auto}body .workflow-heading h1{font-size:30px}}
@media(max-width:700px){body .app>main{padding:22px 16px}body .flow-composer{grid-template-columns:1fr;padding:16px}body .flow-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}body .flow-template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}body .flow-toolbar>label{flex-basis:calc(50% - 10px)}body .flow-toolbar>button{flex:1 1 auto}body .workflow-cards{grid-template-columns:1fr}body .workflow-fields{grid-template-columns:1fr}body .page-heading{align-items:start;flex-wrap:wrap}body .header-actions{gap:8px}body .header-actions .private-badge{display:none}body .brand-font-columns{grid-template-columns:1fr}body .flow-template-dialog[open]{grid-template-columns:1fr}body .workflow-brand-callout{flex-direction:column;align-items:start}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* AI editor: image canvas and prompt panel share a clean, aligned two-column workspace. */
@media(min-width:1000px){
body.photo-focused:not(.manual-photo-editor) .canvas-area{inset:88px 374px 32px 32px;padding-bottom:0;border:1px solid var(--line);border-radius:15px;overflow:hidden}
body.photo-focused:not(.manual-photo-editor) .photo-dock{left:auto;right:24px;top:88px;bottom:auto;width:326px;max-height:calc(100dvh - 112px);overflow-y:auto;margin:0}
body.photo-focused:not(.manual-photo-editor) .photo-dock .photo-ai-prompt{display:flex;flex-direction:column;align-items:stretch;gap:14px;padding:22px;box-shadow:none}
body.photo-focused:not(.manual-photo-editor) .photo-dock .photo-ai-prompt>label{position:static;width:auto;height:auto;clip-path:none;font-size:20px;font-weight:600;letter-spacing:-.5px;order:-2;margin:0}
body.photo-focused:not(.manual-photo-editor) .photo-dock #photo-edit-prompt{order:0;flex:none;width:100%;min-height:180px;height:180px;resize:vertical;padding:13px;border:1px solid var(--line);border-radius:10px;font-size:13px;line-height:1.6}
body.photo-focused:not(.manual-photo-editor) .photo-dock #photo-ai-continue{order:5;width:100%;box-shadow:none;margin:0}
body.photo-focused:not(.manual-photo-editor) .photo-dock .photo-ai-actions{flex:none;flex-wrap:wrap;align-items:center;gap:10px}
body.photo-focused:not(.manual-photo-editor) .photo-dock .photo-ai-actions .small-note{flex:1 1 100%;line-height:1.5}
body.photo-focused:not(.manual-photo-editor) .photo-dock .photo-ai-prompt::after{display:none}
body.photo-focused:not(.manual-photo-editor) .photo-categories{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 0}
body.photo-focused:not(.manual-photo-editor) .photo-categories button{margin:0;min-height:38px;font-size:11px;white-space:normal}
}
body .rail .rail-bottom{display:none}body .rail .brand{margin-top:6px;margin-bottom:28px}body .rail .brand img{width:158px;height:auto}body .rail nav .nav.active{border-left-color:transparent}
body .rail .rail-credit-meter{border-radius:10px}body .photo-ai-prompt .button{box-shadow:none}
body .rail nav .nav.active .rail-ai-label{color:var(--red);border-color:var(--red);margin-right:0}
body:not(.public-home)>.rail:not([hidden]){background:#fff}
@media(max-width:900px){
body:not(.public-home),body:not(.public-home).sidebar-collapsed{--workspace-rail:60px}
body:not(.public-home)>.rail:not([hidden]){width:60px;padding:12px 6px;align-items:stretch}
body .rail :is(.brand,.rail-label,.rail-bottom,.profile,.rail-credit-meter,.workspace-projects,.sidebar-personal,.rail-collapse),body .rail>.text-btn{display:none!important}
body .rail nav{display:flex;flex-direction:column;gap:8px;overflow:visible;margin:0;padding:0}
body .rail nav .nav,body.sidebar-collapsed .rail nav .nav{display:flex;justify-content:center;min-height:44px;padding:10px 0;font-size:0;gap:0}
body .rail nav .nav>span:not(.rail-nav-icon){display:none!important}
body .rail nav .nav>.rail-nav-icon{display:inline-flex!important;width:20px;font-size:20px;margin:0}
body:not(.public-home)>.app{margin-left:60px!important}
body .app>header{padding:12px 16px;min-height:56px}
body .studio-primary{grid-template-columns:1fr!important}
body .workflow-heading{padding-left:0;padding-right:0}
body .workflow-heading>div:last-child{display:flex;flex-wrap:wrap;gap:8px}
body .workflow-heading>div:last-child>.button{margin:0}
body .flow-toolbar>label{flex:1 1 100%}
body .flow-toolbar>button{flex:1}
}
@media(max-width:900px){body .rail>.journey-home,body .rail>button:not(.nav){display:none!important}}
@media(max-width:700px){
body.photo-focused:not(.manual-photo-editor) #photo-view{position:relative;left:0;top:0;width:auto;height:auto;min-height:100dvh;overflow:visible}
body.photo-focused:not(.manual-photo-editor) .photo-topbar{position:relative;inset:auto;min-height:64px;height:auto;flex-wrap:wrap;padding:12px;gap:8px}
body.photo-focused:not(.manual-photo-editor) .photo-topbar img{max-width:140px;height:auto}
body.photo-focused:not(.manual-photo-editor) .photo-topbar .button{min-height:36px;padding:8px 10px;font-size:11px}
body.photo-focused:not(.manual-photo-editor) .canvas-area{position:relative;inset:auto;min-height:390px;padding-bottom:0;margin:12px;border:1px solid var(--line);border-radius:12px}
body.photo-focused:not(.manual-photo-editor) .canvas-stage{min-height:260px;padding:16px}
body.photo-focused:not(.manual-photo-editor) .upload-empty{padding:20px 0}body.photo-focused:not(.manual-photo-editor) .upload-empty h2{font-size:23px}
body.photo-focused:not(.manual-photo-editor) .photo-dock{position:relative;inset:auto;margin:16px 12px;width:auto}
body.photo-focused:not(.manual-photo-editor) .photo-dock #photo-edit-prompt{flex:1 1 100%;min-height:90px;height:90px;width:100%}
body.photo-focused:not(.manual-photo-editor) .photo-dock #photo-ai-continue{width:100%;flex:1 1 100%}
body.photo-focused:not(.manual-photo-editor) .photo-categories{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body.photo-focused:not(.manual-photo-editor) .photo-categories button{white-space:normal;margin:0;min-height:38px;font-size:11px}
}
@media(max-width:700px){body.photo-focused:not(.manual-photo-editor){overflow:auto}body.photo-focused:not(.manual-photo-editor) .editor-shell{height:auto}}
/* Brandbase keeps one outer container, without a second inset frame. */
body #brandbase-workspace .brandbase-welcome{border:0;box-shadow:none;border-radius:0;background:transparent}
body .rail .rail-credit-meter{display:flex;flex-direction:column;align-items:stretch;width:100%;height:auto;min-height:0;padding:22px 10px 14px;margin:22px 0 12px;border-top:1px solid var(--line);border-radius:0;background:transparent;color:var(--ink);text-align:left}
body .rail-credit-meter .credit-center{position:static;display:flex;align-items:baseline;justify-content:flex-start;gap:5px;height:auto;transform:none}
body .rail-credit-meter .credit-center strong{font-size:24px;letter-spacing:-1px;line-height:1.2;color:var(--ink)}body .rail-credit-meter .credit-center>span{font-size:10px;line-height:1.4;color:var(--graphite);max-width:none}
body .rail-credit-meter .credit-bar{display:block;height:4px;background:#eceeeb;border-radius:10px;margin:15px 0 11px;overflow:hidden}body .rail-credit-meter .credit-fill{display:block;width:0;height:100%;background:var(--red);border-radius:10px;transform:none;transform-origin:center;transition:none}
body .rail-credit-meter .credit-caption{position:static;display:block;font-size:10px;line-height:1.6;color:var(--graphite);margin:0;text-align:left}
body.sidebar-collapsed .rail-credit-meter{padding:14px 0}body.sidebar-collapsed .rail-credit-meter .credit-center{justify-content:center}body.sidebar-collapsed .rail-credit-meter .credit-center strong{font-size:14px}body.sidebar-collapsed .rail-credit-meter .credit-caption,body.sidebar-collapsed .rail-credit-meter .credit-center>span{display:none}
.cinema-director{margin:0 0 22px}.cinema-director h3{margin:0 0 6px;font-size:18px}.cinema-director>p,.genjutsu-inspiration>p{font-size:12px;color:var(--graphite);line-height:1.6}.cinema-control-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.cinema-control-grid button{display:flex;align-items:center;gap:8px;text-align:left;padding:8px;border:1px solid var(--line);background:#fafbf8;border-radius:10px;min-width:0}.cinema-control-grid svg{width:45px;height:40px;border-radius:5px;flex-shrink:0}.cinema-control-grid span{min-width:0}.cinema-control-grid small{display:block;font-size:10px;color:var(--graphite);margin-bottom:4px}.cinema-control-grid strong{display:block;font-size:11px;overflow-wrap:anywhere;line-height:1.4}.cinema-options-dialog{width:min(960px,94vw);padding:28px;max-height:85dvh;overflow:auto}.cinema-options-dialog>p{font-size:13px;color:var(--graphite)}.cinema-option-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.cinema-option-grid button{display:flex;flex-direction:column;text-align:left;border:1px solid var(--line);border-radius:12px;background:white;padding:0;overflow:hidden}.cinema-option-grid button[aria-pressed=true]{outline:2px solid var(--red);outline-offset:1px}.cinema-option-grid svg{width:100%;height:150px;background:#eee}.cinema-option-grid strong{font-size:14px;margin:12px 12px 6px}.cinema-option-grid span{font-size:12px;line-height:1.5;color:var(--graphite);margin:0 12px 14px}.genjutsu-inspiration .flow-template-grid img{aspect-ratio:16/9}.genjutsu-inspiration .flow-template-grid small{padding:0 13px 13px;color:var(--graphite);font-size:11px}.genjutsu-inspiration .flow-template-grid strong{padding-bottom:5px}
@media(max-width:1100px){.cinema-control-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.cinema-option-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cinema-options-dialog{padding:24px 14px}.cinema-option-grid svg{height:110px}}

.cinema-control-grid img,.cinema-control-grid video{width:60px;height:44px;object-fit:cover;border-radius:5px;flex-shrink:0}.cinema-option-grid img,.cinema-option-grid video{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;background:#eee}.genjutsu-style-card{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:white}.genjutsu-style-card video{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:#eee}.genjutsu-style-card strong{display:block;padding:14px;font-size:13px}.cinema-model-settings{border-top:1px solid var(--line);padding-top:20px;margin-top:20px}.cinema-model-settings h3{font-size:16px;margin:0 0 16px}

.cinema-control-grid img.cinema-category-icon{width:52px;height:52px;object-fit:contain;border-radius:8px;flex-shrink:0}

/* Compact desktop navigation keeps the wallet ahead of onboarding. */
@media(min-width:901px){
body .rail{padding-top:16px}
body .rail .brand{margin-top:4px;margin-bottom:18px}
body .rail .rail-label{margin-bottom:8px}
body .rail nav{gap:3px}
body .rail nav .nav{min-height:38px;padding:8px 10px}
body .rail .rail-credit-meter{margin:12px 0 8px;padding:14px 10px 10px}
body .rail-credit-meter .credit-bar{margin:10px 0 8px}
}

/* Shared Creative Flow reference panels: three previews per row. */
body .flow-composer{grid-template-columns:310px minmax(0,1fr)}
body .flow-slot .workflow-reference-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body .flow-slot .workflow-reference-list article{position:relative;width:auto;max-width:none;min-width:0}
body .flow-slot .workflow-reference-list img,body .flow-slot .workflow-reference-list video{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:6px;background:#f0efed}
body .flow-slot .workflow-reference-list article>.button{position:absolute;top:3px;right:3px;width:22px;min-height:22px;margin:0;padding:0;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0002}
body .flow-toolbar>label{min-width:120px;flex:1 1 120px}
@media(max-width:1100px){body .flow-composer{grid-template-columns:1fr}body .flow-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){body .flow-inputs{grid-template-columns:1fr}}
