:root {
  --paper: #fffdf9;
  --paper-soft: #f8f3eb;
  --paper-deep: #eee6da;
  --ink: #1b1814;
  --muted: #665f57;
  --line: #dfd4c7;
  --line-strong: #cbb9a8;
  --brand: #8a553a;
  --brand-dark: #6f422e;
  --brand-soft: #eadbce;
  --good: #276247;
  --good-soft: #e7f2ec;
  --warn: #8b5a17;
  --warn-soft: #fff4d9;
  --danger: #8b3029;
  --danger-soft: #f8e9e7;
  --serif: Georgia, Garamond, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 18px 50px rgba(58, 43, 28, 0.09);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 5%, rgba(201, 153, 102, 0.12), transparent 22rem),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.55;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #b96f47;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: -10000px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
}

.skip-link:focus {
  left: 0.75rem;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 92px;
  padding: 0.7rem max(1rem, calc((100% - 1260px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(238, 230, 218, 0.94);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.portal-brand img {
  display: block;
  width: 68px;
  height: 68px;
}

.portal-brand span {
  display: grid;
  gap: 0.08rem;
}

.portal-brand strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.portal-brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.test-badge {
  padding: 0.45rem 0.75rem;
  border: 1px solid #9e6d4e;
  border-radius: 999px;
  color: #754128;
  background: rgba(255, 253, 249, 0.74);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.test-badge[hidden],
.test-notice[hidden] {
  display: none !important;
}

.test-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 0.7rem 1rem;
  color: #56311f;
  background: #f2dfc9;
  font-size: 0.86rem;
}

.test-notice div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.7rem;
}

.test-notice strong {
  font-weight: 750;
}

.link-button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.portal-shell {
  width: min(1260px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0 4rem;
}

.portal-intro {
  max-width: 760px;
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portal-intro h1 {
  max-width: 15ch;
  margin-bottom: 1rem;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  letter-spacing: -0.025em;
}

.portal-intro > p:not(.eyebrow) {
  max-width: 65ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 1.4rem;
  align-items: start;
}

.portal-workspace,
.order-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.portal-workspace {
  min-width: 0;
  overflow: hidden;
}

.order-summary {
  position: sticky;
  top: 1rem;
  padding: 1.35rem;
}

.order-summary h2 {
  margin-bottom: 1rem;
  font-size: 1.45rem;
}

.summary-lines {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #eee6dc;
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-line dt,
.summary-line dd {
  margin: 0;
}

.summary-line dd {
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  font-weight: 750;
}

.summary-total strong {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
}

.summary-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.progress-wrap {
  padding: 1.25rem 1.4rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #fbf8f3;
}

.progress-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.saved-indicator {
  color: var(--good);
}

.mobile-summary-link { display: none; }

.draft-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
}

.discard-draft-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--danger);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.draft-delete-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.progress-track {
  height: 5px;
  margin-top: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e9dfd3;
}

.progress-track span {
  display: block;
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 180ms ease;
}

.step-list {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  min-width: 0;
  color: #8b837a;
  font-size: 0.67rem;
  text-align: center;
}

.step-list li::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto 0.35rem;
  border: 1px solid #a99b8d;
  border-radius: 50%;
  background: #fff;
}

.step-list li.is-current {
  color: var(--ink);
  font-weight: 750;
}

.step-list li.is-current::before,
.step-list li.is-complete::before {
  border-color: var(--brand);
  background: var(--brand);
}

.step-list button {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
}

.step-list button:not(:disabled) {
  cursor: pointer;
}

.step-list button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.step-list button:focus-visible {
  border-radius: 5px;
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

.portal-stage {
  min-height: 440px;
  padding: clamp(1.25rem, 4vw, 2.6rem);
}

.stage-heading {
  max-width: 690px;
  margin-bottom: 1.7rem;
}

.stage-heading h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.8rem, 3.5vw, 2.65rem);
  letter-spacing: -0.01em;
}

.stage-heading p {
  margin: 0;
  color: var(--muted);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.choice-card {
  position: relative;
  display: grid;
  gap: 0.65rem;
  min-height: 145px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.choice-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 25px rgba(58, 43, 28, 0.08);
}

.choice-card:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(138, 85, 58, 0.12);
}

.choice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.choice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.choice-card .choice-price {
  align-self: end;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
}

.choice-meta {
  display: block;
  margin-top: -0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.privacy-upload-note a { color: inherit; font-weight: 700; text-underline-offset: 0.2em; }

.product-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1.25fr);
  gap: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.product-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.product-card-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1.5rem 1.5rem 0;
}

.product-card-copy h3 {
  margin-bottom: 0.7rem;
  font-size: 1.7rem;
}

.product-card-copy p {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.fact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.fact-pill {
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  color: #5e3a27;
  background: var(--brand-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.contact-more {
  grid-column: 1 / -1;
  padding: 1.15rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  background: #fbf7f1;
}

.contact-more p {
  margin: 0 0 0.7rem;
}

.contact-more a {
  color: var(--brand-dark);
  font-weight: 750;
}

.upload-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 1.5rem;
  border: 2px dashed #c8b6a5;
  border-radius: 16px;
  background: #fbf7f1;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease;
}

.upload-zone.is-dragging {
  border-color: var(--brand);
  background: #f4e8dc;
}

.upload-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-zone strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
}

.upload-zone span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.allocation-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: 11px;
  color: var(--muted);
  background: #f4efe8;
  font-size: 0.9rem;
}

.allocation-panel strong {
  color: var(--ink);
}

.allocation-panel.is-valid {
  color: var(--good);
  background: var(--good-soft);
}

.allocation-panel.is-over {
  color: var(--danger);
  background: var(--danger-soft);
}

.motif-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.motif-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.motif-thumb {
  width: 84px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #eee8e0;
}

.motif-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.motif-info {
  min-width: 0;
}

.motif-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.motif-info small {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
}

.quality-warning {
  color: var(--warn) !important;
  font-weight: 650;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.quantity-control button,
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  cursor: pointer;
  font-weight: 750;
}

.quantity-control input {
  width: 54px;
  padding: 0.48rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.motif-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.small-button {
  padding: 0.32rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #4e463f;
  background: #fffdf9;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 650;
}

.small-button:hover,
.icon-button:hover,
.quantity-control button:hover {
  border-color: var(--brand);
}

.small-button.is-danger {
  color: var(--danger);
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(300px, 1.1fr);
  gap: 1.4rem;
}

.editor-preview-wrap {
  min-width: 0;
}

.editor-preview {
  position: sticky;
  top: 1rem;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid #bfae9d;
  border-radius: 10px;
  background:
    linear-gradient(45deg, #e8e2da 25%, transparent 25%),
    linear-gradient(-45deg, #e8e2da 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e2da 75%),
    linear-gradient(-45deg, transparent 75%, #e8e2da 75%),
    #f7f3ee;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  box-shadow: 0 18px 35px rgba(58, 43, 28, 0.12);
}

.editor-preview canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.editor-preview canvas:active {
  cursor: grabbing;
}

.safe-area {
  position: absolute;
  inset: 7%;
  border: 1px dashed rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 0 1px rgba(39, 27, 18, 0.35);
  pointer-events: none;
}

.editor-caption {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.editor-controls {
  display: grid;
  gap: 1rem;
}

.control-section {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.control-section h3 {
  margin-bottom: 0.75rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 750;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field.is-wide {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 750;
}

.field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.67rem 0.72rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
}

.font-select,
.font-select option {
  font-size: 1rem;
}

.font-preview {
  display: block;
  min-height: 2.25rem;
  padding: 0.55rem 0.7rem;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 1.05rem;
  line-height: 1.25;
}

.font-georgia { font-family: Georgia, serif; }
.font-arial { font-family: Arial, sans-serif; }
.font-trebuchet { font-family: "Trebuchet MS", sans-serif; }
.font-verdana { font-family: Verdana, sans-serif; }
.font-times { font-family: "Times New Roman", serif; }
.font-palatino { font-family: "Palatino Linotype", "Book Antiqua", serif; }
.font-courier { font-family: "Courier New", monospace; }
.font-segoe-print { font-family: "Segoe Print", "Bradley Hand", cursive; }

.field input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 0.7rem;
  align-items: center;
}

.range-output {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.editor-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding: 0.7rem;
  border-radius: 10px;
  background: #f4efe8;
}

.editor-pager p {
  min-width: 0;
  margin: 0;
  font-size: 0.85rem;
  text-align: center;
}

.apply-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.help-text {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.automatic-check {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.automatic-check.is-pass {
  border-color: #9ab29b;
  background: var(--good-soft);
}

.automatic-check.needs-review {
  border-color: #d1aa80;
  background: var(--warn-soft);
}

.automatic-check-heading {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.automatic-check-heading .eyebrow,
.automatic-check h3,
.automatic-check p,
.automatic-check ul {
  margin: 0;
}

.automatic-check-mark {
  display: grid;
  place-items: center;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #fff;
  background: var(--good);
  font-weight: 800;
}

.automatic-check.needs-review .automatic-check-mark {
  background: var(--warn);
}

.automatic-check ul {
  padding-left: 1.2rem;
  font-size: 0.86rem;
}

.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.segmented {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f2eb;
}

.segmented button {
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.segmented button.is-active {
  color: #fff;
  background: var(--brand);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.review-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.review-card img,
.review-card canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #eee8e0;
}

.review-card-copy {
  padding: 0.75rem;
}

.review-card-copy strong {
  display: block;
  font-size: 0.85rem;
}

.review-card-copy small {
  color: var(--muted);
}

.check-panel {
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbf7f1;
}

.check-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 0.2rem 0 0;
  accent-color: var(--brand);
}

.check-row strong {
  display: block;
  font-size: 0.9rem;
}

.check-row small {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.form-section {
  display: grid;
  gap: 1rem;
}

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.large-order-form {
  display: grid;
  gap: 1rem;
  max-width: 760px;
}

.shipping-method-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--brand-soft);
  border-radius: 14px;
  background: #fff;
}

.shipping-method-card h3,
.shipping-method-card p { margin: 0; }

.shipping-method-card h3 { margin-block: .15rem .35rem; }

.shipping-method-card > strong {
  color: var(--brand);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  white-space: nowrap;
}

.shipping-explanation {
  margin-top: .75rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--brand-soft);
  color: var(--muted);
  background: #fbf8f3;
  line-height: 1.65;
}

.shipping-explanation p { margin: 0; }

.consent-list {
  display: grid;
  gap: 0.8rem;
}

.consent-card {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.consent-card.optional {
  background: #fbf8f3;
}

.payment-box {
  display: grid;
  gap: 1rem;
  max-width: 620px;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.mock-payment-banner {
  padding: 0.8rem;
  border-radius: 9px;
  color: #5c3b24;
  background: var(--warn-soft);
  font-size: 0.84rem;
}

.payment-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1rem;
  align-items: baseline;
}

.payment-summary span {
  font-family: var(--serif);
  font-size: 1.45rem;
}

.payment-summary small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.test-payment-controls {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.test-payment-controls summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
}

.test-payment-controls .payment-options {
  margin-top: 0.75rem;
}

.payment-options {
  display: grid;
  gap: 0.5rem;
}

.payment-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.payment-option:has(input:checked) {
  border-color: var(--brand);
  background: #fcf7f1;
}

.payment-option input {
  margin-top: 0.25rem;
  accent-color: var(--brand);
}

.payment-option strong,
.payment-option small {
  display: block;
}

.payment-option small {
  color: var(--muted);
}

.result-message,
.inline-message {
  padding: 0.8rem 0.9rem;
  border-radius: 9px;
  font-size: 0.86rem;
}

.result-message.is-success,
.inline-message.is-success {
  color: var(--good);
  background: var(--good-soft);
}

.result-message.is-warning,
.inline-message.is-warning {
  color: var(--warn);
  background: var(--warn-soft);
}

.result-message.is-error,
.inline-message.is-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.confirmation {
  text-align: center;
}

.confirmation-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  color: #fff;
  background: var(--good);
  font-size: 1.8rem;
}

.confirmation h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.confirmation-card {
  max-width: 650px;
  margin: 1.5rem auto 0;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  text-align: left;
}

.privacy-promise {
  display: grid;
  gap: 0.2rem;
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 10px;
  color: var(--good);
  background: var(--good-soft);
}

.privacy-promise span {
  color: var(--ink);
  font-size: 0.84rem;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.checkout-feedback {
  position: fixed;
  z-index: 50;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(440px, calc(100% - 2rem));
  padding: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 24px 70px rgba(54, 37, 24, 0.22);
  animation: checkout-feedback-enter 280ms ease-out both;
}

.checkout-feedback-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.checkout-feedback-kicker, .checkout-feedback-progress { margin: 0; }
.checkout-feedback-kicker { color: var(--brand-dark); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.checkout-feedback-progress { margin-top: 0.15rem; color: var(--muted); font-size: 0.78rem; }
.checkout-feedback-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: var(--paper-soft); cursor: pointer; font-size: 1.35rem; line-height: 1; }
.checkout-feedback h2 { margin-bottom: 0.45rem; font-size: clamp(1.35rem, 4vw, 1.7rem); }
.checkout-feedback h2 + p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.checkout-feedback-ratings { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.55rem; margin-top: 1.15rem; }
.checkout-feedback-ratings button { min-width: 0; min-height: 48px; padding: 0; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--brand-dark); background: #fff; cursor: pointer; font-weight: 800; transition: transform 120ms ease, border-color 120ms ease, background 120ms ease; }
.checkout-feedback-ratings button:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-2px); }
.checkout-feedback-scale { display: flex; justify-content: space-between; margin-top: 0.35rem; color: var(--muted); font-size: 0.7rem; }
.checkout-feedback-skip { display: block; margin: 1rem auto 0; padding: 0.25rem 0.4rem; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 0.78rem; text-decoration: underline; text-underline-offset: 0.2em; }
.checkout-feedback-thanks { text-align: center; }
.checkout-feedback-thanks-mark { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 0.8rem; border-radius: 50%; color: #fff; background: var(--good); font-weight: 800; }
.checkout-feedback-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 1.1rem; }

@keyframes checkout-feedback-enter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.status-timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.status-timeline li {
  position: relative;
  padding: 0 0 1rem 2rem;
  border-bottom: 1px solid var(--line);
}

.status-timeline li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.32rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.status-timeline strong,
.status-timeline time {
  display: block;
}

.status-timeline time {
  color: var(--muted);
  font-size: 0.76rem;
}

.status-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.status-link input {
  min-width: 0;
  padding: 0.62rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f4ee;
}

.portal-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 78px;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--line);
  background: #fbf8f3;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--brand);
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
}

.button-vipps {
  min-width: 180px;
  border-color: #ff5b24;
  background: #ff5b24;
}

.button.button-vipps:hover:not(:disabled) {
  border-color: #e64a13;
  background: #e64a13;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--brand-dark);
}

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.button-secondary:hover:not(:disabled) {
  background: #f1e9df;
}

.button-danger {
  border-color: var(--danger);
  background: var(--danger);
}

.step-message {
  margin: 0;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: right;
}

.portal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper-soft);
  font-size: 0.85rem;
  text-align: center;
}

.portal-footer p {
  margin: 0.2rem;
}

.confirm-dialog {
  width: min(480px, calc(100% - 2rem));
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 25px 80px rgba(27, 24, 20, 0.3);
}

.confirm-dialog::backdrop {
  background: rgba(27, 24, 20, 0.6);
}

.confirm-dialog h2 {
  font-size: 1.8rem;
}

.confirm-dialog p:not(.eyebrow) {
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.address-lookup {
  position: relative;
}

.address-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.3rem);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 16px 36px rgba(27, 24, 20, 0.16);
}

.address-suggestions button {
  display: block;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.address-suggestions button:hover,
.address-suggestions button:focus-visible {
  background: var(--paper-soft);
}

.address-attribution {
  display: block;
  padding: 0.45rem 0.9rem;
  color: var(--muted);
  background: var(--paper-soft);
  text-align: right;
}

.legal-link {
  padding: 0;
  border: 0;
  color: var(--brown-dark);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.legal-dialog {
  width: min(840px, calc(100% - 2rem));
  max-height: min(88vh, 900px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 25px 80px rgba(27, 24, 20, 0.3);
}

.legal-dialog::backdrop {
  background: rgba(27, 24, 20, 0.62);
}

.legal-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--line);
}

.legal-dialog-header h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.65rem, 4vw, 2.4rem);
}

