/*
 * MinMindesten Designer 3
 * Én stylesheet, ét token-sæt, alt scopet under .mmd3. Ingen versionslag.
 * Desktop/mobil styres af [data-mode] (sat af JS ud fra viewport), så layout
 * og JS-adfærd altid er enige.
 */

.mmd3 {
  --ink: #1f2328;
  --ink-soft: #454a52;
  --muted: #72767e;
  --line: #e8e5e0;
  --line-strong: #d8d4cd;
  --panel: #ffffff;
  --tint: #f6f5f2;
    --ok: #2f6b45;
  --ok-bg: #eef4ef;
  --warn: #7d5312;
  --warn-bg: #fbf4e4;
  --error: #8f2f2a;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --font-ui: "MMD3 Source Sans 3", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

.mmd3 *, .mmd3 *::before, .mmd3 *::after { box-sizing: border-box; }

/* Neutraliserer typiske tema-regler for knapper og felter. */
.mmd3 :where(button, input, textarea, select) {
  font: inherit;
  color: inherit;
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  box-shadow: none;
  line-height: 1.2;
}
.mmd3 :where(button) { cursor: pointer; }
.mmd3 :where(h2, h3, p, dl, dd, ol) { margin: 0; padding: 0; }
.mmd3 :where(img) { max-width: none; }

.mmd3 :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.mmd3-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Rammer                                                              */
/* ------------------------------------------------------------------ */

.mmd3-app {
  display: grid;
  grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
  height: clamp(640px, calc(100vh - var(--mmd3-offset, 48px)), 920px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--panel);
}

.mmd3-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.mmd3-head { padding: 26px 28px 14px; }
.mmd3 .mmd3-title {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.mmd3-subtitle { margin-top: 4px; font-size: 15px; color: var(--muted); }

.mmd3-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 28px 30px;
  scrollbar-width: thin;
}

.mmd3-foot {
  border-top: 1px solid var(--line);
  padding: 16px 28px 20px;
  background: var(--panel);
}

/* ------------------------------------------------------------------ */
/* Faner (desktop)                                                     */
/* ------------------------------------------------------------------ */

.mmd3-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.mmd3 .mmd3-tab {
  position: relative;
  height: 50px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: color .15s ease;
}
.mmd3 .mmd3-tab:hover { color: var(--ink); background: transparent; }
.mmd3 .mmd3-tab.is-active { color: var(--ink); }
.mmd3 .mmd3-tab.is-active::after {
  content: "";
  position: absolute;
  left: 18%; right: 18%; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}
.mmd3 .mmd3-tab:focus-visible { outline-offset: -4px; border-radius: var(--r-sm); }

/* ------------------------------------------------------------------ */
/* Panelindhold                                                        */
/* ------------------------------------------------------------------ */

.mmd3-heading h3 {
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.mmd3-heading p { margin-top: 6px; font-size: 15px; color: var(--muted); max-width: 36ch; }
.mmd3-heading + * { margin-top: 22px; }

.mmd3-group { margin-top: 26px; }
.mmd3-heading + .mmd3-group { margin-top: 22px; }
.mmd3-label { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--ink); }
.mmd3-help { font-size: 14.5px; color: var(--muted); margin-bottom: 12px; max-width: 38ch; }
.mmd3-note { margin-top: 22px; font-size: 14px; color: var(--muted); }
.mmd3-fine { margin-top: 10px; font-size: 13.5px; color: var(--muted); text-align: center; }
.mmd3-fine.is-error { color: var(--error); }
.mmd3-warn {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 14.5px;
}

.mmd3-row { display: flex; gap: 10px; margin-top: 12px; }
.mmd3-row > .mmd3-btn { flex: 1 1 0; }
.mmd3-row-end { justify-content: flex-end; margin-top: 26px; }
.mmd3-row-split { justify-content: space-between; margin-top: 22px; }

/* Knapper */
.mmd3 .mmd3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.mmd3 .mmd3-btn-lg { min-height: 52px; font-size: 16px; }
.mmd3 .mmd3-btn-block { width: 100%; }
.mmd3 .mmd3-btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.mmd3 .mmd3-btn-primary:hover { background: #343a42; border-color: #343a42; color: #fff; }
.mmd3 .mmd3-btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.mmd3 .mmd3-btn-secondary:hover { background: var(--tint); color: var(--ink); }
.mmd3 .mmd3-btn-ghost { background: transparent; color: var(--ink); border-color: transparent; padding: 0 10px; }
.mmd3 .mmd3-btn-ghost:hover { background: var(--tint); }
.mmd3 .mmd3-btn:disabled,
.mmd3 .mmd3-btn:disabled:hover { background: #cfd1d4; border-color: #cfd1d4; color: #fff; cursor: not-allowed; }

.mmd3-icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.mmd3-icon svg { width: 100%; height: 100%; display: block; }

.mmd3 .mmd3-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.mmd3 .mmd3-link:hover { color: var(--ink); text-decoration-color: var(--ink); background: transparent; }
.mmd3 .mmd3-link .mmd3-icon { width: 16px; height: 16px; }

.mmd3 .mmd3-chip {
  margin-left: auto;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.mmd3 .mmd3-chip:hover { background: var(--tint); }

/* Felter */
.mmd3 .mmd3-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 17px;
  color: var(--ink);
  transition: border-color .15s ease;
}
.mmd3 .mmd3-input:hover { border-color: #bfbab2; }
.mmd3 .mmd3-input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(31, 35, 40, .08); }
.mmd3 .mmd3-textarea { min-height: 96px; resize: vertical; line-height: 1.4; }

/* Skyder */
.mmd3 .mmd3-range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 28px;
  background: transparent;
  border: 0;
  padding: 0;
  --p: 50%;
}
.mmd3 .mmd3-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--ink) var(--p), #e3e0da var(--p));
}
.mmd3 .mmd3-range::-moz-range-track { height: 4px; border-radius: 4px; background: #e3e0da; }
.mmd3 .mmd3-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ink); }
.mmd3 .mmd3-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--ink);
  box-shadow: 0 1px 4px rgba(20, 24, 28, .18);
}
.mmd3 .mmd3-range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--ink);
}

