.site-editor { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #f4f4f7; color: #292335; font: 14px/1.5 Inter, sans-serif; }
.site-editor *, .sites-page *, .site-dialog * { box-sizing: border-box; letter-spacing: 0; }
.site-editor [hidden], .sites-page [hidden] { display: none !important; }
.site-editor button, .site-editor input, .site-editor textarea { font: inherit; }
.site-editor button, .sites-page button { cursor: pointer; }
.site-editor a, .sites-page a { color: inherit; text-decoration: none; }
.site-editor button:disabled { cursor: not-allowed; opacity: .55; }
.site-editor button:focus-visible, .site-editor a:focus-visible, .sites-page a:focus-visible, .sites-page button:focus-visible { outline: 3px solid #ad4f72; outline-offset: 3px; }
.site-editor svg, .sites-page svg, .site-dialog svg { width: 18px; height: 18px; flex-shrink: 0; }
.editor-header { background: #fff; border-bottom: 1px solid #e4e0e8; min-height: 76px; padding: 14px 24px; display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.editor-heading { min-width: 0; }
.editor-heading h1 { margin: 0; font-size: 18px; font-weight: 700; }
.editor-heading > span { font-size: 11px; color: #70677e; }
.editor-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.save-label-mobile { display: none; }
.icon-button, .rose-button, .secondary-button, .publish-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 1px solid #ded9e3; border-radius: 6px; padding: 9px 14px; font: 600 13px/1.4 Inter, sans-serif; text-decoration: none; background: #fff; color: #332a3c; }
.icon-button { width: 40px; height: 40px; padding: 0; flex-shrink: 0; }
.icon-button:hover, .secondary-button:hover { background: #f7f2f5; }
.rose-button, a.rose-button { background: #a94f70; border-color: #a94f70; color: #fff; }
.rose-button:hover { background: #913e5c; }
.publish-button { background: #f2f0f4; }
.icon-button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.pilot-notice { background: #fbf5f7; color: #714557; border-bottom: 1px solid #ead9e1; padding: 9px 24px; display: flex; gap: 9px; font-size: 12px; align-items: center; flex-shrink: 0; }
.pilot-notice svg { width: 15px; }
.editor-message { padding: 9px 24px; background: #ecf7f0; border-bottom: 1px solid #bbd9c5; color: #285a3b; font-size: 12px; flex-shrink: 0; }
.editor-message.is-error { color: #8c3047; background: #fff0f3; border-color: #efc3ce; }
.editor-workspace { display: flex; flex: 1; min-height: 0; }
.editor-panel { width: 356px; flex-shrink: 0; background: #fff; border-right: 1px solid #ded9e3; display: flex; flex-direction: column; }
.editor-tabs { display: flex; padding: 0 12px; border-bottom: 1px solid #e4e0e8; flex-shrink: 0; }
.editor-tabs button { background: none; color: #766d80; border: 0; border-bottom: 2px solid transparent; padding: 16px 10px; flex: 1; font-size: 12px; font-weight: 600; }
.editor-tabs button[aria-selected="true"] { color: #9a3e61; border-color: #a94f70; }
#site-form { overflow-y: auto; padding: 0 20px 28px; scrollbar-gutter: stable; }
#site-form h2 { font-size: 15px; margin: 22px 0 18px; }
.field-group { border-bottom: 1px solid #eae6ed; }
.field-group summary { padding: 20px 0; cursor: pointer; font-size: 14px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; font-size: 12px; font-weight: 600; }
.field input:not([type="color"]), .field textarea { width: 100%; min-width: 0; border: 1px solid #d8d1df; border-radius: 5px; color: #312839; background: #fff; padding: 10px 11px; font-size: 13px; font-weight: 400; line-height: 1.55; }
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field textarea:focus { outline: 2px solid #d793ad; outline-offset: 1px; border-color: #a94f70; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #ae294b; }
.field-error { color: #ae294b; font-size: 11px; font-weight: 500; }
.upload-preview { width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; border-radius: 5px; border: 1px solid #e4dce7; margin-bottom: 18px; }
.upload-field > span { font-weight: 400; color: #746b7e; font-size: 11px; }
.upload-field input { font-size: 11px !important; padding: 8px !important; }
.text-button { border: 0; background: none; color: #9a3e61; display: inline-flex; align-items: center; gap: 7px; padding: 0; margin: 0 0 24px; font-size: 12px !important; }
.palette-options { display: flex; gap: 12px; margin-bottom: 28px; }
.palette-options button { display: flex; width: 72px; height: 42px; border: 2px solid #ded9e3; border-radius: 6px; padding: 4px; background: #fff; overflow: hidden; }
.palette-options button[aria-pressed="true"] { border-color: #a94f70; box-shadow: 0 0 0 2px #f8e7ee; }
.palette-options span { flex: 1; }
.color-field > div { display: flex; align-items: center; gap: 12px; }
.color-field input { width: 42px; height: 42px; padding: 3px; border: 1px solid #ddd4e2; border-radius: 5px; background: #fff; cursor: pointer; }
.color-field output { font-size: 12px; font-weight: 400; }
.preview-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.preview-toolbar { height: 58px; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; border-bottom: 1px solid #ded9e3; background: #faf9fc; color: #756c80; font-size: 12px; }
.preview-badge { margin-left: 10px; color: #9a3e61; }
.device-switch { display: flex; gap: 4px; }
.device-switch .icon-button { width: 34px; height: 34px; min-height: 34px; background: transparent; border-color: transparent; }
.device-switch [aria-pressed="true"] { background: #fff; border-color: #d8d1df; color: #9a3e61; }
.preview-stage { flex: 1; min-height: 0; padding: 20px; display: flex; justify-content: center; background: #ecebf0; }
.preview-stage iframe { width: 100%; height: 100%; background: #fff; border: 1px solid #dcd8e2; border-radius: 4px; box-shadow: 0 4px 20px #2a173c08; }
.preview-stage.mobile-preview iframe { width: 390px; max-width: 100%; }
.mobile-workspace-switch { display: none; }
.site-dialog { max-width: 440px; width: calc(100% - 32px); border: 1px solid #e1d9e7; border-radius: 8px; padding: 26px; color: #302638; font: 14px/1.6 Inter, sans-serif; }
.site-dialog::backdrop { background: #21192e80; }
.site-dialog h2 { font-size: 19px; margin: 0 0 12px; }
.site-dialog p { margin: 0 0 24px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sites-page { padding: 32px 48px; overflow-y: auto; flex: 1; min-height: 0; font-family: Inter, sans-serif; }
.sites-page .sites-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.sites-page h2 { margin: 0 0 6px; font-size: 22px; color: #2a2135; }
.sites-page p { font-size: 14px; color: #776987; margin: 0; }
.site-draft-row { display: grid; grid-template-columns: 180px minmax(0,1fr) auto; gap: 24px; align-items: center; background: #fff; border: 1px solid #e0d9e8; border-radius: 8px; padding: 18px; }
.site-draft-row > img { width: 180px; height: 120px; object-fit: cover; border-radius: 5px; }
.site-draft-row h3 { font-size: 18px; color: #292335; margin: 7px 0; overflow-wrap: anywhere; }
.site-draft-row p { font-size: 12px; }
.site-local-badge { color: #934561; font-size: 11px; font-weight: 600; }
.site-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sites-empty { border-block: 1px solid #e0d9e8; padding: 46px 0; }
.sites-empty h3 { font-size: 19px; color: #30263c; margin: 0 0 10px; }
.sites-empty .rose-button { margin-top: 22px; }
#sites-message { color: #8d3d59; margin-bottom: 18px; }
.store-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; border-block: 1px solid #e1dae8; padding: 20px 0; margin: 22px 0; }
.store-plan-grid h3 { margin: 0 0 8px; font-size: 15px; }
.store-plan-grid strong { display: block; font-size: 23px; color: #30243b; }
.store-plan-grid p { font-size: 12px; margin: 5px 0; }
.store-pilot-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 1050px) {
  .editor-panel { width: 310px; }
  .editor-header { padding-inline: 16px; gap: 10px; }
  .editor-actions { gap: 6px; }
  .site-draft-row { grid-template-columns: 120px minmax(0, 1fr); gap: 18px; }
  .site-draft-row > img { width: 120px; height: 96px; }
  .site-row-actions { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .editor-header { flex-wrap: wrap; padding: 12px 14px; }
  .editor-heading { flex: 1; }
  .editor-heading h1 { font-size: 16px; }
  .editor-actions { width: 100%; margin: 0; }
  .editor-actions .rose-button { flex: 1; padding-inline: 8px; }
  .save-label { display: none; }
  .save-label-mobile { display: inline; }
  .editor-actions .publish-button { font-size: 12px; padding-inline: 10px; }
  .editor-actions .publish-button svg { display: none; }
  .pilot-notice, .editor-message { padding: 8px 14px; font-size: 11px; }
  .mobile-workspace-switch { display: flex; background: #fff; border-bottom: 1px solid #ded9e3; padding: 6px 14px; gap: 6px; flex-shrink: 0; }
  .mobile-workspace-switch button { flex: 1; display: flex; justify-content: center; gap: 8px; align-items: center; background: #fff; border: 0; border-radius: 5px; padding: 8px; color: #756a81; font-size: 12px; }
  .mobile-workspace-switch button[aria-pressed="true"] { background: #f6e8ee; color: #8c3857; }
  .editor-panel { width: 100%; border-right: 0; }
  .preview-panel { display: none; }
  .show-preview .editor-panel { display: none; }
  .show-preview .preview-panel { display: flex; }
  .preview-stage { padding: 10px; }
  .preview-toolbar { padding-inline: 14px; }
  .preview-badge { margin-left: 5px; font-size: 10px; }
  .sites-page { padding: 24px 16px; }
  .sites-page .sites-intro { align-items: flex-start; flex-direction: column; }
  .site-draft-row { padding: 14px; grid-template-columns: 84px minmax(0,1fr); }
  .site-draft-row > img { width: 84px; height: 90px; }
  .site-draft-row h3 { font-size: 16px; }
  .store-plan-grid { gap: 16px; }
}
