:root {
  --bg: #000000;
  --surface: #000000;
  --surface-subtle: #0d0d10;
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.36);
  --platinum: #d9dbdd;
  --platinum-soft: rgba(217, 219, 221, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #a8abb2;
  --warn-bg: rgba(214, 158, 46, 0.12);
  --warn-border: rgba(236, 184, 72, 0.45);
  --warn-text: #f3d285;
  --danger-bg: rgba(214, 72, 72, 0.14);
  --danger-border: rgba(236, 108, 108, 0.55);
  --danger-text: #ffb4b4;
  --info-bg: rgba(217, 219, 221, 0.08);
  --info-border: rgba(217, 219, 221, 0.28);
  --font-display: 'Gilda Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Familjen Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-sm: 4px;
  --radius-md: 6px;
  --focus-ring: 2px solid #ffffff;
  --header-h: 76px;
}

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

html {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--text-primary);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 0.75rem;
}

/* Header */
.site-header {
  flex: 0 0 auto;
  min-height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  z-index: 10;
}

.site-header__inner {
  min-height: var(--header-h);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-primary);
  text-decoration: none;
}

.brand__logo {
  height: 46px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand__product {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.header-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--platinum);
}

/* Main Split Layout: Mobile-first pinned top stage + scrollable bottom controls */
.studio-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.stage-column {
  position: relative;
  flex: 0 0 auto;
  height: 44dvh;
  min-height: 250px;
  max-height: 420px;
  padding-top: 0.75rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.stage-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
}

.stage-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.stage-viewport canvas:active {
  cursor: grabbing;
}

.stage-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.85);
  color: var(--platinum);
  font-size: 0.875rem;
  z-index: 3;
}

.stage-loading[hidden] {
  display: none;
}

.stage-loading__spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(217, 219, 221, 0.2);
  border-top-color: var(--platinum);
  animation: aqhua-spin 0.9s linear infinite;
}

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

