/* P1N Community Engine 0.3.1 alpha.8.7: streamlined maintenance + beginner-friendly theme studio */
.ce387-maintain{max-width:1020px;margin:18px 0 38px;display:grid;gap:14px}
.ce387-current{display:flex;align-items:center;justify-content:space-between;gap:22px;background:var(--surface,#10223d);border:1px solid var(--line,#36516f);border-radius:17px;padding:23px 26px}
.ce387-current h2{font-size:clamp(1.5rem,3vw,2rem);line-height:1.15;margin:7px 0;overflow-wrap:anywhere;color:var(--ink,#fff)}
.ce387-current p{margin:0;color:var(--muted,#b7cde2);font-size:.82rem}
.ce387-status{min-width:175px;display:flex;flex-direction:column;justify-content:center;gap:4px;padding:11px 17px;border:1px solid var(--line,#345572);border-radius:12px;background:color-mix(in srgb,#2cc9a1 7%,var(--surface,#10223d));text-align:right}
.ce387-status.attention{background:color-mix(in srgb,#ffc66b 10%,var(--surface,#10223d))}
.ce387-status strong{font-size:1rem;color:#76e2bb}.ce387-status.attention strong{color:#ffcc82}
.ce387-status small{font-size:.74rem;color:var(--muted,#b7cde2)}
.ce387-action,.ce387-tools,.ce387-diagnostics,.ce387-readyline{background:var(--surface,#10223d);border:1px solid var(--line,#36516f);border-radius:13px;padding:18px 22px}
.ce387-action h3,.ce387-tools h3{margin:7px 0;font-size:1rem}.ce387-action p,.ce387-tools p{margin:3px 0;color:var(--muted,#b7cde2);font-size:.8rem;line-height:1.55}
.ce387-action small{display:block;color:#ffd29b;margin:12px 0}.ce387-readyline{background:color-mix(in srgb,#35c999 7%,var(--surface,#10223d));font-size:.86rem;color:var(--ink,#fff)}
.ce387-readyline>span{color:#70e5b7;font-size:1.1rem;margin-right:7px}
.ce387-tools{display:flex;align-items:center;justify-content:space-between;gap:18px}.ce387-tools .btn{flex:0 0 auto}
.ce387-missing{padding:10px 13px;border-radius:10px;background:#6f3b2338;border:1px solid #c1834777;max-width:380px}
.ce387-missing strong,.ce387-missing small{display:block}.ce387-missing small{font-size:.74rem;color:var(--muted,#b7cde2);overflow-wrap:anywhere;margin-top:5px}
.ce387-diagnostics{padding:0;overflow:hidden}.ce387-diagnostics summary{padding:13px 20px;cursor:pointer;color:var(--muted,#b7cde2);font-size:.8rem;font-weight:700}.ce387-diagnostics p{padding:0 20px;font-size:.77rem;color:var(--muted,#b7cde2)}.ce387-diagnostics p:last-child{padding-bottom:13px}
.ce387-editor-intro{margin:4px 0 20px}.ce387-editor-intro h1{margin:5px 0 8px;font-size:clamp(1.5rem,3.5vw,2.4rem)}.ce387-editor-intro p{color:var(--muted,#b7cde2);max-width:720px;line-height:1.6}
.ce387-theme-chooser{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:14px}
.ce387-theme-choice{background:var(--surface,#10223d);border:1px solid var(--line,#36516f);border-radius:16px;padding:15px;display:flex;flex-direction:column;gap:12px;min-width:0}
.ce387-theme-choice.is-suggested{border-color:#2cd4f4}.ce387-theme-choice>div:not(.ce387-choice-preview){display:flex;flex-direction:column;gap:4px}
.ce387-theme-choice strong{font-weight:760}.ce387-theme-choice small,.ce387-theme-choice p{font-size:.78rem;color:var(--muted,#bad0e2)}
.ce387-theme-choice p{line-height:1.55;flex:1;margin:0}.ce387-theme-choice form{margin:0}.ce387-theme-choice .btn{width:100%;justify-content:center;text-align:center}
.ce387-choice-preview{height:126px;border-radius:11px;background:#101b33;border:1px solid #36587b;padding:13px;display:flex;gap:10px;position:relative;overflow:hidden}
.ce387-choice-preview i{display:block;width:23%;border-radius:7px;background:#205179}.ce387-choice-preview b{display:block;width:54%;height:63%;border-radius:7px;background:linear-gradient(130deg,var(--ce387-accent,#39d1ee),#19325a)}
.ce387-choice-preview em{display:block;width:14%;height:35%;border-radius:6px;background:#34577d}
.ce387-picker-foot{margin:19px 0;padding:15px 18px;border:1px solid var(--line,#36516f);border-radius:12px;display:flex;align-items:center;gap:15px;justify-content:space-between;flex-wrap:wrap}
.ce387-picker-foot p{margin:0;font-size:.8rem;color:var(--muted,#bad0e2)}
.ce387-topline{justify-content:space-between}.ce387-topline>div{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.ce387-workspace.ce326-workspace{display:grid;grid-template-columns:minmax(310px,44%) minmax(380px,56%);align-items:start;gap:14px}
.ce387-workspace>.ce387-library{grid-column:1/-1;display:flex;flex-direction:row;align-items:stretch;gap:8px;overflow-x:auto;max-height:none;padding:10px 12px;scrollbar-width:thin}
.ce387-library-head{flex:0 0 160px;display:flex;flex-direction:column;justify-content:center;padding:6px 12px 6px 0;border-right:1px solid #355575}
.ce387-library-head h2{font-size:.87rem;margin:0 0 5px}.ce387-library-head p{font-size:.73rem;margin:0;color:#aec8df}
.ce387-library .ce326-region{flex:0 0 153px;padding:11px;border:1px solid #30496a;border-radius:10px;min-height:60px;box-sizing:border-box}
.ce387-library .ce326-region strong{font-size:.79rem}.ce387-library .ce326-region small{font-size:.69rem}
.ce387-library .ce326-region.selected{border-color:#29cef3;background:#123d5c;box-shadow:inset 3px 0 #36d1f6}
.ce387-edit-pane{grid-column:1;min-width:0}
.ce387-preview{grid-column:2;position:sticky;top:12px;min-width:0}
.ce387-preview .ce326-preview-viewport{height:650px;margin:12px auto}
.ce387-preview-caption{color:#b5cde2;font-size:.72rem;margin:0 13px 13px;line-height:1.5}
.ce387-edit-pane .ce326-edit-head{padding:13px 16px}.ce387-edit-pane .ce326-edit-head>div:first-child{display:flex;flex-direction:column;gap:4px}.ce387-edit-pane .ce326-edit-head small{font-size:.69rem;color:#aac6df}
.ce387-edit-pane form#ce326-edit-form{padding:14px 16px}
.ce387-editor-tools{background:#0b1c32;border:1px solid #2e506e;border-radius:10px;padding:10px 12px;margin-bottom:14px;display:grid;gap:8px}
.ce387-editor-tools>span{font-size:.74rem;font-weight:800;color:#bed5ea}.ce387-editor-tools>div{display:flex;flex-wrap:wrap;gap:5px}.ce387-editor-tools>div[hidden]{display:none}
.ce387-editor-tools .btn{min-height:31px;padding:5px 9px;font-size:.73rem;border-radius:8px}
.ce387-edit-pane .ce326-editor-label textarea{min-height:370px;max-height:66vh;font-size:13px;line-height:1.65;padding:16px}
.ce387-code-guide{border:1px solid #315674;border-radius:11px;margin:15px 0;background:#102843;color:#dceffc}
.ce387-code-guide summary{padding:12px 14px;font-size:.79rem;cursor:pointer;font-weight:750;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px}
.ce387-code-guide summary span{font-weight:450;font-size:.69rem;color:#a5c6df}.ce387-guide-body{padding:2px 14px 14px;border-top:1px solid #2a4b68}
.ce387-guide-body p{font-size:.77rem;line-height:1.65;color:#bfd7e9}.ce387-guide-body code,.ce387-guide-body pre{font:12px/1.55 ui-monospace,monospace;color:#9ce5ff}
.ce387-guide-body pre{white-space:pre-wrap;word-break:break-word;background:#07182b;padding:10px;border-radius:8px}
.ce387-save-actions{border-top:1px solid #2c4a68;margin-top:16px;padding-top:16px}
@media(max-width:1240px){.ce387-workspace.ce326-workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.ce387-preview{grid-column:2}.ce387-library-head{flex-basis:145px}}
@media(max-width:950px){.ce387-workspace.ce326-workspace{grid-template-columns:minmax(0,1fr)}.ce387-workspace>.ce387-library,.ce387-edit-pane,.ce387-preview{grid-column:1}.ce387-preview{position:static}.ce387-library-head{flex:0 0 135px}.ce387-preview .ce326-preview-viewport{height:510px}}
@media(max-width:630px){.ce387-current,.ce387-tools{flex-wrap:wrap}.ce387-status{width:100%;text-align:left}.ce387-theme-chooser{grid-template-columns:1fr}.ce387-workspace>.ce387-library{gap:6px}.ce387-library-head{flex:0 0 100px}.ce387-library .ce326-region{flex-basis:135px}.ce387-preview .ce326-preview-viewport{height:460px}.ce387-page-title{display:block}.ce387-page-title>.btn{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.ce387-workspace *{scroll-behavior:auto!important}}
/* This overrides the older accordion-like mobile library rule in engine-v0326. */
.ce387-preview .ce326-preview-viewport.is-tablet{max-width:768px}
