/* Fonts: loaded by landing-kit.css (@import) before this file. */

:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0f172a;
  --panel-2: #111827;
  --panel-3: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: #334155;
  --accent: #f8d749;
  --accent-text: #171717;
  --success: #4ade80;
  --danger: #f87171;
  --wizard-steps-sticky-top: 16px;
  --wizard-sticky-nav-top: 180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, sans-serif;
  background: linear-gradient(180deg, #020617 0%, var(--bg) 100%);
  color: var(--text);
}

/* Match cms-app `.ss-container` width under the site header. */
.ss-site-header .ss-container {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2rem), var(--ss-max-width));
  margin: 0 auto;
}

/* Wizard: main headline sits in the yellow topbar beside the logo */
.ss-topbar-inner .ss-brand-row {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.25rem);
  min-width: 0;
  flex: 1 1 auto;
}

.ss-topbar-inner {
  position: relative;
}

.ss-topbar-inner .ss-brand-row .ss-brand {
  flex-shrink: 0;
}

.ss-wizard-header-tagline {
  margin: 0;
  font-family: var(--ss-headline-font);
  font-size: clamp(0.88rem, 0.9vw + 0.68rem, 1.12rem);
  font-weight: 600;
  color: var(--ss-page-heading);
  line-height: 1.25;
  letter-spacing: -0.02em;
  min-width: 0;
}

.site-shell-container {
  width: min(calc(100% - 2rem), var(--ss-max-width));
  margin: 0 auto;
}

.site-shell-header {
  position: static;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.site-shell-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
}

.site-shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-shell-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #f7a800);
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-shell-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-shell-menu-btn {
  width: auto;
  min-width: 110px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  font-weight: 700;
  padding: 10px 14px;
}

.site-shell-menu-btn:hover {
  border-color: rgba(248, 215, 73, 0.6);
}

.page {
  width: min(calc(100% - 2rem), var(--ss-max-width));
  margin: 0 auto;
  /* Vertical-only padding so the wizard content aligns flush with the
   * `.ss-site-header > .ss-container` edges (same `--ss-max-width`,
   * same 1rem viewport gutter from the `width: min(...)` calc). On step 1
   * the panel chrome is transparent so this directly aligns the hero
   * left/right edges with the brand row + header buttons above. */
  padding: 24px 0;
}

.site-shell-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 16px 0 20px;
}

.site-shell-footer .site-shell-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.wizard-footer-hash {
  font-size: 0.8rem;
  font-family: Inter, sans-serif;
  color: var(--muted);
}

.wizard-footer-hash.hidden {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.panel {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.steps {
  position: static;
  padding: 10px 12px;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.step-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.45);
}

.step-item.active {
  border-color: rgba(248, 215, 73, 0.45);
  background: rgba(248, 215, 73, 0.08);
}

.step-item.done {
  border-color: rgba(74, 222, 128, 0.25);
}

.ephemeral-step:not(.active) {
  display: none;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--panel-3);
  font-size: 12px;
  font-weight: 700;
}

.step-item.active .step-number {
  background: var(--accent);
  color: var(--accent-text);
}

.step-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
  min-width: 0;
}

.wizard-section {
  display: none;
  gap: 16px;
  scroll-margin-top: calc(var(--wizard-sticky-nav-top) + 12px);
}

.wizard-section.active {
  display: grid;
}

.wizard-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wizard-main.single-pane {
  grid-template-columns: minmax(0, 1fr);
}

.wizard-content {
  min-width: 0;
}

.wizard-global-bottom {
  margin-top: 24px;
  display: grid;
  gap: 24px;
}

.wizard-main.wizard-step-1 + .wizard-global-bottom .wizard-contact-widget {
  display: none;
}

.wizard-preview {
  min-width: 0;
  position: static;
  width: min(100%, 520px);
  justify-self: end;
}

.section-header-nav-block {
  display: grid;
  gap: 12px;
}

.section-header-nav-block .btn-row {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
}

.yarn-colors-stage .btn-row-secondary {
  order: 1;
}

.section-header h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

.request-section-title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

/** Größen-Block: weniger Abstand zur Mindestmengen-Grafik (Karten-Grid + Überschrift) */
.request-meta-card--sizes-section {
  gap: 8px;
}

.request-meta-card.request-meta-card--sizes-section {
  background: transparent;
  border: 0;
  box-shadow: none;
  /* Inset Mindestmengen-Grafik + Größenzeilen vom Kantenrand (war 0 → wirkte „flush“). */
  padding: 0 clamp(14px, 3.5vw, 28px);
}

.request-section-title--sizes {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-flow: row;
  align-content: start;
  margin: 0;
  padding: 0 0 4px;
}

/** Kontaktdaten: etwas mehr Luft nach oben, dichter zum Adresskarten-Beginn */
.request-section-title--contact {
  margin: 12px 0 -6px;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.wizard-browser-editor-hint {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(14, 116, 144, 0.22);
  color: rgba(224, 242, 254, 0.95);
  font-size: 14px;
  line-height: 1.5;
}

.design-assist-self-switch-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  margin: 0 auto 18px;
  width: 100%;
  max-width: 28rem;
  padding: 0;
  border: none;
  background: transparent;
}

/* Step 2 header: headline left, self-design CTA right (aligned with „Weiter zur Verpackung“ column) */
.section-header-with-guide.design-step-header-row {
  align-items: flex-start;
  margin-bottom: 8px;
}

.section-header-with-guide.design-step-header-row > h2 {
  flex: 1 1 0;
  min-width: 0;
  margin-right: 12px;
  margin-bottom: 0;
}

.section-header-with-guide.design-step-header-row .design-assist-self-switch-panel {
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: right;
  margin: 0 0 0 auto;
  width: auto;
  max-width: min(22rem, 38vw);
}

.section-header-with-guide.design-step-header-row .design-assist-self-switch-headline {
  text-align: right;
  width: 100%;
}

.section-header-with-guide.design-step-header-row .design-assist-self-switch-btn {
  width: 100%;
  max-width: 22rem;
}

@media (max-width: 720px) {
  .section-header-with-guide.design-step-header-row {
    flex-wrap: wrap;
  }

  .section-header-with-guide.design-step-header-row > h2 {
    margin-right: 0;
    flex: 1 1 100%;
  }

  .section-header-with-guide.design-step-header-row .design-assist-self-switch-panel {
    margin-left: 0;
    margin-top: 12px;
    max-width: none;
    width: 100%;
    align-items: stretch;
  }

  .section-header-with-guide.design-step-header-row .design-assist-self-switch-headline {
    text-align: left;
  }
}

.design-assist-self-switch-headline {
  margin: 0;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #f8fafc;
}

.design-assist-self-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 22rem;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: #ffffff;
  background: #22c55e;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.design-assist-self-switch-btn:hover {
  background: #16a34a;
  color: #ffffff;
}

.design-assist-self-switch-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.request-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.size-quantity-hint-block {
  margin: 0 0 12px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.size-quantity-mindestmenge-img {
  display: block;
  width: min(100%, 800px);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  height: auto;
}

.size-quantity-hint-after-graphic {
  margin: 12px 0 0;
}

.size-quantity-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  min-width: 0;
  max-width: 100%;
}

.size-quantity-hint-block > .size-quantity-hint {
  margin-bottom: 0;
}

/** Hält „pro Größe.“ und den Mengen-Link in einer Zeile; der Rest des Absatzes umbricht normal. */
.size-quantity-hint-cta {
  white-space: nowrap;
}

.size-quantity-hint .size-quantity-large-order-link {
  display: inline;
  width: auto;
  max-width: none;
  margin-left: 0;
  vertical-align: baseline;
}

.size-quantity-large-order-link {
  display: inline;
  width: auto;
  max-width: none;
  font-weight: 600;
  color: #22c55e;
  text-decoration: underline;
  text-underline-offset: 2px;
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

.size-quantity-large-order-link:hover:not(:disabled) {
  color: #15803d;
}

.size-quantity-large-order-link:disabled {
  cursor: default;
  text-decoration: none;
  color: var(--muted);
  opacity: 0.95;
}

.size-quantity-panel {
  display: grid;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.size-quantity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.size-quantity-item {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) auto 120px minmax(220px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
}

.size-quantity-item-head {
  display: contents;
}

.size-quantity-item-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
  min-width: 0;
}

.size-quantity-active-switch {
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(30, 41, 59, 0.95);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.size-quantity-active-switch:hover {
  border-color: rgba(148, 163, 184, 0.55);
}

.size-quantity-active-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.size-quantity-active-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.88);
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.size-quantity-active-switch[aria-checked="true"] {
  background: rgba(34, 197, 94, 0.5);
  border-color: rgba(34, 197, 94, 0.55);
}

.size-quantity-active-switch[aria-checked="true"]::after {
  transform: translateX(20px);
  background: #fff;
}

.size-quantity-item input {
  min-width: 0;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
}

.size-quantity-item input[type="range"] {
  padding: 0;
  border: 0;
  background: transparent;
  min-height: 20px;
  accent-color: var(--accent);
}

.size-quantity-item input[type="range"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 980px) {
  .size-quantity-item {
    grid-template-columns: minmax(130px, 1fr) auto 100px;
  }

  .size-quantity-item input[type="range"] {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@container request-form (max-width: 680px) {
  .size-quantity-item {
    grid-template-columns: minmax(130px, 1fr) auto 100px;
  }

  .size-quantity-item input[type="range"] {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.size-quantity-summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 14px;
  padding-top: 4px;
  font-size: clamp(16px, 0.9rem + 0.35vw, 18px);
  line-height: 1.35;
  color: var(--muted);
}

.size-quantity-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.size-quantity-summary strong {
  color: rgba(226, 232, 240, 0.96);
}

.packaging-screen {
  display: grid;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
}

.packaging-price-line {
  text-align: center;
  font-size: clamp(22px, 2.3vw, 34px);
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.25;
}

.packaging-option-grid {
  display: grid;
  /* Three visible options (hidden Faltschachtel/Kissenschachtel use display:none). Keep 3 columns on all breakpoints. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

/* Temporarily hidden in UI; options remain in markup and data-packaging-option for later re-enable. */
.packaging-option-card.packaging-option-ui-hidden {
  display: none !important;
}

.packaging-detail-grid.packaging-detail-hidden,
.packaging-detail-grid[hidden] {
  display: none !important;
}

.packaging-option-visual-placeholder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.packaging-placeholder-glyph {
  font-size: 42px;
  line-height: 1;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.45);
}

.packaging-placeholder-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.72);
}

.packaging-option-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 10px 8px 12px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.packaging-option-card:hover,
.packaging-option-card:focus-visible {
  border-color: rgba(74, 222, 128, 0.48);
  background: rgba(15, 23, 42, 0.62);
  transform: translateY(-1px);
}

.packaging-option-copy {
  display: grid;
  gap: 6px;
  padding: 0 4px;
}

.packaging-option-card strong {
  font-size: 12px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.92);
}

.packaging-option-copy span:last-child {
  color: rgba(226, 232, 240, 0.74);
  font-size: 12px;
  line-height: 1.45;
}

.packaging-option-visual {
  position: relative;
  width: 100%;
  min-height: 170px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  background:
    linear-gradient(180deg, rgba(28, 37, 68, 0.9), rgba(18, 26, 50, 0.96)),
    radial-gradient(circle at top, rgba(129, 140, 248, 0.16), transparent 50%);
  overflow: hidden;
}

.packaging-option-visual::after {
  content: "×";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.85);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.packaging-photo {
  width: 100%;
  height: 100%;
  min-height: 132px;
  max-height: 200px;
  object-fit: contain;
  border-radius: 10px;
}

.packaging-option-card.active strong {
  color: #ffffff;
}

.packaging-option-card.active {
  border-color: rgba(74, 222, 128, 0.72);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35);
}

