.dm-editor-card[draggable="true"] { cursor: grab; }
.dm-editor-card.dragging { opacity: .5; outline: 2px dashed #63806b; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Singularity Labs design system for the SaaS editor */
.dm-app { --sl-ink: #17231d; --sl-ink-soft: #263b31; --sl-gold: #c99143; --sl-gold-hover: #dca653; --sl-cream: #f7f3e9; --sl-sage: #dce6dd; --sl-line: #d5ddd6; --sl-muted: #66736a; }
.dm-panel { color: var(--sl-ink); background: linear-gradient(180deg, #fff 0%, #fbfcfa 100%); }
.dm-panel h2 { font-size: 24px; letter-spacing: -.025em; }
.dm-panel h3 { color: var(--sl-ink); }
.dm-panel button, .dm-onboarding button {
  appearance: none; min-height: 42px; padding: 10px 15px; border: 1px solid var(--sl-ink); border-radius: 9px;
  color: var(--sl-ink); background: #fff; font-weight: 750; line-height: 1.1; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.dm-panel button:hover, .dm-onboarding button:hover { background: var(--sl-sage); transform: translateY(-1px); box-shadow: 0 5px 14px #17231d14; }
.dm-panel button:active, .dm-onboarding button:active { transform: translateY(0); box-shadow: none; }
.dm-panel button:disabled, .dm-onboarding button:disabled { cursor: not-allowed; opacity: .5; transform: none; box-shadow: none; }
.dm-panel .dm-primary, .dm-onboarding .dm-primary { border-color: var(--sl-gold); color: var(--sl-ink); background: var(--sl-gold); box-shadow: 0 7px 18px #9b672429; }
.dm-panel .dm-primary:hover, .dm-onboarding .dm-primary:hover { border-color: var(--sl-gold-hover); background: var(--sl-gold-hover); }
.dm-panel [data-action="publish"], .dm-panel [data-checkout] { min-height: 48px; }
.dm-panel [data-delete-product], .dm-panel [data-delete-section] { color: #8e2e2e; border-color: #efd0d0; background: #fff8f8; }
.dm-panel [data-delete-product]:hover, .dm-panel [data-delete-section]:hover { background: #fbe8e8; }
.dm-panel input:not([type="checkbox"]):not([type="color"]):not([type="file"]),
.dm-panel select, .dm-panel textarea, .dm-onboarding input, .dm-onboarding select {
  appearance: none; width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid #c8d2ca; border-radius: 9px;
  color: var(--sl-ink); background-color: #fff; outline: 0; transition: border-color .15s ease, box-shadow .15s ease;
}
.dm-panel select, .dm-onboarding select {
  padding-right: 38px; background-image: linear-gradient(45deg,transparent 50%,#17231d 50%),linear-gradient(135deg,#17231d 50%,transparent 50%);
  background-position: calc(100% - 18px) 19px,calc(100% - 13px) 19px; background-size: 5px 5px,5px 5px; background-repeat: no-repeat;
}
.dm-panel input:focus, .dm-panel select:focus, .dm-panel textarea:focus, .dm-onboarding input:focus, .dm-onboarding select:focus {
  border-color: var(--sl-gold); box-shadow: 0 0 0 3px #c991432b;
}
.dm-panel input[type="file"] { width: 100%; padding: 6px; border: 1px dashed #aebbb1; border-radius: 10px; color: var(--sl-muted); background: var(--sl-cream); }
.dm-panel input[type="file"]::file-selector-button { min-height: 38px; margin-right: 10px; padding: 8px 13px; border: 0; border-radius: 7px; color: #fff; background: var(--sl-ink); font-weight: 750; cursor: pointer; }
.dm-panel input[type="file"]::file-selector-button:hover { background: var(--sl-ink-soft); }
.dm-panel input[type="color"] { appearance: none; width: 42px; height: 34px; padding: 3px; border: 1px solid #bdc8bf; border-radius: 8px; background: #fff; cursor: pointer; }
.dm-panel input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.dm-panel input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.dm-panel input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--sl-ink); }
.dm-editor-card { border-color: var(--sl-line); box-shadow: 0 5px 16px #17231d0a; }
.dm-editor-card button { min-height: 34px; padding: 7px 9px; border-color: transparent; background: #eef3ef; }
.dm-plan { border-color: var(--sl-line); background: #fff; box-shadow: 0 8px 22px #17231d0b; }
.dm-plan strong { color: var(--sl-ink); }
.dm-device-switch { padding: 3px; border: 1px solid var(--sl-line); border-radius: 10px; background: #fff; }
.dm-device-switch button { min-height: 36px; border: 0; border-radius: 7px; }
.dm-device-switch button[aria-pressed="true"] { color: #fff; background: var(--sl-ink); }
.dm-tools button { transition: color .15s ease, background-color .15s ease, transform .15s ease; }
.dm-tools button.active { color: var(--sl-ink); background: var(--sl-sage); box-shadow: inset 3px 0 0 var(--sl-gold); }
.dm-tools .publish { box-shadow: inset 3px 0 0 var(--sl-gold); }
.dm-panel :focus-visible, .dm-tools :focus-visible, .dm-onboarding :focus-visible { outline: 3px solid #c9914366; outline-offset: 2px; }
.dm-editor-actions { display: flex; align-items: center; gap: 12px !important; }
.dm-app-shell > header .dm-header-generate { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 14px; border: 1px solid #c99143; border-radius: 8px; color: #17231d; background: #c99143; font-size: 13px; font-weight: 850; white-space: nowrap; box-shadow: 0 6px 18px #0002; }
.dm-app-shell > header .dm-header-generate:hover { background: #dca653; transform: translateY(-1px); }
.dm-app-shell > header .dm-header-generate span { padding-left: 8px; border-left: 1px solid #17231d42; font-size: 11px; }
.dm-app-shell > header .dm-header-generate.premium::before { content: '♛'; }
.dm-app-shell > header .dm-header-generate[hidden] { display: none; }
.dm-payment-dialog { width: min(720px, calc(100vw - 28px)); max-height: min(820px, calc(100vh - 28px)); padding: 0; border: 0; border-radius: 20px; color: #17231d; background: #fff; box-shadow: 0 28px 90px #08110ccc; overflow: auto; }
.dm-payment-dialog::backdrop { background: #0b1711cc; backdrop-filter: blur(5px); }
.dm-payment-close { position: sticky; float: right; top: 16px; right: 16px; z-index: 2; width: 38px; height: 38px; border: 1px solid #d5ddd6; border-radius: 50%; color: #17231d; background: #fff; font-size: 24px; cursor: pointer; }
#dmPaymentBody { padding: 38px; }
.dm-payment-head { max-width: 580px; padding-right: 35px; }
.dm-payment-head h2 { margin: 6px 0 10px; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.035em; }
.dm-payment-head > p:last-child { color: #66736a; line-height: 1.55; }
.dm-payment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.dm-payment-plan { padding: 22px; margin-top: 20px; border: 1px solid #d5ddd6; border-radius: 15px; background: #fff; }
.dm-payment-plan.selected { border-color: #17231d; box-shadow: 0 0 0 2px #17231d, 0 16px 35px #17231d14; }
.dm-payment-plan > span, .dm-payment-plan > strong { display: block; }
.dm-payment-plan > span { color: #926523; font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.dm-payment-plan > strong { margin: 12px 0; font-size: 34px; }
.dm-payment-plan > strong small { color: #66736a; font-size: 13px; }
.dm-payment-plan p, .dm-payment-plan li { color: #526158; line-height: 1.45; }
.dm-payment-plan button { width: 100%; min-height: 48px; margin-top: 12px; border: 1px solid #17231d; border-radius: 9px; color: #17231d; background: #fff; font-weight: 800; cursor: pointer; }
.dm-payment-plan button.dm-primary { border-color: #c99143; background: #c99143; }
.dm-media-alert { display: flex; justify-content: space-between; gap: 15px; margin: 22px 0 0; padding: 14px 16px; border: 1px solid #e5c58e; border-radius: 10px; color: #70470e; background: #fff6e6; }
.dm-media-alert span { color: #84683f; text-align: right; }
.dm-payment-feedback { margin: 14px 0 0; padding: 12px 14px; border-radius: 9px; font-size: 13px; text-align: center; }
.dm-payment-feedback.loading, .dm-payment-feedback.info { color: #244d38; background: #eaf4ed; }
.dm-payment-feedback.error { color: #842f2f; background: #fff0f0; border: 1px solid #efcccc; }
.dm-onboarding { width: min(920px, 100%); margin: auto; padding: 40px; text-align: left; }
.dm-setup-head { max-width: 650px; margin-bottom: 30px; }
.dm-setup-head h2 { margin: 5px 0 10px; font-size: clamp(30px, 4vw, 48px); }
.dm-setup-section { position: relative; padding: 28px; margin: 18px 0; border: 1px solid #dce2dc; border-radius: 16px; background: #fff; box-shadow: 0 12px 35px #17231d0a; }
.dm-setup-section h3 { margin: 0 0 8px; font-size: 21px; }
.dm-step { position: absolute; right: 22px; top: 20px; color: #a97b38; font: 700 12px monospace; }
.dm-domain-input { display: flex; align-items: stretch; }
.dm-domain-input input { min-width: 0; border-radius: 7px 0 0 7px; }
.dm-domain-input span { display: flex; align-items: center; padding: 0 10px; background: #eef2ee; border: 1px solid #cbd3cc; border-left: 0; border-radius: 0 7px 7px 0; font-size: 12px; }
.dm-setup-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 12px; }
.dm-setup-footer small { display: block; color: #66736a; margin-top: 4px; }
.dm-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 22px; }
.dm-theme-card { min-width: 0; padding: 12px !important; border: 1px solid #d7ded8 !important; border-radius: 11px !important; background: #fff !important; color: #17231d !important; text-align: left !important; }
.dm-theme-card:hover, .dm-theme-card.selected { border-color: #17231d !important; box-shadow: 0 0 0 2px #17231d; }
.dm-theme-card strong, .dm-theme-card small { display: block; }
.dm-theme-card small { color: #66736a; margin-top: 3px; font-size: 11px; }
.dm-theme-palette { display: grid; grid-template-columns: repeat(4, 1fr); height: 24px; overflow: hidden; border: 1px solid #d8ded7; border-radius: 6px; margin-bottom: 10px; }
.dm-theme-palette i { display: block; }
.dm-panel-heading { padding-bottom: 14px; border-bottom: 1px solid #e3e7e3; margin-bottom: 16px; }
.dm-panel-heading h2 { margin-bottom: 8px; }
.dm-panel-heading p:last-child { color: #66736a; line-height: 1.5; }
.dm-style-box, .dm-publish-summary, .dm-live-box { padding: 16px; margin: 14px 0; border: 1px solid #dce2dc; border-radius: 12px; background: #f9fbf9; }
.dm-style-box h3 { margin: 0 0 10px; }
.dm-color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dm-color-grid label { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 8px; padding: 8px; border: 1px solid #dce2dc; border-radius: 8px; background: #fff; }
.dm-color-grid label span { grid-column: 1 / -1; font-size: 11px; font-weight: 700; }
.dm-color-grid input { width: 34px; height: 30px; padding: 0; border: 0; }
.dm-color-grid code { font-size: 10px; }
.dm-contrast { padding: 9px; border-radius: 7px; font-size: 12px; }
.dm-contrast.ok { background: #eaf7ef; color: #17613c; }
.dm-contrast.warning { background: #fff3db; color: #80510d; }
.dm-ready { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 10px; background: #eaf7ef; color: #17613c; }
.dm-publish-summary span, .dm-publish-summary small { display: block; color: #66736a; }
.dm-publish-summary strong { display: block; overflow-wrap: anywhere; margin: 5px 0; }
.dm-generate { width: 100%; min-height: 52px; font-size: 16px; }
.dm-checkout-card { padding: 18px; margin: 12px 0; border: 1px solid #d9dfda; border-radius: 13px; background: #fff; }
.dm-checkout-card.featured { color: #fff; border-color: #17231d; background: #17231d; }
.dm-checkout-card > span, .dm-checkout-card > strong { display: block; }
.dm-checkout-card > strong { margin: 10px 0; font-size: 28px; }
.dm-checkout-card > strong small { font-size: 12px; }
.dm-checkout-card button { width: 100%; }
.dm-secure-note, .dm-activation { color: #66736a; font-size: 12px; text-align: center; }
.dm-live-box > span { color: #218752; font-weight: 800; font-size: 12px; }
.dm-live-box > a { display: block; margin: 7px 0 12px; overflow-wrap: anywhere; }
.dm-public-shell.cards-soft .dm-public-product { margin: 10px 0; padding: 17px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--menu-bg) 78%, white); box-shadow: 0 8px 24px #17231d0b; }
.dm-public-shell.cards-outline .dm-public-product { margin: 10px 0; padding: 17px; border: 1px solid color-mix(in srgb, var(--menu-accent) 45%, transparent); border-radius: 10px; }
.dm-public-section > h2 { text-decoration-color: var(--menu-accent); text-decoration-thickness: 3px; text-underline-offset: 7px; }

@media (max-width: 700px) {
  .dm-onboarding { padding: 24px 16px 110px; }
  .dm-onboarding .dm-row { grid-template-columns: 1fr; }
  .dm-setup-section { padding: 22px 18px; }
  .dm-theme-grid { grid-template-columns: 1fr 1fr; }
  .dm-setup-footer { position: sticky; bottom: 0; z-index: 3; margin: 20px -16px -110px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #dce2dc; box-shadow: 0 -12px 30px #17231d14; }
  .dm-setup-footer > div { display: none; }
  .dm-setup-footer button { width: 100%; }
  #dmPaymentBody { padding: 28px 20px 24px; }
  .dm-payment-options { grid-template-columns: 1fr; }
  .dm-payment-plan { padding: 18px; }
  .dm-media-alert { flex-direction: column; }
  .dm-media-alert span { text-align: left; }
}

@media (max-width: 380px) {
  .dm-theme-grid, .dm-color-grid { grid-template-columns: 1fr; }
  .dm-domain-input { display: block; }
  .dm-domain-input input { border-radius: 7px 7px 0 0; }
  .dm-domain-input span { min-height: 34px; border-left: 1px solid #cbd3cc; border-top: 0; border-radius: 0 0 7px 7px; }
}

@media (max-width: 560px) {
  .dm-actions { flex-direction: column; align-items: stretch; }
  .dm-actions a, .dm-actions button { width: 100%; }
  .dm-app-shell > header { padding: 0 12px; }
  .dm-app-shell > header strong { font-size: 15px; }
  .dm-made { font-size: 0; }
  .dm-editor-actions { gap: 7px !important; }
  .dm-status { display: none; }
  .dm-app-shell > header .dm-header-generate { padding: 8px 10px; font-size: 12px; }
  .dm-app-shell > header .dm-header-generate span { display: inline; padding-left: 6px; font-size: 10px; }
  .dm-status { max-width: 110px; text-align: right; }
  .dm-canvas-top { align-items: flex-start; gap: 8px; }
  .dm-device-switch button { padding: 8px 9px; }
  .dm-panel { padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); overflow: auto; }
  .dm-panel button { min-height: 40px; }
  .dm-editor-card header { align-items: flex-start; flex-wrap: wrap; }
  .dm-editor-card header > input { min-width: 0; flex: 1 1 140px; }
  .dm-product-list { margin-left: 0; }
  .dm-public-product { grid-template-columns: minmax(0, 1fr) auto; }
  .dm-public-product img { display: block; grid-column: 1 / -1; width: 100%; height: auto; max-height: 220px; }
  .dm-public-top h1 { font-size: clamp(28px, 10vw, 34px); overflow-wrap: anywhere; }
  .dm-public-main { padding-left: 16px; padding-right: 16px; }
}
