/* Konstrukce — Car Wash 3D configurator
   Loaded only on /konfigurator. */

.cfg-page {
  --cfg-bg: #e9ebee;
  --cfg-ink: #1a1d22;
  --cfg-muted: #6a7280;
  --cfg-line: rgba(0, 0, 0, 0.08);
  --cfg-accent: #2632d9;
  --cfg-panel: rgba(255, 255, 255, 0.92);
}

.cfg-wrap {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;
}

.cfg-stage-wrap {
  position: relative;
  width: 100%;
  height: min(78vh, 820px);
  background: var(--cfg-bg);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--cfg-line);
}

#stage {
  position: absolute;
  inset: 0;
}

#stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.cfg-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--cfg-bg);
  z-index: 5;
  transition: opacity 0.4s;
}

.cfg-loader.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.cfg-loader .spin {
  width: 30px;
  height: 30px;
  border: 2px solid var(--cfg-line);
  border-top-color: var(--cfg-accent);
  border-radius: 50%;
  animation: cfg-spin 0.9s linear infinite;
}

@keyframes cfg-spin {
  to {
    transform: rotate(360deg);
  }
}

.cfg-hud {
  position: absolute;
  left: 18px;
  top: 16px;
  z-index: 4;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cfg-ink);
  user-select: none;
  pointer-events: none;
}

.cfg-hud .title {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: none;
}

.cfg-hud .sub {
  color: var(--cfg-muted);
  margin-top: 4px;
  font-size: 10px;
}

.cfg-hud .accent {
  color: var(--cfg-accent);
}

.cfg-legend {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 4;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--cfg-line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--cfg-muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  line-height: 1.6;
  pointer-events: none;
}

.cfg-legend kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--cfg-line);
  border-radius: 3px;
  background: #fff;
  color: var(--cfg-ink);
  font-size: 10px;
}

/* Panel */

.cfg-panel {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 6;
  width: 300px;
  max-height: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  background: var(--cfg-panel);
  color: var(--cfg-ink);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  font: 12px/1.4 ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.cfg-panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--cfg-line);
}

.cfg-panel-hd b {
  font-size: 13px;
  font-weight: 600;
}

.cfg-panel-hd .cfg-toggle-btn {
  background: transparent;
  border: 0;
  color: var(--cfg-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
}

.cfg-panel-body {
  padding: 4px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.cfg-panel.collapsed .cfg-panel-body,
.cfg-panel.collapsed .cfg-panel-cta {
  display: none;
}

.cfg-section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(26, 29, 34, 0.5);
  padding: 10px 0 0;
}

.cfg-section:first-child {
  padding-top: 4px;
}

.cfg-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cfg-row.inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cfg-lbl {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: rgba(26, 29, 34, 0.75);
  font-weight: 500;
}

.cfg-val {
  color: rgba(26, 29, 34, 0.5);
  font-variant-numeric: tabular-nums;
}

.cfg-row input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  margin: 6px 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  outline: none;
}

.cfg-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.cfg-row input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.cfg-row input[type="text"] {
  appearance: none;
  width: 100%;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 7px;
  background: #fff;
  color: inherit;
  font: inherit;
  outline: none;
}

.cfg-row input[type="text"]:focus {
  border-color: var(--cfg-accent);
}

.cfg-row input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 56px;
  height: 24px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.cfg-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.cfg-row input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 5.5px;
}

.cfg-toggle {
  position: relative;
  width: 34px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  transition: background 0.15s;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.cfg-toggle[data-on="1"] {
  background: var(--cfg-accent);
}

.cfg-toggle i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}

.cfg-toggle[data-on="1"] i {
  transform: translateX(14px);
}

.cfg-seg {
  display: flex;
  padding: 2px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  user-select: none;
}

.cfg-seg button {
  appearance: none;
  flex: 1;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  min-height: 24px;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px 6px;
}