.packaging-option-card.active .packaging-option-visual {
  border-color: rgba(74, 222, 128, 0.42);
}

.packaging-option-card.active .packaging-option-visual::after {
  content: "✓";
  background: var(--accent);
  color: var(--accent-text, #171717);
}

.packaging-option-card.active::before {
  content: "Ausgewählt";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: #15803d;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.packaging-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.packaging-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.packaging-upload-copy,
.packaging-notes-label {
  font-size: 16px;
  text-align: left;
  color: rgba(226, 232, 240, 0.96);
  font-weight: 700;
}

.packaging-upload-dropzone {
  min-height: 150px;
}

.packaging-upload-surface {
  justify-items: center;
  text-align: center;
  gap: 14px;
  padding: 28px 22px;
  border-style: dashed;
  border-color: rgba(125, 211, 252, 0.22);
  background:
    linear-gradient(180deg, rgba(12, 20, 44, 0.92), rgba(6, 12, 28, 0.98)),
    radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 45%);
}

.packaging-upload-surface .media-upload-dropzone-copy {
  width: 100%;
  justify-items: center;
  text-align: center;
  gap: 12px;
}

.packaging-upload-surface .media-upload-dropzone-copy strong {
  font-size: 17px;
  color: #eef2ff;
}

.packaging-upload-surface .media-upload-dropzone-copy span:last-child {
  max-width: 620px;
  font-size: 14px;
  color: rgba(226, 232, 240, 0.82);
}

.packaging-upload-icon {
  opacity: 0.96;
}

.packaging-file-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.packaging-file-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.packaging-file-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: white;
}

.packaging-file-item span {
  min-width: 0;
  word-break: break-word;
  color: var(--muted);
}

.packaging-file-remove {
  min-height: 36px;
  padding: 8px 10px;
}

.packaging-notes-input {
  min-height: 150px;
  resize: vertical;
}

.request-form-panel,
.request-preview-panel {
  min-width: 0;
}

.request-layout.request-layout-no-preview {
  grid-template-columns: 1fr;
}

.request-form-panel {
  container-type: inline-size;
  container-name: request-form;
  display: grid;
  gap: 16px;
}

.request-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.request-field-span-2 {
  grid-column: span 2;
}

.request-address-card,
.request-meta-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.request-offer-summary-card {
  gap: 10px;
  margin-bottom: 14px;
}

.request-offer-summary-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.96);
}

.request-offer-summary-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.request-offer-summary-list strong {
  color: rgba(226, 232, 240, 0.96);
}

.delivery-step-card {
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.delivery-step-title {
  margin: 0;
  font-size: 18px;
  color: #111827;
}

.delivery-step-copy {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

.delivery-mode-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.delivery-mode-choice-btn {
  min-height: 44px;
}

.delivery-standard-range {
  margin: 0;
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
}

.delivery-custom-panel {
  display: grid;
  gap: 8px;
}

.delivery-calendar-shell {
  display: grid;
  gap: 8px;
}

.delivery-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.delivery-calendar-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  flex: 0 0 44px;
  min-height: 36px;
  min-width: 44px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
}

.delivery-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.delivery-calendar-weekdays span {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
}

.delivery-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 56px;
  gap: 6px;
}

.delivery-calendar-filler {
  display: block;
  height: 56px;
}

.delivery-calendar-day {
  width: 100%;
  height: 56px;
  min-height: 56px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
  color: #111827;
  font-weight: 600;
}

