:root {
  color-scheme: light;
  --canvas: #eef1f0;
  --surface: #ffffff;
  --surface-subtle: #f7f8f7;
  --ink: #171918;
  --muted: #686e6b;
  --line: #d7dcda;
  --line-strong: #aeb6b2;
  --primary: #252826;
  --primary-hover: #111312;
  --accent: #3f6f8f;
  --accent-soft: #eaf2f7;
  --love: #b23b62;
  --turquoise: #158f8a;
  --turquoise-soft: #dff3f1;
  --danger: #a22b33;
  --focus: #3f6f8f;
  --shadow: 0 12px 32px rgba(23, 25, 24, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.app-header {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 72px;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 15;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-logo {
  display: block;
  height: 46px;
  object-fit: contain;
  width: 46px;
}

.brand-lockup p,
.brand-lockup h1 {
  margin: 0;
}

.brand-lockup p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-lockup h1 {
  font-size: 20px;
  font-weight: 760;
  line-height: 1.2;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 18px;
}

.cart-trigger {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 740;
  gap: 9px;
  min-height: 38px;
  padding: 6px 8px 6px 12px;
}

.cart-trigger:hover {
  border-color: #707773;
}

.cart-trigger span {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  height: 23px;
  justify-content: center;
  min-width: 23px;
  padding: 0 5px;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.config-panel {
  background: var(--surface);
  border-right: 1px solid var(--line);
  min-width: 0;
}

.config-panel form {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.form-section {
  border-bottom: 1px solid var(--line);
  padding: 25px 28px 27px;
}

.section-heading,
.download-heading-row > div {
  align-items: baseline;
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.section-heading h2,
.download-heading-row h2 {
  font-size: 16px;
  font-weight: 760;
  margin: 0;
}

.section-number {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.optional-toggle {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 11px;
  grid-template-columns: 38px minmax(0, 1fr);
}

.optional-toggle input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.optional-toggle-control {
  background: #cfd5d2;
  border-radius: 999px;
  height: 22px;
  padding: 3px;
  transition: background-color 140ms ease;
  width: 38px;
}

.optional-toggle-control i {
  background: var(--surface);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(23, 25, 24, 0.22);
  display: block;
  height: 16px;
  transform: translateX(0);
  transition: transform 140ms ease;
  width: 16px;
}

.optional-toggle input:checked + .optional-toggle-control {
  background: var(--accent);
}

.optional-toggle input:checked + .optional-toggle-control i {
  transform: translateX(16px);
}

.optional-toggle input:focus-visible + .optional-toggle-control {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
  outline-offset: 2px;
}

.optional-toggle-copy {
  display: grid;
  gap: 2px;
}

.optional-toggle-copy strong {
  font-size: 13px;
}

.optional-toggle-copy small {
  color: var(--muted);
  font-size: 11px;
}

.optional-field-panel {
  border-left: 2px solid var(--line);
  margin-top: 15px;
  padding-left: 14px;
}

.field-label {
  color: #414643;
  display: block;
  font-size: 12px;
  font-weight: 720;
  margin: 18px 0 8px;
}

.font-picker {
  margin-top: 16px;
}

.font-picker-heading {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.font-picker-heading .field-label {
  margin: 0;
}

.font-position {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.font-slider {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.font-slider-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  display: inline-flex;
  font-size: 20px;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.font-slider-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.font-slider-button:disabled {
  cursor: default;
  opacity: 0.32;
}

.font-options {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 3px 0;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
}

.font-options::-webkit-scrollbar {
  display: none;
}

.font-option {
  cursor: pointer;
  flex: 0 0 62%;
  min-width: 0;
  position: relative;
  scroll-snap-align: center;
}

.font-option input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.font-option span {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  display: flex;
  font-size: 20px;
  justify-content: center;
  line-height: 1.1;
  height: 64px;
  overflow-wrap: anywhere;
  padding: 10px;
  text-align: center;
}

.font-option:hover span {
  border-color: #7d8581;
}

.font-option input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.font-option input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
  outline-offset: 2px;
}

fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.text-field-wrap {
  position: relative;
}

input[type="text"],
input[type="number"],
select {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  min-height: 44px;
  width: 100%;
}

input[type="text"] {
  font-size: 17px;
  font-weight: 650;
  padding: 8px 72px 8px 12px;
}

input[type="number"] {
  font-weight: 700;
  padding: 7px 8px;
  text-align: center;
}

select {
  padding: 8px 12px;
}

input[type="text"]:hover,
select:hover {
  border-color: #7d8581;
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-count {
  color: var(--muted);
  font-size: 11px;
  position: absolute;
  right: 12px;
  top: 15px;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
  margin: 7px 0 0;
}

.segmented-control {
  background: #e9ecea;
  border-radius: 6px;
  display: grid;
  gap: 2px;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  padding: 3px;
}

.segmented-control label {
  min-width: 0;
  position: relative;
}

.segmented-control input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.segmented-control span {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #505653;
  display: flex;
  font-size: 13px;
  font-weight: 690;
  justify-content: center;
  min-height: 36px;
  padding: 6px 10px;
  text-align: center;
}

.segmented-control input:checked + span {
  background: var(--surface);
  border-color: #d4d9d6;
  box-shadow: 0 1px 3px rgba(23, 25, 24, 0.08);
  color: var(--ink);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
}

.conditional-panel {
  border-left: 2px solid var(--line);
  margin-top: 18px;
  padding-left: 16px;
}

.role-mode-info {
  align-items: flex-start;
  background: var(--turquoise-soft);
  border-left: 3px solid var(--turquoise);
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
  margin-top: 12px;
  padding: 11px 12px;
}

.role-mode-info-icon {
  align-items: center;
  border: 1px solid #68aaa5;
  border-radius: 50%;
  color: #0f625f;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  margin-top: 1px;
  width: 20px;
}

.role-mode-info strong {
  font-size: 12px;
}

.role-mode-info p {
  color: #315e5b;
  font-size: 11px;
  line-height: 1.45;
  margin: 3px 0 0;
}

.swatch-option {
  position: relative;
}

.swatch-option input,
.preset-option input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.role-sequence {
  display: grid;
  gap: 6px;
}

.role-sequence-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 4px 5px;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.role-sequence-row.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.role-sequence-row.is-dragging {
  opacity: 0.45;
}

.role-selector {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex: 1;
  gap: 10px;
  min-height: 38px;
  min-width: 0;
  padding: 4px 7px;
}

.role-selector input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.role-selector strong {
  font-size: 13px;
}

.role-position {
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 25px;
  font-size: 12px;
  font-weight: 780;
  height: 25px;
  justify-content: center;
}

.role-selector input:checked + .role-position {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.role-selector input:focus-visible + .role-position {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
  outline-offset: 2px;
}

.role-order-controls {
  align-items: center;
  display: flex;
  gap: 4px;
}

.drag-handle {
  color: var(--muted);
  cursor: grab;
  font-size: 17px;
  padding: 0 3px;
}

.role-result {
  align-items: baseline;
  background: var(--surface-subtle);
  border-radius: 5px;
  display: grid;
  gap: 3px;
  margin-top: 9px;
  padding: 9px 11px;
}

.role-result span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
}

.role-result strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.icon-button {
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: inline-flex;
  font-size: 16px;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--line-strong);
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.preset-option input:focus-visible + span,
.swatch-option input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
  outline-offset: 2px;
}

.preset-list {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#preset-panel {
  margin-top: 16px;
}

#preset-panel > .field-label {
  margin-top: 0;
}

.preset-tools {
  display: flex;
  justify-content: flex-end;
  margin: -25px 0 8px;
}

.invert-colors-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 720;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
}

.invert-colors-button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.preset-option {
  display: block;
  position: relative;
}

.preset-option > span {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 18px;
  min-height: 38px;
  padding: 6px 8px;
}

.preset-option input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.preset-colors {
  border: 1px solid #cbd0cd;
  border-radius: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 24px;
  overflow: hidden;
}

.radio-mark {
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  height: 16px;
  position: relative;
  width: 16px;
}

.preset-option input:checked + span .radio-mark::after {
  background: var(--accent);
  border-radius: 50%;
  content: "";
  inset: 3px;
  position: absolute;
}

.swatch-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.custom-color-panel {
  margin-top: 16px;
}

.custom-color-intro {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 8px;
}

.color-step {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.color-step + .color-step {
  margin-top: 8px;
}

.color-step.is-active {
  border-color: var(--accent);
}

.color-step-header {
  align-items: center;
  background: var(--surface);
  border: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  min-height: 54px;
  padding: 7px 10px;
  text-align: left;
  width: 100%;
}

.color-step.is-active .color-step-header {
  background: var(--accent-soft);
}

.color-step-number {
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.color-step.is-active .color-step-number {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.color-step-copy {
  display: grid;
  gap: 2px;
}

.color-step-copy strong {
  font-size: 13px;
}

.color-step-copy small {
  color: var(--muted);
  font-size: 11px;
}

.color-step-sample {
  border: 1px solid rgba(23, 25, 24, 0.24);
  border-radius: 50%;
  height: 26px;
  width: 26px;
}

.color-step-body {
  border-top: 1px solid var(--line);
  padding: 10px;
}

.swatch-option span {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  font-size: 10px;
  font-weight: 650;
  gap: 6px;
  min-height: 58px;
  padding: 7px 4px 6px;
  text-align: center;
}

.swatch-option input:checked + span {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.color-disc {
  border: 1px solid rgba(23, 25, 24, 0.24);
  border-radius: 50%;
  height: 24px;
  width: 24px;
}

.submit-bar {
  background: var(--surface);
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 20px 28px 24px;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.primary-button,
.secondary-button {
  border-radius: 5px;
  font-weight: 740;
  min-height: 44px;
  padding: 10px 16px;
}

.primary-button {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  width: 100%;
}

.primary-button:hover {
  background: var(--primary-hover);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.secondary-button:hover {
  border-color: #707773;
}

.secondary-button:disabled {
  background: var(--surface-subtle);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.submit-bar .secondary-button {
  width: 100%;
}

.product-choice {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 2px;
}

.product-choice .field-label {
  margin-top: 12px;
}

.product-choice-row {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 14px 0;
}

.product-choice-row strong {
  font-size: 16px;
}

.quantity-field {
  display: grid;
  gap: 5px;
  width: 76px;
}

.quantity-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
}

.quantity-field input {
  min-height: 38px;
  width: 100%;
}

.quantity-field input:disabled {
  background: var(--surface-subtle);
  color: var(--muted);
}

.preview-workspace {
  min-width: 0;
  padding: 24px 28px 32px;
}

.workspace-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.workspace-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.dimension-summary {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 110px;
}

.dimension-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.dimension-summary strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.result-label {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 720;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.viewer-reset {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  display: inline-flex;
  font-size: 19px;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.viewer-reset:hover {
  border-color: var(--line-strong);
}

.view-tabs {
  display: flex;
  gap: 4px;
}

.view-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  min-height: 34px;
  padding: 6px 13px;
}

.view-tabs button[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--ink);
}

.view-tabs button:disabled {
  border-color: transparent;
  color: #9ba19e;
  cursor: not-allowed;
}

.preview-stage {
  align-items: center;
  aspect-ratio: 14 / 7.6;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

.preview-stage[data-view="iso"] {
  background: #f5f7f6;
  border-color: transparent;
  box-shadow: none;
}

.preview-image {
  height: 100%;
  inset: 0;
  object-fit: contain;
  position: absolute;
  width: 100%;
}

.live-front-preview {
  display: block;
  height: 100%;
  inset: 0;
  overflow: visible;
  position: absolute;
  width: 100%;
}

.live-front-preview #live-outline {
  pointer-events: none;
}

.live-front-preview #live-outline text,
.live-front-preview #live-outline rect {
  fill: #000000;
  paint-order: normal;
  stroke: none;
}

.live-front-preview #live-insert {
  stroke-opacity: 0.28;
  stroke-width: 3px;
}

.live-front-preview text {
  dominant-baseline: alphabetic;
  paint-order: stroke fill;
  stroke: rgba(23, 25, 24, 0.08);
  stroke-width: 1px;
}

.live-front-preview #live-role,
.live-front-preview #live-outline-role {
  font-family: "Nametag Preview nunito-extra-bold", Nunito, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
}

.live-preview-info {
  background: rgba(255, 255, 255, 0.94);
  border-left: 4px solid var(--accent);
  box-shadow: 0 8px 22px rgba(23, 25, 24, 0.1);
  display: grid;
  gap: 3px;
  left: 16px;
  max-width: 390px;
  padding: 10px 12px;
  position: absolute;
  top: 16px;
  z-index: 3;
}

.live-preview-info strong {
  font-size: 12px;
}

.live-preview-info span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.live-preview-info-mobile {
  display: none;
}

.three-preview,
.three-preview canvas {
  height: 100%;
  width: 100%;
}

.three-preview {
  inset: 0;
  overflow: hidden;
  position: absolute;
}

.three-preview canvas {
  cursor: grab;
  display: block;
  touch-action: none;
}

.three-preview canvas:active {
  cursor: grabbing;
}

.viewer-state {
  align-items: center;
  background: rgba(245, 247, 246, 0.9);
  color: var(--muted);
  display: flex;
  font-size: 13px;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.processing-overlay {
  align-items: center;
  background: rgba(251, 252, 251, 0.92);
  display: flex;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  position: absolute;
  text-align: center;
}

.processing-overlay strong {
  font-size: 17px;
  margin-top: 16px;
}

.processing-overlay span:last-child {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.large-spinner {
  animation: spin 0.85s linear infinite;
  border: 3px solid #dce2df;
  border-radius: 50%;
  border-top-color: var(--turquoise);
  height: 34px;
  width: 34px;
}

.error-banner {
  align-items: center;
  background: #fff5f5;
  border: 1px solid #e6b8bc;
  border-radius: 6px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 14px 16px;
}

.error-banner strong {
  color: var(--danger);
  font-size: 13px;
}

.error-banner p {
  color: #713039;
  font-size: 12px;
  line-height: 1.45;
  margin: 3px 0 0;
}

.download-section {
  padding-top: 26px;
}

.download-heading-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.download-heading-row > div {
  margin: 0;
}

.download-heading-row > span {
  color: var(--muted);
  font-size: 12px;
}

.download-grid {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 15px;
}

.download-link {
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  min-height: 50px;
  padding: 8px 12px;
  text-decoration: none;
}

.download-link:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.download-link:hover {
  background: var(--surface);
}

.download-link strong {
  font-size: 13px;
}

.download-link span {
  color: var(--muted);
  font-size: 11px;
}

.toast {
  background: #202321;
  border-radius: 5px;
  bottom: 22px;
  color: #ffffff;
  font-size: 13px;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 11px 15px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 10;
}

.cart-open {
  overflow: hidden;
}

.cart-backdrop {
  background: rgba(23, 25, 24, 0.3);
  inset: 0;
  position: fixed;
  z-index: 20;
}

.cart-drawer {
  background: var(--surface);
  box-shadow: -14px 0 38px rgba(23, 25, 24, 0.16);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
  max-width: 100%;
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(0);
  transition: transform 180ms ease;
  width: 440px;
  z-index: 21;
}

.cart-drawer[aria-hidden="true"] {
  pointer-events: none;
  transform: translateX(105%);
}

.cart-view,
.checkout-view,
.checkout-view form {
  min-height: 0;
}

.cart-view,
.checkout-view form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
}

.cart-heading-group {
  align-items: center;
  display: flex;
  gap: 12px;
}

.cart-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 15px 22px;
}

.cart-header h2 {
  font-size: 20px;
  margin: 2px 0 0;
}

.cart-header .icon-button {
  font-size: 22px;
}

.cart-heading-group > .icon-button {
  font-size: 17px;
}

.cart-content {
  overflow-y: auto;
  padding: 0 22px;
}

.cart-empty {
  color: var(--muted);
  padding: 58px 20px;
  text-align: center;
}

.cart-empty strong {
  color: var(--ink);
  display: block;
  font-size: 16px;
}

.cart-empty p {
  font-size: 13px;
  line-height: 1.5;
  margin: 7px auto 0;
  max-width: 280px;
}

.cart-item {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.cart-item.has-preview {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 92px minmax(0, 1fr);
}

.cart-item-preview {
  aspect-ratio: 1.4 / 0.76;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: block;
  object-fit: contain;
  width: 92px;
}

.cart-item-body {
  min-width: 0;
}

.cart-item-heading {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.cart-item-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cart-item-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.cart-item-heading strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.cart-item-heading > strong {
  flex: 0 0 auto;
  font-size: 13px;
}

.cart-item p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 10px 0 14px;
}

.cart-item-footer,
.quantity-control {
  align-items: center;
  display: flex;
}

.cart-item-footer {
  justify-content: space-between;
}

.quantity-control {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.quantity-control .icon-button {
  background: var(--surface);
  border: 0;
  border-radius: 0;
  height: 30px;
  width: 31px;
}

.quantity-control > span {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 12px;
  font-weight: 740;
  line-height: 30px;
  min-width: 34px;
  text-align: center;
}

.digital-quantity {
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 0;
}

.danger-button {
  color: var(--danger);
}

.cart-delivery {
  border-bottom: 1px solid var(--line);
  margin-bottom: 17px;
  padding: 0 0 17px;
}

.cart-delivery h3 {
  font-size: 14px;
  margin: 0 0 12px;
}

.delivery-options {
  display: grid;
  gap: 8px;
}

.delivery-options label {
  cursor: pointer;
  display: block;
  position: relative;
}

.delivery-options input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.delivery-options label > span {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 62px;
  padding: 10px 12px;
}

.delivery-options i {
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  grid-row: 1 / span 3;
  height: 19px;
  position: relative;
  width: 19px;
}

.delivery-options strong {
  font-size: 13px;
}

.delivery-options small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.delivery-option-price {
  font-size: 11px;
  grid-column: 2;
}

.delivery-options input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.delivery-options input:checked + span i {
  border-color: var(--accent);
}

.delivery-options input:checked + span i::after {
  background: var(--accent);
  border-radius: 50%;
  content: "";
  inset: 3px;
  position: absolute;
}

.delivery-options input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
  outline-offset: 2px;
}

.cart-summary {
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 22px rgba(23, 25, 24, 0.06);
  max-height: calc(100dvh - 76px);
  overflow-y: auto;
  padding: 17px 22px 20px;
}

.summary-row {
  align-items: center;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.summary-total {
  border-top: 1px solid var(--line);
  font-size: 15px;
  margin: 16px 0 14px;
  padding-top: 14px;
}

.custom-total {
  background: var(--surface-subtle);
  margin-top: 14px;
  padding: 12px;
}

.custom-total-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.custom-total-heading label {
  font-size: 12px;
  font-weight: 760;
}

.custom-total small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.custom-total > div {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.custom-total input {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-weight: 700;
  min-height: 38px;
  min-width: 0;
  padding: 7px 9px;
  width: 100%;
}

.custom-total {
  position: relative;
}

.reset-price {
  color: var(--accent);
  margin-top: 5px;
}

.love-burst {
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
}

.love-burst span {
  animation: love-rise 1.45s ease-out both;
  bottom: 18px;
  color: var(--love);
  font-size: 15px;
  left: var(--heart-x);
  opacity: 0;
  position: absolute;
  text-shadow: 0 1px 2px rgba(93, 23, 40, 0.16);
  transform: translate(-50%, 0) scale(0.75);
  animation-delay: var(--heart-delay);
}

.cart-summary .primary-button {
  min-height: 46px;
}

.checkout-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  margin: 7px 0 0;
  text-align: center;
}

.checkout-content {
  overflow-y: auto;
  padding: 0 22px 24px;
}

.checkout-section {
  border-bottom: 1px solid var(--line);
  padding: 21px 0 24px;
}

.checkout-section h3 {
  font-size: 14px;
  margin: 0 0 14px;
}

.checkout-fields {
  display: grid;
  gap: 12px 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.checkout-fields label {
  display: grid;
  gap: 6px;
  grid-column: span 3;
  min-width: 0;
}

.checkout-fields label > span {
  color: #414643;
  font-size: 11px;
  font-weight: 700;
}

.checkout-fields label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.checkout-fields input,
.checkout-fields select {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  min-height: 41px;
  min-width: 0;
  padding: 7px 9px;
  width: 100%;
}

.checkout-fields select:disabled {
  background: var(--surface-subtle);
  color: var(--muted);
  opacity: 1;
}

.checkout-fields .wide-field {
  grid-column: 1 / -1;
}

.checkout-fields .street-field {
  grid-column: span 4;
}

.checkout-fields .house-number-field {
  grid-column: span 2;
}

.checkout-fields .postal-field {
  grid-column: span 2;
}

.checkout-fields .city-field {
  grid-column: span 4;
}

.check-field {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 9px;
}

.check-field input {
  accent-color: var(--accent);
  height: 18px;
  width: 18px;
}

.checkout-footer {
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 22px rgba(23, 25, 24, 0.06);
  padding: 16px 22px 20px;
}

.checkout-footer .summary-total {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.checkout-valid {
  background: var(--turquoise-soft);
  border: 1px solid #a8d7d3;
  color: #0f625f;
  font-size: 12px;
  font-weight: 720;
  margin-bottom: 10px;
  padding: 9px 10px;
  text-align: center;
}

.confirmation-shell {
  margin: 0 auto;
  max-width: 1240px;
  min-height: calc(100vh - 72px);
  padding: 54px 36px 64px;
  width: 100%;
}

.confirmation-heading {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  padding-bottom: 28px;
}

.confirmation-heading h2,
.confirmation-heading p {
  margin: 0;
}

.confirmation-heading h2 {
  font-size: 30px;
  line-height: 1.2;
  margin-top: 5px;
}

.confirmation-heading p {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 8px;
  max-width: 680px;
}

.confirmation-mark {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  flex: 0 0 54px;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.confirmation-mark .large-spinner {
  height: 24px;
  width: 24px;
}

.confirmation-check {
  display: none;
  font-size: 26px;
  font-weight: 800;
}

.confirmation-mark[data-status="paid"] {
  background: var(--turquoise-soft);
  border-color: #8fcac6;
  color: #0f625f;
}

.confirmation-mark[data-status="paid"] .large-spinner {
  display: none;
}

.confirmation-mark[data-status="paid"] .confirmation-check {
  display: block;
}

.confirmation-layout {
  display: grid;
  gap: 46px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  padding-top: 34px;
}

.share-preview-frame {
  aspect-ratio: 1 / 0.76;
  background: #f5f7f6;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

.share-preview-frame img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.share-preview-state {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 12px;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: absolute;
  text-align: center;
}

.share-copy {
  align-items: flex-end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding-top: 18px;
}

.share-copy h3,
.share-copy p {
  margin: 0;
}

.share-copy h3,
.order-details h3 {
  font-size: 17px;
}

.share-copy p,
.share-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 5px;
}

.share-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.share-actions button {
  min-height: 42px;
  white-space: nowrap;
}

.share-note {
  min-height: 18px;
}

.order-details {
  border-left: 1px solid var(--line);
  min-width: 0;
  padding-left: 34px;
}

.order-reference {
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 0 0 20px;
}

.order-reference span,
.confirmation-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.order-reference strong {
  color: var(--accent);
  font-size: 16px;
}

.order-details h3 {
  margin: 24px 0 12px;
}

.confirmation-items {
  display: grid;
  gap: 8px;
}

.confirmation-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 5px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 13px 14px;
}

.confirmation-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.confirmation-item p {
  color: var(--muted);
  font-size: 11px;
  grid-column: 1 / -1;
  line-height: 1.45;
  margin: 0;
}

.confirmation-summary {
  border-top: 1px solid var(--line);
  margin: 22px 0 0;
  padding-top: 12px;
}

.confirmation-summary > div {
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  padding: 7px 0;
}

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

.confirmation-summary dd {
  font-weight: 750;
  margin: 0;
  text-align: right;
}

.confirmation-summary > div:nth-last-child(2) {
  border-top: 1px solid var(--line);
  font-size: 15px;
  margin-top: 6px;
  padding-top: 14px;
}

.confirmation-error {
  background: #fff5f5;
  border: 1px solid #e8b8bc;
  margin-top: 18px;
  padding: 12px;
}

.confirmation-error p {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 10px;
}

.confirmation-back {
  margin-top: 22px;
}

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

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes love-rise {
  15% {
    opacity: 1;
    transform: translate(-50%, -10px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--heart-drift)), -115px) scale(1.25) rotate(8deg);
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 370px minmax(0, 1fr);
  }

  .preview-workspace {
    padding-left: 20px;
    padding-right: 20px;
  }

}

@media (max-width: 820px) {
  .app-header {
    height: 64px;
    padding: 0 16px;
  }

  .brand-logo {
    height: 40px;
    width: 40px;
  }

  .brand-lockup p {
    display: none;
  }

  .brand-lockup h1 {
    font-size: 17px;
  }

  .header-actions {
    gap: 9px;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 64px);
  }

  .config-panel {
    border-right: 0;
  }

  .form-section {
    padding: 22px 18px 24px;
  }

  .submit-bar {
    border-top: 1px solid var(--line);
    padding: 12px 18px;
    position: static;
  }

  .preview-workspace {
    background: var(--surface-subtle);
    border-bottom: 1px solid var(--line);
    order: -1;
    padding: 18px 16px 20px;
    position: sticky;
    top: 64px;
    z-index: 14;
  }

  .preview-stage {
    aspect-ratio: auto;
    height: clamp(180px, 27svh, 250px);
    min-height: 0;
  }

  .confirmation-shell {
    min-height: calc(100vh - 64px);
    padding: 34px 20px 48px;
  }

  .confirmation-layout {
    gap: 30px;
    grid-template-columns: 1fr;
  }

  .order-details {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 28px;
  }
}

@media (max-width: 520px) {
  .cart-trigger {
    min-height: 36px;
  }

  .cart-drawer {
    width: 100%;
  }

  .cart-header,
  .cart-summary,
  .checkout-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cart-content,
  .checkout-content {
    padding: 0 16px;
  }

  .live-preview-info {
    background: rgba(255, 255, 255, 0.9);
    border: 0;
    bottom: 8px;
    box-shadow: none;
    display: block;
    left: 50%;
    max-width: calc(100% - 16px);
    padding: 6px 9px;
    right: auto;
    top: auto;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .live-preview-info strong,
  .live-preview-info-desktop {
    display: none;
  }

  .live-preview-info .live-preview-info-mobile {
    display: block;
    font-size: 10px;
    line-height: 1.2;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-link:nth-child(odd) {
    border-right: 0;
  }

  .error-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .confirmation-heading h2 {
    font-size: 24px;
  }

  .confirmation-heading {
    gap: 12px;
  }

  .confirmation-mark {
    flex-basis: 44px;
    height: 44px;
    width: 44px;
  }

  .share-preview-frame {
    min-height: 230px;
  }

  .share-copy {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .share-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