.cfg-seg button[aria-checked="true"] {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* Two-row grid variant for the background preset picker (6 options). */
.cfg-seg.cfg-seg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.cfg-seg.cfg-seg-grid button {
  flex: none;
  font-size: 11px;
}

/* ─────────────────────────────── Tabs ─────────────────────────────── */
.cfg-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 6px 6px 0;
  border-bottom: 1px solid var(--cfg-line);
  flex-shrink: 0;
}
.cfg-tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 4px 7px;
  border-radius: 6px 6px 0 0;
  color: var(--cfg-muted);
  font-size: 9.5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  line-height: 1.1;
  text-align: center;
}
.cfg-tabs button i.fas {
  font-size: 14px;
}
.cfg-tabs button span {
  display: block;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
}
.cfg-tabs button:hover {
  color: var(--cfg-ink);
}
.cfg-tabs button[aria-selected="true"] {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}
.cfg-tab-pane[hidden] { display: none; }
.cfg-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Cleaning-zone chip list (used inside each island card) */
.cz-chiplist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}
.cz-chiplist:empty::before {
  content: attr(data-empty);
  display: block;
  font-size: 11px;
  color: rgba(26, 29, 34, 0.5);
  padding: 4px 6px;
}
.cz-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--cfg-ink);
  white-space: nowrap;
}
.cz-chip i.fas {
  color: #3b82f6;
  font-size: 11px;
}
.cz-chip-remove {
  appearance: none;
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  color: var(--cfg-muted);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cz-chip-remove:hover { background: #fee2e2; color: #b91c1c; }

/* Island cards & editor */
.cz-islands {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cz-empty-hint {
  font-size: 11px;
  color: rgba(26, 29, 34, 0.55);
  padding: 10px;
  text-align: center;
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}
.cz-island {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 9px;
}
.cz-island-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.cz-island-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--cfg-ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cz-island-del {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--cfg-muted);
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.cz-island-del:hover { background: #fee2e2; color: #b91c1c; }
.cz-island-addrow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 2px;
}
.cz-machine-add {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  border-radius: 6px;
  width: 100%;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--cfg-ink);
}
.cz-machine-add i.fas { color: #3b82f6; font-size: 12px; }
.cz-machine-add:hover:not(:disabled) {
  border-color: #3b82f6;
  background: #eff6ff;
}
.cz-machine-add:disabled,
.cz-machine-add[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}
.cz-island-full-hint {
  font-size: 10px;
  color: var(--cfg-muted);
  text-align: center;
}
.cz-add-island-btn {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 34px;
  margin-top: 4px;
  border: 1px dashed rgba(59, 130, 246, 0.5);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.06);
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.cz-add-island-btn:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: #3b82f6;
}
.cz-add-island-btn i.fas { font-size: 11px; }

[data-cz-controls][hidden] { display: none; }
[data-requires][hidden] { display: none; }

.cfg-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--cfg-ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.cfg-file-btn:hover {
  border-color: var(--cfg-accent);
}

.cfg-file-btn.has-file {
  border-style: solid;
  border-color: var(--cfg-accent);
  color: var(--cfg-accent);
}

.cfg-logo-preview {
  margin-top: 6px;
  padding: 6px;
  background: #fff;
  border-radius: 6px;
  display: flex;
  justify-content: center;
}

.cfg-logo-preview img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
}

.cfg-logo-clear {
  margin-top: 4px;
  width: 100%;
  background: transparent;
  border: 0;
  color: #b91c1c;
  font-size: 11px;
  cursor: pointer;
  padding: 2px;
}

.cfg-panel-cta {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--cfg-line);
}

.cfg-cta-btn {
  position: relative;
  display: block;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #3b82f6;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.30);
  transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
  animation: cfg-cta-pulse 2.2s ease-in-out infinite;
}

.cfg-cta-btn:hover {
  background: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  animation-play-state: paused;
}