.delivery-calendar-day--selected {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.delivery-calendar-day--disabled {
  background: #e5e7eb;
  border-color: #cbd5e1;
  color: #6b7280;
  opacity: 1;
  cursor: not-allowed;
}

.delivery-calendar-day--premium-express {
  background: #fed7aa;
  border-color: #fdba74;
}

.delivery-calendar-day--premium-high {
  background: #fdba74;
  border-color: #fb923c;
}

.delivery-calendar-day--premium-low {
  background: #fde68a;
  border-color: #facc15;
}

.delivery-calendar-day--standard {
  background: #dbeafe;
  border-color: #93c5fd;
}

.delivery-calendar-day--discount-low {
  background: #bbf7d0;
  border-color: #86efac;
}

.delivery-calendar-day--discount-high {
  background: #86efac;
  border-color: #4ade80;
}

.delivery-calendar-day--estimated {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.delivery-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.delivery-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 4px 8px;
  color: #374151;
}

.delivery-legend-premium-express { background: #fed7aa; border-color: #fdba74; }
.delivery-legend-premium-high { background: #fdba74; border-color: #fb923c; }
.delivery-legend-premium-low { background: #fde68a; border-color: #facc15; }
.delivery-legend-standard { background: #dbeafe; border-color: #93c5fd; }
.delivery-legend-discount-low { background: #bbf7d0; border-color: #86efac; }
.delivery-legend-discount-high { background: #86efac; border-color: #4ade80; }

.delivery-selection-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  color: #111827;
  font-size: 14px;
}

.delivery-selection-card p {
  margin: 0;
}

.request-meta-grid {
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 14px;
}

.request-meta-grid--equal-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-address-lookup-btn {
  margin-top: 4px;
  min-height: 48px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.request-address-card .field label,
.request-meta-card .field label {
  font-size: 12px;
  letter-spacing: 0.01em;
}

.request-address-card input,
.request-address-card select,
.request-meta-card input,
.request-meta-card textarea {
  min-height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.request-meta-card textarea {
  min-height: 120px;
}

.request-preview-card {
  display: grid;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.request-preview-card .design-card-header-preview {
  margin-bottom: 0;
}

.request-preview-card .preview-headline {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.request-preview-card .preview-subheadline {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.request-preview-card .request-preview-sock-meta {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text, #1e293b);
}

.request-preview-panel {
  width: 100%;
  max-width: 520px;
  justify-self: end;
}

[data-step-section="8"] .final-step-variant[data-final-step-variant="quote-request"] .request-layout {
  /* .page is capped at --ss-max-width (~1280px); equal 1fr columns (~590px) are too narrow for .size-quantity-item (~600px min content). */
  grid-template-columns: minmax(0, 1.38fr) minmax(260px, 0.62fr);
  align-items: start;
  gap: 20px;
}

[data-step-section="8"] .final-step-variant[data-final-step-variant="quote-request"] .request-layout.request-layout-no-preview {
  grid-template-columns: 1fr;
}

[data-step-section="8"] .final-step-variant[data-final-step-variant="quote-request"] .request-preview-panel {
  max-width: none;
  justify-self: stretch;
}

[data-step-section="8"] .final-step-variant[data-final-step-variant="quote-request"] .request-preview-frame {
  min-height: clamp(360px, 42vw, 720px);
}

[data-step-section="8"] .final-step-variant[data-final-step-variant="quote-request"] .request-preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(380px, 72vh, 860px);
}

@media (max-width: 1400px) {
  [data-step-section="8"] .final-step-variant[data-final-step-variant="quote-request"] .request-layout {
    grid-template-columns: 1fr;
  }

  [data-step-section="8"] .final-step-variant[data-final-step-variant="quote-request"] .request-preview-panel {
    max-width: 100%;
    justify-self: stretch;
  }

  [data-step-section="8"] .final-step-variant[data-final-step-variant="quote-request"] .request-preview-frame {
    min-height: clamp(420px, 78vw, 980px);
  }

  [data-step-section="8"] .final-step-variant[data-final-step-variant="quote-request"] .request-preview-frame img {
    max-height: none;
  }
}

.request-preview-frame {
  min-height: clamp(260px, 40vw, 460px);
}

.request-preview-frame img {
  width: 100%;
  max-height: clamp(280px, 56vh, 580px);
  object-fit: contain;
}

.wizard-trustpilot-wrap {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.wizard-trustpilot-kicker {
  margin: 0 0 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.wizard-trustpilot-intro {
  margin: 0 0 16px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.wizard-trustpilot-panel {
  min-height: 140px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/**
 * Single-row Review Carousel (TrustBox template 54ad5defc6454f065c28af8b):
 * "Hervorragend / score / total reviews / Trustpilot logo" tile on the left
 * plus horizontally scrolling review cards. The TrustBox iframe handles its
 * own internal scroll buttons, so we only need to give it the full container
 * width and stop clipping the rounded outer panel.
 */
.wizard-trustpilot-panel--carousel {
  min-height: 240px;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
}

.wizard-trustpilot-panel .trustpilot-widget {
  width: 100%;
  max-width: 100%;
}

.wizard-trustpilot-panel--carousel .trustpilot-widget {
  min-height: 240px;
}

.wizard-contact-widget {
  margin-top: 24px;
}

/* Step 1: headline + 67/33 benefits / contact (order -2 keeps block above CTA bar at -1) */
.wizard-section[data-step-section="1"] > .wizard-step1-hero {
  order: -2;
}

.wizard-step1-hero {
  display: grid;
  gap: 20px;
  margin-bottom: 4px;
  padding-top: 24px;
}

.wizard-step1-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
  column-gap: 3rem;
  row-gap: 24px;
  align-items: start;
}

.wizard-step1-benefits {
  min-width: 0;
  text-align: left;
  display: grid;
  gap: 18px;
}

/* Pill badge above the headline. Matches the dark hero-badge treatment used
 * on the main site (`[data-theme="schlauesocke-2026"] .ss-hero .ss-hero-copy
 * .ss-badge`) so the wizard hero reads as part of the same brand language. */
.wizard-step1-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ss-yellow, #f8d749);
  background: linear-gradient(
    145deg,
    rgba(31, 35, 64, 0.92) 0%,
    rgba(31, 35, 64, 0.78) 100%
  );
  border: 1px solid rgba(248, 215, 73, 0.4);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .wizard-step1-badge {
    white-space: normal;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
  }
}

.wizard-step1-hero-title {
  margin: 4px 0 0;
  font-family: var(--ss-headline-font, "Poppins", sans-serif);
  font-size: clamp(1.45rem, 4.8vw + 0.2rem, 2.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ss-page-heading, var(--text, #1f2340));
  text-wrap: balance;
}

.wizard-step1-hero-accent {
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--ss-yellow, #f8d749) 0%,
    rgba(248, 215, 73, 0.55) 100%
  );
}

.wizard-step1-hero-sub {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.5;
  color: var(--ss-page-body-prose, var(--muted, #334155));
  text-wrap: pretty;
}

.wizard-step1-benefits-title {
  margin: 8px 0 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text, #1f2340);
}

/* Use the same green check-tile pattern as `.ss-checklist` on the main site
 * so the wizard list reads like the hero checklist. The tile is themed via
 * the global `--ss-checklist-icon-*` tokens. */
.wizard-step1-benefits-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ss-page-body-prose, var(--text, #334155));
}

.wizard-step1-benefits-list > li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 28px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.wizard-step1-benefits-list > li::before {
  content: "";
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--ss-checklist-icon-image), var(--ss-checklist-icon-bg, #ecfdf5);
  background-size: 14px 14px, auto;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  border: 1px solid var(--ss-checklist-icon-border, #34d399);
}

@media (max-width: 960px) {
  .wizard-step1-hero {
    padding-top: 12px;
  }

  .wizard-step1-intro-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  .wizard-contact-widget--step1-column {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    justify-self: stretch;
  }

  .wizard-section[data-step-section="1"] .wizard-contact-widget--step1-column {
    display: none;
  }

  .wizard-main.wizard-step-1 + .wizard-global-bottom .wizard-contact-widget {
    display: block;
    margin-top: 8px;
  }
}

.wizard-contact-widget--step1-column {
  margin-top: 0;
  margin-bottom: 30px;
  justify-self: stretch;
  max-width: 100%;
}

@media (max-width: 900px) {
  .ss-wizard-header-tagline {
    display: none;
  }
}

.wizard-contact-widget--step1-column .wizard-contact-widget-inner {
  max-width: none;
  margin: 0;
}

.wizard-contact-widget--step1-column .wizard-contact-widget-avatar {
  width: 96px;
  height: 96px;
}

.wizard-contact-widget-inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.95) 100%);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

.wizard-contact-widget-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.wizard-contact-widget-avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(248, 215, 73, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.wizard-contact-widget-titles {
  min-width: 0;
}

.wizard-contact-widget-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
}

.wizard-contact-widget-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
  line-height: 1.2;
}

.wizard-contact-widget-copy {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.95);
}

.wizard-contact-widget-actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.wizard-contact-widget-link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 14px;
  row-gap: 2px;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.28);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wizard-contact-widget-link-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.wizard-contact-widget-link-label {
  grid-column: 2;
  grid-row: 1;
}

.wizard-contact-widget-link-value {
  grid-column: 2;
  grid-row: 2;
}

@media (min-width: 480px) {
  .wizard-contact-widget-link {
    grid-template-columns: auto 7.5rem 1fr;
    grid-template-rows: auto;
    row-gap: 0;
  }

  .wizard-contact-widget-link-icon {
    grid-column: 1;
    grid-row: 1;
  }

  .wizard-contact-widget-link-label {
    grid-column: 2;
    grid-row: 1;
  }

  .wizard-contact-widget-link-value {
    grid-column: 3;
    grid-row: 1;
  }
}

.wizard-contact-widget-link:hover {
  border-color: rgba(248, 215, 73, 0.55);
  background: rgba(30, 41, 59, 0.75);
}

.wizard-contact-widget-link:focus-visible {
  outline: 2px solid rgba(248, 215, 73, 0.65);
  outline-offset: 2px;
}

.wizard-contact-widget-link-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 215, 73, 0.95);
}

.wizard-contact-widget-link-value {
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
}

.wizard-contact-widget-link--external .wizard-contact-widget-link-value {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wizard-contact-widget-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(248, 215, 73, 0.2);
  color: var(--ss-yellow, #f8d749);
  border: 1px solid rgba(248, 215, 73, 0.35);
}

.wizard-contact-widget-link-icon svg {
  width: 16px;
  height: 16px;
}

.wizard-contact-widget-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--ss-radius-md, 12px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.45);
}

.wizard-contact-widget-trust-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--success, #16a34a);
}

.wizard-contact-widget-trust-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wizard-contact-widget-trust-text strong {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.01em;
}

.wizard-contact-widget-trust-text span {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(226, 232, 240, 0.85);
}

.sock-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-1-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.step-1-category {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.step-1-category-header {
  cursor: pointer;
}

.step-1-template-list {
  display: none;
}

.sock-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  text-align: left;
  padding: 16px;
  border-radius: var(--ss-radius-md, 12px);
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.42);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sock-option-card:hover {
  border-color: rgba(148, 163, 184, 0.6);
  transform: translateY(-1px);
}

.sock-option-card.active {
  border-color: rgba(91, 165, 74, 0.85);
  background: rgba(91, 165, 74, 0.06);
  box-shadow: 0 0 0 1px rgba(91, 165, 74, 0.25);
}

/* Active sock card "Ausgewählt" pill — sits in the top-right corner so it
 * doesn't disrupt the column flow of title → copy → image. The title gets
 * extra inline-end padding when active so its text never collides with the
 * pill on narrow cards. */
.sock-option-card.active::before {
  content: "Ausgewählt";
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: var(--schlauesocke-green, #5ba54a);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.sock-option-card.active .sock-option-title {
  padding-right: 110px;
}

.sock-option-card img {
  display: block;
  width: 100%;
  height: auto;
  /* Image renders LAST in the column flow (after title + copy) — this matches
   * the existing DOM order, so no `order` override is needed. The image fills
   * the full column width and scales its height proportionally to its natural
   * aspect ratio. */
}

.sock-option-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.sock-option-copy {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted, rgba(226, 232, 240, 0.78));
}

.wizard-step1-advantage-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.45);
}

.wizard-step1-advantage-item {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 56px;
}

.wizard-step1-advantage-item strong {
  font-size: 14px;
  line-height: 1.2;
}

.wizard-step1-advantage-item span {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.wizard-step1-advantage-cta {
  justify-self: end;
  align-self: center;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .wizard-step1-advantage-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wizard-step1-advantage-cta {
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .wizard-step1-advantage-bar {
    grid-template-columns: 1fr;
  }
}

.canvas-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.canvas-source-card {
  display: grid;
  gap: 8px;
  position: relative;
  text-align: left;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.42);
  cursor: pointer;
}

.canvas-source-card.active {
  border-color: rgba(56, 189, 248, 0.52);
  box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.canvas-source-card strong {
  font-size: 15px;
}

.canvas-source-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.canvas-source-card img {
  display: block;
  width: 100%;
  aspect-ratio: 336 / 1012;
  object-fit: contain;
  border-radius: 12px;
  background: white;
}

.canvas-source-card img.picking-color {
  cursor: crosshair;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}

.canvas-palette-tooltip {
  position: absolute;
  z-index: 12;
  width: min(320px, calc(100% - 24px));
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.36);
  background: rgba(2, 6, 23, 0.96);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
}

.canvas-palette-tooltip.hidden {
  display: none;
}

.canvas-palette-tooltip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.canvas-palette-tooltip-head strong {
  font-size: 13px;
}

.canvas-palette-tooltip-copy {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.canvas-palette-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.canvas-palette-tooltip-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.82);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.canvas-palette-tooltip-item img {
  width: 100%;
  aspect-ratio: 11 / 16;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.canvas-palette-tooltip-item span {
  font-size: 11px;
  color: var(--muted);
}

.background-suggestion-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.background-suggestion-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.45);
  cursor: pointer;
}

.background-suggestion-card.active {
  border-color: rgba(74, 222, 128, 0.62);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.3);
}

.background-suggestion-swatch {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.background-suggestion-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.background-suggestion-content strong {
  font-size: 13px;
}

.background-suggestion-content span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.design-editor-grid {
  display: grid;
  gap: 16px;
}

.design-mode-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}

.design-limits-note {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  position: relative;
  padding-right: 190px;
}

.design-limits-note-content {
  display: grid;
  gap: 4px;
}

.design-limits-note strong {
  color: var(--text);
}

.design-limits-note span {
  display: block;
}

.design-limits-note-actions {
  position: absolute;
  top: 8px;
  right: 10px;
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.design-limits-note-optout {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.design-limits-note-dismiss {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.12);
  color: var(--text);
  font-size: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.design-limits-note-dismiss::before {
  content: "";
  display: block;
  width: 10px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.design-limits-note-dismiss.is-maximize::before {
  width: 9px;
  height: 9px;
  background: transparent;
  border: 1.5px solid currentColor;
  border-radius: 1px;
  box-sizing: border-box;
}

.design-limits-note.is-collapsed {
  padding-right: 14px;
  display: inline-grid;
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

.design-limits-note.is-collapsed .design-limits-note-content {
  display: none;
}

.design-limits-note.is-collapsed .design-limits-note-actions {
  position: static;
  top: auto;
  right: auto;
}

.design-limits-note.is-collapsed .design-limits-note-optout {
  display: inline-flex;
}

.design-canvas-size-note {
  margin-top: 8px;
}

.design-limits-restore-btn {
  margin-top: 8px;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
  width: fit-content;
  max-width: 100%;
}

.design-sock-variant-field {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: min(220px, 100%);
}

/* Gleiche Farbwelt wie .design-mode-chip.active (hellblau) */
.design-sock-variant-select {
  width: 100%;
  min-width: 150px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.58);
  background: rgba(59, 130, 246, 0.18);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.design-sock-variant-select:hover {
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(59, 130, 246, 0.24);
}

.design-sock-variant-select:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.85);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22);
}

.design-mode-strip .design-mode-chip {
  min-width: 150px;
}

.design-stage-toggle-group {
  margin-left: auto;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 10px;
  width: auto;
  flex: 0 0 auto;
}

.design-stage-toggle-group .live-preview-toggle {
  flex: 0 0 300px;
  min-height: 100%;
  padding: 10px 12px;
}

.design-stage-toggle-group .live-preview-toggle-copy span {
  line-height: 1.3;
}

.design-quote-shortcut {
  width: auto;
  margin-left: auto;
  flex: 0 0 auto;
  padding-inline: 16px;
  border-color: rgba(248, 215, 73, 0.38);
  background: rgba(248, 215, 73, 0.08);
  color: #fef08a;
  font-weight: 700;
}

.design-quote-shortcut:hover {
  border-color: rgba(248, 215, 73, 0.72);
  background: rgba(248, 215, 73, 0.14);
}

.design-quote-shortcut-bottom {
  width: auto;
  padding-inline: 16px;
  border-color: rgba(248, 215, 73, 0.38);
  background: rgba(248, 215, 73, 0.08);
  color: #fef08a;
  font-weight: 700;
}

.design-quote-shortcut-bottom:hover {
  border-color: rgba(248, 215, 73, 0.72);
  background: rgba(248, 215, 73, 0.14);
}

.design-mode-chip {
  width: auto;
  min-width: 180px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.45);
  color: var(--muted);
  font-weight: 700;
}

.design-mode-chip.active {
  border-color: rgba(96, 165, 250, 0.58);
  background: rgba(59, 130, 246, 0.18);
  color: var(--text);
}

.design-mode-copy {
  color: var(--muted);
  font-size: 13px;
}

.design-workbench {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.design-workbench.integrated-sidebar {
  grid-template-columns: 320px minmax(0, 1fr);
}

.design-workbench.mode-sketch .design-canvas-surface {
  display: none;
}

.design-workbench.mode-canvas .design-sketch-surface {
  display: none;
}

.design-column {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.design-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.design-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.design-card-header h2,
.design-card-header h3 {
  margin: 0;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.design-inline-status {
  color: var(--muted);
  font-size: 12px;
}

.design-upload-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.media-upload-dropzone {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(96, 165, 250, 0.42);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 0.86)),
    radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 40%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.media-upload-dropzone.prominent-upload {
  gap: 12px;
  padding: 28px 20px;
  justify-items: center;
  text-align: center;
  border-color: rgba(134, 239, 172, 0.72);
  background:
    linear-gradient(180deg, rgba(18, 55, 42, 0.9), rgba(5, 24, 18, 0.98)),
    radial-gradient(circle at top left, rgba(134, 239, 172, 0.22), transparent 42%);
  box-shadow:
    inset 0 0 0 1px rgba(187, 247, 208, 0.12),
    0 18px 38px rgba(16, 185, 129, 0.14);
}

.media-upload-dropzone:hover,
.media-upload-dropzone:focus-visible,
.media-upload-dropzone.drag-active {
  border-color: rgba(134, 239, 172, 0.72);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.92)),
    radial-gradient(circle at top, rgba(74, 222, 128, 0.14), transparent 42%);
  box-shadow:
    inset 0 0 0 1px rgba(134, 239, 172, 0.12),
    0 10px 24px rgba(2, 6, 23, 0.18);
  transform: translateY(-1px);
}

.media-upload-dropzone.prominent-upload:hover,
.media-upload-dropzone.prominent-upload:focus-visible,
.media-upload-dropzone.prominent-upload.drag-active {
  border-color: rgba(187, 247, 208, 0.96);
  background:
    linear-gradient(180deg, rgba(24, 78, 57, 0.96), rgba(6, 26, 19, 0.99)),
    radial-gradient(circle at top left, rgba(134, 239, 172, 0.28), transparent 46%);
  box-shadow:
    inset 0 0 0 1px rgba(220, 252, 231, 0.18),
    0 22px 44px rgba(16, 185, 129, 0.2);
  transform: translateY(-2px) scale(1.01);
}

.media-upload-dropzone-copy {
  display: grid;
  gap: 6px;
}

.media-upload-dropzone.prominent-upload .media-upload-dropzone-copy {
  width: 100%;
  justify-items: center;
  text-align: center;
  gap: 10px;
}

.media-upload-dropzone-copy strong {
  font-size: 15px;
}

.media-upload-dropzone.prominent-upload .media-upload-dropzone-copy strong {
  font-size: 18px;
  color: #ecfdf5;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.media-upload-dropzone-icon {
  position: relative;
  display: block;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(220, 252, 231, 0.08);
}

.media-upload-dropzone-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 14px;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 0;
  border-bottom: 18px solid #f0fdf4;
  transform: translateX(-50%);
}

.media-upload-dropzone-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 32px;
  width: 10px;
  height: 20px;
  border-radius: 999px;
  background: #f0fdf4;
  transform: translateX(-50%);
}

.media-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.design-action-tile {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
}

.design-action-tile strong {
  font-size: 14px;
}

.design-action-tile span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.design-action-tile.muted {
  background: rgba(255, 255, 255, 0.9);
}

.design-action-tile:empty {
  display: none;
}

.design-stage-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px 2px;
}

.design-stage-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.design-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(248, 215, 73, 0.28);
  background: rgba(248, 215, 73, 0.08);
  font-size: 12px;
}

