.designer-page { background: #fff; }
.designer-context { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 32px; }
.designer-back { color: var(--muted); font-size: 12px; font-weight: 600; }
.format-navigation { display: flex; padding: 4px; gap: 3px; border: 1px solid #e0e6f0; border-radius: 10px; background: #f5f7fc; }
.format-navigation a { padding: 9px 15px; border-radius: 7px; font-size: 11px; font-weight: 650; color: var(--muted); }
.format-navigation a[aria-current=page] { background: white; color: var(--blue); box-shadow: 0 2px 6px #111a450d; }
.designer-context a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.designer-back:hover { color: var(--blue); }
.personalisation-colour { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 18px; }
.template-hint { margin-top: 14px !important; margin-bottom: 0 !important; font-size: 10px !important; }
.physical-export { display: block !important; }
#export-format { width: 100%; min-height: 44px; margin-bottom: 14px; padding: 9px; background: white; color: var(--navy); border: 1px solid #dce2ee; border-radius: 8px; font-size: 11px; }
.physical-designer #select-prepaid:disabled { opacity: 1; cursor: default; }
.physical-designer .canvas-empty { inset: 24% 27% 45% 18%; padding: 8px; }
.physical-designer .canvas-empty strong { font-size: clamp(15px, 1.7vw, 23px); }
.physical-designer .canvas-empty .upload-symbol { display: none; }
.physical-designer .canvas-frame, .physical-designer #design-canvas { border-radius: 4%; }
.physical-designer .export-preview { background-color: #f4f6fa; background-image: linear-gradient(45deg, #e6eaf2 25%, transparent 25%), linear-gradient(-45deg, #e6eaf2 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6eaf2 75%), linear-gradient(-45deg, transparent 75%, #e6eaf2 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.physical-designer .export-preview img { border-radius: 0; }
@media (max-width: 480px) {
  .designer-context { gap: 12px; margin-bottom: 26px; }
  .designer-back { font-size: 10px; }
  .format-navigation a { padding: 10px; font-size: 10px; }
  .physical-designer .canvas-empty strong { font-size: 14px; }
  .physical-designer .canvas-empty > span:last-child { display: none; }
}
@media (pointer: coarse) { .format-navigation a, .designer-back { min-height: 44px; display: flex; align-items: center; } }
.designer-page button, .designer-page input, .designer-page select, .designer-page textarea { font: inherit; }
.designer-page button { touch-action: manipulation; }
.designer-page :where(button, input, textarea, select, canvas):focus-visible { outline: 3px solid #1735ce; outline-offset: 3px; }
.designer-page button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.designer-shell { width: calc(100% - 96px); max-width: 1380px; margin: 0 auto; padding-block: 48px 32px; }
.designer-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.designer-heading .eyebrow { color: var(--blue); font-size: 9px; letter-spacing: 1.6px; margin-bottom: 13px; }
.designer-heading h1 { font-size: clamp(40px, 4.1vw, 60px); font-weight: 600; letter-spacing: -.06em; line-height: 1.08; }
.designer-heading h1 em { font-style: normal; color: var(--blue); }
.designer-intro { color: var(--muted); font-size: 14px; margin-top: 13px; }
.heading-actions { display: flex; gap: 8px; padding-bottom: 2px; }
.tool-button { background: white; color: var(--navy); border: 1px solid #dce2ee; border-radius: 8px; min-height: 42px; padding: 10px 15px; font-size: 12px !important; font-weight: 650 !important; display: inline-flex; align-items: center; justify-content: center; gap: 17px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-size: 11px !important; font-weight: 650 !important; padding: 8px 0; min-height: 36px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #dce2ee; border-radius: 8px; background: white; color: var(--navy); font-size: 23px !important; }
.designer-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 348px; align-items: start; gap: 28px; }
.design-workbench { min-width: 0; }
.workbench-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 2px 16px; }
.workbench-title { color: var(--muted); font-size: 12px; font-weight: 650; }
.project-name-field { margin-bottom: 18px; }
.project-name-field label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--navy); font-size: 12px; font-weight: 700; }
.project-name-field label span { color: var(--muted); font-size: 9px; font-weight: 500; }
.project-name-field input { width: 100%; min-height: 44px; padding: 10px 12px; background: white; border: 1px solid #cbd5e7; border-radius: 8px; color: var(--navy); font-size: 13px; }
.project-name-field input::placeholder { color: #788397; }
.project-name-field input[aria-invalid=true] { border-color: #a42c3d; }
.export-panel .project-name-field p { margin-top: 7px; text-align: left; font-size: 10px; line-height: 1.6; }
.export-panel .project-name-field .field-error { color: #a42c3d; }
.history-actions { display: flex; gap: 6px; }
.canvas-surround { position: relative; padding: 27px 32px 22px; background: #f3f5fa; border: 1px solid #e8ecf4; border-radius: 20px; }
.canvas-label { display: flex; justify-content: space-between; color: #566078; font-size: 8px; font-weight: 650; letter-spacing: 1.1px; margin-bottom: 30px; }
.canvas-label > span:last-child { letter-spacing: .4px; }
.canvas-frame { position: relative; width: 100%; aspect-ratio: 1536 / 969; border-radius: 16px; box-shadow: 0 18px 32px #15285816, 0 2px 5px #15285808; background: #eaf0ff; }
#design-canvas { display: block; width: 100%; height: 100%; border-radius: 16px; touch-action: none; }
.canvas-empty { position: absolute; inset: 21% 22% 22%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; border: 1px dashed #b5c4e8; background: #ffffff42; border-radius: 12px; color: var(--navy); padding: 16px; }
.canvas-empty strong { font-size: clamp(16px, 1.8vw, 27px); font-weight: 550; letter-spacing: -.7px; line-height: 1.15; text-align: center; }
.canvas-empty > span:last-child { color: var(--muted); font-size: 10px; }
.upload-symbol { display: grid; place-items: center; background: #fff; border-radius: 50%; height: 32px; width: 32px; color: var(--blue); font-size: 24px; }
.canvas-help { text-align: center; color: #566078; font-size: 10px; margin-top: 28px; }
.drop-feedback { display: none; position: absolute; inset: 10px; border: 2px dashed var(--blue); border-radius: 12px; place-items: center; background: #eaf0fff5; color: var(--blue); font-size: 22px; font-weight: 650; pointer-events: none; z-index: 2; }
.is-dragging .drop-feedback { display: grid; }
.workbench-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 2px 20px; }
.check-label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; cursor: pointer; min-height: 40px; }
.check-label input { width: 15px; height: 15px; accent-color: var(--blue); }
.design-additions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.add-button { display: flex; align-items: center; gap: 13px; min-height: 86px; padding: 17px; background: white; border: 1px solid #dce3f0; border-radius: 12px; text-align: left; color: var(--navy); }
.add-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; background: #eff3ff; border-radius: 9px; color: var(--blue); font-size: 25px; }
.text-icon { font-family: Georgia, serif; }
.add-button strong { display: block; font-size: 12px; font-weight: 750; }
.add-button small { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.add-button > span:last-child { color: var(--blue); font-size: 22px; margin-left: auto; }
.local-note { margin: 18px 0; text-align: center; font-size: 10px; color: var(--muted); }
.designer-inspector { border: 1px solid #e0e6f0; border-radius: 16px; overflow: hidden; background: white; }
.inspector-section { padding: 23px; border-bottom: 1px solid #e8ecf3; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-label h2 { font-size: 14px; font-weight: 750; letter-spacing: -.35px; }
.section-label > span { color: #566078; font-size: 9px; letter-spacing: 1px; }
.section-label .text-button { min-height: 24px; padding: 0; }
.control-label, .prepaid-colour, .font-row label, .property-grid label { display: block; color: var(--muted); font-size: 10px; font-weight: 600; }
.control-label { margin-bottom: 9px; }
.colour-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.swatches { display: flex; gap: 7px; }
.swatch { background: var(--swatch); width: 28px; height: 28px; border: 1px solid #dae1ef; border-radius: 50%; position: relative; }
.swatch[aria-pressed=true]::after { content: ''; position: absolute; inset: -4px; border: 1px solid var(--blue); border-radius: 50%; }
.custom-colour { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.custom-colour span { font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
input[type=color] { appearance: none; width: 30px; height: 30px; background: #fff; padding: 3px; border: 1px solid #dce2ee; border-radius: 6px; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 3px; }
.brand-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.designer-page fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.brand-controls legend { font-size: 10px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.segmented { display: flex; padding: 3px; gap: 2px; background: #f1f4f9; border-radius: 7px; }
.segmented button { flex: 1; min-height: 33px; padding: 5px 10px; font-size: 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); }
.segmented button[aria-pressed=true] { color: var(--blue); background: white; box-shadow: 0 1px 4px #15285815; font-weight: 750; }
.prepaid-colour input { display: block; margin-top: 8px; width: 100%; height: 39px; padding: 7px; }
.empty-layers, .hint { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 0 0 15px; }
.layer-list { list-style: none; display: flex; flex-direction: column; gap: 7px; padding: 0; margin: 0 0 10px; max-height: 280px; overflow-y: auto; }
.layer-row { background: #f8f9fc; border: 1px solid transparent; border-radius: 8px; padding: 7px; }
.layer-row.selected { background: #f0f4ff; border-color: #a6b8ed; }
.layer-row-heading { display: flex; align-items: center; gap: 7px; }
.layer-row-heading .layer-select { flex: 1; min-width: 0; }
.layer-grip { flex: none; width: 28px; min-height: 35px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #566078; cursor: grab; letter-spacing: -3px; font-size: 17px !important; }
.layer-grip:active { cursor: grabbing; }
.layer-row.is-reordering { opacity: .45; }
.layer-row.drop-before { box-shadow: 0 -3px 0 var(--blue); }
.layer-row.drop-after { box-shadow: 0 3px 0 var(--blue); }
.layer-order-help, .position-help { color: var(--muted); font-size: 10px; line-height: 1.7; margin-bottom: 12px; }
.position-help { margin-top: 15px; }
.layer-order-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 17px; }
.layer-order-controls .tool-button { min-height: 37px; padding: 7px; font-size: 10px !important; gap: 5px; }
.layer-select { display: flex; align-items: center; gap: 10px; padding: 0; width: 100%; min-height: 35px; background: transparent; color: var(--navy); border: 0; text-align: left; font-size: 11px; }
.layer-select > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.layer-type { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 5px; background: white; border: 1px solid #e0e5ef; flex: none; font-size: 14px; font-family: Georgia, serif; }
.layer-select img { width: 29px; height: 29px; object-fit: contain; background: white; border: 1px solid #e0e5ef; border-radius: 5px; }
.layer-actions { display: flex; justify-content: flex-end; gap: 2px; border-top: 1px solid #e1e7f3; padding-top: 5px; margin-top: 5px; }
.layer-actions button { font-size: 9px; border: 0; background: transparent; color: var(--muted); padding: 5px 7px; min-height: 30px; border-radius: 4px; }
.layer-actions .delete-layer { color: #963b46; }
.system-layer { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 42px; padding: 6px 7px; background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: 10px !important; color: var(--muted); text-align: left; }
.system-layer small { margin-left: auto; font-size: 8px; color: #566078; }
.system-layer[aria-pressed=true] { border-color: #a6b8ed; background: #f0f4ff; color: var(--navy); }
.locked-brand { padding-left: 8px; }
.locked-brand img { width: 28px; margin-right: 1px; }
.designer-page textarea, .font-row select, .property-grid input, .font-row input[type=number] { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #dce2ee; border-radius: 7px; color: var(--navy); background: white; font-size: 12px; }
.designer-page textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.font-row { display: grid; grid-template-columns: 1fr 65px 37px; gap: 8px; margin-top: 12px; align-items: end; }
.font-row :is(select, input) { margin-top: 5px; }
.font-row input[type=color] { width: 37px; height: 39px; }
.text-formatting { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.text-formatting .segmented button { padding-inline: 7px; font-size: 9px; }
.property-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; }
.property-grid input { margin-top: 5px; font-variant-numeric: tabular-nums; }
.position-actions { display: flex; gap: 6px; margin-top: 15px; flex-wrap: wrap; }
.position-actions .tool-button { padding: 6px 10px; min-height: 35px; font-size: 10px !important; flex: 1; }
.export-panel { padding: 22px; background: #fafbfe; }
.export-button { width: 100%; min-height: 50px; justify-content: space-between; font-size: 12px !important; }
.export-panel p { margin-top: 10px; color: var(--muted); font-size: 9px; text-align: center; }
.designer-footnote { display: flex; align-items: flex-start; gap: 10px; margin-top: 28px; border-top: 1px solid #e5eaf3; padding-top: 20px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.footnote-mark { flex: none; display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #cbd5eb; color: var(--blue); border-radius: 50%; font-size: 10px; font-family: Georgia, serif; }
.designer-status { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; background: var(--navy); color: white; padding: 13px 20px; border-radius: 10px; box-shadow: 0 8px 30px #111a4526; font-size: 12px; z-index: 50; }
.designer-status:empty { display: none; }
.designer-status.error { background: #7a2936; }
.designer-dialog { margin: auto; padding: 30px; border: 1px solid #e0e6f0; border-radius: 20px; width: min(700px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; color: var(--navy); background: white; box-shadow: 0 24px 80px #111a4533; }
.designer-dialog::backdrop { background: #111a4599; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.dialog-heading .eyebrow { font-size: 8px; color: var(--blue); letter-spacing: 1.2px; margin-bottom: 9px; }
.dialog-heading h2 { font-size: 32px; font-weight: 600; letter-spacing: -1.5px; }
.dialog-heading .icon-button { flex: none; }
.export-preview { background: #f2f5fa; padding: 24px; border-radius: 12px; }
.export-preview img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 10px 24px #111a451a; }
.export-detail { margin-top: 14px; font-size: 10px; color: var(--muted); text-align: center; }
.export-note { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 19px; }
.export-preview-tabs { display: flex; gap: 5px; padding: 4px; background: #f1f4f9; border-radius: 9px; margin-bottom: 18px; }
.export-preview-tabs button { flex: 1; min-height: 44px; padding: 9px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 650; }
.export-preview-tabs button[aria-pressed=true] { color: var(--blue); background: white; box-shadow: 0 1px 4px #111a4512; }
.export-bundle-note { padding: 12px 15px; margin-bottom: 18px; color: var(--navy); background: var(--pale); border-radius: 8px; font-size: 11px; line-height: 1.7; }
.dialog-actions { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.dialog-actions .button { font-size: 12px; min-height: 44px; }
.reset-dialog { max-width: 460px; }
.reset-dialog h2 { font-size: 26px; letter-spacing: -1px; }
.reset-dialog > p { font-size: 13px; color: var(--muted); margin-top: 15px; }
.designer-alert { padding: 20px; border: 1px solid #e5c7cc; background: #fff4f4; border-radius: 12px; margin-block: 20px; }
@media (hover: hover) and (pointer: fine) {
  .tool-button:hover, .icon-button:hover, .add-button:hover { border-color: #9eafe1; background: #f6f8ff; }
  .canvas-empty:hover { background: #ffffff85; border-color: var(--blue); }
  .system-layer:not(.locked-brand):hover, .layer-actions button:hover { background: #e8eefc; color: var(--blue); }
  .text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 1100px) {
  .designer-shell { width: calc(100% - 64px); }
  .designer-workspace { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
  .inspector-section { padding: 20px; }
  .canvas-surround { padding: 22px 22px 19px; }
  .canvas-empty { inset: 20% 19%; padding: 10px; }
  .canvas-empty > span:last-child { font-size: 9px; }
  .canvas-empty strong { font-size: 20px; }
  .design-additions { grid-template-columns: 1fr; gap: 10px; }
  .add-button { min-height: 74px; }
  .designer-intro { font-size: 12px; }
  .heading-actions .tool-button { padding-inline: 12px; font-size: 10px !important; }
}
@media (max-width: 800px) {
  .designer-shell { width: calc(100% - 40px); padding-top: 30px; }
  .designer-workspace { grid-template-columns: 1fr; gap: 24px; }
  .designer-heading { align-items: flex-start; gap: 22px; margin-bottom: 26px; }
  .designer-heading h1 { font-size: 44px; }
  .heading-actions { flex-direction: column; gap: 6px; }
  .heading-actions .tool-button { min-height: 36px; }
  .designer-intro { max-width: 32ch; }
  .designer-inspector { display: grid; grid-template-columns: 1fr 1fr; }
  .designer-inspector > section:first-child { border-right: 1px solid #e8ecf3; }
  .selection-settings, .export-panel { grid-column: 1 / -1; }
  .export-panel { display: block; }
  .export-button { max-width: none; }
  .design-additions { grid-template-columns: 1fr 1fr; }
  .canvas-empty strong { font-size: 26px; }
}
@media (max-width: 480px) {
  .designer-heading h1 { font-size: 39px; }
  .designer-heading .eyebrow { font-size: 7px; letter-spacing: 1.1px; }
  .designer-intro { font-size: 11px; max-width: 24ch; }
  .canvas-surround { padding: 17px 14px 15px; border-radius: 14px; }
  .canvas-label { font-size: 6px; margin-bottom: 20px; }
  .canvas-frame, #design-canvas { border-radius: 10px; }
  .canvas-help { font-size: 8px; margin-top: 20px; }
  .canvas-empty { inset: 18% 18% 22%; gap: 5px; }
  .canvas-empty strong { font-size: 18px; }
  .canvas-empty > span:last-child { font-size: 7px; }
  .upload-symbol { height: 24px; width: 24px; font-size: 20px; }
  .workbench-bottom { gap: 12px; padding-bottom: 14px; }
  .check-label { font-size: 9px; gap: 7px; }
  .workbench-bottom .text-button { font-size: 9px !important; }
  .design-additions { gap: 9px; }
  .add-button { padding: 12px; gap: 9px; min-height: 76px; }
  .add-icon { width: 27px; height: 32px; font-size: 20px; }
  .add-button strong { font-size: 10px; }
  .add-button small { font-size: 8px; line-height: 1.5; }
  .add-button > span:last-child { display: none; }
  .designer-inspector { display: block; }
  .designer-inspector > section:first-child { border-right: 0; }
  .export-panel { display: block; }
  .export-button { max-width: none; }
  .export-panel p { margin-top: 10px; }
  .designer-dialog { padding: 22px; }
  .export-preview { padding: 14px; }
  .dialog-heading h2 { font-size: 28px; }
  .dialog-actions { gap: 8px; }
  .dialog-actions .button, .dialog-actions .tool-button { padding-inline: 12px; font-size: 11px !important; }
}
@media (prefers-reduced-motion: reduce) { .designer-page *, .designer-page *::before, .designer-page *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (pointer: coarse) {
  .icon-button { width: 44px; height: 44px; }
  .swatches { flex-wrap: wrap; }
  .swatch { width: 44px; height: 44px; }
  .segmented button, .layer-actions button, .layer-grip, .layer-order-controls .tool-button, .system-layer, .text-button, .tool-button, .position-actions .tool-button { min-height: 44px; }
}

/* Keep editor helper labels readable on compact screens. */
.canvas-label,.canvas-help{font-size:11px}
