/* P1N Community Engine Alpha.8.8 — branding and editor navigation / scrollbar polish */
.top-site-name .ce388-site-logo{display:block;flex:none;width:auto;height:var(--ce388-logo-height,44px);max-width:min(180px,35vw);max-height:56px;object-fit:contain;object-position:center}
@media(max-width:760px){.top-site-name .ce388-site-logo{max-height:38px;height:min(var(--ce388-logo-height,44px),38px);max-width:112px}}
.ce387-workspace.ce326-workspace>.ce387-library{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:8px;overflow:visible!important;max-height:none!important;padding:12px;min-width:0}
.ce387-library .ce387-library-head{grid-column:1/-1;flex:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:15px;border-right:0;border-bottom:1px solid #355575;padding:0 3px 11px}
.ce387-library .ce387-library-head h2{font-size:.88rem;margin:0}.ce387-library .ce387-library-head p{font-size:.71rem;margin:0}
.ce387-library .ce326-region{min-width:0;min-height:71px;flex:none!important;display:flex;flex-direction:column;justify-content:center;gap:4px;padding:11px 13px!important;background:#122b49;border:1px solid #355575;border-radius:10px;overflow-wrap:anywhere;transition:background .17s,border-color .17s,transform .17s}
.ce387-library .ce326-region:hover{border-color:#42c7ef;background:#163857;transform:translateY(-1px)}
.ce387-library .ce326-region.selected{background:#144364;border-color:#40d1f5;box-shadow:inset 3px 0 #40d1f5}
.ce387-library .ce326-region strong{line-height:1.26;font-size:.78rem}.ce387-library .ce326-region small{line-height:1.35;font-size:.67rem;margin:0;color:#bdd4e8}
.ce387-library .ce388-brand-link{border-color:#297e9b;background:linear-gradient(110deg,#133b56,#102945)}
.ce387-library .ce388-brand-link strong:before{content:'◈';font-size:1rem;color:#32cfee;margin-right:7px}
.ce387-edit-pane .ce387-editor-tools{border-radius:12px}.ce387-edit-pane .ce326-editor-label textarea{border-radius:11px;min-height:310px}
.ce387-edit-pane .ce326-save-actions{position:sticky;bottom:0;z-index:3;background:#0e2540;border-top:1px solid #365775;padding:12px 2px;margin-top:12px}
.ce388-brand-grid{display:grid;grid-template-columns:minmax(295px,42%) minmax(360px,58%);gap:15px;align-items:start;margin-bottom:24px}
.ce388-brand-grid>*{min-width:0}
.ce388-brand-panel{background:#10223e;border:1px solid #355777;border-radius:15px;padding:23px;min-width:0}
.ce388-brand-panel h2{margin:0 0 6px;font-size:1.22rem}.ce388-brand-panel>p{font-size:.8rem;color:#b3cce1;line-height:1.6;margin:0 0 17px}
.ce388-logo-card{display:flex;gap:15px;align-items:center;border:1px solid #345b7c;background:linear-gradient(125deg,#163351,#0b2036);border-radius:12px;padding:14px;margin:0 0 19px}
.ce388-logo-swatch{width:112px;min-width:112px;height:94px;border-radius:12px;border:1px dashed #4b7696;background:#0c2038;display:flex;align-items:center;justify-content:center;padding:8px}
.ce388-logo-swatch img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
.ce388-logo-card strong,.ce388-logo-card small{display:block;overflow-wrap:anywhere}.ce388-logo-card strong{font-size:.93rem}.ce388-logo-card small{font-size:.72rem;color:#b6cee2;line-height:1.5;margin-top:6px}
.ce388-brand-form{display:grid;gap:12px}.ce388-brand-form>label{margin:0;font-size:.8rem}.ce388-brand-form input[type=file]{font-size:.77rem;line-height:1.45;cursor:pointer;border:1px dashed #4781a6!important;background:#102f4c;padding:13px}
.ce388-brand-form label small{display:block;font-size:.7rem;color:#aec6db;line-height:1.5;margin-top:5px;font-weight:400}
.ce388-brand-form label input,.ce388-brand-form label select{margin-top:7px}
.ce388-brand-form .ce388-switch{display:flex;align-items:center;gap:10px;border:1px solid #345675;border-radius:10px;background:#112e4c;padding:11px 13px;line-height:1.3}
.ce388-switch input{margin:0;width:18px;height:18px;flex:none}
.ce388-brand-form .btn{justify-content:center}
.ce388-brand-publish{display:flex;align-items:center;gap:12px;padding-top:17px;margin-top:17px;border-top:1px solid #315675;flex-wrap:wrap}
.ce388-brand-publish span{font-size:.73rem;line-height:1.4;color:#a9c5dd;flex:1;min-width:120px}
.ce388-brand-publish .btn:disabled{opacity:.48;cursor:not-allowed}
.ce388-brand-panel .ce388-help{margin:18px 0 0;border:1px solid #305576;background:#102b47;padding:13px;border-radius:10px;font-size:.77rem;color:#bfdae9}
.ce388-brand-preview{position:sticky;top:12px;grid-column:auto;min-height:0}
.ce388-brand-preview .ce326-preview-viewport{height:660px;margin:12px auto}
.ce388-brand-preview .ce326-preview-viewport.is-mobile{max-width:390px}
.ce388-brand-preview .ce326-preview-viewport iframe{width:100%;height:100%;border:0}
.ce326-workspace,.ce326-workspace *, .ce388-brand-grid,.ce388-brand-grid *{scrollbar-width:thin;scrollbar-color:#3e8cb3 #102942}
.ce326-workspace *::-webkit-scrollbar,.ce388-brand-grid *::-webkit-scrollbar{width:9px;height:9px}
.ce326-workspace *::-webkit-scrollbar-track,.ce388-brand-grid *::-webkit-scrollbar-track{background:#102942;border-radius:30px}
.ce326-workspace *::-webkit-scrollbar-thumb,.ce388-brand-grid *::-webkit-scrollbar-thumb{background:#33799c;border:2px solid #102942;border-radius:30px}
.ce326-workspace *::-webkit-scrollbar-thumb:hover,.ce388-brand-grid *::-webkit-scrollbar-thumb:hover{background:#37b7dc}
.ce388-preview-document{scrollbar-width:thin;scrollbar-color:#438fb7 #112944}
.ce388-preview-document::-webkit-scrollbar{width:9px;height:9px}.ce388-preview-document::-webkit-scrollbar-thumb{background:#3b8fb9;border:2px solid #102942;border-radius:14px}.ce388-preview-document::-webkit-scrollbar-track{background:#102942}
@media(max-width:1100px){.ce387-workspace.ce326-workspace>.ce387-library{grid-template-columns:repeat(3,minmax(0,1fr))}.ce388-brand-grid{grid-template-columns:1fr}.ce388-brand-preview{position:static}}
@media(max-width:740px){.ce387-workspace.ce326-workspace>.ce387-library{grid-template-columns:repeat(2,minmax(0,1fr))}.ce387-library .ce387-library-head{flex-direction:column;align-items:flex-start;gap:3px}.ce388-brand-panel{padding:16px}}
@media(max-width:430px){.ce387-workspace.ce326-workspace>.ce387-library{grid-template-columns:1fr 1fr;gap:7px;padding:9px}.ce387-library .ce326-region{padding:10px!important;min-height:76px}.ce388-logo-card{flex-direction:column;align-items:flex-start}.ce388-logo-swatch{width:100%;min-width:0}}

.ce388-brand-form .ce388-presentation{border:1px solid var(--line);background:var(--surface-2);border-radius:10px;padding:12px 14px}.ce388-brand-form .ce388-presentation small{color:var(--muted)}

.ce388-brand-preview .ce326-preview-viewport{overflow:hidden}.ce388-brand-preview .ce326-preview-viewport iframe{display:block;max-width:none;transform-origin:top left;}