.design-status-chip.muted {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.design-stage-hint {
  color: var(--muted);
  font-size: 12px;
}

.design-stage-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  align-items: stretch;
  gap: 18px;
}

.design-render-preview-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.32);
}

.design-render-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.design-render-preview-head h3 {
  margin: 0;
  font-size: 16px;
}

.design-render-preview-head span {
  color: var(--muted);
  font-size: 12px;
}

.design-preview-frame {
  padding: 12px;
}

.design-preview-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3800 / 4600;
}

.design-preview-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 140ms ease, filter 140ms ease;
}

#design-preview-image.pending-edit-dim {
  opacity: 0.56;
  filter: saturate(0.82) brightness(1.02);
}

.design-preview-grid-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}

.design-preview-placement-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.design-preview-pending-projection {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.design-preview-pending-item {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: center center;
  z-index: 5;
  will-change: transform, width, height;
}

.design-preview-pending-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 2px dashed rgba(248, 215, 73, 0.98);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 2px rgba(248, 215, 73, 0.28),
    0 14px 34px rgba(15, 23, 42, 0.2);
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 4px;
  overflow: visible;
}

.design-preview-pending-frame::after {
  content: "Vorschau";
  position: absolute;
  left: 8px;
  top: -28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(248, 215, 73, 0.64);
  color: #fef08a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.design-preview-pending-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.96;
  filter:
    drop-shadow(0 10px 18px rgba(15, 23, 42, 0.18))
    saturate(1.08);
}

.design-preview-object-toolbar {
  position: absolute;
  width: 360px;
  max-width: min(360px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  z-index: 6;
  pointer-events: none;
}

.design-preview-object-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.88);
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1.15;
  pointer-events: auto;
}

.toolbar-btn-icon {
  font-size: 12px;
  line-height: 1;
}

.toolbar-btn-label {
  line-height: 1.15;
}

.design-preview-object-toolbar button:hover {
  background: rgba(51, 65, 85, 0.96);
}

.design-preview-object-toolbar .toolbar-confirm-btn {
  grid-column: 1 / -1;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.52);
  color: #dcfce7;
  font-weight: 700;
}

.design-preview-object-toolbar .toolbar-abort-btn {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.32);
  color: #e2e8f0;
}

.design-preview-object-toolbar button[data-object-action="copy-mirrored"],
.design-preview-object-toolbar button[data-object-action="copy-other-foot"] {
  grid-column: 1 / -1;
}

.design-preview-object-toolbar .toolbar-confirm-btn:disabled {
  opacity: 0.45;
}

/* Design step: visibly inactive buttons while rendering */
[data-step-section="2"] .btn-row button:disabled {
  opacity: 0.5;
  color: var(--muted);
  cursor: not-allowed;
  border-color: rgba(148, 163, 184, 0.25);
}
[data-step-section="2"] .btn-row button:disabled.btn-primary {
  background: rgba(148, 163, 184, 0.3);
  color: rgba(23, 23, 23, 0.6);
}

.design-preview-knit-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.design-preview-knit-preview strong {
  font-size: 12px;
  color: #e2e8f0;
}

.design-preview-knit-preview span {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.design-preview-knit-canvas-wrap {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.design-preview-knit-preview canvas {
  display: block;
  /* 2× (KNIT_PREVIEW_LOGICAL_WIDTH + KNIT_PREVIEW_RULER_LEFT_GUTTER) in app.js */
  width: 428px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(45deg, rgba(255,255,255,0.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.06) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.06) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.06) 75%),
    rgba(2, 6, 23, 0.8);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.design-preview-knit-meta {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: 168px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(248, 215, 73, 0.32);
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  font-size: 10px;
  line-height: 1.3;
  text-align: right;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
  pointer-events: none;
}

.design-preview-anchor-indicator {
  position: absolute;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  pointer-events: none;
  z-index: 7;
}

.design-preview-anchor-indicator::before,
.design-preview-anchor-indicator::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  opacity: 0.95;
}

.design-preview-anchor-indicator::before {
  width: 16px;
  height: 1px;
}

.design-preview-anchor-indicator::after {
  width: 1px;
  height: 16px;
}

.design-preview-anchor-core {
  position: absolute;
  inset: 6px;
  border-radius: 999px;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.08);
}

.design-preview-anchor-spinner {
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  opacity: 0;
}

.design-preview-anchor-indicator.pending {
  color: #ef4444;
  animation: design-anchor-pulse 0.9s ease-in-out infinite;
}

.design-preview-anchor-indicator.loading,
.design-preview-anchor-indicator.confirmed {
  color: #22c55e;
}

.design-preview-anchor-indicator.loading .design-preview-anchor-spinner {
  opacity: 1;
  animation: design-preview-spin 0.8s linear infinite;
}

.design-preview-placement-item {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: center center;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.design-preview-placement-item.dragging {
  cursor: grabbing;
}

.design-preview-placement-item:hover:not(.dragging):not(.pending-edit) {
  z-index: 2;
}

.design-preview-placement-box {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(59, 130, 246, 0.38);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  isolation: isolate;
}

.design-preview-pending-mask {
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.84)),
    repeating-linear-gradient(
      135deg,
      rgba(248, 215, 73, 0.1) 0 8px,
      rgba(255, 255, 255, 0.18) 8px 16px
    );
  box-shadow: 0 0 0 1px rgba(248, 215, 73, 0.34);
  backdrop-filter: blur(1px);
  pointer-events: none;
  z-index: 0;
}

.design-preview-placement-item.active .design-preview-placement-box {
  border-color: rgba(59, 130, 246, 0.7);
}

.design-preview-placement-item:hover:not(.pending-edit) .design-preview-placement-box {
  border-color: rgba(96, 165, 250, 0.82);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 2px rgba(96, 165, 250, 0.22),
    0 8px 20px rgba(15, 23, 42, 0.16);
}

.design-preview-placement-image {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(15, 23, 42, 0.18));
}

.design-preview-placement-item.active {
  z-index: 3;
}

.design-preview-placement-item.active .design-preview-placement-image {
  opacity: 0.42;
}

.design-preview-placement-item:hover:not(.pending-edit) .design-preview-placement-image {
  opacity: 0.28;
}

.design-preview-placement-item:hover:not(.active):not(.pending-edit)::before {
  content: "Bearbeiten";
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(96, 165, 250, 0.72);
  color: #dbeafe;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
  pointer-events: none;
}

.design-preview-placement-item.pending-edit .design-preview-placement-box {
  border-style: solid;
  border-color: rgba(248, 215, 73, 0.9);
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 2px rgba(248, 215, 73, 0.34),
    0 8px 24px rgba(15, 23, 42, 0.08),
    0 0 36px rgba(248, 215, 73, 0.18);
  outline: 2px dashed rgba(248, 215, 73, 0.95);
  outline-offset: 4px;
}

.design-preview-placement-item.pending-edit .design-preview-placement-image {
  opacity: 0.92;
  filter:
    drop-shadow(0 8px 18px rgba(15, 23, 42, 0.18))
    saturate(1.08)
    brightness(1.08);
  position: relative;
  z-index: 1;
}

.design-preview-placement-item.pending-edit .design-preview-target,
.design-preview-placement-item.pending-edit .design-preview-move-handle,
.design-preview-placement-item.pending-edit .design-preview-pending-mask {
  display: none;
}