/* Farver */
.mmd3-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.mmd3 .mmd3-swatch {
  width: 32px; height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .12);
  background: var(--c);
  transition: box-shadow .15s ease;
}
.mmd3 .mmd3-swatch:hover { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line-strong); }
.mmd3 .mmd3-swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }

/* Skrifttyper */
.mmd3-fonts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mmd3 .mmd3-font {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 70px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, background-color .15s ease;
}
.mmd3 .mmd3-font:hover { border-color: var(--line-strong); background: var(--tint); }
.mmd3 .mmd3-font.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.mmd3-font-sample { font-size: 22px; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmd3-font-name { font-size: 12.5px; color: var(--muted); }

/* Foto */
.mmd3-photo-card {
  position: relative;
  height: 210px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    repeating-conic-gradient(#f2f1ee 0 25%, #fbfaf8 0 50%) 0 0 / 18px 18px;
  overflow: hidden;
}
.mmd3-heading + .mmd3-photo-card, .mmd3-group + .mmd3-photo-card { margin-top: 18px; }
.mmd3-photo-card img {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
}
.mmd3 .mmd3-round-btn {
  position: absolute;
  top: 10px; right: 10px;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  padding: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 8px rgba(20, 24, 28, .22);
}
.mmd3 .mmd3-round-btn:hover { background: #343a42; }
.mmd3 .mmd3-round-btn svg { width: 100%; height: 100%; }
.mmd3-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.mmd3-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 12px;
  border-radius: var(--r-md);
  background: var(--ok-bg);
  font-size: 15px;
  font-weight: 600;
}
.mmd3-ok {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  padding: 4px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  flex: none;
}
.mmd3-ok svg { width: 100%; height: 100%; }

.mmd3-effects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mmd3 .mmd3-effect {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}
.mmd3-effect-thumb {
  display: block;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ecebe8;
  overflow: hidden;
  transition: box-shadow .15s ease;
}
.mmd3-effect-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mmd3 .mmd3-effect:hover .mmd3-effect-thumb { box-shadow: 0 0 0 1px var(--line-strong); }
.mmd3 .mmd3-effect.is-active .mmd3-effect-thumb { box-shadow: 0 0 0 2px var(--ink); border-color: transparent; }
.mmd3 .mmd3-effect.is-active { color: var(--ink); }
.mmd3-effect-label { text-align: center; }

/* Motiver */
.mmd3-motifs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mmd3 .mmd3-motif {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 88px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink-soft);
  transition: border-color .15s ease, background-color .15s ease;
}
.mmd3 .mmd3-motif:hover { border-color: var(--line-strong); background: var(--tint); }
.mmd3 .mmd3-motif.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); background: #fff; }
.mmd3-motif-thumb { display: grid; place-items: center; width: 36px; height: 36px; }
.mmd3-motif-thumb img { width: 34px; height: 34px; object-fit: contain; opacity: .9; }
.mmd3-motif-name { font-size: 13px; font-weight: 600; text-align: center; line-height: 1.2; }

