:root {
  --a: #e05437;      /* orange: accents, buttons, pills. Never body text. */
  --c: #efe5ce;      /* beige */
  --d: #3a291c;      /* dark brown: text */
  --soft: #6a5647;   /* muted brown, 6:1+ on light backgrounds */
  --paper: #fffaf0;
  --sh-text: #333;
  --sh-mute: #666;
  --sh-line: #dedede;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  background: #f2efe8;
  color: var(--d);
  font-family: 'Josefin Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:focus-visible { outline: 3px solid var(--d); outline-offset: 2px; border-radius: 6px; }
.toolbar :focus-visible, .card-a :focus-visible { outline-color: var(--c); }
.seg-btn { font-size: 13.5px; }

.h-serif {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.h-small { font-size: 21px; }

/* ---------- prototype toolbar ---------- */
.toolbar { background: var(--d); color: var(--c); }
.toolbar-in { max-width: 440px; margin: 0 auto; padding: 8px 12px; }
.seg { display: flex; background: rgba(239,229,206,.14); border-radius: 12px; padding: 3px; gap: 3px; }
.seg-btn {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--c);
  font: 700 14px/1 'Josefin Sans', sans-serif;
  padding: 4px 6px 2px;
  cursor: pointer;
}
.seg-btn[aria-pressed="true"] { background: var(--c); color: var(--d); }
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.switch, .tb-btn {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--c);
  font: 600 14px/1 'Josefin Sans', sans-serif;
  cursor: pointer;
}
.switch { display: inline-flex; align-items: center; gap: 9px; padding: 0 4px; }
.switch-track {
  width: 40px; height: 24px; border-radius: 999px;
  border: 1.5px solid var(--c);
  position: relative; flex: none;
  transition: background .15s;
}
.switch-knob {
  position: absolute; top: 2.5px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--c);
  transition: transform .15s, background .15s;
}
.switch[aria-checked="true"] .switch-track { background: var(--c); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(15px); background: var(--d); }
.tb-btn { border: 1.5px solid var(--c); border-radius: 999px; padding: 2px 18px 0; font-weight: 700; }
.legend { font-size: 12.5px; padding: 4px 4px 2px; display: flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 16px; height: 12px; border-radius: 3px; margin-left: 4px; }
.key-ours { border: 2px dashed var(--a); background: rgba(224,84,55,.25); margin-left: 0; }
.key-std { border: 2px dashed #b9b9b9; margin-left: 12px; }

/* ---------- page column ---------- */
.page {
  max-width: 440px;
  margin: 0 auto;
  background: #fff;
  padding: 0 16px 28px;
  min-height: 100vh;
}
.page > * + * { margin-top: 16px; }

/* ---------- Shopify standard (simplified chrome, neutral on purpose) ---------- */
.std { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: var(--sh-text); }
.sh-logo { margin: 0 -16px; padding: 16px; border-bottom: 1px solid var(--sh-line); }
.sh-logo img { display: block; height: 30px; width: auto; }
.sh-thanks { display: flex; align-items: center; gap: 12px; padding: 20px 0 16px; }
.sh-check { width: 48px; height: 48px; flex: none; }
.sh-conf { font-size: 14px; color: var(--sh-mute); }
.sh-h1 { font-size: 22px; font-weight: 600; line-height: 1.2; }
.sh-box { border: 1px solid var(--sh-line); border-radius: 8px; overflow: hidden; background: #fff; }
.sh-map { position: relative; height: 84px; background: #ececec; }
.sh-map svg { display: block; width: 100%; height: 100%; }
.sh-map-note {
  position: absolute; right: 8px; bottom: 6px;
  font-size: 11px; color: #555; background: rgba(255,255,255,.85);
  padding: 2px 6px; border-radius: 4px;
}
.sh-box-body { padding: 14px 16px 16px; }
.sh-h2 { font-size: 16px; font-weight: 600; }
.sh-p { font-size: 14px; color: var(--sh-mute); margin-top: 4px; }

.sh-details summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; padding: 0 16px; cursor: pointer;
}
.sh-details summary::-webkit-details-marker { display: none; }
.sh-details .chev { transition: transform .15s; color: var(--sh-mute); }
.sh-details details[open] .chev { transform: rotate(180deg); }
.sh-items { list-style: none; padding: 4px 0 6px; }
.sh-item { display: flex; align-items: center; gap: 12px; padding: 0 16px 10px; font-size: 14px; }
.sh-thumb {
  width: 40px; height: 40px; flex: none;
  border: 1px solid var(--sh-line); border-radius: 8px; background: #f3f3f3;
}
.sh-item-name { flex: 1; font-weight: 500; }
.sh-item-qty { color: var(--sh-mute); white-space: nowrap; }
.sh-dl { border-top: 1px solid var(--sh-line); padding: 14px 16px 2px; font-size: 14px; }
.sh-dl div { margin-bottom: 14px; }
.sh-dl dt { font-weight: 600; margin-bottom: 2px; }
.sh-dl dd { color: var(--sh-mute); }
.sh-help { font-size: 14px; color: var(--sh-mute); padding: 4px 2px; }
.sh-help a { color: var(--sh-text); display: inline-block; padding: 12px 0; }
.proto-foot { font-size: 12.5px; color: var(--sh-mute); text-align: center; padding-top: 4px; }

/* ---------- our blocks ---------- */
.card { border-radius: 18px; padding: 20px 18px; position: relative; }
.eyebrow {
  font: 700 12px/1.2 'Josefin Sans', sans-serif;
  letter-spacing: .14em; text-transform: uppercase;
}

/* A: warmth card */
.card-a { background: var(--d); color: var(--c); }
.card-a .h-serif { font-size: 27px; }
.a-lead { margin-top: 10px; font-size: 16px; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--c); color: var(--d);
  font-weight: 700; font-size: 14px; line-height: 1;
  padding: 8px 12px 6px; border-radius: 999px;
}
.pill-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--a); margin-top: -2px; }
.status-time { font-size: 14px; }
.card-a .eyebrow { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(239,229,206,.28); }
.steps { list-style: none; margin-top: 14px; }
.steps li { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.steps li:last-child { padding-bottom: 0; }
.steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px;
  width: 2px; background: rgba(239,229,206,.3);
}
.num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--c); color: var(--d);
  font-weight: 700; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding-top: 2px;
}
.num-dark { background: var(--d); color: var(--c); }
.steps h4 { font-size: 16px; font-weight: 700; line-height: 1.3; padding-top: 3px; }
.steps p { font-size: 15px; margin-top: 2px; }
/* Step 3 has a COD and a prepaid version. Whichever shows is the last step. */
.steps li[data-only] { padding-bottom: 0; }
.steps li[data-only]::before { display: none; }
.a-help { margin-top: 8px; padding-left: 40px; }
.link-btn-light { color: var(--c); margin: 0; padding: 0; text-align: left; }

