:root { font-family: Arial, sans-serif; color: #202721; background: #f4f6f4; font-size: 14px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 38px; min-height: 38px; padding: 8px 12px; border: 1px solid #c9d0ca; border-radius: 4px; background: white; color: inherit; cursor: pointer; }
button:hover { background: #eaf0eb; }
button:disabled { opacity: 0.5; cursor: default; }
button svg { width: 17px; height: 17px; flex-shrink: 0; }
.primary { color: white; background: #28633e; border-color: #28633e; }
.primary:hover { background: #1c4c2d; }
a { color: inherit; }
:focus-visible { outline: 2px solid #3678b8; outline-offset: 3px; }
.brand { font-family: Georgia, serif; font-size: 25px; text-decoration: none; white-space: nowrap; }
.brand span { color: #52892d; }
h1, h2, p { margin: 0; }
h1 { font-size: 17px; font-weight: 500; }
h2 { font-size: 14px; margin-bottom: 16px; }
label { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; font-size: 12px; font-weight: 600; }
input:not([type="color"]), textarea, select { width: 100%; padding: 10px; border: 1px solid #c9d0ca; border-radius: 4px; background: white; color: #202721; line-height: 1.5; font-weight: 400; }
textarea { resize: vertical; }
input[type="file"] { font-size: 12px; }
.login { max-width: 360px; margin: 14vh auto 0; padding: 24px; }
.login .brand { display: block; margin-bottom: 48px; }
.login h1 { margin-bottom: 24px; }
.login .primary { width: 100%; }
#login-status { margin-top: 16px; line-height: 1.6; color: #9a3027; }
.back-link { display: block; margin-top: 24px; font-size: 12px; }
.editor-header { height: 72px; padding: 0 24px; display: flex; align-items: center; gap: 28px; background: white; border-bottom: 1px solid #d9dfd9; }
.header-actions { display: flex; gap: 8px; margin-left: auto; }
.status-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 24px; min-height: 38px; font-size: 12px; border-bottom: 1px solid #d9dfd9; }
#publish-status { color: #365a42; overflow-wrap: anywhere; }
.editor-workspace { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - 110px); }
.settings { overflow-y: auto; background: white; border-right: 1px solid #d9dfd9; }
.settings section { padding: 24px; border-bottom: 1px solid #e1e6e1; }
.settings section:last-child { padding-bottom: 72px; }
.colour-controls { display: flex; gap: 32px; }
input[type="color"] { width: 54px; height: 38px; border: 1px solid #c9d0ca; border-radius: 4px; padding: 3px; background: white; cursor: pointer; }
.image-selection { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.image-selection img { width: 104px; height: 92px; object-fit: contain; }
#image-status { font-size: 12px; margin-top: 10px; line-height: 1.5; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h2 { margin: 0; }
.service-editor { border-bottom: 1px solid #d9dfd9; padding-top: 16px; margin-bottom: 12px; }
.service-toolbar { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.service-toolbar span { flex: 1; font-size: 12px; color: #607064; }
.service-toolbar button { padding: 6px; min-width: 30px; min-height: 30px; }
.gallery-editor-row { padding-block: 16px; border-bottom: 1px solid #d9dfd9; }
.gallery-editor-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.gallery-editor-row .service-toolbar { align-items: center; }
.gallery-editor-row label { margin-bottom: 0; }
#gallery-editor-status { margin-block: 12px; font-size: 12px; line-height: 1.5; }
input[type="range"] { padding: 0; accent-color: #28633e; }
.layout-row { display: flex; align-items: center; gap: 4px; padding: 5px 0; border-bottom: 1px solid #e1e6e1; }
.layout-row > span { flex: 1; min-width: 0; font-size: 12px; }
.layout-row button { padding: 5px; min-width: 28px; min-height: 32px; }
.layout-row button:first-child { cursor: grab; }
.layout-row.drop-target { background: #dceafa; outline: 1px dashed #3678b8; }
#layout-order { margin-bottom: 18px; }
#layout-alignment p { font-size: 12px; font-weight: 600; margin-bottom: 7px; }
.alignment-controls { display: flex; margin-bottom: 16px; }
.alignment-controls button { border-radius: 0; min-width: 40px; }
.alignment-controls button[aria-pressed="true"], .layout-presets button[aria-pressed="true"] { background: #dceade; border-color: #28633e; }
.layout-presets { display: flex; gap: 8px; }
.layout-presets button { flex: 1; padding: 10px; }
.layout-sketch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 54px; height: 34px; }
.sketch-text { background: repeating-linear-gradient(to bottom, #64746a 0 2px, transparent 2px 7px); margin-block: 3px; }
.sketch-image { background: #72a67f; border-radius: 2px; }
[data-preset="image-left"] .sketch-image { order: -1; }
[data-preset="stacked"] { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
[data-preset="stacked"] .sketch-image { order: -1; }
.preview-area { padding: 16px 24px 24px; min-width: 0; display: flex; flex-direction: column; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 44px; margin-bottom: 12px; flex-shrink: 0; }
.preview-toolbar > span { font-size: 12px; }
.device-controls { display: flex; }
.device-controls button { border-radius: 0; }
.device-controls button[aria-pressed="true"] { background: #dceade; color: #205934; }
.preview-viewport { flex: 1; min-height: 300px; position: relative; overflow: hidden; background: #e2e7e2; border: 1px solid #c9d0ca; }
.preview-viewport iframe { display: block; border: 0; position: absolute; top: 0; left: 0; transform-origin: top left; background: white; }
.preview-area:fullscreen { background: #f4f6f4; height: 100dvh; }
@media (max-width: 850px) {
  .editor-header { padding-inline: 16px; gap: 12px; }
  .editor-header h1 { display: none; }
  .status-bar { padding-inline: 16px; }
  .editor-workspace { grid-template-columns: 280px minmax(0, 1fr); }
  .settings section { padding: 18px; }
  .preview-area { padding: 12px; }
}
@media (max-width: 620px) {
  .editor-workspace { display: flex; flex-direction: column; height: auto; }
  .preview-area { order: -1; height: 520px; }
  .settings { overflow: visible; border-right: 0; }
  .editor-header { height: 64px; }
  .brand { font-size: 22px; }
  .header-actions { gap: 4px; }
  .header-actions button { padding: 8px; }
}
