/* Shared controls and supporting screens. */
:root { --bg: #f7f7f4; --surface: #fff; --ink: #222a2c; --muted: #69716f; --line: #e4e6df; --accent: #c95033; --soft: #f9eee8; --green: #357258; --font: "Segoe UI",Arial,sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button,input,textarea,select { font: inherit; }
button,a,input,select,textarea { outline-offset: 3px; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible { outline: 2px solid var(--accent); }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
a { color: inherit; }
h1,h2,h3,h4,p { margin: 0; }
h1 { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -1px; }
h2 { font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.6px; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
em { font: inherit; }
svg { width: 17px; height: 17px; flex-shrink: 0; }
img { max-width: 100%; }
[hidden] { display: none!important; }
.muted,.help,.intro { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: grid; gap: 10px; }
.full { width: 100%; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 15px; border: 1px solid #dce0d8; border-radius: 7px; color: var(--ink); background: #fff; font-size: 14px; font-weight: 500; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { background: #f6f7f2; border-color: #bec6bb; }
.btn.dark,.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.dark:hover:not(:disabled),.btn.accent:hover:not(:disabled) { background: #b34228; border-color: #b34228; }
.btn.soft { background: var(--soft); border-color: #efdace; color: #a9422c; }
.btn.small { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.btn.icon { width: 44px; height: 44px; padding: 11px; flex-shrink: 0; }
.link { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; background: none; border: 0; padding: 5px 2px; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: none; }
.link:hover { color: var(--ink); }
.danger { color: #b43d42; }
.badge { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; font-size: 11px; font-weight: 500; line-height: 1.4; background: #f5f6f1; color: var(--muted); white-space: nowrap; }
.badge.green { color: #32684d; background: #edf5ed; border-color: #dceadc; }
.badge.green:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #237650; }
.badge.red { color: #a54d32; background: #fcf0e9; border-color: #f1ddcf; }
.pill { min-height: 44px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 2px; color: var(--muted); background: none; font-size: 14px; }
.pill.active { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.boot { height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; }
.demo-strip { height: 25px; background: #eceef5; border-bottom: 1px solid #dfe3ed; color: #626c80; font-size: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.demo-strip .link { font-size: 10px; text-decoration: underline; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 216px; background: #fff; color: var(--muted); display: flex; flex-direction: column; padding: 26px 14px 20px; border-right: 1px solid var(--line); }
.demo-strip~.sidebar { top: 25px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 650; letter-spacing: -.4px; text-decoration: none; color: #fff; padding: 0 10px; }
.brand img { width: 29px; height: 29px; object-fit: contain; }
.brand small { font-size: 10px; color: #949bab; font-weight: 400; letter-spacing: .03em; margin-left: 6px; }
.nav { display: grid; gap: 3px; margin-top: 34px; }
.nav button { display: flex; align-items: center; gap: 10px; min-height: 38px; border: 0; border-radius: 5px; background: transparent; color: inherit; text-align: left; padding: 8px 10px; font-size: 12px; }
.nav button:hover { background: #ffffff08; color: white; }
.nav button.active { background: #2b3347; color: #fff; }
.nav button.active svg { color: #b5bfff; }
.navlabel { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: #666f83; margin: 25px 10px 8px; }
.nav .badge { margin-left: auto; font-size: 9px; background: #ffffff09; color: #8e98b6; border-color: #ffffff0c; }
.sidebar-bottom { margin-top: auto; }
.support-link { display: flex; gap: 9px; align-items: center; text-decoration: none; font-size: 11px; padding: 10px; color: #a6adbb; margin-bottom: 15px; }
.account { border-top: 1px solid #ffffff0b; padding: 16px 8px 0; display: flex; align-items: center; gap: 9px; font-size: 11px; }
.account strong { color: #d4d8e0; font-size: 11px; font-weight: 500; }
.account .link { font-size: 10px; color: #8893a8; padding: 0; }
.avatar { width: 29px; height: 29px; background: #333d54; border-radius: 6px; display: grid; place-items: center; color: #c9d3e8; font-size: 10px; font-weight: 600; }
.main { margin-left: 216px; min-height: 100dvh; }
.topbar { height: 58px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.crumb { font-size: 12px; color: #949aa5; }
.crumb strong { font-weight: 500; color: #404855; }
.content { padding: 34px 32px; max-width: 1500px; margin: auto; }
.workspace-heading,.welcome { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.workspace-heading p,.welcome p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.welcome .eyebrow { margin: 0 0 8px; }
.workspace-summary { display: flex; gap: 22px; margin-bottom: 22px; color: var(--muted); font-size: 11px; }
.workspace-summary strong { font-weight: 600; color: var(--ink); margin-right: 4px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.toolbar .row { gap: 22px; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 5px; padding: 7px 10px; background: white; margin-bottom: 8px; }
.search svg { width: 14px; color: #9aa1ac; }
.search input { border: 0; outline: 0; max-width: 180px; background: transparent; color: var(--ink); font-size: 11px; }
.sites { display: grid; grid-template-columns: repeat(auto-fill,minmax(275px,1fr)); gap: 22px; }
.site-card { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: white; transition: border-color .12s; }
.site-card:hover { border-color: #bac2d5; }
.site-art { position: relative; display: block; width: 100%; height: 210px; background: #e9ecf1; border: 0; border-bottom: 1px solid var(--line); overflow: hidden; padding: 0; }
.actual-preview iframe { position: absolute; left: 0; top: 0; width: 1000px; height: 770px; transform-origin: top left; pointer-events: none; border: 0; background: white; }
.preview-open { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px; color: #353b47; background: #fffffff2; border: 1px solid #dce0e6; padding: 7px 10px; border-radius: 5px; font-size: 10px; opacity: 0; transition: opacity .12s; }
.site-art:hover .preview-open,.site-art:focus-visible .preview-open { opacity: 1; }
.preview-open svg { width: 13px; height: 13px; }
.card-body { padding: 17px; }
.card-body h3 { font-size: 13px; }
.card-body .url { display: block; font-size: 10px; color: var(--muted); margin: 5px 0 16px; overflow: hidden; text-overflow: ellipsis; }
.card-foot { padding-top: 13px; border-top: 1px solid #eff0f3; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--muted); }
.card-actions { display: flex; gap: 5px; }
.new-card { min-height: 332px; border: 1px dashed #cdd3df; border-radius: 7px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 11px; color: var(--muted); }
.new-card span { width: 34px; height: 34px; display: grid; place-items: center; background: white; border: 1px solid var(--line); border-radius: 6px; font-size: 20px; margin-bottom: 8px; }
.new-card strong { color: #485061; font-weight: 500; }
.new-card:hover { background: #fff; }
.empty { grid-column: 1/-1; min-height: 0; border: 1px solid var(--line); border-radius: 9px; padding: 30px; background: #fff; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; text-align: left; }
.empty h2 { font-size: 21px; }
.empty p { font-size: 14px; line-height: 1.7; color: var(--muted); max-width: 490px; }
.empty>svg { width: 28px; height: 28px; color: #8894a9; }
.workspace-note { margin-top: 30px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.workspace-note svg { width: 14px; }
.workspace-note .link { font-size: 11px; text-decoration: underline; margin-left: 4px; }
.field { display: grid; gap: 8px; margin-bottom: 21px; font-size: 13px; color: #525d55; font-weight: 500; }
.field input,.field textarea,.field select { min-width: 0; width: 100%; min-height: 44px; border: 1px solid #dce2d5; border-radius: 7px; background: #fff; color: var(--ink); padding: 11px 12px; font-size: 14px; font-weight: 400; line-height: 1.6; }
.field input:hover,.field textarea:hover,.field select:hover { border-color: #b9c3d3; }
.field input:focus,.field textarea:focus,.field select:focus { border-color: #c78e76; outline: 0; box-shadow: 0 0 0 3px #c9503310; }
.field textarea { min-height: 118px; resize: vertical; }
.field input[type=color] { padding: 4px; height: 44px; cursor: pointer; }
.help { font-size: 12px; font-weight: 400; line-height: 1.65; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 19px; }
.check input { accent-color: var(--accent); }
.group { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 25px; }
.group h4 { font-size: 14px; font-weight: 600; margin-bottom: 15px; color: var(--ink); }
.image-well { margin-bottom: 24px; text-align: center; }
.image-well img { display: block; width: 100%; height: 200px; object-fit: cover; border-radius: 7px; margin-bottom: 13px; }
.image-well p { border: 1px solid var(--line); border-radius: 7px; background: #f6f7f2; color: var(--muted); padding: 29px 14px; font-size: 13px; margin-bottom: 14px; }
.image-well .btn { width: 100%; min-height: 44px; font-size: 14px; }
.section-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.section-actions .btn { font-size: 13px; }
.item-editor { border: 1px solid var(--line); border-radius: 7px; padding: 16px; margin-bottom: 15px; }
.inspector-ai { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 21px; }
.inspector-ai h4 { font-size: 14px; font-weight: 500; margin-bottom: 7px; }
.inspector-ai p { font-size: 13px; line-height: 1.7; color: var(--muted); margin-bottom: 14px; }
.theme-presets { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 18px 0 24px; }
.theme-presets button { border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 12px; color: var(--muted); padding: 6px; }
.theme-presets button.selected { border-color: var(--accent); }
.theme-presets button>span { display: block; position: relative; background: var(--preset-bg); color: var(--preset-ink); height: 60px; padding: 9px; text-align: left; margin-bottom: 5px; border-radius: 4px; }
.theme-presets b { font-size: 27px; font-weight: 500; }
.theme-presets i { width: 13px; height: 13px; background: var(--preset-accent); display: block; position: absolute; right: 7px; bottom: 9px; border-radius: 2px; }
/* Supporting screens use the same restrained controls and spacing. */
.settings-page { max-width: 660px; }
.settings-page>.field { font-size: 12px; }
.settings-page .field input,.settings-page .field textarea { font-size: 12px; padding: 10px; }
.billing-card { max-width: 620px; border: 1px solid var(--line); background: white; padding: 27px; border-radius: 6px; }
.billing-card .price { font-size: 23px; font-weight: 600; margin: 22px 0 18px; }
.billing-card ul { padding-left: 17px; color: var(--muted); line-height: 2; margin: 0 0 20px; }
.notice { background: #faf6ed; border: 1px solid #ebe2cf; color: #7a6b53; padding: 15px 17px; border-radius: 7px; font-size: 13px; line-height: 1.7; margin: 18px 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(190px,1fr)); gap: 16px; }
.media-card { border: 1px solid var(--line); border-radius: 5px; background: white; overflow: hidden; padding: 0; text-align: left; }
.media-card img { display: block; width: 100%; height: 150px; object-fit: cover; }
.media-card .info { padding: 12px; font-size: 10px; }
.media-card .info p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 12px; }
.message { max-width: 880px; padding: 23px; background: white; border: 1px solid var(--line); border-radius: 5px; margin-bottom: 13px; }
.message.unread { border-left: 3px solid var(--accent); }
.message p { white-space: pre-wrap; margin: 18px 0 20px; }
.message a { color: var(--muted); font-size: 11px; }
.message small { color: var(--muted); font-size: 10px; }
.version { max-width: 880px; padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; }
.version small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.setup-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.setup-card { padding: 22px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.setup-card .badge { margin-top: 12px; }
.setup-card p { font-size: 11px; color: var(--muted); margin-top: 13px; }
.code { font: 11px/1.7 Consolas,monospace; overflow-wrap: anywhere; background: #f1f3f7; border: 1px solid var(--line); border-radius: 4px; padding: 10px; margin: 12px 0; }
.error { color: #b74630; font-size: 13px; min-height: 16px; line-height: 1.5; margin: 9px 0; }
.conflict { background: #fff5ee; color: #975d36; border-bottom: 1px solid #eedbcb; padding: 11px 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 13px; font-size: 13px; }
.ai-output { border: 1px solid var(--line); background: #f8f9f4; padding: 17px; border-radius: 7px; white-space: pre-wrap; max-height: 330px; overflow: auto; font-size: 14px; line-height: 1.75; }
.tabbar { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabbar button { border: 0; border-bottom: 2px solid transparent; padding: 12px 0; background: none; color: var(--muted); font-size: 11px; }
.tabbar button.active { color: var(--ink); border-color: var(--accent); }
.public-link { font-size: 10px; color: var(--muted); text-decoration: none; }
.login { min-height: 100dvh; display: grid; place-items: center; background: #f5f6f8; padding: 40px; }
.login-inner { width: 360px; max-width: 100%; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 32px; box-shadow: 0 3px 12px #141b2904; }
.login-inner>.brand { color: var(--ink); padding: 0; margin-bottom: 30px; font-size: 17px; }
.login-inner .brand small { color: #959eae; }
.login-inner h2 { font-size: 22px; margin-bottom: 7px; }
.login-inner>p { font-size: 12px; color: var(--muted); }
.login-tabs { display: flex; border-bottom: 1px solid var(--line); gap: 18px; margin: 24px 0 21px; }
.login-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); padding: 0 0 10px; font-size: 11px; }
.login-tabs button.active { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.login-inner .field { font-size: 11px; }
.login-inner .field input { padding: 10px; font-size: 12px; }
.login-note { font-size: 10px!important; line-height: 1.7; margin: 20px 0!important; color: var(--muted); text-align: left; }
.login-demo { border-top: 1px solid var(--line); padding-top: 19px; margin-top: 18px; }
.login-footer { margin-top: 25px; font-size: 10px; color: #949eae; display: flex; justify-content: space-between; }
.login-footer a { text-decoration: none; }
.login-form { display: contents; }
dialog { width: 560px; max-width: calc(100% - 32px); max-height: 88dvh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 24px 80px #26351b20; background: #fff; color: var(--ink); }
dialog::backdrop { background: #141c2e55; }
dialog h2 { font-size: 23px; }
dialog p.muted { font-size: 14px; line-height: 1.7; margin: 13px 0 23px; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.templates { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.templates label { padding: 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; cursor: pointer; }
.templates label:has(input:checked) { border-color: var(--accent); background: #f6f7ff; }
.templates input { accent-color: var(--accent); margin: 0; }
.templates small { color: var(--muted); font-size: 12px; display: block; width: 100%; padding-left: 20px; }
.template-preview { display: block; position: relative; overflow: hidden; width: 100%; height: 110px; background: #f4f5ef; order: -1; border-radius: 4px; }
.template-preview iframe { width: 1000px; height: 770px; transform: scale(.14); transform-origin: top left; border: 0; pointer-events: none; }
.review-summary { display: flex; gap: 15px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.review-summary svg { width: 26px; height: 26px; color: var(--accent); }
.review-summary p { font-size: 13px; color: var(--muted); margin-top: 5px; }
.review-list button { display: flex; align-items: center; gap: 13px; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 14px 0; min-height: 66px; width: 100%; font-size: 14px; }
.review-list button:hover { background: #f8f9fb; }
.review-list button>span { color: #8c98ac; }
.review-list strong { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.review-list small { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 5px; }
.review-note { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 20px; }
.section-library { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.section-option { border: 1px solid var(--line); border-radius: 7px; background: #fff; text-align: left; padding: 17px; display: flex; align-items: center; gap: 12px; }
.section-option:hover { border-color: var(--accent); background: #f8f9ff; }
.section-option svg { width: 22px; height: 22px; color: #8895ae; }
.section-option small { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 4px; }
.section-option strong { font-size: 14px; font-weight: 500; color: var(--ink); }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%,8px); opacity: 0; pointer-events: none; border: 1px solid #343d35; background: #29312b; color: #fff; padding: 13px 19px; border-radius: 7px; box-shadow: 0 4px 20px #22341818; font-size: 14px; line-height: 1.6; max-width: 90%; z-index: 100; transition: opacity .15s,transform .15s; }
#toast.show { opacity: 1; transform: translate(-50%,0); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover:not(:disabled) { background: #3b4541; border-color: #3b4541; }

/* Canvas-first editor: the page and one focused editing drawer. */
.canvas-first { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.editorbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 64px; min-height: 64px; padding: 0 24px; border-bottom: 1px solid var(--line); background: #fff; z-index: 20; }
.editor-identity, .editor-actions { display: flex; align-items: center; gap: 9px; min-width: 0; }
.editor-identity > .btn { border: 0; color: var(--muted); }
.studio-wordmark { display: flex; align-items: center; gap: 9px; text-decoration: none; white-space: nowrap; }
.studio-wordmark img { width: 29px; height: 29px; }
.studio-wordmark strong { font-size: 18px; font-weight: 650; letter-spacing: -.6px; }
.studio-wordmark span { margin-left: 4px; font-weight: 400; color: var(--muted); }
.separator { height: 29px; border-left: 1px solid var(--line); margin: 0 9px; }
.site-name { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.save-status { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.save-status:before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 6px 2px 0; border-radius: 50%; background: #819575; }
.editor-actions > .btn.icon { border: 0; color: var(--muted); }
.editor-actions [data-action=publish] { margin-left: 7px; padding: 11px 18px; }
.editor-menu { position: relative; }
.editor-menu summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 7px; color: var(--muted); font-size: 16px; letter-spacing: 2px; cursor: pointer; list-style: none; }
.editor-menu summary::-webkit-details-marker, .advanced summary::-webkit-details-marker { display: none; }
.editor-menu summary:hover, .editor-menu[open] summary { background: #f5f6f1; }
.editor-menu > div { position: absolute; right: 0; top: 49px; z-index: 50; display: grid; gap: 2px; width: 255px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 12px 36px #222a2c16; }
.editor-menu .btn { justify-content: flex-start; border: 0; font-size: 14px; font-weight: 400; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 0; flex: 1; min-height: 0; }
.editor-grid.panel-open { grid-template-columns: minmax(0, 1fr) 360px; }
#drawer-host { min-width: 0; min-height: 0; }
.canvas-area { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; position: relative; background: #f1f2ee; }
.canvas-toolbar { display: flex; align-items: center; gap: 14px; min-height: 56px; height: 56px; padding: 6px 24px; background: #f1f2ee; }
.page-control { display: flex; align-items: center; gap: 8px; min-height: 44px; width: max-content; max-width: 200px; padding: 9px 11px; border: 1px solid #dce0d8; border-radius: 7px; background: #fff; }
.page-control svg { width: 17px; height: 17px; color: #89918a; }
.page-control select { min-width: 86px; max-width: 150px; padding: 0; border: 0; color: #465047; background: none; font-size: 14px; cursor: pointer; }
.devices { display: flex; flex-shrink: 0; align-items: center; gap: 2px; padding: 3px; border: 1px solid #dce0d8; border-radius: 7px; background: #e8ebe4; }
.devices button { display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; border: 0; border-radius: 5px; color: #89918a; background: none; }
.devices button.active { color: #465047; background: #fff; box-shadow: 0 1px 3px #222a2c0c; }
.devices svg { width: 18px; height: 18px; }
.draft-label { color: #7b8479; font-size: 12px; white-space: nowrap; }
.panel-open .draft-label { display: none; }
.editor-dock { display: flex; align-items: center; gap: 3px; min-width: 0; margin-left: auto; padding: 0; white-space: nowrap; }
.editor-dock .btn { min-height: 44px; padding: 10px 11px; gap: 7px; border: 0; color: #5f6a60; background: none; font-size: 14px; }
.editor-dock .btn svg { width: 18px; height: 18px; }
.editor-dock .btn:hover { color: var(--ink); background: #e8ebe3; }
.editor-dock .btn.active { color: #b3482d; background: #f9eee8; }
.editor-dock > span { height: 23px; margin: 0 5px; border-left: 1px solid #d9dfd4; }
.canvas-scroll { display: flex; align-items: flex-start; justify-content: center; flex: 1; min-height: 0; overflow: auto; padding: 10px 24px 0; }
.canvas-frame { position: relative; flex-shrink: 0; overflow: hidden; min-height: 0; border: 1px solid #d9dfd4; border-radius: 4px; background: #fff; box-shadow: 0 4px 16px #222a2c06; }
.canvas-frame iframe { display: block; border: 0; background: #fff; transform-origin: top left; }
.canvas-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 35px; height: 35px; padding: 6px 24px 8px; background: #f1f2ee; }
.canvas-hint { color: #7b8479; font-size: 12px; line-height: 1.4; }
.zoom-select { max-width: 150px; border: 0; padding: 0; color: #6a7467; background: none; font-size: 12px; cursor: pointer; }

/* Focused content controls use the same spacing for original and native pages. */
.context-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; border-left: 1px solid var(--line); background: #fff; }
.context-heading { display: flex; align-items: center; justify-content: space-between; gap: 13px; min-height: 78px; padding: 17px 23px; border-bottom: 1px solid #ebeee4; }
.context-heading small { display: block; margin-bottom: 3px; color: #7b8479; font-size: 12px; }
.context-heading h2 { font-size: 20px; letter-spacing: -.5px; }
.context-heading .btn { border: 0; color: #7b8479; transform: rotate(180deg); }
.context-body { flex: 1; min-height: 0; padding: 23px; overflow: auto; scrollbar-width: thin; scrollbar-color: #dce1d7 transparent; }
.context-body > h3, .context-body > .eyebrow { display: none; }
.context-body > .intro { margin-bottom: 22px; font-size: 14px; line-height: 1.7; }
.panel-heading, .sections-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 12px; color: #7b8479; font-size: 13px; }
.panel-heading .btn { width: 36px; height: 36px; min-height: 36px; padding: 8px; border: 0; }
.pages { display: grid; gap: 5px; }
.page-row { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 11px 12px; border: 0; border-radius: 7px; color: #626e61; background: none; text-align: left; font-size: 14px; }
.page-row svg { width: 18px; height: 18px; }
.page-row small { margin-left: auto; color: #7b8479; font-size: 12px; }
.page-row:hover { background: #f5f6f1; }
.page-row.active { background: #f9eee8; color: #b3482d; font-weight: 500; }
.sections-head { margin-top: 27px; }
.section-row { display: flex; align-items: center; gap: 10px; padding: 13px 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #89918a; }
.section-row.active { border-color: #e7c9b8; background: #fdf5ef; }
.section-row .drag { color: #b2baa9; font-size: 17px; cursor: grab; }
.section-row svg { width: 17px; height: 17px; }
.section-row button { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: #5f6e57; text-align: left; }
.section-row strong { display: block; max-width: 248px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.section-row small { display: block; margin-top: 4px; color: #7b8479; font-size: 12px; }
.context-body.editor-left > .btn { margin-top: 6px; }
.panel-footer { padding-top: 22px; margin-top: 23px; border-top: 1px solid var(--line); }
.panel-footer .btn { justify-content: flex-start; border: 0; padding-left: 3px; }
.logo-preview { display: block; max-width: 160px; max-height: 100px; height: auto; object-fit: contain; margin: 12px 0; }
.advanced { padding: 19px 0; border-top: 1px solid var(--line); }
.advanced summary { display: flex; align-items: center; justify-content: space-between; min-height: 26px; color: #596852; font-size: 13px; font-weight: 500; cursor: pointer; list-style: none; }
.advanced summary:after { content: '+'; color: #8b967f; font-size: 20px; font-weight: 400; }
.advanced[open] summary { margin-bottom: 17px; }
.advanced[open] summary:after { content: '−'; }
.theme-presets button.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.context-body .field-search { display: flex; align-items: center; gap: 9px; min-height: 44px; width: 100%; padding: 10px 12px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.field-search svg { width: 17px; height: 17px; color: #89918a; }
.field-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.field-search:focus-within { border-color: #c78e76; box-shadow: 0 0 0 2px #c9503312; }
.template-field-list { display: grid; gap: 7px; margin: 16px 0; }
.template-field-list button { display: flex; align-items: center; gap: 11px; width: 100%; min-width: 0; min-height: 64px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 7px; color: #4e5851; background: #fff; text-align: left; }
.template-field-list button:hover { border-color: #c6cfbc; background: #fafbf7; }
.template-field-list button > svg { width: 19px; height: 19px; color: #929a8f; }
.template-field-list button > span { min-width: 0; flex: 1; }
.template-field-list strong { display: block; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.4; }
.template-field-list small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.template-field-list button.selected { border-color: #e5c4b2; background: #fdf4ed; }
.template-field-list button.selected strong { color: #974a30; }
.template-field-list button.selected > svg { color: var(--accent); }
.template-summary { padding: 14px 15px; margin: 21px 0; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--muted); font-size: 13px; line-height: 1.7; }
.template-summary strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 13px; font-weight: 500; }
.template-summary p { font-size: 13px; }
.template-field-title, .template-field-panel > .eyebrow { display: block; margin-bottom: 19px; color: #38432e; font-size: 15px; font-weight: 600; line-height: 1.5; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
.template-field-panel .field { font-size: 14px; }
.template-field-panel textarea { min-height: 170px; font-size: 16px; line-height: 1.7; }
.template-field-panel .btn { min-height: 44px; font-size: 14px; }
.template-scope-note { padding-top: 18px; margin: 24px 0 14px; border-top: 1px solid var(--line); color: #7d8577; font-size: 12px; line-height: 1.75; }
.template-scope-note p + p { margin-top: 8px; }

/* Suggestions remain reviewable content changes with a clear apply action. */
.ai-source { display: grid; justify-items: start; gap: 8px; margin-bottom: 20px; }
.ai-source p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.ai-review { padding-top: 23px; margin-top: 25px; border-top: 1px solid var(--line); }
.ai-review > h3 { margin-bottom: 8px; font-size: 18px; letter-spacing: -.3px; }
.ai-review > .muted { margin-bottom: 18px; font-size: 13px; line-height: 1.65; }
.ai-change { padding: 17px; margin: 16px 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.ai-change h4 { margin-bottom: 12px; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.ai-change > div { padding: 11px 0; }
.ai-change > div > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.ai-change p { color: #4e594a; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-change > .ai-after { margin-top: 7px; padding: 12px 13px; border-left: 2px solid #c95033; border-radius: 0 5px 5px 0; background: #f7f8f2; }
.ai-change > .ai-after > span { color: #a54a30; }
.ai-review > .row { flex-wrap: wrap; gap: 10px; }
.ai-review > .row .btn { min-height: 44px; }
.ai-review > .help { margin-top: 12px; }

@media (max-width: 1400px) {
  .studio-wordmark span { display: none; }
  .site-name { max-width: 220px; }
  .canvas-toolbar { padding-left: 18px; padding-right: 18px; gap: 10px; }
  .editor-dock .btn { padding-left: 9px; padding-right: 9px; }
  .editor-dock .btn svg { display: none; }
  .draft-label { display: none; }
  .canvas-scroll { padding-left: 18px; padding-right: 18px; }
  .canvas-bottom { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 1100px) {
  .editorbar { padding: 0 16px; }
  .studio-wordmark, .separator { display: none; }
  .editor-grid.panel-open { grid-template-columns: minmax(0, 1fr) 340px; }
  .canvas-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .page-control { grid-column: 1; grid-row: 1; }
  .devices { grid-column: 2; grid-row: 1; }
  .editor-dock { grid-column: 1 / -1; grid-row: 2; justify-content: center; margin: 0; width: 100%; }
  .canvas-hint { max-width: 65%; font-size: 11px; }
}
@media (max-width: 600px) {
  .editorbar { gap: 7px; padding: 0 10px; }
  .editor-identity, .editor-actions { gap: 2px; }
  .editor-identity > .btn.icon { width: 36px; padding: 8px; }
  .site-name { max-width: 145px; font-size: 13px; }
  .save-status { max-width: 156px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
  .editor-actions > .btn.icon { width: 34px; padding: 8px; }
  .editor-menu summary { width: 32px; }
  .editor-actions [data-action=publish] { margin-left: 3px; padding: 10px 12px; font-size: 13px; }
  .editor-actions [data-action=publish] svg { display: none; }
  .canvas-area { padding-bottom: 74px; }
  .canvas-toolbar { display: flex; min-height: 56px; height: 56px; padding: 6px 12px; }
  .page-control { max-width: 175px; }
  .page-control select { min-width: 80px; max-width: 118px; }
  .devices { margin-left: auto; }
  .devices button { width: 38px; height: 38px; }
  .canvas-scroll { padding: 4px 10px 0; }
  .canvas-bottom { justify-content: flex-end; height: 29px; min-height: 29px; padding: 4px 12px; }
  .canvas-hint { display: none; }
  .editor-dock { position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 30; width: auto; height: 62px; gap: 3px; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 4px 22px #222a2c10; }
  .editor-dock .btn { flex: 1; flex-direction: column; gap: 4px; min-width: 0; min-height: 48px; padding: 5px; font-size: 12px; font-weight: 400; }
  .editor-dock .btn svg { display: block; width: 20px; height: 20px; }
  .editor-dock .btn .label { display: block; font-size: 11px; line-height: 1.4; }
  .editor-dock > span { margin: 0 2px; height: 29px; }
  .editor-grid.panel-open { position: relative; grid-template-columns: minmax(0, 1fr); }
  .panel-open .canvas-area:after { content: ''; position: absolute; inset: 0; z-index: 20; background: #25351b18; }
  .panel-open .editor-dock { visibility: hidden; }
  .panel-open #drawer-host { position: absolute; inset: 8px 10px 10px; z-index: 40; overflow: hidden; border: 1px solid #d9dfd4; border-radius: 12px; background: #fff; box-shadow: 0 8px 38px #222a2c20; }
  .context-panel { border: 0; border-radius: 12px; }
  .context-heading { min-height: 75px; padding: 16px 20px; }
  .context-body { padding: 21px; }
  .section-library { grid-template-columns: minmax(0, 1fr); }
  .templates { grid-template-columns: minmax(0, 1fr); }
  .template-preview { height: 160px; }
  .template-preview iframe { transform: scale(.3); }
  .two { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dialog-actions .btn { min-height: 44px; }
  #toast { bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