.design-preview-placement-item.pending-edit::after {
  content: "Vorschau";
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(248, 215, 73, 0.72);
  color: #fef08a;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.design-preview-move-handle {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.34);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 11px;
  line-height: 1;
  font-weight: 400;
  opacity: 0.75;
}

.design-preview-move-handle::before {
  content: "+";
}

.design-preview-target {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: rgba(37, 99, 235, 0.1);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
  display: none;
  pointer-events: none;
}

.design-preview-target::before,
.design-preview-target::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(255, 255, 255, 0.95);
  transform: translate(-50%, -50%);
}

.design-preview-target::before {
  width: 10px;
  height: 1px;
}

.design-preview-target::after {
  width: 1px;
  height: 10px;
}

.design-preview-placement-item.active .design-preview-target {
  display: block;
}

/* Loading overlay: only over the design canvas (sock preview), not full page */
.design-preview-render-busy.design-canvas-loading-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.82);
  border-radius: 12px;
  z-index: 10;
  pointer-events: none;
}

.design-preview-render-busy .design-preview-render-spinner {
  width: 32px;
  height: 32px;
  border-width: 3px;
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.95);
}

.design-canvas-loading-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.design-preview-render-spinner {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: rgba(255, 255, 255, 0.96);
  animation: design-preview-spin 0.8s linear infinite;
}

@keyframes design-preview-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes design-anchor-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.94);
    opacity: 0.7;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(0.94);
    opacity: 0.7;
  }
}

.design-preview-grid-overlay circle {
  fill: rgba(96, 165, 250, 0.9);
  stroke: rgba(219, 234, 254, 0.95);
  stroke-width: 1;
}

.design-preview-grid-overlay circle.active {
  fill: rgba(248, 215, 73, 0.95);
  stroke: rgba(255, 248, 210, 0.98);
  stroke-width: 1.2;
}

.field {
  display: grid;
  gap: 6px;
}

.field-action-btn {
  width: auto;
  justify-self: start;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
  border-color: rgba(134, 239, 172, 0.35);
  background: rgba(134, 239, 172, 0.08);
  color: #bbf7d0;
}

.field label {
  font-size: 13px;
  font-weight: 600;
}

.field-optional-mark {
  font-weight: 500;
  color: var(--muted);
}

.field.field-missing input:not([type="hidden"]),
.field.field-missing select,
.field.field-missing textarea {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
  border-color: rgba(248, 113, 113, 0.95);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.25);
}

.size-quantity-panel.field-missing {
  outline: 2px solid var(--danger);
  outline-offset: 3px;
  border-radius: 14px;
}

.size-quantity-item.field-missing {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
  border-radius: 10px;
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-3);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

/* Native <select> dropdown lists often use a light surface; inherit --text reads as grey on white. */
select option {
  background: #fff;
  color: #0f172a;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

input[type="file"] {
  padding: 8px;
}

input[type="color"] {
  min-height: 44px;
  padding: 6px;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wizard-content .wizard-section > .btn-row:not(.wizard-step-footer-nav),
.wizard-content .wizard-section > .render-progress-panel > .btn-row:not(.wizard-step-footer-nav),
.wizard-content .wizard-section .yarn-single-image-step .btn-row:not(.wizard-step-footer-nav),
.wizard-content .wizard-section .packaging-screen > .btn-row,
.wizard-content .wizard-section .request-form-panel > .request-nav-row {
  order: -1;
  position: static;
  padding: 0 0 12px;
  border: none;
  background: transparent;
}

.request-submit-row {
  margin-top: 6px;
}

.request-submit-row > * {
  flex: 1 1 auto;
}

.btn-row > * {
  flex: 1 1 180px;
}

.btn-row-centered {
  justify-content: center;
}

.btn-row-centered > * {
  flex: 0 0 auto;
}

.wizard-content .wizard-section > .wizard-step-footer-nav.btn-row,
.wizard-content .wizard-section > .render-progress-panel > .wizard-step-footer-nav.btn-row {
  order: 5;
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
}

.wizard-content .wizard-section .yarn-single-image-step > .wizard-step-footer-nav.btn-row {
  margin-top: 24px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.72);
}

.wizard-content .wizard-section .request-form-panel > .wizard-step-footer-nav.request-submit-row {
  margin-top: 16px;
}

.btn-primary,
.btn-secondary {
  cursor: pointer;
}

.btn-secondary.active {
  border-color: rgba(134, 239, 172, 0.58);
  box-shadow: inset 0 0 0 1px rgba(134, 239, 172, 0.34);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: rgba(248, 215, 73, 0.82);
  box-shadow:
    0 0 0 1px rgba(248, 215, 73, 0.22),
    0 10px 24px rgba(248, 215, 73, 0.18);
  font-weight: 700;
}

.btn-secondary-soft {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1));
  color: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 22px rgba(15, 23, 42, 0.18);
}

.btn-secondary-soft:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.14));
}

.btn-with-subheadline {
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
}

.btn-with-subheadline small {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
}

.wizard-forward-icon {
  display: inline-block;
  margin-left: 8px;
  font-weight: 800;
}

.btn-cta-pulse {
  background: rgba(34, 197, 94, 0.22);
  color: #dcfce7;
  border-color: rgba(74, 222, 128, 0.72);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.28);
  animation: ctaPulseGreen 1.15s ease-in-out infinite;
}

.btn-cta-pulse:hover {
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(134, 239, 172, 0.95);
}

@keyframes ctaPulseGreen {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.18);
    transform: translateY(0);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.07);
    transform: translateY(-1px);
  }
}

@keyframes dragFlowPulse {
  0% {
    transform: translateX(0) scale(0.88);
    opacity: 0.3;
  }

  25% {
    opacity: 1;
  }

  100% {
    transform: translateX(calc(100% + 110px)) scale(1.08);
    opacity: 0;
  }
}

.split {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 16px;
}

.dual-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stage-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.stage-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 336px;
  max-width: 100%;
  margin: 0 auto 8px;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.stage-badge.active {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.16);
  color: #dcfce7;
}

.stage-card.active {
  box-shadow: none;
}

.stage-card h3,
.yarn-selection-panel h3 {
  margin: 0 0 10px;
}

.stage-card-foot {
  width: 336px;
  max-width: 100%;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.media-browser {
  position: relative;
  display: grid;
  gap: 12px;
  overflow: visible;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.45);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.template-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.template-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  background: rgba(2, 6, 23, 0.45);
  text-align: left;
  color: inherit;
}

.template-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
}

.template-card strong {
  display: block;
  font-size: 13px;
}

.template-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.template-card.active {
  border-color: rgba(74, 222, 128, 0.72);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35);
}

.asset-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.45);
  cursor: grab;
}

/* Drag-hint: eindeutig als "Ziehen"-Aktion, nicht als Ladeanzeige */
.asset-card.drag-flow-source::before {
  content: "";
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(134, 239, 172, 0.5);
  pointer-events: none;
}

.asset-card-drag-hint {
  position: absolute;
  left: calc(100% + 20px);
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(134, 239, 172, 0.4);
  color: #86efac;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.asset-card-drag-hint::before {
  content: "→ ";
  opacity: 0.9;
}

.asset-card-ready-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  pointer-events: none;
}

.asset-card-main {
  position: relative;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.asset-card.active {
  border-color: rgba(134, 239, 172, 0.58);
  box-shadow: inset 0 0 0 1px rgba(134, 239, 172, 0.34);
}

.asset-card img {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
}

.asset-card span {
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.asset-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.asset-card-action {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 11px;
}

.editor-wrap {
  display: grid;
  gap: 14px;
}

.live-preview-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(248, 215, 73, 0.38);
  background: rgba(248, 215, 73, 0.08);
  cursor: pointer;
}

.live-preview-toggle-copy {
  display: grid;
  gap: 4px;
}

.live-preview-toggle-copy strong {
  font-size: 14px;
}

.live-preview-toggle-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.live-preview-toggle-control {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 32px;
}

.live-preview-toggle-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.live-preview-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.26);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.live-preview-toggle-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff8d2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, background 160ms ease;
}

.live-preview-toggle-control input:checked + .live-preview-toggle-slider {
  background: rgba(74, 222, 128, 0.28);
  border-color: rgba(74, 222, 128, 0.58);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.22);
}

.live-preview-toggle-control input:checked + .live-preview-toggle-slider::after {
  transform: translateX(24px);
  background: #dcfce7;
}

.pulse-attention {
  animation: livePreviewPulse 1.15s ease-in-out infinite;
}

@keyframes livePreviewPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(248, 215, 73, 0.12);
    border-color: rgba(248, 215, 73, 0.38);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(248, 215, 73, 0.04);
    border-color: rgba(248, 215, 73, 0.85);
  }
}

.canvas-shell {
  padding: 0;
  border: 0;
  background: transparent;
}

.canvas-stage-container {
  width: 336px;
  max-width: 100%;
  margin: 0 auto;
}

.canvas-stage-box {
  position: relative;
  width: 100%;
  aspect-ratio: 336 / 1012;
  background: white;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.stage-card.active .canvas-stage-box {
  box-shadow: 0 0 0 2px rgba(134, 239, 172, 0.24), 0 14px 28px rgba(0, 0, 0, 0.18);
  border-color: rgba(134, 239, 172, 0.44);
}

.placement-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.stripe-customize-panel {
  grid-column: 1 / -1;
}

.stripe-customize-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.stripe-mm-formula {
  color: var(--text);
  font-weight: 600;
}

.stripe-customize-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stripe-customize-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1.4fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.stripe-customize-row-label {
  font-size: 13px;
  font-weight: 700;
}

.stripe-customize-row input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: transparent;
  cursor: pointer;
}

.stripe-height-field {
  display: grid;
  gap: 4px;
}

.stripe-height-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.stripe-height-field input[type="number"] {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 13px;
}

.stripe-height-mm {
  font-size: 11px;
  color: var(--muted);
}

.design-edit-hero {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.92));
}

.design-edit-column .design-card:not(.design-edit-hero) {
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.design-edit-column #assisted-design-briefing-card {
  padding-top: 0;
  border-top: none;
}

.mock-edit-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mock-edit-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.mock-edit-meta strong {
  color: var(--text);
}

.mock-edit-label {
  font-size: 13px;
  font-weight: 700;
}

.mock-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mock-segment {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 700;
}

.mock-segment.active {
  border-color: rgba(96, 165, 250, 0.58);
  background: rgba(59, 130, 246, 0.18);
  color: var(--text);
}

.mock-segment:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mock-slider-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.mock-slider-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.mock-slider-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #93c5fd);
}

.mock-slider-fill.size {
  width: 70%;
}

.mock-slider-fill.rotation {
  width: 14%;
}

.mock-range {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  height: 24px;
}

.mock-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.mock-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border-radius: 999px;
  border: 2px solid #dbeafe;
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mock-range::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.mock-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #dbeafe;
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mock-range:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.design-stage-note {
  margin-top: 4px;
  padding: 0;
  background: transparent;
}

.placement-tools > .tooltip-inline,
.placement-tools > button {
  width: 100%;
}

.placement-field {
  grid-column: 1 / -1;
}

