:root {
  --ink: #15120e;
  --navy: #071321;
  --paper: #f1eadc;
  --cream: #fff9ee;
  --gold: #c58b4b;
  --muted: #74695c;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  padding: 16px clamp(20px, 5vw, 72px);
  color: #fff;
  background: var(--navy);
  border-bottom: 1px solid rgba(197, 139, 75, 0.35);
}

.portal-wordmark,
.parent-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.portal-clock {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #edc389;
  border: 1px solid #edc389;
  border-radius: 50%;
  font-size: 20px;
}

.parent-brand {
  color: #c9a367;
  font-size: 9px;
}

.parent-brand img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.order-layout,
.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  min-height: calc(100svh - 76px);
}

.order-intro,
.admin-intro {
  padding: clamp(52px, 8vw, 110px) clamp(24px, 7vw, 96px);
  background:
    radial-gradient(
      circle at 70% 20%,
      rgba(197, 139, 75, 0.16),
      transparent 36%
    ),
    var(--navy);
  color: #fff;
}

.eyebrow {
  margin: 0 0 18px;
  color: #d7ac70;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.order-intro h1,
.admin-intro h1 {
  margin: 0;
  max-width: 600px;
  font:
    400 clamp(54px, 7vw, 104px) / 0.9 Georgia,
    serif;
  letter-spacing: -0.05em;
}

.order-intro h1 span,
.admin-intro h1 span {
  display: block;
  color: #edc389;
  font-style: italic;
}

.lead {
  max-width: 560px;
  margin: 30px 0;
  color: rgba(255, 255, 255, 0.76);
  font:
    18px/1.65 Georgia,
    serif;
}

.source-card {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 14px 16px;
  border: 1px solid rgba(237, 195, 137, 0.32);
  color: #edc389;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.order-shell,
.admin-shell {
  padding: clamp(40px, 7vw, 90px);
  background: #f4ede1;
}

.order-form,
.generator-form {
  display: grid;
  gap: 22px;
  max-width: 720px;
  margin: auto;
}

.order-form label,
.generator-form label {
  display: grid;
  gap: 8px;
  color: #6d5a45;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.order-form input:not([type="checkbox"]),
.order-form textarea,
.generator-form input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(71, 51, 31, 0.32);
  border-radius: 0;
  padding: 12px 0;
  color: var(--ink);
  background: transparent;
  font:
    18px/1.4 Georgia,
    serif;
  outline: 0;
}

.order-form input:focus,
.order-form textarea:focus,
.generator-form input:focus {
  border-bottom-color: var(--gold);
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.photo-field {
  padding: 22px;
  border: 1px dashed rgba(71, 51, 31, 0.35);
  background: rgba(255, 255, 255, 0.38);
}

.photo-field input {
  font:
    13px Arial,
    sans-serif !important;
}

.photo-preview {
  display: none;
  width: 100%;
  max-height: 280px;
  margin-top: 14px;
  object-fit: contain;
  background: #fff;
}

.photo-preview.visible {
  display: block;
}

.scene-picker {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.product-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.product-picker legend {
  margin-bottom: 10px;
  color: #6d5a45;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.product-choice {
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  gap: 13px !important;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(71, 51, 31, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  text-transform: none !important;
}

.product-choice.selected {
  border-color: var(--gold);
  background: #fff8eb;
  box-shadow: 0 0 0 2px rgba(197, 139, 75, 0.12);
}

.product-choice input {
  width: auto !important;
}

.product-choice span,
.product-choice b,
.product-choice small {
  display: block;
}

.product-choice b {
  color: var(--ink);
  font: 700 16px/1.3 Georgia, serif;
}

.product-choice small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.product-choice strong {
  color: var(--navy);
  font: 700 18px/1 Georgia, serif;
}

.scene-picker legend {
  color: #6d5a45;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.scene-picker > p,
.scene-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.scene-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 5px 2px 14px;
  scrollbar-width: thin;
}

.scene-card {
  flex: 0 0 min(72vw, 260px);
  overflow: hidden;
  scroll-snap-align: center;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 0 0 13px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 5px 18px rgba(21, 18, 14, 0.08);
  cursor: pointer;
}

.scene-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 139, 75, 0.18);
}

.scene-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
  background-image: url("/assets/historical-scenes.webp");
  background-size: 300% 200%;
  background-repeat: no-repeat;
}

.scene-1 { background-position: 0 0; }
.scene-2 { background-position: 50% 0; }
.scene-3 { background-position: 100% 0; }
.scene-4 { background-position: 0 100%; }
.scene-5 { background-position: 50% 100%; }
.scene-6 { background-position: 100% 100%; }

.scene-card b,
.scene-card small {
  display: block;
  padding: 0 13px;
}

.scene-card b { font: 20px/1.2 Georgia, serif; }
.scene-card small { margin-top: 3px; color: var(--muted); }

.consent {
  display: grid !important;
  grid-template-columns: 20px 1fr;
  gap: 11px !important;
  align-items: start;
  color: #5d5245 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1.5;
  text-transform: none !important;
}

.consent input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.consent a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 2px;
}

.small-note {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.portal-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  border: 0;
  padding: 0 24px;
  color: #15110d;
  background: #d79f5d;
  font:
    700 12px Arial,
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.portal-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.form-message {
  margin: 0;
  color: #8b5d2e;
  font-size: 13px;
  line-height: 1.5;
}

.order-success {
  max-width: 620px;
  margin: auto;
  padding-top: clamp(30px, 8vw, 100px);
}

.order-success h2 {
  margin: 12px 0 20px;
  font:
    400 clamp(48px, 7vw, 82px) / 0.95 Georgia,
    serif;
}

.honey,
.scan-form {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.generator-output {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 26px;
  margin-top: 30px;
  padding: 26px;
  color: #fff;
  background: var(--navy);
}

.qr-canvas-wrap {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 14px;
  background: #fff;
}

.qr-canvas-wrap canvas {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.url-output {
  display: grid;
  gap: 14px;
  align-content: center;
}

.url-output p {
  margin: 0;
  color: #a99a88;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.url-output code {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 6px;
  color: #edc389;
  font-size: 12px;
  line-height: 1.5;
  text-transform: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.small-button {
  min-height: 42px;
  border: 1px solid rgba(237, 195, 137, 0.4);
  padding: 0 15px;
  color: #edc389;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.tracking-note {
  max-width: 720px;
  margin: 28px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(71, 51, 31, 0.18);
  color: #625647;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .order-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .order-intro,
  .admin-intro {
    padding-bottom: 58px;
  }
}

@media (max-width: 620px) {
  .portal-header {
    min-height: 66px;
    padding: 13px 18px;
  }

  .parent-brand span {
    display: none;
  }

  .order-shell,
  .admin-shell {
    padding: 38px 20px 60px;
  }

  .field-pair,
  .generator-output {
    grid-template-columns: 1fr;
  }

  .generator-output {
    padding: 18px;
  }
}
