.artvenue-configurator-shell {
  flex: 1 0 auto;
  display: flex;
  min-height: 0;
  background: var(--paper);
}

.artvenue-configurator-shell .cfg {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 340px;
  align-items: stretch;
  flex: 1 0 auto;
  min-height: 0;
  width: 100%;
  border-top: 1px solid var(--line);
}

.artvenue-configurator-shell .cfg-col {
  padding: 28px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  background: var(--paper);
}

.artvenue-configurator-shell .cfg-col:last-child {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.artvenue-configurator-shell .cfg-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 16px;
  padding: 28px 40px 36px;
  background: color-mix(in srgb, var(--paper) 74%, #ffffff 26%);
  min-width: 0;
  overflow: hidden;
}

.artvenue-configurator-shell .cfg section {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.artvenue-configurator-shell .cfg section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.artvenue-configurator-shell .cfg h4 {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cfg-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cfg-section-head h4 {
  margin-bottom: 0;
}

.cfg-inline-note {
  display: grid;
  gap: 8px;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  font-size: 13px;
  line-height: 1.5;
}

.cfg-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cfg-choice-grid .mode-chip {
  flex: 1 1 calc(50% - 4px);
  min-width: 128px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.cfg-choice-grid .mode-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.cfg-choice-grid .mode-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.cfg-inline-form {
  gap: 10px;
}

.cfg-inline-form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.cfg-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cfg-upload-trigger,
.cfg-inline-actions .btn,
.cfg-stage-toolbar .btn {
  white-space: nowrap;
}

.cfg-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.cfg-track-upload-name {
  margin-top: 12px;
}

.cfg-details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.cfg-details summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cfg-details[open] summary {
  margin-bottom: 16px;
  color: var(--ink);
}

.bbox-grid,
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-grid .toggle-card {
  grid-column: 1 / -1;
}

.cfg-subsection {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.cfg-subsection h5 {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.slider-group {
  display: grid;
  gap: 18px;
}

.cfg-toggle-slider {
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.cfg-toggle-slider.is-disabled {
  opacity: 0.52;
}

.slider-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.slider-label strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.slider {
  width: 100%;
  appearance: none;
  height: 2px;
  background: var(--line);
  outline: none;
  accent-color: var(--ink);
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: var(--ink);
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  cursor: pointer;
}

.cfg-val {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.toggle-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}

.toggle-card small {
  color: var(--ink-muted);
  line-height: 1.5;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-row span {
  margin: 0;
}

.cfg-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}

.cfg-stage-toolbar .cfg-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cfg-stage-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cfg-inline-note--soft {
  background: color-mix(in srgb, var(--paper-raised) 84%, #ffffff 16%);
}

.cfg-stage-banner {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(192, 80, 43, 0.22);
  background: rgba(192, 80, 43, 0.08);
  color: #8b431f;
  font-size: 13px;
  line-height: 1.5;
}

.cfg-stage-banner strong {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cfg-stage-toolbar .btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.78;
}

.cfg-stage-toolbar .btn.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  display: inline-block;
  vertical-align: -2px;
  animation: cfg-spin 0.8s linear infinite;
}

.cfg-stage-toolbar .chip {
  min-width: 140px;
  justify-content: center;
}

.map-status {
  margin: 0;
  color: var(--ink-muted);
  width: 100%;
}

.map-status--ok {
  color: #1f6d4e;
}

.map-status--warn {
  color: #8a5a12;
}

.map-status--error {
  color: #972f25;
}

.cfg-stage-stack {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, 760px);
  align-self: stretch;
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 0;
  margin-inline: auto;
  border: 1px solid var(--line);
  background: #0f1412;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
}

.cfg-busy-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 32px;
  background: rgba(255, 248, 239, 0.72);
  backdrop-filter: blur(4px);
  text-align: center;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cfg-busy-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(18, 24, 22, 0.18);
  border-top-color: var(--ink);
  border-radius: 999px;
  animation: cfg-spin 0.8s linear infinite;
}

.cfg-stage-flag {
  position: absolute;
  top: auto;
  right: 24px;
  bottom: 24px;
  z-index: 5;
}

.cfg-pane {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.cfg-pane.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cfg-pane .map-canvas,
.cfg-pane .preview-canvas {
  position: relative;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.cfg-pane .map-canvas {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.cfg-pane .map-canvas > .maplibregl-map,
.cfg-pane .map-canvas > .mapboxgl-map,
.cfg-pane .map-canvas .maplibregl-canvas-container,
.cfg-pane .map-canvas .mapboxgl-canvas-container,
.cfg-pane .map-canvas .maplibregl-canvas,
.cfg-pane .map-canvas .mapboxgl-canvas {
  width: 100% !important;
  height: 100% !important;
}

.cfg-pane .preview-canvas {
  background:
    radial-gradient(circle at 18% 18%, rgba(233, 189, 124, 0.28), transparent 24%),
    radial-gradient(circle at 78% 14%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(180deg, #f9f6f0 0%, #ebe3d6 54%, #d8cec0 100%);
}

.preview-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.cfg-north-indicator {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
}

.cfg-north-indicator__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(18, 24, 22, 0.14);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.92);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.cfg-north-indicator__arrow {
  width: 2px;
  height: 44px;
  position: relative;
  background: linear-gradient(180deg, rgba(18, 24, 22, 0.1) 0%, rgba(18, 24, 22, 0.7) 100%);
  transform-origin: 50% 85%;
  transition: transform 120ms linear;
}

.cfg-north-indicator__arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  background: rgba(255, 251, 244, 0.82);
  transform: translateX(-50%) rotate(-45deg);
}

.cfg-stage-label {
  position: absolute;
  left: 40px;
  top: 40px;
  bottom: auto;
  z-index: 4;
  max-width: calc(100% - 80px);
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.cfg-stage-meta {
  display: grid;
  gap: 14px;
  width: 100%;
}

.stage-reference-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preview-attribution {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.preview-note,
.insight-copy,
.token-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.insight-copy.subtle {
  color: var(--ink-muted);
}

.cfg-col--summary {
  display: block;
  padding-top: var(--summary-align-offset, 28px);
}

.cfg-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cfg-summary-head h4 {
  margin-bottom: 0;
}

.cfg-summary {
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.cfg-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.cfg-summary-row span:first-child {
  color: var(--ink-soft);
}

.cfg-summary-row span:last-child {
  font-family: var(--mono);
  text-align: right;
}

.price-box {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.price-box span {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.price-box strong {
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.price-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.breakdown-row strong {
  font-family: var(--mono);
  font-weight: 500;
}

.breakdown-row.muted-row {
  color: var(--ink-muted);
  font-size: 13px;
}

.tag,
.advice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tone-success {
  border-color: rgba(31, 109, 78, 0.28);
  background: rgba(31, 109, 78, 0.08);
  color: #1a5a41;
}

.tone-warning {
  border-color: rgba(192, 80, 43, 0.22);
  background: rgba(192, 80, 43, 0.08);
  color: #8b431f;
}

.tone-danger {
  border-color: rgba(151, 47, 37, 0.24);
  background: rgba(151, 47, 37, 0.08);
  color: #972f25;
}

.tone-neutral {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink-muted);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fact-chip {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}

.fact-chip span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fact-chip strong {
  display: block;
  line-height: 1.4;
}

.muted-block {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.55;
}

.artvenue-flow-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.cfg-system-grid {
  display: grid;
  gap: 10px;
}

.cfg-system-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.cfg-system-row span {
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cfg-system-row strong {
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-form {
  display: grid;
  gap: 12px;
}

.order-gate {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.5;
}

.order-gate.tone-success {
  border-color: rgba(31, 109, 78, 0.28);
}

.order-gate.tone-danger {
  border-color: rgba(151, 47, 37, 0.24);
}

.tracking-box {
  padding-top: 6px;
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.timeline li {
  padding-left: 6px;
}

.timeline .current {
  color: var(--accent);
  font-weight: 700;
}

.map-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  color: rgba(239, 235, 224, 0.82);
  text-align: center;
  line-height: 1.6;
}

.mapboxgl-canvas,
.maplibregl-canvas {
  outline: none;
}

.mapboxgl-ctrl-group,
.maplibregl-ctrl-group {
  border-radius: 0 !important;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18) !important;
}

.mapboxgl-ctrl-scale,
.maplibregl-ctrl-scale {
  margin: 0 0 18px 18px !important;
  padding: 6px 10px !important;
  border: 1px solid var(--line) !important;
  border-top: 0 !important;
  background: rgba(255, 251, 244, 0.94) !important;
  color: var(--ink) !important;
  font-family: var(--mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12) !important;
}

.mapboxgl-ctrl button,
.maplibregl-ctrl button {
  width: 34px !important;
  height: 34px !important;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: 420px;
  padding: 16px 18px;
  border: 1px solid rgba(239, 235, 224, 0.16);
  background: rgba(15, 20, 18, 0.92);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.toast.toast-error {
  border-color: rgba(192, 80, 43, 0.28);
}

.cfg-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.cfg-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 12, 0.62);
  backdrop-filter: blur(6px);
}

.cfg-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 36px 72px rgba(0, 0, 0, 0.26);
}

.cfg-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cfg-modal__body {
  display: grid;
  gap: 18px;
}

.cfg-modal__body h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.cfg-modal__qr-wrap {
  display: grid;
  justify-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
}

.cfg-modal__qr-image {
  width: min(100%, 260px);
  aspect-ratio: 1 / 1;
  background: #fff;
  object-fit: contain;
}

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

.hidden {
  display: none !important;
}

@media (max-width: 1380px) {
  .artvenue-configurator-shell .cfg {
    grid-template-columns: 320px minmax(0, 1fr) 320px;
  }

  .artvenue-configurator-shell .cfg-stage {
    padding-inline: 28px;
  }
}

@media (max-width: 1180px) {
  .artvenue-configurator-shell .cfg {
    grid-template-columns: 1fr;
  }

  .artvenue-configurator-shell .cfg-col,
  .artvenue-configurator-shell .cfg-col:last-child {
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cfg-col--summary {
    padding-top: 20px;
  }

  .artvenue-configurator-shell .cfg-stage {
    min-height: 0;
    border-bottom: 1px solid var(--line);
  }

  .cfg-stage-stack {
    width: min(100%, 640px);
  }

  .stage-reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .artvenue-configurator-shell .cfg-col,
  .artvenue-configurator-shell .cfg-stage {
    padding: 20px 18px 24px;
  }

  .cfg-inline-form__row,
  .bbox-grid,
  .field-grid,
  .fact-grid {
    grid-template-columns: 1fr;
  }

  .cfg-stage-toolbar,
  .cfg-inline-actions,
  .cfg-stage-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cfg-stage-toolbar .chip,
  .cfg-stage-toolbar .btn,
  .cfg-inline-actions .btn,
  .cfg-upload-trigger {
    width: 100%;
  }

  .cfg-stage-stack {
    width: 100%;
  }

  .cfg-stage-label {
    left: 18px;
    right: 18px;
    top: 18px;
    bottom: auto;
    max-width: none;
  }

  .cfg-north-indicator {
    top: 18px;
    right: 18px;
  }

  .cfg-stage-flag {
    top: auto;
    right: 18px;
    bottom: 18px;
  }

  .cfg-summary-row,
  .cfg-system-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .cfg-summary-row span:last-child,
  .cfg-system-row strong {
    text-align: left;
  }

  .cfg-modal {
    padding: 16px;
  }

  .cfg-modal__panel {
    padding: 24px 20px 20px;
  }
}