.cfg-cta-btn:active {
  transform: translateY(1px);
}

@keyframes cfg-cta-pulse {
  0%   { box-shadow: 0 6px 16px rgba(59, 130, 246, 0.30), 0 0 0 0 rgba(59, 130, 246, 0.55); }
  60%  { box-shadow: 0 6px 16px rgba(59, 130, 246, 0.30), 0 0 0 14px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 6px 16px rgba(59, 130, 246, 0.30), 0 0 0 0 rgba(59, 130, 246, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .cfg-cta-btn { animation: none; }
}

/* Modal */

.cfg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.cfg-modal-backdrop.open {
  display: flex;
}

.cfg-modal {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Wide modal variant — used by the configurator inquiry to match the
   contact-page form layout (two-column on desktop). */
.cfg-modal-wide {
  max-width: 880px;
}
@media (min-width: 1280px) {
  .cfg-modal-wide {
    max-width: 1040px;
  }
}

.cfg-modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cfg-line);
}

.cfg-modal-hd h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.cfg-modal-close {
  background: transparent;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: var(--cfg-muted);
  padding: 0 6px;
}

.cfg-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cfg-modal-body label {
  font-size: 13px;
  color: var(--cfg-ink);
}

.cfg-modal-body label > span.text-red-500 {
  font-weight: 600;
}

.cfg-modal-body input,
.cfg-modal-body textarea {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  outline: none;
  background: #fff;
}

.cfg-modal-body input:focus,
.cfg-modal-body textarea:focus {
  border-color: var(--cfg-accent);
}

.cfg-modal-body textarea {
  min-height: 90px;
  resize: vertical;
}

.cfg-modal-foot {
  padding: 14px 20px 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--cfg-line);
}

.cfg-btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}

.cfg-btn-secondary {
  background: rgba(0, 0, 0, 0.06);
  color: var(--cfg-ink);
}

.cfg-btn-primary {
  background: var(--cfg-accent);
  color: #fff;
}

.cfg-btn-primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.cfg-msg {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0;
}

.cfg-msg.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.cfg-msg.success {
  background: #f0fdf4;
  color: #14532d;
  border: 1px solid #bbf7d0;
}

.cfg-summary-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.cfg-summary-title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.cfg-summary {
  margin-top: 4px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  color: #334155;
  max-height: 180px;
  overflow-y: auto;
}

.cfg-summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  margin: 0;
}

.cfg-summary dt {
  color: var(--cfg-muted);
}

.cfg-summary dd {
  margin: 0;
  font-weight: 500;
  color: var(--cfg-ink);
}

.cfg-summary .swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  margin-right: 6px;
  vertical-align: middle;
}

/* ─────────────────────────── SEO content section ─────────────────────── */
.cfg-seo {
  background: #fff;
  padding: 56px 16px 64px;
  border-top: 1px solid #e2e8f0;
  margin-top: 28px;
}
.cfg-seo-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.cfg-seo-intro {
  text-align: center;
  margin-bottom: 44px;
}
.cfg-seo-intro h2 {
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 14px;
  line-height: 1.2;
}
.cfg-seo-intro p {
  font-size: 17px;
  color: #475569;
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.6;
}
.cfg-seo-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}
.cfg-seo-step {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  position: relative;
}
.cfg-seo-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}
.cfg-seo-step h3 {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 8px;
}
.cfg-seo-step p {
  font-size: 14px;
  color: #475569;
  line-height: 1.55;
  margin: 0;
}

.cfg-seo-h2 {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px;
}