.stage-hint {
  position: absolute;
  left: 50%;
  bottom: 0.65rem;
  transform: translateX(-50%);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.stage-hint[hidden] {
  display: none;
}

.stage-fallback {
  position: absolute;
  inset: 0;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 2;
}

.stage-fallback[hidden] {
  display: none;
}

.stage-fallback__svg-host {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-fallback__svg {
  height: 100%;
  max-height: 360px;
  width: auto;
  display: block;
}

/* Minimal floating camera preset bar */
.stage-toolbar {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 4;
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.camera-btn {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.camera-btn:last-child {
  border-right: 0;
}

.camera-btn:hover {
  color: var(--text-primary);
  background: var(--platinum-soft);
}

/* Scrollable Controls Column */
.controls-column {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
}

.controls-intro {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.controls-intro__title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--text-primary);
}

.controls-intro__lead {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Hairline-divided sections (no rounded cards) */
.panel {
  border-bottom: 1px solid var(--border);
}

.panel__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.panel__summary::-webkit-details-marker {
  display: none;
}

.panel__chevron {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.panel[open] .panel__chevron {
  transform: rotate(225deg);
}

.panel__body {
  padding: 0 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* Form Fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.field__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.field__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.field__counter,
.field__value {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.field__help {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.field__feedback {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--platinum);
}

.field__feedback--warn {
  color: var(--warn-text);
}

.field__feedback--error {
  color: var(--danger-text);
}

.text-input {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.15s ease;
}

.text-input--normal {
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.9375rem;
}

.text-input::placeholder {
  color: rgba(154, 157, 163, 0.55);
}

.text-input:focus {
  border-color: var(--platinum);
  outline: none;
}

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

.range-input {
  width: 100%;
  height: 1.75rem;
  margin: 0;
  accent-color: var(--platinum);
  cursor: pointer;
}

/* Font Picker */
.font-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.font-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.font-option:hover {
  border-color: var(--border-strong);
}

.font-option:has(input:checked) {
  border-color: var(--platinum);
  background: var(--platinum-soft);
}

.font-option__input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.font-option__sample {
  font-size: 1.05rem;
  color: var(--text-primary);
}

.font-preview--familjen-grotesk {
  font-family: 'Familjen Grotesk', sans-serif;
  font-weight: 600;
}

.font-preview--bebas-neue {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.font-preview--montserrat {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

.font-preview--cinzel {
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

.font-preview--lora {
  font-family: 'Lora', serif;
  font-weight: 600;
}

.font-preview--space-grotesk {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.font-preview--bitter {
  font-family: 'Bitter', serif;
  font-weight: 600;
}

.font-option__meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: right;
}

/* Ink Picker */
.ink-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.ink-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.ink-option:hover {
  border-color: var(--border-strong);
}

.ink-option:has(input:checked) {
  border-color: var(--platinum);
  background: var(--platinum-soft);
}

.ink-option__input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.ink-option__swatch {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

.ink-swatch--vit {
  background-color: #ffffff;
}

.ink-swatch--silvergra {
  background-color: #aeb4bc;
}

.ink-swatch--champagne {
  background-color: #e5cfa0;
}

.ink-swatch--isbla {
  background-color: #7dd3fc;
}

.ink-swatch--salvia {
  background-color: #8fbc94;
}

.ink-swatch--julrod {
  background-color: #dc2626;
}

.ink-option__label {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.ink-option__check {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--platinum);
  opacity: 0;
}

.ink-option:has(input:checked) .ink-option__check {
  opacity: 1;
}

/* Text Orientation Toggle */
.orientation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.orientation-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.orientation-option:hover {
  border-color: var(--border-strong);
}

.orientation-option:has(input:checked) {
  border-color: var(--platinum);
  background: var(--platinum-soft);
}

.orientation-option__input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.orientation-option__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

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

.toggle-row__switch {
  position: relative;
  width: 2.35rem;
  height: 1.3rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.toggle-row__switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.toggle-row__input:checked + .toggle-row__switch {
  background: var(--platinum);
  border-color: var(--platinum);
}

.toggle-row__input:checked + .toggle-row__switch::after {
  transform: translateX(1.05rem);
  background: var(--bg);
}

.toggle-row__input:focus-visible + .toggle-row__switch {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.toggle-row__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.toggle-row__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.toggle-row__desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  width: 100%;
  min-height: 2.85rem;
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg);
}

.btn--primary:hover:not(:disabled) {
  background: var(--platinum);
  border-color: var(--platinum);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--platinum-soft);
}

.btn--sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
}

.btn[aria-pressed='true'] {
  border-color: var(--platinum);
  color: var(--text-primary);
  background: var(--platinum-soft);
}

/* Notices */
.notice {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.notice--warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.notice--info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--text-primary);
}

.notice--danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.notice__title {
  display: inline;
  margin-right: 0.25rem;
}

/* Spec & Summary Lists */
.spec-list {
  margin: 0;
  border-top: 1px solid var(--border);
}

.spec-list__item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.spec-list__item dt {
  color: var(--text-secondary);
}

.spec-list__item dd {
  margin: 0;
  color: var(--text-primary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.spec-list__item--strong dd {
  font-weight: 600;
  color: var(--platinum);
}

.detail-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Image Upload & Placement */
.file-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.file-input {
  flex: 1 1 200px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.file-input::file-selector-button {
  appearance: none;
  margin-right: 0.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.image-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.image-placement-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.drag-pad-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drag-pad-canvas {
  width: 96px;
  height: auto;
  aspect-ratio: 146 / 570;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  touch-action: none;
  cursor: move;
}

.image-sliders {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bg-tool {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bg-tool__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bg-tool__backdrop-toggle {
  display: inline-flex;
  gap: 0.35rem;
}

.bg-preview-host {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 220px;
  overflow: hidden;
}

.bg-preview-host--checker {
  background-color: #202227;
  background-image:
    linear-gradient(45deg, #2b2d33 25%, transparent 25%),
    linear-gradient(-45deg, #2b2d33 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2b2d33 75%),
    linear-gradient(-45deg, transparent 75%, #2b2d33 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.bg-preview-host--dark {
  background: var(--bg);
}

.bg-preview-canvas {
  max-width: 100%;
  max-height: 200px;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: crosshair;
  display: block;
}

.bg-color-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.bg-picked-swatch {
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Order Form & Swish Checkout */
.order-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.delivery-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.delivery-option {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.delivery-option:hover {
  border-color: var(--border-strong);
}

.delivery-option:has(input:checked) {
  border-color: var(--platinum);
  background: var(--platinum-soft);
}

.delivery-option__input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.delivery-option__text {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.delivery-option__title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.delivery-option__price {
  font-size: 0.8125rem;
  color: var(--platinum);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.shipping-address-fields {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-top: 0.25rem;
}

.shipping-address-fields[hidden] {
  display: none;
}

.shipping-address-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0.75rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
}

.checkbox-row__input {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--platinum);
  flex-shrink: 0;
}

.checkbox-row__text {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.turnstile-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.order-confirmation {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-confirmation[hidden],
.order-form[hidden] {
  display: none;
}

.order-confirmation__header {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.payment-status {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.payment-status--confirmed {
  border-color: rgba(121, 212, 157, 0.6);
  background: rgba(121, 212, 157, 0.12);
  color: #9be8ba;
  font-weight: 600;
}

.payment-status--cancelled {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.spec-copy-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn--xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

.order-confirmation__title {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-primary);
}

.order-confirmation__order-no {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.order-confirmation__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.swish-qr-box {
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  align-self: center;
}

.swish-qr-canvas {
  display: block;
  width: 200px;
  height: 200px;
}

.order-confirmation__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Desktop Split Pane */
@media (min-width: 960px) {
  :root {
    --header-h: 88px;
  }

  .site-header__inner {
    padding: 0.9rem 1.75rem;
  }

  .brand__logo {
    height: 54px;
  }

  .studio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 460px);
  }

  .stage-column {
    height: 100%;
    min-height: 0;
    max-height: none;
    padding-top: 1.25rem;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }

  .stage-toolbar {
    top: 1.25rem;
    right: 1.25rem;
  }

  .controls-intro {
    padding: 1.5rem 1.5rem 1.15rem;
  }

  .panel__summary {
    padding: 1.05rem 1.5rem;
  }

  .panel__body {
    padding: 0 1.5rem 1.5rem;
  }
}

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

/* ==========================================================================
   AQHUA UI patch
   Append to the END of public/assets/css/styles.css (after the existing
   @media blocks). Pure CSS: no inline styles, no new fonts, no new assets.
   Every selector targets an existing class or id.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
/* Existing token names are re-pointed so older rules re-skin automatically. */
:root {
  --svart: #000000;          /* page, header (the logo JPEG has a black box) */
  --grafit: #131418;         /* resting fill for every control */
  --grafit-upp: #1d1e23;     /* hover / pressed fill */
  --studioljus: #2a2b32;     /* light pool behind the bottle, stage only */
  --stal: #a9adb3;           /* secondary text */
  --tryckvit: #ffffff;       /* chosen option, primary button, values */

  --surface-subtle: var(--grafit);
  --text-secondary: var(--stal);
  --platinum: var(--tryckvit);
  --platinum-soft: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.32);
  --radius-sm: 8px;
  --radius-md: 12px;

  --header-h: 56px;
  --pad: 1.25rem;            /* column gutter */
  --gap: 1.5rem;             /* space between fields */
  --tap: 2.75rem;            /* 44px touch target */
  --ink: #ffffff;            /* set by the :has() rules in section 9 */
}

/* 2. Header ---------------------------------------------------------------- */
.site-header__inner {
  padding: 0.5rem max(var(--pad), env(safe-area-inset-right)) 0.5rem max(var(--pad), env(safe-area-inset-left));
}

.brand__logo {
  height: 36px;
}

.header-price {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--tryckvit);
}

/* 3. Stage: lit plinth, quiet controls ------------------------------------- */
/* The light pool only shows if the WebGL canvas is transparent (see notes). */
.stage-viewport {
  background: radial-gradient(
    ellipse 55% 60% at 50% 52%,
    var(--studioljus) 0%,
    rgba(42, 43, 50, 0) 100%
  );
}

/* Height includes the toolbar strip below the model. */
.stage-column {
  height: clamp(290px, 44dvh, 420px);
  min-height: 0;
  max-height: none;
  padding-top: 0;
}

/* Phones: the camera presets sit in their own strip under the model, so they
   never cover the bottle and sit in thumb reach. Desktop overlays (section 11). */
.stage-toolbar {
  position: static;
  align-self: center;
  margin: 0.25rem 0 0.625rem;
  padding: 3px;
  gap: 2px;
  border: 0;
  border-radius: 999px;
  background: var(--grafit);
  box-shadow: none;
}

.camera-btn {
  min-height: var(--tap);
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  font-size: 0.875rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.camera-btn[aria-pressed='true'] {
  background: var(--tryckvit);
  color: var(--svart);
}

.stage-hint {
  top: 0.75rem;
  bottom: auto;
  left: var(--pad);
  transform: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 0.8125rem;
  color: var(--stal);
  white-space: normal;
  animation: aqhua-hint-out 0.6s ease 8s forwards;
}

@keyframes aqhua-hint-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.hint-mouse {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .hint-touch {
    display: none;
  }

  .hint-mouse {
    display: inline;
  }
}

/* 4. Intro and panels ------------------------------------------------------ */
.controls-column {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Phones: the h1 stays for screen readers but is not drawn; the stage and the
   first panel already say what this page is. Desktop restores it (section 11). */
.controls-intro {
  padding: 0;
  border-bottom: 0;
}

.controls-intro__title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* The product line lives in "Om AQHUA 500 ml"; on phones the text field
   must be visible without scrolling. */
.controls-intro__lead {
  display: none;
}

.panel__summary {
  min-height: 3.5rem;
  padding: 0.5rem var(--pad);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.panel__body {
  padding: 0 var(--pad) 1.75rem;
  gap: var(--gap);
}

.field {
  gap: 0.5rem;
}

.field__label {
  font-weight: 600;
}

.fieldset > legend {
  padding: 0;
}

/* 5. Inputs ---------------------------------------------------------------- */
.text-input {
  min-height: 3.25rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--grafit);
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.text-input:focus {
  border-color: var(--tryckvit);
}

/* The print line mirrors the chosen typeface and ink (section 9). */
.text-input:not(.text-input--normal) {
  font-family: var(--print-font, var(--font-sans)), var(--font-sans);
  font-weight: var(--print-weight, 600);
}

/* 16px minimum keeps iOS Safari from zooming the page on focus. */
.text-input--normal {
  min-height: 3rem;
  font-size: 1rem;
  letter-spacing: normal;
  color: var(--text-primary);
}

.text-input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  color: #868a92;
}

.range-input {
  -webkit-appearance: none;
  appearance: none;
  height: var(--tap);
  background: transparent;
  accent-color: var(--tryckvit);
}

.range-input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.range-input::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -12px;
  border: 0;
  border-radius: 50%;
  background: var(--tryckvit);
}

.range-input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--tryckvit);
}

/* 6. Option tiles: fill at rest, white ring only when chosen ---------------- */
.orientation-option,
.font-option,
.ink-option,
.delivery-option {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--grafit);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.orientation-option:hover,
.font-option:hover,
.ink-option:hover,
.delivery-option:hover {
  border-color: transparent;
  background: var(--grafit-upp);
}

.orientation-option:has(input:checked),
.font-option:has(input:checked),
.ink-option:has(input:checked),
.delivery-option:has(input:checked) {
  border-color: var(--tryckvit);
  background: var(--grafit);
}

.orientation-option:has(input:focus-visible),
.font-option:has(input:focus-visible),
.ink-option:has(input:focus-visible),
.delivery-option:has(input:focus-visible) {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.orientation-option {
  min-height: var(--tap);
}

/* Fonts: two columns; the face is its own label. The meta text stays in the
   accessible name but is visually hidden. */
.font-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.font-option {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  min-height: 3.5rem;
  padding: 0.75rem 0.875rem;
}

.font-option__sample {
  max-width: 100%;
  overflow: hidden;
  font-size: 1.1rem;
  line-height: 1.2;
  white-space: nowrap;
}

.font-option__meta {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Inks: three columns, swatch above name. */
.ink-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.ink-option {
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-height: 4.5rem;
  padding: 0.75rem 0.25rem;
  text-align: center;
}

.ink-option__swatch {
  width: 1.75rem;
  height: 1.75rem;
}

.ink-option__label {
  font-size: 0.8125rem;
}

.ink-option__check {
  display: none;
}

.delivery-option {
  min-height: 3.5rem;
  padding: 0.75rem 0.875rem;
}

.delivery-option__text {
  align-items: center;
}

.delivery-option__price {
  font-weight: 600;
  color: var(--tryckvit);
}

/* 7. Buttons, toggles, checks ---------------------------------------------- */
.btn {
  min-height: var(--tap);
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--grafit-upp);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn--ghost {
  background: var(--grafit);
}

.btn--sm,
.btn--xs {
  min-height: 2.5rem;
  padding: 0 0.875rem;
  font-size: 0.8125rem;
}

.btn[aria-pressed='true'] {
  background: var(--tryckvit);
  color: var(--svart);
}

.btn--primary {
  min-height: 3.5rem;
  font-size: 1rem;
  background: var(--tryckvit);
  color: var(--svart);
}

.btn--primary:hover:not(:disabled) {
  background: #e4e5e8;
}

.file-input::file-selector-button {
  min-height: var(--tap);
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--grafit-upp);
}

.checkbox-row {
  gap: 0.875rem;
}

.checkbox-row__input {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0;
}

.checkbox-row__text {
  font-size: 0.875rem;
}

.mode-option {
  min-height: var(--tap);
}

.mode-option input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--tryckvit);
}

/* 8. Spec lists and the collapsed technical block --------------------------- */
.spec-list__item {
  padding: 0.75rem 0;
}

.spec-list__item--strong {
  align-items: center;
  padding-top: 1rem;
}

.spec-list__item--strong dt {
  font-weight: 600;
  color: var(--tryckvit);
}

.spec-list__item--strong dd {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--tryckvit);
}

/* Order summary: the typeface and size rows repeat what the preview already
   shows and carry JS-built "a · b" strings, so they are not drawn. The JS keeps
   updating them. Remove these two rules to show them again. */
#order-summary .spec-list__item:has(#summary-font),
#order-summary .spec-list__item:has(#summary-layout) {
  display: none;
}

#order-summary .spec-list__item {
  padding: 0.5rem 0;
}

#order-summary .spec-list__item--strong {
  padding-top: 1rem;
}

.spec-more__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--stal);
}

.spec-more__summary::-webkit-details-marker {
  display: none;
}

.spec-more__summary::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.spec-more[open] > .spec-more__summary::after {
  transform: rotate(225deg);
}

/* 9. Print line mirrors the chosen typeface and ink (no JS) ---------------- */
/* Values match CONFIG.STICKER_FONTS ids and CONFIG.INK_PALETTE ids. */
.controls-column:has(input[name='stickerFont'][value='bebas-neue']:checked) {
  --print-font: 'Bebas Neue';
  --print-weight: 400;
}

.controls-column:has(input[name='stickerFont'][value='montserrat']:checked) {
  --print-font: 'Montserrat';
}

.controls-column:has(input[name='stickerFont'][value='cinzel']:checked) {
  --print-font: 'Cinzel';
}

.controls-column:has(input[name='stickerFont'][value='lora']:checked) {
  --print-font: 'Lora';
}

.controls-column:has(input[name='stickerFont'][value='space-grotesk']:checked) {
  --print-font: 'Space Grotesk';
}

.controls-column:has(input[name='stickerFont'][value='bitter']:checked) {
  --print-font: 'Bitter';
}

.controls-column:has(input[name='stickerInk'][value='silvergra']:checked) {
  --ink: #aeb4bc;
}

.controls-column:has(input[name='stickerInk'][value='champagne']:checked) {
  --ink: #e5cfa0;
}

.controls-column:has(input[name='stickerInk'][value='isbla']:checked) {
  --ink: #7dd3fc;
}

.controls-column:has(input[name='stickerInk'][value='salvia']:checked) {
  --ink: #8fbc94;
}

.controls-column:has(input[name='stickerInk'][value='julrod']:checked) {
  --ink: #dc2626;
}

/* 10. Landscape phones: side by side instead of a 250px stage over nothing --- */
@media (max-width: 959px) and (orientation: landscape) and (max-height: 540px) {
  :root {
    --header-h: 48px;
  }

  .brand__logo {
    height: 30px;
  }

  .studio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 46%);
  }

  .stage-column {
    height: 100%;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
}

/* 11. Desktop --------------------------------------------------------------- */
@media (min-width: 960px) {
  :root {
    --header-h: 72px;
    --pad: 1.5rem;
  }

  .site-header__inner {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .brand__logo {
    height: 44px;
  }

  .studio-layout {
    grid-template-columns: minmax(0, 1fr) clamp(420px, 30vw, 580px);
  }

  .stage-column {
    height: 100%;
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }

  .stage-toolbar {
    position: absolute;
    top: auto;
    bottom: 1.5rem;
    left: 50%;
    right: auto;
    margin: 0;
    transform: translateX(-50%);
    background: rgba(19, 20, 24, 0.85);
    box-shadow: 0 0 0 1px var(--border);
  }

  .stage-hint {
    top: 1.5rem;
    left: 1.5rem;
  }

  .controls-intro {
    padding: 1.75rem var(--pad) 1rem;
  }

  .controls-intro__title {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    font-size: 1.75rem;
  }

  .controls-intro__lead {
    display: block;
    margin-top: 0.35rem;
  }

  .panel__summary {
    padding: 0.5rem var(--pad);
  }

  .panel__body {
    padding: 0 var(--pad) 1.75rem;
  }
}

/* 12. Large monitors: everything is in rem, so scale the root ---------------- */
@media (min-width: 1600px) {
  html {
    font-size: 18px;
  }

  :root {
    --header-h: 80px;
    --pad: 1.75rem;
  }

  .brand__logo {
    height: 50px;
  }
}

.payment-status__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.payment-status__hint[hidden] {
  display: none;
}