.placement-field select {
  background: var(--panel-3);
}

.meta-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(248, 215, 73, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.tooltip-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.field label .tooltip-inline {
  margin-left: 8px;
}

.tooltip-trigger {
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(134, 239, 172, 0.45);
  background: rgba(134, 239, 172, 0.12);
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.tooltip-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(134, 239, 172, 0.28);
  background: rgba(2, 6, 23, 0.96);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
}

.tooltip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: rgba(2, 6, 23, 0.96);
  border-right: 1px solid rgba(134, 239, 172, 0.28);
  border-bottom: 1px solid rgba(134, 239, 172, 0.28);
  transform: translateX(-50%) rotate(45deg);
}

.tooltip-inline:hover .tooltip-bubble,
.tooltip-inline:focus-within .tooltip-bubble {
  opacity: 1;
  visibility: visible;
}

.render-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.preview-frame {
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.45);
}

.preview-frame.request-preview-frame {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: white;
  cursor: crosshair;
}

.render-progress-panel {
  display: grid;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
  padding: 12px 6px 24px;
}

.render-progress-hero {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.render-progress-hero h2 {
  margin: 0;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.05;
  color: rgba(255, 255, 255, 0.98);
}

.render-progress-copy {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.82);
  text-align: center;
}

.render-progress-ascii-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
}

.render-progress-ascii-shell::before {
  content: "";
  position: absolute;
  width: min(360px, 62vw);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(157, 210, 159, 0.3) 0%, rgba(157, 210, 159, 0.14) 38%, rgba(15, 23, 42, 0) 72%);
  filter: blur(18px);
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.progress-bar-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #9dd29f;
  transition: width 220ms ease;
  box-shadow: 0 0 18px rgba(157, 210, 159, 0.28);
}

.render-progress-meter {
  display: grid;
  gap: 10px;
}

.render-progress-percent {
  justify-self: end;
  font-size: 18px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
}

.ascii-sock {
  margin: 0;
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #9dd29f;
  font-family: Inter, sans-serif;
  font-size: 10px;
  line-height: 1;
  white-space: pre;
  text-shadow:
    0 0 12px rgba(157, 210, 159, 0.32),
    0 0 30px rgba(157, 210, 159, 0.2);
}

.ascii-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(calc(-1 * var(--fall-distance, 24px)));
  filter: blur(1.2px) brightness(1.35);
  will-change: transform, opacity, filter;
}

.ascii-char.revealed {
  opacity: 1;
  animation: asciiFall 640ms cubic-bezier(0.2, 0.72, 0.16, 1) forwards;
}

@keyframes asciiFall {
  from {
    opacity: 0;
    transform: translateY(calc(-1 * var(--fall-distance, 24px)));
    text-shadow: 0 0 0 rgba(157, 210, 159, 0);
    filter: blur(2px) brightness(1.9);
  }
  35% {
    opacity: 0.9;
    text-shadow:
      0 0 12px rgba(157, 210, 159, var(--char-glow, 0.38)),
      0 0 22px rgba(157, 210, 159, calc(var(--char-glow, 0.38) * 0.7));
    filter: blur(0.7px) brightness(2.2);
  }
  72% {
    opacity: 1;
    text-shadow:
      0 0 8px rgba(157, 210, 159, calc(var(--char-glow, 0.38) * 0.8)),
      0 0 16px rgba(157, 210, 159, calc(var(--char-glow, 0.38) * 0.45));
    filter: blur(0.15px) brightness(1.25);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 0 6px rgba(157, 210, 159, calc(var(--char-glow, 0.38) * 0.55));
    filter: blur(0) brightness(1.05);
  }
}

.render-progress-actions {
  justify-content: center;
}

.render-progress-actions > * {
  flex: 0 1 auto;
}

.render-progress-message {
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.94);
  font-size: 18px;
  line-height: 1.55;
  text-align: center;
}

.render-progress-hash {
  color: rgba(226, 232, 240, 0.88);
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.render-progress-hash strong {
  font-family: Inter, sans-serif;
  color: #9dd29f;
  font-weight: 700;
}

.render-progress-panel.is-success .render-progress-copy {
  max-width: 620px;
}

.render-progress-panel.is-success .render-progress-ascii-shell {
  min-height: 420px;
}

.render-progress-panel.is-success .render-progress-message {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.render-progress-panel.is-success .render-progress-meter {
  max-width: 580px;
  margin: 0 auto;
  width: 100%;
}

.render-progress-panel.is-success .ascii-sock {
  transform: scale(1.08);
}

.render-progress-panel.is-error .render-progress-message {
  border-color: rgba(248, 113, 113, 0.22);
  background: rgba(127, 29, 29, 0.18);
  color: #fecaca;
}

.yarn-single-image-step {
  display: grid;
  gap: 12px;
}

.yarn-colors-workbench {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.yarn-colors-sidebar {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.yarn-colors-sidebar .yarn-slot-content span,
.yarn-colors-sidebar .yarn-slot-meta,
.yarn-colors-sidebar .yarn-selection-content > span,
.yarn-colors-sidebar .yarn-selection-content .yarn-slot-meta,
.yarn-colors-sidebar .yarn-selection-actions {
  display: none;
}

.yarn-colors-sidebar .yarn-slot-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Canvas palette (Linke/Rechte Seite): same layout as Bereichsfarben, 99x119px cards */
#canvas-palette-point-list.yarn-slot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#canvas-palette-point-list .yarn-summary-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
#canvas-palette-point-list .yarn-status-head {
  grid-column: 1 / -1;
}
#canvas-palette-point-list .palette-point-meta,
#canvas-palette-point-list .yarn-selection-actions {
  display: none;
}
#canvas-palette-point-list .yarn-card-preview-btn,
#canvas-palette-point-list .yarn-card-preview-frame {
  width: 99px;
  height: 119px;
  min-width: 99px;
  min-height: 119px;
}
#canvas-palette-point-list .yarn-card-preview-fallback {
  width: 99px;
  height: 119px;
}
#canvas-palette-point-list .yarn-card-preview-image {
  width: 99px;
  height: 119px;
  object-fit: contain;
}

.yarn-colors-sidebar .yarn-slot-item,
.yarn-colors-sidebar .yarn-selection-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
}

.yarn-colors-sidebar .yarn-card-preview-btn,
.yarn-colors-sidebar .yarn-card-preview-frame {
  flex: 0 0 auto;
  align-self: center;
}

.yarn-colors-sidebar .yarn-selection-content strong,
.yarn-colors-sidebar .yarn-slot-content strong {
  display: block;
  text-align: center;
  font-size: 12px;
}

.yarn-colors-stage {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.yarn-render-actions {
  display: grid;
  gap: 8px;
}
.yarn-render-actions .btn-block {
  width: 100%;
}

.yarn-palette-panel {
  display: grid;
  gap: 4px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.yarn-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.yarn-status-total {
  font-size: 13px;
  color: var(--muted);
}

.palette-point-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.yarn-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.yarn-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-chip.done {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.36);
  background: rgba(74, 222, 128, 0.12);
}

.status-chip.open {
  color: #fde68a;
  border-color: rgba(248, 215, 73, 0.28);
  background: rgba(248, 215, 73, 0.1);
}

.status-chip.rgb {
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
}

.yarn-palette-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.yarn-palette-side {
  display: grid;
  gap: 10px;
}

.yarn-slot-list {
  display: grid;
  gap: 4px;
}

.yarn-summary-block {
  display: grid;
  gap: 4px;
}

.yarn-colors-toggle {
  margin-bottom: 2px;
}

.yarn-summary-block h4 {
  margin: 0;
  font-size: 14px;
}

.yarn-slot-item {
  display: grid;
  grid-template-columns: min-content minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.yarn-slot-picker {
  width: 52px;
  min-width: 52px;
  height: 44px;
  padding: 4px;
}

.yarn-slot-picker.palette-slot-empty {
  border: 1px dashed rgba(148, 163, 184, 0.32);
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(148, 163, 184, 0.2) 48% 52%, transparent 52% 100%),
    linear-gradient(225deg, transparent 0 48%, rgba(148, 163, 184, 0.2) 48% 52%, transparent 52% 100%);
}

.yarn-card-preview-btn,
.yarn-card-preview-frame {
  position: relative;
  width: fit-content;
  height: fit-content;
  min-width: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
}

.yarn-card-preview-btn {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.yarn-card-preview-btn:hover,
.yarn-card-preview-btn:focus-visible {
  outline: 2px solid rgba(250, 204, 21, 0.6);
  outline-offset: 1px;
}

.yarn-card-preview-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  vertical-align: top;
  background: transparent;
}

.yarn-card-preview-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 119px;
  padding: 6px;
  text-align: center;
  font-size: 10px;
  color: rgba(15, 23, 42, 0.72);
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.85), rgba(241, 245, 249, 1));
}

.yarn-slot-content {
  display: grid;
  gap: 4px;
}

.yarn-slot-content strong {
  font-size: 14px;
}

.yarn-slot-content span {
  color: var(--muted);
  font-size: 12px;
}

.yarn-slot-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.color-pick-btn {
  width: auto;
  justify-self: start;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
}

.color-pick-btn.active {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
}

.yarn-map-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.4);
}

.yarn-map-wrap.large {
  min-height: 820px;
}

.yarn-map-wrap img {
  display: block;
  width: 100%;
  height: auto;
  background: white;
}

.yarn-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.96);
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.yarn-transition-overlay.hidden {
  display: flex !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.yarn-transition-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
}

.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}

.loading-indicator-slim {
  padding: 8px 0;
  min-height: 40px;
}

.loading-indicator-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(157, 210, 159, 0.22);
  border-top-color: #9dd29f;
  border-radius: 50%;
  animation: loading-spinner 0.7s linear infinite;
}

.loading-indicator-slim .loading-indicator-spinner {
  width: 24px;
  height: 24px;
  border-width: 2px;
  border-color: rgba(157, 210, 159, 0.2);
  border-top-color: #9dd29f;
}

@keyframes loading-spinner {
  to {
    transform: rotate(360deg);
  }
}

.yarn-transition-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.yarn-transition-overlay-headline {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.98);
  text-shadow: 0 0 24px rgba(74, 222, 128, 0.35);
}

.yarn-transition-overlay-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.85);
}

.yarn-preview-render-busy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.85);
  z-index: 10;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.yarn-preview-render-busy.hidden {
  display: flex !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.yarn-preview-render-busy-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.yarn-preview-render-busy-headline {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.yarn-hotspot-layer {
  display: none; /* Highlights only in sidebar */
}

.canvas-palette-hotspot-layer {
  display: none; /* Highlights only in sidebar */
}

.canvas-palette-group {
  position: absolute;
  display: grid;
  gap: 8px;
  width: min(320px, 42%);
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.canvas-palette-group-left {
  left: 14px;
  top: 14px;
}

.canvas-palette-group-right {
  right: 14px;
  top: 14px;
}

.canvas-palette-group-shared {
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 28px));
}

.canvas-palette-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.canvas-palette-group-head span {
  color: var(--muted);
}

.canvas-palette-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.canvas-palette-slot {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.82);
  color: inherit;
  font: inherit;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.canvas-palette-slot:hover,
.canvas-palette-slot:focus-visible,
.canvas-palette-slot.active {
  border-color: rgba(56, 189, 248, 0.38);
  background: rgba(15, 23, 42, 0.92);
  transform: translateY(-1px);
}

.canvas-palette-slot.empty {
  border-style: dashed;
}

.canvas-palette-slot-swatch {
  display: block;
  width: 100%;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(148,163,184,0.05));
}

