/* M31 editor chrome. Site preview styles stay isolated in the iframe. */
body[data-route=builder]{--workspace-ink:#24272c;--workspace-muted:#717680;--workspace-line:#e5e7eb;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
body[data-route=builder] .builder-top{padding:12px 20px!important;min-height:74px;box-shadow:0 1px 2px #00000003;position:relative;z-index:25}
body[data-route=builder] .builder-top h1{font-size:18px;letter-spacing:-.45px;font-weight:650}
body[data-route=builder] .builder-top .eyebrow{font-size:10px;letter-spacing:.04em;color:#717680}
body[data-route=builder] .builder-top .actions{gap:8px;align-items:center;flex-wrap:nowrap}
body[data-route=builder] .builder-top :is(button,select,.editor-more>summary){font-size:12px!important;min-height:36px!important;padding:8px 12px!important;border-radius:7px!important;line-height:18px!important;background:#fff;color:#414651;border:1px solid #d5d7da;box-shadow:0 1px 2px #10182805;white-space:nowrap}
body[data-route=builder] .builder-top #save{background:#24272c;color:#fff;border-color:#24272c;font-weight:600;order:9}
body[data-route=builder] .builder-top #preview-site{order:8}.editor-more{position:relative}.editor-more>summary{cursor:pointer;display:flex;gap:12px;align-items:center;list-style:none}.editor-more>summary::-webkit-details-marker{display:none}.editor-more-menu{position:absolute;top:calc(100% + 8px);right:0;padding:6px;background:white;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 8px 24px #10182818;min-width:190px;display:grid;gap:3px;z-index:40}.editor-more:not([open]) .editor-more-menu{display:none}.builder-top .editor-more-menu button{width:100%;text-align:left;border:0!important;box-shadow:none!important}.editor-more-menu button:hover{background:#f4f5f7!important}.editor-more-menu .export-menu{padding:8px 12px;font-size:12px}
body[data-route=builder] .share-strip{background:#fafafa;font-size:11px;color:#717680;padding:6px 20px!important;border-color:#e9eaeb}
body[data-route=builder] .editor-tool-shell{grid-template-columns:76px minmax(0,1fr)}
body[data-route=builder] .editor-tool-rail{padding:8px 6px;gap:3px;scrollbar-width:thin;background:#fafafa}
body[data-route=builder] .editor-tool-rail button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;min-height:60px;padding:8px 2px;font-size:10px;line-height:1.4;color:#61656e;border:0!important;border-radius:7px;background:transparent;font-weight:500;box-shadow:none}
body[data-route=builder] .editor-tool-rail button[aria-pressed=true]{background:#eef0ff;color:#444ce7;box-shadow:inset 2px 0 #6366f1}
body[data-route=builder] .editor-tool-rail button:hover{background:#eef0f3;color:#24272c}.editor-template-back{font-size:9px!important;line-height:1.5;padding:10px 0 14px!important;gap:4px!important;flex-direction:column;text-align:center}
body[data-route=builder] .editor-tool-shell .structure{padding:16px 14px;background:#fff;border-right:1px solid #e5e7eb;scrollbar-width:thin}
body[data-route=builder] .editor-tool-shell .settings{padding:20px!important;background:#fff;border-left:1px solid #e5e7eb;scrollbar-width:thin;min-width:0}
body[data-route=builder] .editor-tool-shell .settings h2{font-size:16px!important;line-height:1.4!important;letter-spacing:-.2px;margin:0 0 16px;font-weight:650}
body[data-route=builder] .editor-tool-shell .settings h3{font-size:12px;margin:22px 0 12px;font-weight:600;color:#414651}
body[data-route=builder] .settings label{display:block!important;font-size:12px;line-height:1.5;color:#414651;margin:0 0 16px;font-weight:500}
body[data-route=builder] .settings :is(input:not([type=checkbox]):not([type=color]),select,textarea){display:block;box-sizing:border-box;width:100%;min-width:0;margin:7px 0 0;padding:9px 11px;border:1px solid #d5d7da;border-radius:7px;background:#fff;color:#252b37;font:400 13px/1.55 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;box-shadow:0 1px 2px #10182805;outline:none}
body[data-route=builder] .settings textarea{min-height:104px;resize:vertical}
body[data-route=builder] .settings :is(input,textarea,select):focus{border-color:#818cf8;box-shadow:0 0 0 3px #eef2ff}
body[data-route=builder] .settings input[type=checkbox]{width:16px;height:16px;accent-color:#4f46e5;min-height:0;padding:0;margin:0;vertical-align:middle}
body[data-route=builder] .settings p{font-size:12px;line-height:1.65;color:#717680}
body[data-route=builder] .editor-tool-shell .canvas{background:#f0f1f3;padding:18px!important}
body[data-route=builder] .preview-toolbar{padding:0 0 14px;margin:0;gap:8px;font-size:11px;align-items:center;border:0}
body[data-route=builder] .preview-toolbar>span{font-size:11px;color:#717680}
body[data-route=builder] .preview-toolbar button{min-height:30px;padding:6px 9px;border-radius:6px;font-size:11px;background:transparent;border:1px solid transparent;color:#717680}
body[data-route=builder] .preview-toolbar button[aria-pressed=true]{background:white;color:#24272c;box-shadow:0 1px 3px #10182812;border-color:#e5e7eb}
body[data-route=builder] .canvas-language{font-size:10px!important;color:#717680!important}.canvas-language select{min-height:30px!important;font-size:11px!important;max-width:100px}
.editor-canvas-stage{border:1px solid #e0e2e7;border-radius:8px!important;box-shadow:0 4px 16px #10182808!important;background:white}
.seo-panel-heading{display:flex;gap:10px;align-items:center;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #eaecf0}.seo-panel-heading h2{margin:2px 0 0!important}.seo-panel-heading small{font-size:9px;letter-spacing:.1em;color:#8a8f98}.seo-panel-icon{width:34px;height:34px;border:1px solid #e9eaeb;border-radius:8px;display:grid;place-items:center;font:23px Arial;color:#535862;background:#fafafa}
body[data-route=builder] .settings .seo-toggle{display:flex!important;align-items:center;flex-direction:row-reverse;justify-content:space-between;border-top:1px solid #eaecf0;padding-top:18px;margin-top:20px}
body[data-route=builder] .seo-toggle input{appearance:none!important;width:32px!important;height:19px!important;border:0;background:#d5d7da;border-radius:20px;position:relative;flex-shrink:0;cursor:pointer;transition:background .15s}
.seo-toggle input:before{content:"";position:absolute;left:3px;top:3px;background:white;width:13px;height:13px;border-radius:50%;box-shadow:0 1px 2px #0002;transition:transform .15s}.seo-toggle input:checked{background:#4f46e5!important}.seo-toggle input:checked:before{transform:translateX(13px)}
.seo-hint{font-size:11px!important;line-height:1.65!important;color:#8a8f98!important;margin:10px 0 16px}.seo-help{font-size:11px;color:#717680;padding:8px 0;border-bottom:1px solid #eaecf0}.seo-help summary{cursor:pointer}.seo-search-result{padding:14px;background:#fafbfc;border:1px solid #e5e7eb;border-radius:8px;overflow-wrap:anywhere}.seo-search-result>small{font-size:10px;color:#717680}.seo-search-result>div{font-family:Arial,sans-serif;font-size:17px!important;line-height:1.4;margin-top:6px}.seo-search-result>p{font-family:Arial,sans-serif;font-size:11px!important;margin:6px 0;line-height:1.5!important}
#seo-save{width:100%;min-height:38px;border-radius:7px;background:#24272c;color:white;font-size:12px;box-shadow:0 1px 2px #10182812}#seo-status:empty{display:none}
.template-loading{position:absolute;inset:0;background:#fafafa;padding:18px;display:flex;flex-wrap:wrap;align-content:start;gap:18px}.template-loading span{display:block;border-radius:3px;background:#eceef1}.template-loading-nav{width:100%;height:14px}.template-loading-hero{width:100%;height:140px}.template-loading-row{width:100%;height:60px}.template-screen .template-card-frame{opacity:0;transition:opacity .15s}.template-screen[data-full-preview=ready] .template-card-frame{opacity:1}.template-screen[data-full-preview=ready] .template-loading{display:none}
@media(min-width:901px){body[data-route=builder] .editor-tool-shell>.editor{grid-template-columns:214px minmax(0,1fr) 314px!important}body[data-route=builder] .editor-tool-shell>.editor>.structure{grid-column:1!important;grid-row:1!important}body[data-route=builder] .editor-tool-shell>.editor>.canvas{grid-column:2!important;grid-row:1!important}body[data-route=builder] .editor-tool-shell>.editor>.settings{grid-column:3!important;grid-row:1!important}}
@media(min-width:1600px){body[data-route=builder] .editor-tool-shell>.editor{grid-template-columns:240px minmax(0,1fr) 340px!important}}
@media(min-width:901px) and (max-width:1150px){body[data-route=builder] .editor-tool-shell>.editor{grid-template-columns:180px minmax(0,1fr) 280px!important}body[data-route=builder] .builder-top{gap:8px}body[data-route=builder] .builder-top .actions{gap:5px}body[data-route=builder] .builder-top :is(button,select,.editor-more>summary){padding:7px 8px!important}}
@media(max-width:900px){body[data-route=builder] .editor-tool-shell{display:block}.editor-tool-rail button{min-width:65px!important}.editor-tool-shell>.editor{grid-template-columns:180px minmax(0,1fr)!important}.settings{grid-column:2!important}.builder-top .actions{flex-wrap:wrap!important}body[data-route=builder] .editor-tool-shell .settings{max-height:65vh}}
@media(prefers-reduced-motion:reduce){.template-screen .template-card-frame,.seo-toggle input,.seo-toggle input:before{transition:none}}

/* Explicit page-language labels keep the existing page ID and navigation binding. */
.page-name-translations{display:grid;gap:12px;margin:12px 0 20px;padding:14px;border:1px solid #e2e6ed;border-radius:10px;background:#f8fafc}.page-name-translations label{display:grid;gap:6px;font-size:12px;color:#526074}.page-name-translations input{min-width:0;width:100%;box-sizing:border-box}#share-layout-section{width:100%;margin:0 0 16px;padding:12px;white-space:normal}.website-catalog-controls>label{display:flex;align-items:center;gap:10px;min-width:180px}.website-catalog-controls>label select{min-width:140px;max-width:240px}

/* Keep the optional section list in its own grid row at intermediate widths. */
@media(min-width:901px) and (max-width:1250px){
 body[data-route=builder] .editor-tool-shell>.editor{grid-template-columns:minmax(0,1fr) 245px!important;grid-template-rows:auto minmax(0,1fr)}
 body[data-route=builder] .editor-tool-shell>.editor>.structure{position:static!important;inset:auto!important;width:auto!important;height:auto!important;max-height:180px;grid-column:1/-1!important;grid-row:1!important;box-shadow:none;overflow:auto}
 body[data-route=builder] .editor-tool-shell>.editor>.canvas{grid-column:1!important;grid-row:2!important}
 body[data-route=builder] .editor-tool-shell>.editor>.settings{grid-column:2!important;grid-row:2!important}
}

.canvas-zoom-controls{display:flex;align-items:center;gap:3px;margin-left:auto;padding:3px;border:1px solid #dce2eb;border-radius:8px;background:#fff;flex-wrap:wrap}.canvas-zoom-controls button{min-width:28px!important;padding:5px 8px!important;white-space:nowrap}.canvas-zoom-controls output{min-width:46px;text-align:center;font:12px system-ui;font-variant-numeric:tabular-nums;color:#546175}.canvas-zoom-controls button:disabled{opacity:.4;cursor:default}

/* Center all editor rail labels, including wrapped Korean page/hero labels. */
body[data-route=builder] .editor-tool-rail button{text-align:center}
body[data-route=builder] .editor-tool-rail button>span{display:block;width:100%;text-align:center;line-height:1.5}
body[data-route=builder] .editor-tool-rail button>svg{flex-shrink:0;margin-inline:auto}

/* The mobile editor scrolls as one document: keep account navigation from covering inspector controls. */
@media(max-width:900px){body[data-route=builder]>.top{position:static}body[data-route=builder] .editor-tool-shell .settings{max-height:none!important;height:auto!important;overflow:visible!important}body[data-route=builder] .settings .bound-board-settings{min-width:0}body[data-route=builder] .settings .catalog-edit-toolbar{flex-wrap:wrap}body[data-route=builder] .settings .catalog-edit-toolbar label{min-width:0;flex:1}}
/* Inspector selection already moves the canvas; avoid a second animated document scroll shifting click targets. */
html:has(body[data-route=builder]),body[data-route=builder] .settings{scroll-behavior:auto}

.site-name-translations{display:grid;gap:12px;margin:14px 0 24px;padding:14px;border:1px solid #e2e6ed;border-radius:9px;background:#f8fafc}.site-name-translations label{display:grid;gap:6px;font-size:12px}.site-name-translations input{width:100%;min-width:0;margin:0!important}.site-name-translations p{margin:0;font-size:11px;line-height:1.6;color:#667085}

/* Keep long tool names on two lines without widening the rail. */
body[data-route=builder] .editor-tool-rail button>span{white-space:normal;overflow-wrap:anywhere;word-break:normal;max-inline-size:100%;line-height:1.4}
body[data-route=builder] .editor-tool-rail button[data-template-tool=sections]>span{max-inline-size:6em}
body[data-route=builder] .editor-tool-rail button[data-template-tool=hero]>span{max-inline-size:3.7em}

/* Sharing remains available without occupying the mobile preview. */
body[data-route=builder] .editor-share-details>summary{display:list-item;padding:8px 16px;cursor:pointer}body[data-route=builder] .editor-share-details[open]>.share-strip{display:flex!important}
@media(max-width:600px){body[data-route=builder] .editor-share-details{margin:6px 12px;border:1px solid #d5dbe4;border-radius:8px;background:#fff}body[data-route=builder] .editor-share-details>summary{display:list-item;padding:9px 14px;font-size:13px;cursor:pointer}body[data-route=builder] .editor-share-details:not([open])>.share-strip{display:none!important}body[data-route=builder] .builder-top{padding:8px 12px!important;gap:8px;min-height:0!important}body[data-route=builder] .builder-top .eyebrow{display:none}body[data-route=builder] .builder-top h1{font-size:16px}body[data-route=builder] .builder-top .actions{flex-wrap:wrap!important;gap:5px!important}body[data-route=builder] .builder-top .small{font-size:11px;margin:3px 0}}

/* Readable tool names by default; compact rail is an explicit user choice. */
@media(min-width:901px){
 body[data-route=builder] .editor-tool-shell{grid-template-columns:184px minmax(0,1fr)}
 body[data-route=builder] .editor-tool-rail button[data-template-tool]{flex-direction:row;justify-content:flex-start;gap:10px;padding:12px 10px;min-height:44px;font-size:13px;text-align:left}
 body[data-route=builder] .editor-tool-rail button[data-template-tool] svg{flex:0 0 20px}
 body[data-route=builder] .editor-tool-rail button[data-template-tool] span{white-space:normal;word-break:keep-all;overflow-wrap:normal}
 body[data-route=builder] .editor-template-back{font-size:12px!important;flex-direction:row;align-items:center;text-align:left;gap:8px;padding:12px 8px!important}
 body[data-route=builder] .editor-tool-rail .editor-rail-toggle{min-height:34px;padding:8px;font-size:11px;align-items:flex-start;white-space:nowrap}
 body[data-route=builder] .editor-tool-shell[data-rail-collapsed=true]{grid-template-columns:76px minmax(0,1fr)}
 body[data-route=builder] .editor-tool-shell[data-rail-collapsed=true] .editor-tool-rail button[data-template-tool]{justify-content:center}
 body[data-route=builder] .editor-tool-shell[data-rail-collapsed=true] .editor-tool-rail button[data-template-tool] span{display:none}
 body[data-route=builder] .editor-tool-shell[data-rail-collapsed=true] .editor-template-back{flex-direction:column;font-size:10px!important}
}
@media(max-width:900px){.editor-tool-rail .editor-rail-toggle{display:none!important}}

/* Page-height canvas: only the outer editor page scrolls vertically. */
@media(min-width:901px){
 body[data-route=builder]:has(.editor-tool-shell){height:auto!important;min-height:100dvh;overflow:visible!important;display:block!important}
 body[data-route=builder]:has(.editor-tool-shell)>#main{display:block!important;overflow:visible!important;height:auto!important}
 body[data-route=builder] .builder-wrap{display:block!important;min-height:0;height:auto!important}
 body[data-route=builder] .editor-tool-shell{height:auto!important;overflow:visible!important;grid-template-rows:auto;align-items:start}
 body[data-route=builder] .editor-tool-shell>.editor{height:auto!important;overflow:visible!important;align-items:start}
 body[data-route=builder] .editor-tool-shell>.editor>.canvas{height:auto!important;overflow:visible!important;display:block!important;align-self:start}
 body[data-route=builder] .editor-canvas-stage{height:var(--canvas-full-height,auto);flex:none!important;min-height:0;max-height:none!important}
 body[data-route=builder] .editor-tool-shell>.editor>:is(.settings,.structure),body[data-route=builder] .editor-tool-rail{position:sticky!important;top:12px!important;height:auto!important;max-height:calc(100dvh - 24px)!important;align-self:start;overflow:auto}
}
body[data-route=builder] .editor-save-bar{position:sticky;bottom:0;margin:18px 0 0;padding:12px 0 0;border-top:1px solid #dce1e7;box-shadow:none;min-width:0}
body[data-route=builder] .editor-save-bar>p{font-size:12px!important;line-height:1.5!important;margin:0 0 10px!important;padding:8px 10px;border-radius:6px;background:#f0f7f2;overflow-wrap:anywhere}
body[data-route=builder] .editor-save-bar>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
body[data-route=builder] .editor-save-bar button{box-sizing:border-box;width:100%;min-width:0;min-height:38px;margin:0;font-size:12px!important;line-height:1.5!important;padding:8px!important;white-space:normal;overflow-wrap:anywhere}
body[data-route=builder] .editor-save-bar [data-editor-save]{background:#243b62!important;color:#fff!important;border-color:#243b62!important}
.editor-save-options{margin-top:10px;border-top:1px solid #e7e9ed;padding-top:8px}
.editor-save-options>summary{font-size:12px;line-height:1.6;cursor:pointer;color:#586372;padding:4px 0}
.editor-save-options .editor-save-secondary{display:block;margin-top:6px!important;background:#fff;color:#414651;border:1px solid #dce1e7}
body[data-route=builder] :is(.settings,.inline-section-settings,.inline-menu-settings) :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea){box-sizing:border-box;min-width:0;max-width:100%;width:100%;font-size:13px;line-height:1.5;padding:9px 10px;min-height:38px}
body[data-route=builder] :is(.settings,.inline-section-settings,.inline-menu-settings) label{line-height:1.6;overflow-wrap:anywhere}

body[data-route=builder] .editor-save-bar>p[data-dirty=true]{background:#fff7e8;color:#8c601b}
body[data-route=builder] .editor-save-bar>p[data-save-error=true]{background:#fff0ef;color:#9e3029}
/* Section selection is a bounded modal; it never replaces the editing workspace. */
.section-library-dialog{width:min(1480px,96vw);max-width:96vw;height:min(900px,92dvh);max-height:92dvh;margin:auto;padding:0;border:1px solid #dce1e8;border-radius:12px;background:#f6f7f9;color:#24272c;overflow:hidden}
.section-library-dialog::backdrop{background:#17203080}
.section-library-dialog>.dialog-bar{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #dce1e8;background:white}
.section-library-dialog>.dialog-bar h2{font-size:19px;margin:4px 0 0}
.section-library-dialog .section-browser{display:grid;grid-template-columns:230px minmax(0,1fr) 280px;gap:16px;height:calc(100% - 82px);padding:16px;overflow:hidden;align-items:start}
.section-library-dialog .section-design-list,.section-library-dialog .inline-section-settings{min-width:0;max-height:100%;overflow:auto;padding:12px;background:white;border:1px solid #e1e5eb;border-radius:8px}
.section-library-dialog .section-design-preview{min-width:0;overflow:hidden}
.section-library-dialog .section-preview-stage{height:55dvh;min-height:240px;overflow:hidden;position:relative;background:white;border:1px solid #dce1e8;border-radius:8px}
.section-library-dialog #section-designs{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.section-library-dialog #section-designs>button{text-align:left;padding:8px;min-width:0}
.section-library-dialog #section-designs strong,.section-library-dialog #section-designs small{display:block;margin-top:6px}
.section-library-dialog label,.section-library-dialog summary{font-size:12px;line-height:1.6}
.section-library-dialog :is(select,input[type=search]){box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:9px;margin:6px 0 12px;border:1px solid #dce1e8;border-radius:6px;font-size:13px}
.section-library-dialog #section-confirm{width:100%;min-height:40px;margin-top:10px}
body[data-route=builder] .editor-quick-add{background:#243b62!important;color:white!important;min-height:40px!important;font-size:13px!important;margin-bottom:6px!important}
@media(min-width:901px){
 body[data-route=builder] .editor-tool-shell>.editor:not(.show-section-panel){grid-template-columns:minmax(0,1fr) 280px!important}
 body[data-route=builder] .editor-tool-shell>.editor:not(.show-section-panel)>.structure{display:none!important}
 body[data-route=builder] .editor-tool-shell>.editor:not(.show-section-panel)>.canvas{grid-column:1!important}
 body[data-route=builder] .editor-tool-shell>.editor:not(.show-section-panel)>.settings{grid-column:2!important}
 body[data-route=builder] #toggle-section-panel{display:inline-flex!important}
}
@media(max-width:900px){.section-library-dialog .section-browser{grid-template-columns:180px minmax(0,1fr);overflow:auto}.section-library-dialog .inline-section-settings{grid-column:1/-1}.section-library-dialog .section-preview-stage{height:45dvh}}

/* Existing-region editing stays in the right inspector. Explicit libraries overlay the page. */
.editor-design-dialog{width:min(1380px,96vw);max-width:96vw;max-height:92dvh;overflow:auto;border:1px solid #dce1e8;border-radius:12px;padding:20px;background:white;color:#202832}.editor-design-dialog::backdrop{background:#18233455}.editor-design-dialog .menu-picker-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:20px}.editor-design-dialog #menu-preview{width:100%;min-height:300px;border:1px solid #ddd}.settings.footer-inspector .f-studio-layout{display:block}.settings.footer-inspector .f-studio-layout>section:first-child,.settings.footer-inspector .f-preview-wrap,.settings.footer-inspector .f-pattern-panel,.settings.footer-inspector .f-caption,.settings.footer-inspector .f-sticky-preview>.f-actions:first-child{display:none}.settings.footer-inspector .f-scroll-edit{overflow:visible;max-height:none}.settings.footer-inspector .f-sticky-preview{position:static}.settings.footer-inspector .f-form-grid{display:block}.settings.footer-inspector input,.settings.footer-inspector select,.settings.footer-inspector textarea{max-width:100%;min-width:0}.settings.footer-inspector .f-toolbar small{display:none}@media(max-width:700px){.editor-design-dialog .menu-picker-layout{grid-template-columns:1fr}}