/* E: COD reminders (COD only) */
.card-e { background: var(--paper); border: 2px solid var(--d); padding: 18px 16px 10px; }
.rows { list-style: none; margin: 12px 0 16px; }
.rows li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(58,41,28,.15); }
.rows li:first-child { border-top: 0; padding-top: 2px; }
.row-ic {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--c); color: var(--d);
  display: flex; align-items: center; justify-content: center;
}
.row-ic svg { width: 22px; height: 22px; }
.rows h3 { font-size: 16px; font-weight: 700; line-height: 1.3; padding-top: 2px; }
.rows p { font-size: 14.5px; color: var(--soft); margin-top: 2px; }
.cash { white-space: nowrap; background: var(--c); border-radius: 6px; padding: 2px 6px 0; }
.btn-confirm { text-align: center; }
.card-e .link-btn { margin-top: 8px; }

/* F: add to your order */
.card-f { background: #fff; border: 1.5px solid rgba(58,41,28,.3); padding: 18px 14px 16px; }
.f-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; }
.chip-parcel {
  background: var(--c); color: var(--d);
  font-weight: 700; font-size: 13px; line-height: 1;
  padding: 7px 10px 5px; border-radius: 999px;
}
.offer { border: 1.5px solid rgba(58,41,28,.18); border-radius: 14px; overflow: hidden; background: var(--paper); }
.offer + .offer { margin-top: 12px; }
.offer-imgs { display: grid; grid-template-columns: 1fr; background: var(--c); }
.offer-imgs-2 { grid-template-columns: 1fr 1fr; gap: 2px; }
.offer-imgs img { display: block; width: 100%; height: 150px; object-fit: cover; }
.offer-body { padding: 14px 14px 16px; }
.offer-name { font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 700; line-height: 1.2; }
.offer-price { font-size: 18px; font-weight: 700; margin-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.offer-extra { font-size: 14px; font-weight: 600; color: var(--soft); }
.offer-why { font-size: 15px; margin: 8px 0 14px; }
.offer-reason { display: none; font-size: 12.5px; font-weight: 600; color: var(--soft); margin: -6px 0 12px; }
.show-ours .offer-reason { display: block; }
.btn-add { min-height: 52px; }
.offer-done { background: var(--c); border-radius: 12px; padding: 12px 14px 10px; font-size: 15.5px; }
.offer-done:focus { outline: none; }
.f-rule { margin-top: 12px; }

/* Toast: prototype feedback only, nothing navigates. */
.toast {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 400px; z-index: 20;
  background: var(--d); color: var(--c);
  border-radius: 14px; padding: 12px 16px 10px;
  box-shadow: 0 8px 24px rgba(58,41,28,.35);
  font-size: 15px;
}
.toast-msg { font-weight: 700; }
.toast-url { font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }

/* Embed mode (thankyou.html?embed=1 in an iframe): the review page owns the controls. */
.embed .toolbar, .embed .proto-foot { display: none; }

/* B: pin card */
.card-b { background: var(--paper); border: 2px solid var(--d); padding: 18px 14px 16px; }
.b-lead { font-size: 15px; margin: 8px 0 12px; }
.map {
  position: relative;
  aspect-ratio: 358 / 200;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(58,41,28,.3);
  background: #ece5d3;
  cursor: crosshair;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.map svg { display: block; width: 100%; height: 100%; }
#pin { transition: transform .28s cubic-bezier(.3,1.4,.5,1); }
.map-note {
  position: absolute; left: 8px; bottom: 6px;
  font-size: 11px; font-weight: 600; color: var(--d);
  background: rgba(255,250,240,.88); padding: 3px 7px 1px; border-radius: 5px;
  pointer-events: none;
}
.card-b[data-state="saved"] .map { aspect-ratio: 358 / 120; cursor: default; pointer-events: none; }
.hint { font-size: 14px; font-weight: 600; color: var(--soft); text-align: center; margin: 8px 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px;
  border-radius: 999px;
  font: 700 16px/1.1 'Josefin Sans', sans-serif;
  padding: 10px 18px 8px;
  text-decoration: none; cursor: pointer;
}
.btn-outline { background: #fff; color: var(--d); border: 1.5px solid var(--d); }
.btn-outline:active { background: var(--c); }
.btn-dark { background: var(--d); color: var(--c); border: 1.5px solid var(--d); }
/* White on #e05437 is 3.8:1, so the label is bold 19px (WCAG large text, needs 3:1). */
.btn-primary {
  background: var(--a); color: #fff; border: 0;
  font-size: 19px; min-height: 54px;
  box-shadow: 0 4px 0 #a83a22;
}
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #a83a22; }
.btn-primary[aria-busy="true"] { cursor: progress; }
.btn-small { min-height: 44px; font-size: 14px; padding: 8px 6px 6px; }

.spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.45); border-top-color: #fff;
  animation: spin .7s linear infinite; margin-top: -2px;
}
[aria-busy="true"] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.label { display: block; font-size: 14px; font-weight: 700; margin: 16px 2px 6px; }
.field {
  width: 100%; min-height: 48px;
  border: 1.5px solid rgba(58,41,28,.55);
  background: #fff; border-radius: 10px;
  font: 400 16px/1.2 'Josefin Sans', sans-serif;
  color: var(--d); padding: 12px 12px 10px; margin-bottom: 14px;
}
.field::placeholder { color: #75675b; opacity: 1; }
.field:focus { outline: 3px solid var(--d); outline-offset: 1px; }
.fine { font-size: 13.5px; color: var(--soft); text-align: center; margin-top: 14px; }

.saved-head { display: flex; align-items: center; gap: 12px; margin: 12px 0 12px; }
.saved-head:focus { outline: none; }
.saved-check { width: 40px; height: 40px; flex: none; }
.saved-title { font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 700; line-height: 1.15; }
.saved-sub { font-size: 14.5px; }
.saved-meta { margin-top: 12px; font-size: 15px; }
.saved-meta div { display: flex; gap: 10px; padding: 8px 2px; border-bottom: 1px solid rgba(58,41,28,.15); }
.saved-meta dt { flex: 0 0 82px; font-weight: 700; }
.saved-meta dd { flex: 1; overflow-wrap: anywhere; }
.coords { font-size: 13px; color: var(--soft); padding-top: 2px; }
.link-btn {
  display: block; margin: 4px auto 0; min-height: 44px; padding: 0 14px;
  background: none; border: 0; cursor: pointer;
  font: 700 16px/1 'Josefin Sans', sans-serif; color: var(--d);
  text-decoration: underline; text-decoration-color: var(--a);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
#saved-area .fine { margin-top: 6px; }

/* C: how to play */
.card-c { background: var(--c); text-align: center; padding-top: 16px; }
.deck-art { display: block; width: 190px; height: auto; margin: 0 auto 8px; }
.eyebrow-dark { color: var(--d); margin-bottom: 6px; }
.play { list-style: none; text-align: left; margin: 14px auto 0; max-width: 300px; }
.play li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; padding: 6px 0; }
.play li span:last-child { padding-top: 3px; }
.play-tag {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(58,41,28,.2);
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 17px;
}

/* D: social */
.card-d { background: #fff; border: 1.5px solid rgba(58,41,28,.3); text-align: center; }
.d-lead { font-size: 15px; margin-top: 6px; }
.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 12px; }
.d-review { font-size: 14.5px; color: var(--soft); }

/* ---------- "Show what's ours" mode ---------- */
.show-ours .ours, .show-ours .std { position: relative; }
.show-ours .ours { outline: 2px dashed var(--a); outline-offset: 3px; }
.show-ours .std { outline: 2px dashed #b9b9b9; outline-offset: 3px; border-radius: 8px; }
.show-ours .ours::after, .show-ours .std::after {
  content: attr(data-tag);
  position: absolute; top: -10px; right: 10px; z-index: 2;
  font: 700 11px/1 'Josefin Sans', sans-serif; letter-spacing: .04em;
  padding: 5px 8px 3px; border-radius: 999px;
}
.show-ours .ours::after { background: var(--d); color: var(--c); border: 1.5px solid var(--a); }
.show-ours .std::after { background: #fff; color: #555; border: 1.5px solid #b9b9b9; }
.show-ours .sh-details { overflow: visible; }
.show-ours .page > * + * { margin-top: 22px; }
.show-ours .sh-header { margin-top: 10px; }

/* ---------- sheets ---------- */
.sheet {
  width: 100%; max-width: 440px;
  margin: auto auto 0;
  border: 0; border-radius: 20px 20px 0 0;
  background: var(--paper); color: var(--d);
  padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 86vh; overflow-y: auto;
}
.sheet::backdrop { background: rgba(58,41,28,.55); }
.sheet-p { font-size: 15px; margin: 8px 0 16px; }
.sheet-actions { display: grid; gap: 10px; }
.notes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notes-head .btn { width: auto; padding-left: 18px; padding-right: 18px; }
.notes-list { list-style: none; font-size: 15px; }
.notes-list li { padding: 10px 0; border-top: 1px solid rgba(58,41,28,.15); }
.notes-list code { font-size: 13px; background: var(--c); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

@media (min-width: 480px) {
  .page { margin-top: 0; box-shadow: 0 0 0 1px rgba(58,41,28,.08); }
  .sheet { margin-bottom: auto; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .spinner { animation-duration: 1.6s; }
}