.cfg-seo-feats {
  list-style: none;
  padding: 0;
  margin: 0 0 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
}
.cfg-seo-feats li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: #334155;
  line-height: 1.55;
}
.cfg-seo-feats i.fas {
  color: #3b82f6;
  margin-top: 4px;
  flex-shrink: 0;
}
.cfg-seo-feats strong { color: #0f172a; }

.cfg-seo-cta {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border-radius: 18px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.25);
}
.cfg-seo-cta h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
}
.cfg-seo-cta p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 720px;
  margin: 0 auto 22px;
  line-height: 1.55;
}
.cfg-seo-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #1d4ed8;
  border: 0;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s, box-shadow 0.15s;
}
.cfg-seo-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.20);
}
.cfg-seo-cta-btn:active { transform: translateY(0); }

@media (max-width: 800px) {
  .cfg-seo { padding: 40px 12px 48px; }
  .cfg-seo-intro h2 { font-size: 24px; }
  .cfg-seo-intro p { font-size: 15px; }
  .cfg-seo-steps {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 36px;
  }
  .cfg-seo-h2 { font-size: 22px; }
  .cfg-seo-feats {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 36px;
  }
  .cfg-seo-cta { padding: 28px 20px; }
  .cfg-seo-cta h2 { font-size: 22px; }
  .cfg-seo-cta p { font-size: 14px; }
  .cfg-seo-cta-btn { padding: 12px 22px; font-size: 15px; }
}