.canvas-palette-slot.empty .canvas-palette-slot-swatch {
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(148, 163, 184, 0.2) 48% 52%, transparent 52% 100%),
    linear-gradient(225deg, transparent 0 48%, rgba(148, 163, 184, 0.2) 48% 52%, transparent 52% 100%);
}

.canvas-palette-slot-label {
  font-size: 12px;
  font-weight: 700;
}

.yarn-hotspot {
  position: absolute;
  width: auto;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(248, 215, 73, 0.28);
  background: rgba(2, 6, 23, 0.86);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.yarn-hotspot.active {
  border-color: rgba(248, 215, 73, 0.62);
}

.yarn-hotspot-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  flex: 0 0 auto;
}

.yarn-hotspot-label {
  font-size: 12px;
  font-weight: 700;
}

.yarn-selection-overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  z-index: 3;
}

.yarn-selection-item {
  display: grid;
  grid-template-columns: min-content minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.yarn-selection-content {
  display: grid;
  gap: 4px;
}

.yarn-selection-content strong {
  font-size: 14px;
}

.yarn-selection-content span {
  color: var(--muted);
  font-size: 12px;
}

.yarn-selection-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reload-icon-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(248, 215, 73, 0.34);
  background: rgba(248, 215, 73, 0.08);
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.wizard-main.focus-yarn-step {
  grid-template-columns: 1fr;
}

.wizard-preview.hidden {
  display: none;
}

/* Hide preview on step 1 so main content stays clickable; does not rely on JS toggle */
.wizard-main.wizard-step-1 .wizard-preview {
  display: none !important;
}

.wizard-main .wizard-content {
  position: relative;
  z-index: 1;
}

.admin-map-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-map-controls,
.admin-map-stage-panel {
  display: grid;
  gap: 14px;
}

.admin-hotspot {
  cursor: move;
}

.yarn-map-wrap.admin {
  min-height: 920px;
}

.render-preview-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: white;
}

#harmonization-image.picking-color {
  cursor: crosshair;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}

.render-meta {
  display: grid;
  gap: 10px;
}

.code-block {
  width: 100%;
  min-height: 200px;
  background: rgba(2, 6, 23, 0.55);
  font-family: Inter, sans-serif;
  font-size: 12px;
}

.status {
  min-height: 24px;
  font-weight: 600;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

/* Top-right alert: status(..., ..., "error") surfaces here so validation stays visible when inline status is off-screen */
.assisted-briefing-validation {
  margin-top: 10px;
  min-height: 0;
}

.assisted-briefing-validation:empty {
  display: none;
}

.wizard-toast {
  position: fixed;
  z-index: 100000;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: auto;
  left: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 24px));
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(24, 10, 14, 0.98);
  color: #fecaca;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 16px 48px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.wizard-toast.wizard-toast--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.wizard-toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.wizard-toast-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(254, 202, 202, 0.75);
}

.wizard-toast-text {
  margin: 0;
  font-weight: 600;
  min-width: 0;
}

.wizard-toast-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -6px -8px -6px 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(252, 231, 232, 0.85);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.wizard-toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.import-website-logo-status {
  margin-top: 8px;
  font-size: 13px;
}

.harmonize-params-panel {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.52);
}

.harmonize-params-panel strong {
  font-size: 13px;
}

.harmonize-params-output {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
  font-family: Inter, sans-serif;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.72);
  z-index: 50;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(80vh, 900px);
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(134, 239, 172, 0.2);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
}

.asset-editor-modal-card {
  width: min(1040px, 100%);
}

.asset-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 340px);
  gap: 18px;
  margin-bottom: 18px;
}

.asset-editor-preview-panel,
.asset-editor-controls {
  min-width: 0;
}

.asset-editor-preview-frame {
  position: relative;
  min-height: 420px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    linear-gradient(45deg, rgba(255,255,255,0.08) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.08) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.08) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.08) 75%),
    rgba(255, 255, 255, 0.03);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  overflow: hidden;
}

.asset-editor-preview-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.asset-editor-controls {
  display: grid;
  gap: 12px;
}

.asset-editor-control-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.asset-editor-crop-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.asset-editor-tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.asset-editor-tool-tabs .asset-editor-tool-tab {
  min-width: 0;
  flex: 1 1 auto;
}

.asset-editor-recolor-intro {
  margin-bottom: 4px;
}

.asset-editor-recolor-method-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.asset-editor-recolor-method-row .asset-editor-recolor-method {
  min-width: 0;
  flex: 1 1 120px;
}

.asset-editor-pipeline-order {
  margin: 0 0 12px;
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0 0 4px;
}

.modal-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-close-btn {
  width: auto;
  flex: 0 0 auto;
}

.section-header-with-guide {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editor-guide-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.guide-inline-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 40px;
  border-radius: 999px;
}

.guide-inline-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

/* Editor Guide: compact floating tooltip-style popover next to target, no full-screen overlay */
.editor-guide-popover {
  position: fixed;
  z-index: 60;
  padding: 8px;
  pointer-events: none;
}
.editor-guide-popover.hidden {
  display: none !important;
}
.editor-guide-popover:not(.hidden) {
  display: block;
  pointer-events: auto;
}
.editor-guide-popover-card {
  width: min(300px, calc(100vw - 24px));
  padding: 14px 36px 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(134, 239, 172, 0.25);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(250, 204, 21, 0.15);
}
.editor-guide-popover-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.15);
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.editor-guide-popover-close:hover {
  background: rgba(148, 163, 184, 0.28);
}
.editor-guide-popover-body {
  margin-bottom: 12px;
}
.editor-guide-popover-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.editor-guide-popover-copy {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.editor-guide-popover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.editor-guide-popover-actions .btn-secondary,
.editor-guide-popover-actions .btn-primary {
  padding: 6px 12px;
  font-size: 13px;
}
.editor-guide-popover .editor-guide-step-index {
  display: block;
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.editor-guide-modal-card {
  width: min(700px, 100%);
}

.process-guard-modal {
  z-index: 100;
}

.process-guard-modal-card {
  width: min(620px, 100%);
  border-color: rgba(248, 113, 113, 0.4);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.4);
}

.process-guard-debug-wrap {
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.process-guard-debug {
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(248, 180, 180, 0.95);
  font-family: Inter, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow: auto;
}

.editor-guide-step-index {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.editor-guide-target {
  outline: 3px solid rgba(250, 204, 21, 0.9);
  outline-offset: 4px;
  border-radius: 8px;
}

.suggestion-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.suggestion-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.42);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.suggestion-item:hover,
.suggestion-item:focus-visible {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(10, 26, 33, 0.9);
  transform: translateY(-1px);
}

.suggestion-item[data-default-suggestion="true"] {
  border-color: rgba(250, 204, 21, 0.35);
}

.suggestion-swatch {
  width: 100%;
  height: 56px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.suggestion-card {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  vertical-align: top;
  border-radius: 0;
  border: none;
  background: transparent;
}

.suggestion-card-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 119px;
  padding: 6px;
  text-align: center;
  font-size: 11px;
  color: rgba(15, 23, 42, 0.72);
}

/* Modal: fixed 160x110 for all color cards */
.modal-overlay .yarn-card-preview-btn,
.modal-overlay .yarn-card-preview-frame {
  position: relative;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  height: 110px;
  min-height: 110px;
  max-height: 110px;
}

.modal-overlay .yarn-card-preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.modal-overlay .yarn-card-preview-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.modal-overlay .suggestion-card {
  width: 160px;
  height: 110px;
  object-fit: contain;
  object-position: center;
}

.modal-overlay .suggestion-card-fallback {
  width: 160px;
  height: 110px;
}

.suggestion-content {
  display: grid;
  gap: 4px;
  width: 100%;
}

.suggestion-name {
  margin: 0;
  font-weight: 700;
  display: block;
}

.suggestion-meta {
  color: var(--muted);
  font-size: 13px;
  display: block;
}

.yarn-suggestion-controls {
  grid-template-columns: 80px minmax(120px, 200px);
  align-items: end;
}

.yarn-suggestion-color-field,
.yarn-suggestion-hex-field {
  align-content: start;
}

.yarn-suggestion-color-field {
  position: relative;
  width: fit-content;
}

.modal-overlay .yarn-suggestion-color-field {
  width: 80px;
}

.yarn-suggestion-color-field input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 82px;
  min-height: 119px;
  opacity: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
}

.modal-overlay .yarn-suggestion-color-field input[type="color"] {
  min-width: 80px;
  min-height: 55px;
}

.yarn-suggestion-color-field .yarn-card-preview-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.modal-overlay .yarn-suggestion-color-field .yarn-card-preview-frame {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
  height: 55px;
  min-height: 55px;
  max-height: 55px;
}

.yarn-suggestion-rgb-tile {
  flex: 1;
  min-width: 80px;
  min-height: 55px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: block;
}

.yarn-suggestion-hex-field input {
  max-width: 220px;
  font-family: Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.yarn-suggestion-preview-wrap {
  position: relative;
  min-height: 200px;
  margin-top: 16px;
}

.yarn-suggestion-list-headline {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.95);
}

.suggestion-list-overlay {
  margin: 0;
  padding: 0 0 12px 0;
}

.yarn-suggestion-canvas-section {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.yarn-suggestion-preview-wrap .yarn-suggestion-canvas-section {
  margin: 0 0 8px;
}

.yarn-suggestion-canvas-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.yarn-suggestion-canvas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.yarn-suggestion-canvas-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.46);
}

.yarn-suggestion-canvas-head {
  display: grid;
  gap: 4px;
}

.yarn-suggestion-canvas-head strong {
  font-size: 14px;
}