/* Opsummering */
.mmd3-summary { margin-top: 20px; border-top: 1px solid var(--line); }
.mmd3-summary-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mmd3-summary-row dt { font-size: 14px; color: var(--muted); }
.mmd3-summary-row dd { font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.mmd3-summary-row.is-warn dd { color: var(--warn); }

/* Bestilling */
.mmd3-order { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mmd3-order-product { flex: 1 1 140px; min-width: 0; }
.mmd3-order-name { font-size: 14.5px; color: var(--muted); }
.mmd3-order-price { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.mmd3-order > .mmd3-btn { flex: 1 1 170px; }
.mmd3-order > .mmd3-fine { flex-basis: 100%; margin-top: 0; }
.mmd3-order.is-large { display: block; margin-top: 22px; }
.mmd3-order.is-large .mmd3-order-product {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
}
.mmd3-confirm {
  flex-basis: 100%;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 14.5px;
}
.mmd3-confirm .mmd3-row { margin-top: 10px; }

.mmd3-fatal { padding: 28px; }
.mmd3-fatal p { margin-top: 6px; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Scene med stenen                                                    */
/* ------------------------------------------------------------------ */

.mmd3-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 72px 28px 44px;
  /* Følger lyssætningen i stenfotoet (mørkere venstre/bund, lysere højre), så fotoets
     bløde kanter glider umærkeligt over i scenen. */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06) 0%, rgba(0, 0, 0, .05) 100%),
    linear-gradient(90deg, #cdccca 0%, #d7d6d4 38%, #e0dfdd 70%, #e4e3e2 100%);
  overflow: hidden;
}

.mmd3-frame { position: relative; flex: none; width: 0; height: 0; }

.mmd3-stone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  pointer-events: none;
  /* Bløde kanter på selve fotoet, så det går i ét med scenen. Stenen berøres ikke. */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 8.5%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 7.5%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 8.5%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 7.5%, #000 93%, transparent 100%);
  mask-composite: intersect;
}

.mmd3-canvas-wrap { position: absolute; inset: 0; }
.mmd3-canvas-wrap canvas { display: block; }

.mmd3-toolbar {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 2px rgba(20, 24, 28, .06), 0 6px 20px rgba(20, 24, 28, .08);
}
.mmd3 .mmd3-tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.mmd3 .mmd3-tool:hover { background: var(--tint); }
.mmd3 .mmd3-tool:disabled { color: #b4b7bb; background: transparent; cursor: default; }
.mmd3-tool .mmd3-icon { width: 17px; height: 17px; }

.mmd3-popover {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  width: 250px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 12px 40px rgba(20, 24, 28, .18);
}
.mmd3-popover-title { font-weight: 700; font-size: 16px; }
.mmd3-popover-text { font-size: 14px; color: var(--muted); margin: 2px 0 12px; }
.mmd3-popover .mmd3-btn + .mmd3-btn { margin-top: 8px; }
.mmd3 .mmd3-popover-cancel { display: block; margin: 8px auto 0; }

.mmd3-busy {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  background: rgba(228, 227, 224, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.mmd3-busy[hidden] { display: none; }
.mmd3-busy-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(20, 24, 28, .14);
  font-size: 15px;
  font-weight: 600;
}
.mmd3-spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #e2dfd9;
  border-top-color: var(--ink);
  animation: mmd3-spin .8s linear infinite;
}
@keyframes mmd3-spin { to { transform: rotate(360deg); } }

.mmd3-toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 8;
  max-width: min(440px, calc(100% - 32px));
  padding: 11px 16px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  font-size: 14.5px;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.mmd3-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.mmd3-toast.is-error { background: var(--error); }

.mmd3-hint {
  position: absolute;
  bottom: 16px;
  left: 0; right: 0;
  text-align: center;
  font-size: 13.5px;
  color: #6b6e73;
  pointer-events: none;
}

/* Skjul designeren indtil motoren er klar (undgår layout-hop). */
.mmd3:not(.is-ready) .mmd3-canvas-wrap { visibility: hidden; }

/* ------------------------------------------------------------------ */
/* Mobil: guidet trin-flow, preview øverst                             */
/* ------------------------------------------------------------------ */

.mmd3[data-mode="mobile"] .mmd3-app {
  display: flex;
  flex-direction: column;
  height: auto;
  border-radius: 16px;
  overflow: visible;
}
.mmd3[data-mode="mobile"] .mmd3-stage {
  order: -1;
  position: sticky;
  top: var(--mmd3-sticky-top, 0px);
  z-index: 5;
  height: min(calc(100vw * .9), 56vh);
  padding: 46px 0 0;
  border-radius: 16px 16px 0 0;
}
.mmd3[data-mode="mobile"] .mmd3-toolbar { top: 6px; padding: 3px; }
.mmd3[data-mode="mobile"] .mmd3-tool { height: 34px; padding: 0 10px; }
.mmd3[data-mode="mobile"] .mmd3-tool-label { display: none; }
.mmd3[data-mode="mobile"] .mmd3-hint { display: none; }
.mmd3[data-mode="mobile"] .mmd3-popover { top: 52px; }
.mmd3[data-mode="mobile"] .mmd3-panel { border-right: 0; border-radius: 0 0 16px 16px; }
.mmd3[data-mode="mobile"] .mmd3-head { display: none; }
.mmd3[data-mode="mobile"] .mmd3-foot { display: none; }
.mmd3[data-mode="mobile"] .mmd3-body { overflow: visible; padding: 22px 18px 0; }

.mmd3-steps {
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 12px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.mmd3-steps::-webkit-scrollbar { display: none; }
.mmd3-step { flex: 1 0 auto; margin: 0; }
.mmd3 .mmd3-step button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 48px;
  padding: 2px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.mmd3-step-num {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}
.mmd3-step.is-done .mmd3-step-num { border-color: #c9c5bd; background: var(--tint); color: var(--ink-soft); }
.mmd3-step.is-active button { color: var(--ink); }
.mmd3-step.is-active .mmd3-step-num { background: var(--ink); border-color: var(--ink); color: #fff; }

.mmd3-mnav {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 26px -18px 0;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
}
.mmd3-mnav-right { display: flex; align-items: center; gap: 14px; }
.mmd3-mnav .mmd3-btn-primary { min-width: 120px; }

.mmd3.is-breakout[data-mode="mobile"] .mmd3-app { border-radius: 0; border-left: 0; border-right: 0; }
.mmd3.is-breakout[data-mode="mobile"] .mmd3-stage { border-radius: 0; }
.mmd3.is-breakout[data-mode="mobile"] .mmd3-panel { border-radius: 0; }
.mmd3.is-breakout[data-mode="mobile"] .mmd3-mnav { border-radius: 0; }

@media (prefers-reduced-motion: reduce) {
  .mmd3 *, .mmd3 *::before, .mmd3 *::after { transition: none !important; animation-duration: .001ms !important; }
}

.mmd3-step::marker { content: '' !important; }

/* v1.1.4 - valg af lys/sort hjertesten */
.mmd3-stone-colors{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mmd3-stone-color{appearance:none;border:1px solid #dedbd6;background:#fff;border-radius:10px;padding:11px 12px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer;color:inherit;font:inherit;transition:border-color .15s,box-shadow .15s}
.mmd3-stone-color:hover{border-color:#aaa49c}
.mmd3-stone-color.is-active{border-color:#292724;box-shadow:0 0 0 1px #292724}
.mmd3-stone-color:disabled{opacity:.45;cursor:not-allowed}
.mmd3-stone-color-dot{width:28px;height:28px;border-radius:50%;flex:0 0 28px;border:1px solid #cfcac2;box-shadow:inset 0 0 0 2px rgba(255,255,255,.55)}
.mmd3-stone-color-dot.is-light{background:#e9e5dc}
.mmd3-stone-color-dot.is-black{background:#202020;border-color:#202020}
.mmd3-stone-color-copy{display:flex;flex-direction:column;line-height:1.2;gap:3px}
.mmd3-stone-color-copy strong{font-size:14px;font-weight:650}
.mmd3-stone-color-copy small{font-size:12px;color:#6f6a64}


/* v1.3.1 - billedbeskæring */
.mmd3-crop-overlay{position:fixed;inset:0;z-index:100000;background:rgba(20,19,18,.72);display:flex;align-items:center;justify-content:center;padding:20px}
.mmd3-crop-modal{width:min(560px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:16px;padding:18px;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.mmd3-crop-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.mmd3-crop-head strong{font-size:20px}.mmd3-crop-head p{margin:4px 0 0;color:#6f6a64;font-size:14px}
.mmd3-crop-viewport{position:relative;width:100%;aspect-ratio:1/1;overflow:hidden;background:#eee;cursor:grab;touch-action:none;user-select:none;border-radius:10px}
.mmd3-crop-viewport:active{cursor:grabbing}.mmd3-crop-image{position:absolute;left:50%;top:50%;max-width:none!important;max-height:none!important;pointer-events:none;transform-origin:center center}
.mmd3-crop-viewport:after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 2px rgba(255,255,255,.9)}
.mmd3-crop-zoom{width:100%;height:28px;margin:4px 0 2px;appearance:none;-webkit-appearance:none;background:transparent;cursor:pointer}.mmd3-crop-zoom::-webkit-slider-runnable-track{height:8px;background:#d1d5db;border:1px solid #b8bec6;border-radius:999px}.mmd3-crop-zoom::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:22px;height:22px;margin-top:-8px;border-radius:50%;background:#1677ff;border:3px solid #fff;box-shadow:0 0 0 1px #1677ff,0 1px 3px rgba(0,0,0,.2)}.mmd3-crop-zoom::-moz-range-track{height:8px;background:#d1d5db;border:1px solid #b8bec6;border-radius:999px}.mmd3-crop-zoom::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#1677ff;border:3px solid #fff;box-shadow:0 0 0 1px #1677ff,0 1px 3px rgba(0,0,0,.2)}.mmd3-crop-zoom:focus-visible{outline:2px solid #1677ff;outline-offset:3px}.mmd3-crop-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
@media(max-width:600px){.mmd3-crop-overlay{padding:0;align-items:flex-end}.mmd3-crop-modal{border-radius:16px 16px 0 0;max-height:94vh}.mmd3-crop-actions{position:sticky;bottom:-18px;background:#fff;padding:12px 0 18px}.mmd3-crop-actions .mmd3-btn{flex:1}}

/* v1.4.20 - admin-værktøjer (vises kun, når serveren har bekræftet manage_woocommerce) */
.mmd3-admin-tools { box-sizing: border-box; margin: 14px auto 0; max-width: 1440px; padding: 12px 16px; border: 1px dashed #b8952f; border-radius: 10px; background: #fffbea; color: #3a342b; font-size: 14px; line-height: 1.45; }
.mmd3-admin-tools__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mmd3-admin-tools__badge { padding: 1px 8px; border-radius: 9px; background: #f0e6c0; font-size: 11px; font-weight: 600; color: #5c4a00; }
.mmd3-admin-tools__ctx { margin: 4px 0 10px; color: #6d6862; }
.mmd3-admin-tools__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mmd3-admin-btn { appearance: none; cursor: pointer; min-height: 38px; padding: 8px 14px; border: 1px solid #b8952f; border-radius: 8px; background: #fff; color: #292725; font: inherit; font-weight: 600; }
.mmd3-admin-btn--primary { background: #f6e9a9; }
.mmd3-admin-btn[disabled] { opacity: .55; cursor: default; }
.mmd3-admin-tools__link { margin-left: auto; color: #292725; font-size: 13px; text-decoration: underline; }
.mmd3-admin-tools__status { margin: 8px 0 0; min-height: 1em; color: #1f4d2d; }
.mmd3-admin-tools__status.is-error, .mmd3-admin-tools__warn { color: #b32d2e; }
.mmd3-admin-tools__warn { margin: 8px 0 0; font-weight: 600; }
.mmd3.mmd3-is-admin-editor .mmd3-order { display: none !important; }

/* 1.4.25 - foto-effekter der ikke kan UV-printes på den valgte sten (udtoning på mørk sten) */
.mmd3 .mmd3-effect.is-disabled { cursor: not-allowed; color: var(--muted, #72767e); }
.mmd3 .mmd3-effect.is-disabled .mmd3-effect-thumb { position: relative; box-shadow: none; }
.mmd3 .mmd3-effect.is-disabled .mmd3-effect-thumb img { opacity: .3; filter: grayscale(1); }
.mmd3 .mmd3-effect.is-disabled:hover .mmd3-effect-thumb { box-shadow: none; }
.mmd3-effect-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 4px; text-align: center; font-size: 11px; line-height: 1.2; font-weight: 600; color: #3a342b; }

/* 1.4.26: gennemsigtighed spærret på mørk sten */
.mmd3-range-disabled { opacity: .4; pointer-events: none; }
.mmd3-range-disabled .mmd3-range { cursor: not-allowed; }

/* 1.4.28: valg af stenform (hjerte / rund) - samme knapper som stenfarve */
.mmd3-shapes{margin-bottom:2px}
.mmd3-shape-icon{width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;color:#bdb5a8}
.mmd3-shape-icon svg{width:26px;height:26px;display:block}
.mmd3-shape-icon.is-black{color:#2a2a2a}
.mmd3-shape.is-active .mmd3-shape-icon{color:#8f8576}
.mmd3-shape.is-active .mmd3-shape-icon.is-black{color:#151515}

/* 1.4.29 - beskeder kan lukkes / foto i cirkel */
.mmd3-toast{display:flex;align-items:flex-start;gap:10px;padding-right:8px}
.mmd3-toast.is-visible{pointer-events:auto}
.mmd3-toast-text{flex:1 1 auto}
.mmd3-toast-close{appearance:none;flex:0 0 26px;width:26px;height:26px;margin:-3px 0 -3px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;cursor:pointer;display:grid;place-items:center}
.mmd3-toast-close:hover,.mmd3-toast-close:focus-visible{background:rgba(255,255,255,.28)}
.mmd3-toast-close svg{width:14px;height:14px;display:block}
.mmd3-crop-viewport.is-circle:after{border-radius:50%;box-shadow:0 0 0 2px rgba(255,255,255,.95),0 0 0 999px rgba(20,18,16,.45)}

.mmd3-frame-editor{display:flex;flex-direction:column;align-items:center;gap:10px;margin-top:12px}
.mmd3-frame-pos{position:relative;width:min(220px,70%);aspect-ratio:1/1;border-radius:50%;overflow:hidden;cursor:grab;touch-action:none;user-select:none;background:#e9e5dc;box-shadow:0 0 0 1px #dedbd6,0 2px 10px rgba(0,0,0,.08)}
.mmd3-frame-pos.is-dragging{cursor:grabbing}
.mmd3-frame-pos-img{position:absolute;max-width:none!important;max-height:none!important;pointer-events:none}
.mmd3-frame-zoom{display:flex;align-items:center;gap:10px;width:100%}
.mmd3-frame-zoom .mmd3-range{flex:1 1 auto}

/* 1.4.33 - advarsel når tekst/motiv går ud over stenens kant */
.mmd3-order .mmd3-edge-warn{margin:8px 0 0;font-size:13px;line-height:1.35;padding:8px 10px}

/* 1.4.39: centrering */
.mmd3 .mmd3-align { display: flex; gap: 8px; flex-wrap: wrap; }
.mmd3 .mmd3-align > .mmd3-btn { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; font-size: 14px; }
.mmd3 .mmd3-align-select { width: 100%; margin-top: 8px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }

/* 1.6.0: Forbedr billedet (AI) */
.mmd3-enhance-hint{color:#8a5a00}
.mmd3-compare-overlay{max-width:none;margin:0}
.mmd3-compare-modal{width:min(860px,100%)}
.mmd3-compare{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.mmd3-compare-card{margin:0;display:flex;flex-direction:column;gap:10px;min-width:0}
.mmd3-compare-img{aspect-ratio:1/1;border-radius:10px;overflow:hidden;background:repeating-conic-gradient(#f1f0ee 0 25%,#fff 0 50%) 0 0/20px 20px;display:flex;align-items:center;justify-content:center}
.mmd3-compare-img img{width:100%;height:100%;object-fit:contain;display:block}
.mmd3-compare-card figcaption{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.mmd3-compare-card figcaption strong{font-size:16px}.mmd3-compare-card figcaption small{color:#6f6a64;font-size:12px}
.mmd3-compare-modal .mmd3-fine{margin:14px 0 0}
@media(max-width:600px){.mmd3-compare{grid-template-columns:1fr 1fr;gap:10px}.mmd3-compare-card .mmd3-btn{font-size:14px;padding-left:8px;padding-right:8px}}

/* ------------------------------------------------------------------ */
/* 1.7.0: holder til hjertestenen                                      */
/* ------------------------------------------------------------------ */
.mmd3-holder{flex-basis:100%;margin:0 0 4px}
.mmd3-order.is-large .mmd3-holder{margin:0 0 16px}
.mmd3-holder .mmd3-label{margin-bottom:2px}
.mmd3-holder-tagline{margin:0 0 8px;font-size:13px;color:var(--muted)}
.mmd3-holder-options{display:flex;flex-direction:column;gap:6px}
.mmd3 .mmd3-holder-option{appearance:none;border:1px solid #dedbd6;background:#fff;border-radius:10px;padding:6px 10px 6px 6px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer;color:inherit;font:inherit;min-width:0;width:100%;transition:border-color .15s,box-shadow .15s}
.mmd3 .mmd3-holder-option:hover{border-color:#aaa49c}
.mmd3 .mmd3-holder-option.is-active{border-color:#292724;box-shadow:0 0 0 1px #292724}
.mmd3 .mmd3-holder-option:disabled{opacity:.5;cursor:not-allowed}
.mmd3-holder-thumb{width:44px;height:44px;flex:0 0 44px;border-radius:8px;object-fit:cover;background:#f1efeb;display:flex;align-items:center;justify-content:center;color:#8a847c}
.mmd3-holder-thumb.is-none svg{width:18px;height:18px}
.mmd3-holder-copy{display:flex;align-items:center;justify-content:space-between;gap:10px;line-height:1.25;min-width:0;flex:1 1 auto}
.mmd3-holder-copy strong{font-size:13.5px;font-weight:600}
.mmd3-holder-copy small{font-size:12.5px;color:#6f6a64;white-space:nowrap}
.mmd3-holder-test{font-size:12px;font-weight:400;color:var(--warn)}
.mmd3 .mmd3-holder-show{margin-top:6px}
.mmd3-order-holder{font-size:12.5px;color:var(--muted);margin-top:2px}
.mmd3[data-mode="desktop"] .mmd3-foot .mmd3-holder-thumb{width:30px;height:30px;flex-basis:30px;border-radius:6px}
.mmd3[data-mode="desktop"] .mmd3-foot .mmd3-holder-options{gap:4px}
.mmd3[data-mode="desktop"] .mmd3-foot .mmd3-holder-option{padding:4px 10px 4px 4px}
.mmd3[data-mode="desktop"] .mmd3-foot .mmd3-holder-tagline{display:none}
.mmd3-holder-view{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:72px 28px 28px;background:inherit}
.mmd3-holder-img{display:block;max-width:100%;max-height:calc(100% - 90px);width:auto;height:auto;object-fit:contain;filter:drop-shadow(0 10px 18px rgba(0,0,0,.18));transition:opacity .2s}
.mmd3-holder-img.is-loading{opacity:.35}
.mmd3-holder-img:not([src]){display:none}
.mmd3-holder-status{margin:0;font-size:13px;color:#4f4a44;text-align:center}
.mmd3[data-mode="mobile"] .mmd3-holder-view{padding:44px 12px 10px;gap:6px}
.mmd3[data-mode="mobile"] .mmd3-holder-img{max-height:calc(100% - 44px)}
.mmd3[data-mode="mobile"] .mmd3-holder-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.mmd3[data-mode="mobile"] .mmd3-holder-edit{min-height:34px;padding:6px 14px;font-size:13.5px}
.mmd3.is-holder-view .mmd3-hint{visibility:hidden}