.dialog-close {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.legal-dialog-content {
  max-height: calc(88vh - 190px);
  padding: 1.2rem 1.4rem 2rem;
  overflow: auto;
}

.legal-dialog-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.legal-dialog-content h2 {
  margin-top: 1.6rem;
  font-size: 1.45rem;
}

.legal-dialog-content p,
.legal-dialog-content li {
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.65;
}

.legal-dialog > .dialog-actions {
  margin: 0;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
}
.noscript-message {
  padding: 1rem;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 960px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
    grid-row: auto;
  }

  .mobile-summary-link { display: inline-block; margin-top: .75rem; padding: .5rem 0; color: var(--brand); text-underline-offset: .2em; }

  .summary-lines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-total {
    padding-top: 0.2rem;
  }
}

@media (max-width: 760px) {
  .portal-shell {
    width: min(100% - 1rem, 1260px);
    padding-top: 2.3rem;
  }

  .portal-header {
    min-height: 78px;
    padding-inline: 0.75rem;
  }

  .portal-brand img {
    width: 56px;
    height: 56px;
  }

  .test-notice {
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
  }

  .test-notice div {
    justify-content: flex-start;
  }

  .progress-heading,
  .draft-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .draft-delete-note {
    text-align: left;
  }

  .step-list li {
    font-size: 0;
  }

  .step-list li::before {
    width: 9px;
    height: 9px;
    margin-bottom: 0;
  }

  .product-card,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .product-card img {
    max-height: 320px;
  }

  .product-card-copy {
    padding: 0 1.2rem 1.3rem;
  }

  .editor-preview {
    position: relative;
    top: auto;
    max-width: 520px;
    margin-inline: auto;
  }

  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .portal-brand small {
    display: none;
  }

  .portal-brand strong {
    font-size: 1.12rem;
  }

  .test-badge {
    padding: 0.35rem 0.55rem;
    font-size: 0.66rem;
  }

  .portal-intro h1 {
    font-size: 2.35rem;
  }

  .progress-wrap,
  .portal-stage,
  .portal-actions {
    padding-inline: 1rem;
  }

  .choice-grid,
  .delivery-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .choice-card {
    min-height: 120px;
  }

  .motif-row {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .motif-thumb {
    width: 66px;
  }

  .quantity-control {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .allocation-panel,
  .review-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .review-card-copy {
    padding: 0.55rem;
  }

  .summary-lines {
    grid-template-columns: 1fr;
  }

  .portal-actions {
    grid-template-columns: auto 1fr;
  }

  .step-message {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: left;
  }

  .portal-actions #backButton {
    grid-column: 1;
    grid-row: 2;
  }

  .portal-actions #nextButton {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .shipping-method-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-link {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .checkout-feedback {
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 1.15rem max(1rem, env(safe-area-inset-right)) max(1.15rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    border-width: 1px 0 0;
    border-radius: 22px 22px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