.yarn-suggestion-canvas-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.yarn-suggestion-canvas-image {
  display: block;
  width: 100%;
  aspect-ratio: 336 / 1012;
  object-fit: contain;
  border-radius: 12px;
  background: white;
  cursor: crosshair;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.yarn-suggestion-canvas-image:hover,
.yarn-suggestion-canvas-image:focus-visible {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.42);
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .layout,
  .wizard-main,
  .design-workbench,
  /* Higher specificity than .design-workbench.integrated-sidebar so mobile stacks preview below sidebar */
  .design-workbench.integrated-sidebar,
  .admin-map-layout,
  .yarn-colors-workbench,
  .split,
  .canvas-source-grid,
  .dual-stage-grid,
  .yarn-palette-columns,
  .render-shell {
    grid-template-columns: 1fr;
  }

  .yarn-selection-overlay {
    grid-template-columns: 1fr;
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .steps {
    position: static;
    padding: 10px 12px;
  }

  .asset-editor-layout {
    grid-template-columns: 1fr;
  }

  .wizard-preview {
    position: static;
    width: 100%;
    justify-self: stretch;
  }

  .request-layout {
    grid-template-columns: 1fr;
  }

  .asset-card.drag-flow-source::before,
  .asset-card-drag-hint {
    display: none;
  }

  .packaging-detail-grid {
    grid-template-columns: 1fr;
  }

  /* Keep Labels / Banderole / Keine Verpackung in one row; do not collapse when the upload panel is hidden. */
  .packaging-screen > .packaging-option-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sock-option-grid {
    grid-template-columns: 1fr;
  }

  .suggestion-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .yarn-colors-sidebar .yarn-slot-list {
    grid-template-columns: repeat(2, 1fr);
  }

  #canvas-palette-point-list .yarn-summary-block {
    grid-template-columns: repeat(2, 1fr);
  }

  .step-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .design-preview-stage {
    aspect-ratio: 3800 / 4600;
  }
}

@media (max-width: 900px) {
  .ss-site-header .ss-container {
    width: min(calc(100% - 1.25rem), var(--ss-max-width));
  }

  .ss-topbar-inner {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: auto;
    min-width: 0;
  }

  .ss-topbar-inner .ss-brand-row {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: auto;
    justify-content: flex-start;
    gap: 10px;
  }

  .ss-nav-toggle {
    flex-shrink: 0;
  }

  .ss-topbar-inner .ss-brand-row .ss-brand {
    display: block;
    width: auto;
    max-width: 100%;
  }

  .ss-topbar-inner .ss-brand-row .ss-brand img {
    display: block;
    width: auto;
    height: 40px;
    object-fit: contain;
  }

  .ss-topbar-inner .ss-brand-row .ss-brand,
  .ss-brand {
    justify-content: flex-start;
  }

  .ss-header-actions {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    display: none;
    width: min(16rem, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid rgba(15, 23, 42, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.2);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .ss-topbar-inner.is-mobile-menu-open .ss-header-actions {
    display: flex;
  }

  .step-1-categories {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .step-1-category {
    gap: 8px;
  }

  .sock-option-card {
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
  }

  .sock-option-copy {
    min-height: 0;
  }

  .step-1-template-list {
    min-height: 0;
  }

  .site-shell-container {
    width: min(calc(100% - 1rem), var(--ss-max-width));
  }

  .site-shell-header-row {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 10px 0;
    gap: 10px;
  }

  .site-shell-brand {
    justify-content: center;
  }

  .site-shell-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-shell-menu-btn {
    min-width: 0;
    padding: 10px;
  }

  .page {
    padding: 16px;
  }

  .steps {
    position: static;
    overflow: hidden;
  }

  .wizard-content .wizard-section > .btn-row,
  .wizard-content .wizard-section > .render-progress-panel > .btn-row,
  .wizard-content .wizard-section .yarn-single-image-step .btn-row,
  .wizard-content .wizard-section .packaging-screen > .btn-row,
  .wizard-content .wizard-section .request-form-panel > .request-nav-row,
  .wizard-content .wizard-section > .wizard-step-footer-nav.btn-row,
  .wizard-content .wizard-section > .render-progress-panel > .wizard-step-footer-nav.btn-row,
  .wizard-content .wizard-section .yarn-single-image-step > .wizard-step-footer-nav.btn-row {
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .step-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .step-item {
    min-width: 140px;
  }

  .request-field-grid {
    grid-template-columns: 1fr;
  }

  .request-meta-grid {
    grid-template-columns: 1fr;
  }

  .request-field-span-2 {
    grid-column: auto;
  }

  .packaging-card {
    padding: 16px;
  }

  .packaging-screen > .packaging-option-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .packaging-option-card {
    padding: 14px;
    border-radius: 16px;
  }

  .packaging-option-card strong {
    font-size: 16px;
  }

  .size-quantity-hint-block {
    margin-bottom: 8px;
  }

  .size-quantity-mindestmenge-img {
    width: 100%;
    max-width: 100%;
  }

  .size-quantity-hint {
    font-size: 12px;
  }

  .size-quantity-hint-cta {
    white-space: normal;
  }

  .size-quantity-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 16px;
  }

  .size-quantity-item-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .size-quantity-item input[type="number"] {
    width: 100%;
    min-height: 42px;
  }

  .size-quantity-item input[type="range"] {
    grid-column: auto;
    width: 100%;
  }

  .size-quantity-summary {
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .size-quantity-summary-row {
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .packaging-price-line {
    font-size: 20px;
  }

  .packaging-upload-copy,
  .packaging-notes-label {
    font-size: 17px;
  }

  .design-mode-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .design-stage-toggle-group {
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .design-mode-chip {
    min-width: 0;
  }

  .design-stage-toolbar {
    align-items: flex-start;
  }

  .design-stage-status {
    flex-direction: column;
    align-items: stretch;
  }

  .mock-segmented {
    grid-template-columns: 1fr;
  }

  .canvas-shell {
    padding: 10px;
  }

  .design-preview-stage {
    aspect-ratio: 3800 / 4600;
  }
}

/* Wizard header: narrow viewports stack the brand (centered); wider tablet keeps logo + burger one row. */
@media (max-width: 719px) {
  body[data-template-category^="wizard"] .ss-topbar-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: flex-start;
  }

  body[data-template-category^="wizard"] .ss-topbar-inner .ss-brand-row {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }

  body[data-template-category^="wizard"] .ss-topbar-inner .ss-brand-row .ss-brand {
    margin-left: auto;
    margin-right: auto;
  }

  body[data-template-category^="wizard"] .ss-topbar-inner .ss-nav-toggle {
    align-self: flex-end;
  }
}

/* Render simulation mode: flash when render would trigger */
.render-simulation-flash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: rgba(248, 215, 73, 0.4);
  opacity: 0;
  transition: opacity 80ms ease-out;
}
.render-simulation-flash--active {
  opacity: 1;
  transition: opacity 80ms ease-in;
}

.render-simulation-badge {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 99998;
  padding: 6px 12px;
  background: rgba(248, 215, 73, 0.95);
  color: #171717;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Pre–step-2 design path: assisted mode (upload + briefing only) */
.assisted-design-only {
  display: none !important;
}

body.wizard-design-assisted [data-design-assist-hide] {
  display: none !important;
}

body.wizard-design-assisted .section-header-with-guide.design-step-header-row .wizard-editor-guide-trigger {
  display: none !important;
}

body.wizard-design-assisted #design-workbench.design-workbench {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: min(1080px, 100%);
  margin-left: auto;
  margin-right: auto;
}

body.wizard-design-assisted .assisted-design-only {
  display: block !important;
}

body.wizard-design-assisted #assisted-to-quote-btn.assisted-design-only,
body.wizard-design-assisted .step-2-footer-row > [data-assisted-to-quote].assisted-design-only {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.wizard-design-assisted .design-step-standard-actions {
  display: none !important;
}

body.wizard-design-template-editor [data-self-designer-hide-upload] {
  display: none !important;
}

/* Equal halves: avoid inline-flex min-content collapsing the primary button */
body.wizard-design-assisted .step-2-footer-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow-x: visible;
}

body.wizard-design-assisted .step-2-footer-row > .btn-secondary[data-go-step="1"],
body.wizard-design-assisted .step-2-footer-row > #assisted-to-quote-btn,
body.wizard-design-assisted .step-2-footer-row > [data-assisted-to-quote] {
  flex: 1 1 0 !important;
  min-width: 0;
  max-width: none;
  width: auto;
}

/* Step 2: four equal visual columns — Zurück 20%, shortcuts 30% / 30%, Guide 20%; no horizontal scroll */
.step-2-footer-row {
  display: grid;
  grid-template-columns: 2fr 3fr 3fr 2fr;
  gap: 10px;
  align-items: stretch;
  overflow-x: visible;
  flex-wrap: unset;
}

.step-2-footer-row .design-step-standard-actions {
  display: contents;
}

.step-2-footer-row > .btn-secondary[data-go-step="1"],
.step-2-footer-row .design-step-standard-actions > .btn-secondary,
.step-2-footer-row .design-step-standard-actions > .btn-primary,
.step-2-footer-row .design-step-standard-actions > .guide-inline-btn {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  box-sizing: border-box;
}

.step-2-footer-row .design-step-standard-actions > .guide-inline-btn {
  justify-content: center;
}

.step-2-footer-row .btn-with-subheadline {
  white-space: normal;
  overflow-wrap: anywhere;
  padding-left: 8px;
  padding-right: 8px;
}

.step-2-footer-row.btn-row > * {
  flex: unset;
}

#assisted-design-briefing-card > .btn-row.step-2-footer-row {
  margin: 40px 0;
}

.assisted-briefing-design-block {
  margin: 0 0 20px;
}

/* Narrow copy; full-width row for design-type thumbnails */
.assisted-briefing-design-head {
  max-width: 38rem;
  margin: 0 auto 16px;
}

.assisted-briefing-design-head .assisted-briefing-design-intro {
  margin-bottom: 0;
}

.assisted-briefing-design-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  text-align: center;
  line-height: 1.3;
}

.assisted-briefing-design-intro {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.assisted-briefing-design-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

/* Sport + Klassik-Sportbund: three choices in one row */
.assisted-briefing-design-grid--sport {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 680px) {
  #assisted-briefing-design-classic .assisted-briefing-design-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assisted-briefing-design-grid--sport {
    grid-template-columns: 1fr;
  }
}

#assisted-design-briefing-card .assisted-briefing-design-thumb-wrap {
  max-width: 100%;
}

.assisted-briefing-design-option {
  display: block;
  margin: 0;
  position: relative;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.assisted-briefing-design-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.assisted-briefing-design-option:has(input:checked) {
  border-color: rgba(74, 222, 128, 0.72);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35);
}

.assisted-briefing-design-option:has(input:checked)::before {
  content: "Ausgewählt";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: #15803d;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.assisted-briefing-design-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

.assisted-briefing-design-option-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 12px;
}

.assisted-briefing-design-thumb-wrap {
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.assisted-briefing-design-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assisted-briefing-design-check {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.85);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.assisted-briefing-design-check::after {
  content: "×";
}

.assisted-briefing-design-option:has(input:checked) .assisted-briefing-design-check {
  background: var(--accent);
  color: var(--accent-text, #171717);
}

.assisted-briefing-design-option:has(input:checked) .assisted-briefing-design-check::after {
  content: "✓";
}

.assisted-briefing-design-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
  padding: 0 4px;
}

.assisted-briefing-design-option:has(input:checked) .assisted-briefing-design-label {
  color: var(--text, #e2e8f0);
}

.design-path-modal-actions {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.design-path-modal-card .design-path-choice-btn {
  width: 100%;
  justify-content: center;
}

.design-path-modal-footer {
  margin-top: 12px;
  justify-content: flex-start;
}

.design-path-modal-footer > * {
  flex: 0 0 auto;
}
