.editor-page { background: var(--paper); }
.ed-top { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; background: rgba(243, 239, 230, 0.96); border-bottom: 1px solid var(--line); }
.free-flag { margin: 0; flex: 1 0 100%; color: var(--muted); font-size: 0.92rem; }
.ed-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.ed-actions .btn, .ed-actions .btn-ghost { min-height: 42px; }
.download { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 8; background: var(--sheet); border: 1px solid var(--line); min-width: 240px; padding: 6px; box-shadow: 0 12px 30px rgba(40, 28, 16, 0.12); }
.menu button { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 10px 10px; cursor: pointer; }
.menu button:hover { background: var(--paper); }
.ed-app { display: flex; flex-direction: column; }
.stage { order: -1; max-height: 72vh; overflow: auto; }
.ed-side { padding: 16px 16px 32px; }
.stage { background: linear-gradient(180deg, #e4ddd0, #d5cbbd); padding: 22px 16px 32px; }
.stage-inner { width: min(680px, 100%); margin: 0 auto; }
.stage-inner svg { width: 100%; height: auto; display: block; background: white; box-shadow: 0 16px 40px rgba(40, 30, 20, 0.18), 0 0 0 1px rgba(40, 30, 20, 0.05); }
.side-block { margin: 0 0 18px; }
.side-block h2 { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.layout-name { margin: 0 0 8px; font-family: var(--text); font-size: 1.2rem; }
.template-scroller { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.template-scroller button { flex: 0 0 92px; border: 1px solid var(--line); background: transparent; padding: 4px; text-align: left; cursor: pointer; }
.template-scroller button[aria-pressed="true"] { border-color: var(--crimson); box-shadow: inset 0 0 0 1px var(--crimson); }
.mini-slot { display: block; background: white; }
.mini-slot svg { width: 100%; height: auto; display: block; }
.mini-name { display: block; font-size: 10px; line-height: 1.25; padding: 4px 2px 2px; color: var(--ink); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.segmented button, .font-list button { border: 1px solid var(--line); background: transparent; min-height: 40px; cursor: pointer; }
.segmented button[aria-pressed="true"], .font-list button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.fields { display: grid; gap: 10px; }
.fields label, .colors label { display: grid; gap: 4px; font-size: 0.86rem; color: var(--muted); }
.fields input[type="text"], .fields input[type="email"], .fields input[type="tel"], .fields input[type="url"] { background: white; border: 1px solid var(--line); padding: 10px 12px; font-size: 1rem; color: var(--ink); width: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.18); padding: 0; background: linear-gradient(135deg, var(--swatch) 55%, var(--swatch-b) 55%); cursor: pointer; }
.swatches button[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.font-list { display: flex; flex-wrap: wrap; gap: 6px; }
.font-list button { padding: 0 12px; }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.colors input[type="color"] { width: 100%; height: 36px; border: 1px solid var(--line); background: white; padding: 2px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: 0.95rem; }
.check input { margin-top: 4px; }
.note { color: var(--muted); font-size: 0.9rem; }
.logo-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.editor-seo { padding-top: 28px; }
.warn { color: #7d2414; }

@media (min-width: 960px) {
  .free-flag { flex: 1 1 auto; order: 0; }
  .ed-actions { width: auto; margin-left: auto; }
  .ed-app { display: grid; grid-template-columns: 360px 1fr; height: calc(100dvh - 64px); }
  .ed-side { overflow: auto; border-right: 1px solid var(--line); }
  .stage { order: 0; max-height: none; overflow: auto; display: grid; align-items: start; }
}