/* Mobile bar (hidden on desktop) */
.cfg-mobile-bar { display: none; }
.cfg-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* ─────────────────────────── MOBILE OPTIMISATION ─────────────────────────── */
@media (max-width: 900px) {
  .cfg-wrap {
    padding: 8px 8px 0;
  }

  /* Stage fills the available viewport so user gets a real preview */
  .cfg-stage-wrap {
    border-radius: 12px;
    height: calc(100vh - 220px);
    height: calc(100dvh - 220px);
    min-height: 340px;
    max-height: none;
  }

  .cfg-hud { display: none; }
  .cfg-legend { display: none; }

  /* Panel becomes a bottom-sheet drawer that slides up */
  .cfg-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    margin: 0;
    border-radius: 18px 18px 0 0;
    border: 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
    max-height: 82vh;
    max-height: 82dvh;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.16, 1);
    z-index: 1100;
  }

  .cfg-panel.open {
    transform: translateY(0);
  }

  /* Drag handle visual on mobile */
  .cfg-panel-hd {
    position: relative;
    padding: 14px 18px 12px;
  }
  .cfg-panel-hd::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
  }
  .cfg-panel-hd b {
    font-size: 15px;
  }
  .cfg-panel-hd .cfg-toggle-btn {
    font-size: 22px;
    line-height: 1;
    padding: 4px 10px;
    color: var(--cfg-ink);
  }

  .cfg-panel-body {
    padding: 6px 16px 14px;
    gap: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .cfg-section {
    font-size: 11px;
    padding-top: 14px;
  }

  /* Larger labels and rows for fingers */
  .cfg-row { gap: 8px; }
  .cfg-row.inline { gap: 14px; min-height: 44px; }
  .cfg-lbl { font-size: 14px; }
  .cfg-val { font-size: 14px; }

  /* Toggle: bigger, easier to hit */
  .cfg-toggle {
    width: 50px;
    height: 30px;
  }
  .cfg-toggle i {
    width: 26px;
    height: 26px;
  }
  .cfg-toggle[data-on="1"] i {
    transform: translateX(20px);
  }

  /* Segmented buttons: roomy tap targets */
  .cfg-seg button {
    min-height: 40px;
    font-size: 13px;
  }

  /* Color picker bigger and easier to tap */
  .cfg-row input[type="color"] {
    width: 64px;
    height: 34px;
    border-radius: 8px;
  }

  /* Text input: native size for thumbs */
  .cfg-row input[type="text"] {
    height: 42px;
    font-size: 16px; /* prevents iOS auto-zoom on focus */
    border-radius: 9px;
    padding: 0 12px;
  }

  /* Range slider: chunkier thumb */
  .cfg-row input[type="range"] {
    height: 6px;
  }
  .cfg-row input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }
  .cfg-row input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }

  /* Logo upload more touchable */
  .cfg-file-btn {
    height: 42px;
    font-size: 13px;
  }

  /* In-panel CTA hidden — replaced by sticky mobile bar */
  .cfg-panel-cta { display: none; }

  /* Tabs: bigger tap targets on mobile, scroll horizontally if needed */
  .cfg-tabs {
    padding: 8px 8px 0;
  }
  .cfg-tabs button {
    padding: 10px 4px 9px;
    font-size: 10.5px;
  }
  .cfg-tabs button i.fas {
    font-size: 16px;
  }

  /* Island editor: bigger machine add buttons */
  .cz-machine-add {
    height: 38px;
  }
  .cz-machine-add i.fas { font-size: 14px; }
  .cz-add-island-btn {
    height: 42px;
    font-size: 13px;
  }
  .cz-island-del {
    width: 30px;
    height: 30px;
    font-size: 22px;
  }
  .cz-chip {
    font-size: 12px;
    padding: 6px 8px 6px 12px;
  }
  .cz-chip-remove {
    width: 22px;
    height: 22px;
  }

  /* Panel backdrop active when drawer open */
  .cfg-panel-backdrop {
    position: fixed;
    z-index: 1090;
  }
  .cfg-panel-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Sticky mobile action bar */
  .cfg-mobile-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 10px;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(255,255,255,0.96) 60%, rgba(255,255,255,0));
    z-index: 50;
  }

  .cfg-mobile-settings {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  .cfg-mobile-settings i {
    font-size: 16px;
    color: #3b82f6;
  }

  .cfg-mobile-cta {
    flex: 1 1 auto;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: #3b82f6;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.30);
    animation: cfg-cta-pulse-mobile 2.2s ease-in-out infinite;
  }
  .cfg-mobile-cta:active {
    background: #2563eb;
    animation-play-state: paused;
  }
  @keyframes cfg-cta-pulse-mobile {
    0%   { box-shadow: 0 8px 18px rgba(59, 130, 246, 0.30), 0 0 0 0 rgba(59, 130, 246, 0.55); }
    60%  { box-shadow: 0 8px 18px rgba(59, 130, 246, 0.30), 0 0 0 18px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 8px 18px rgba(59, 130, 246, 0.30), 0 0 0 0 rgba(59, 130, 246, 0); }
  }

  /* Modal: full-screen on mobile, sticky header & footer */
  .cfg-modal-backdrop { padding: 0; }
  .cfg-modal,
  .cfg-modal-wide {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .cfg-modal-hd {
    padding: 14px 16px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
  }
  .cfg-modal-hd h3 { font-size: 16px; }
  .cfg-modal-close {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
  }
  .cfg-modal-body {
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .cfg-modal-foot {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    flex-direction: column-reverse;
    gap: 8px;
  }
  .cfg-modal-foot > button {
    width: 100%;
    height: 48px;
    font-size: 15px;
  }

  /* Form inputs inside the modal: touch-sized + no iOS zoom */
  .cfg-modal-body input,
  .cfg-modal-body textarea,
  .cfg-modal-body select {
    font-size: 16px;
  }
}

/* Tighter padding for very small screens */
@media (max-width: 380px) {
  .cfg-wrap { padding: 6px 6px 0; }
  .cfg-mobile-settings { padding: 0 12px; font-size: 13px; }
  .cfg-mobile-cta { font-size: 14px; }
}

/* Admin: configurator block in inquiry detail */
.adm-cfg-block {
  margin-top: 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.adm-cfg-block h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
}

.adm-cfg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 18px;
  font-size: 13px;
}

.adm-cfg-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.adm-cfg-grid > div > span:first-child {
  color: #64748b;
}

.adm-cfg-grid > div > span:last-child {
  font-weight: 500;
  color: #0f172a;
}

.adm-cfg-grid .swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  margin-right: 6px;
  vertical-align: middle;
}
