/* / note: Keep this storefront deliberately quiet so merchant identity and checkout stay first. */
:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink, #17233b);
  background: var(--surface, #f5f7fb);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --brand: #2563eb;
  --accent: #1d4ed8;
  --surface: #f5f7fb;
  --ink: #17233b;
  --muted: #64718a;
  --line: #e2e7ef;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  /* / note: Flex the page column so the merchant footer rests at the viewport bottom on short pages. */
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--surface);
}
/* / note: Let the storefront take remaining height while closed-store and checkout states remain natural. */
body > main { flex: 1 0 auto; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.topbar {
  min-height: 0;
  padding: 22px 18px 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: color-mix(in srgb, var(--surface) 94%, white);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.brand {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
}
.brand-mark {
  width: 160px;
  height: 160px;
  flex: 0 0 160px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: white;
  background: var(--brand);
  font-size: 76px;
  line-height: 1;
  font-weight: 800;
}
.merchant-logo {
  width: 160px;
  height: 160px;
  flex: 0 0 160px;
  object-fit: contain;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.brand-copy { min-width: 0; display: grid; justify-items: center; gap: 3px; text-align: center; }
#brand-name {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(21px, 4vw, 27px);
  font-weight: 790;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.15;
}
.merchant-tagline {
  max-width: min(88vw, 600px);
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.storefront-shell { width: min(100% - 40px, 820px); margin: 35px auto 58px; }
.store-intro { margin: 0 0 24px; }
.intro-kicker { margin: 0 0 8px; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.store-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(25px, 5vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.hero-description {
  max-width: 600px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
/* / note: The saved merchant rate is the lead offer; the discount is calculated from that same rate. */
.selling-rate-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 3px 12px;
  margin-top: 18px;
  color: var(--brand);
}
.selling-rate-label { grid-column: 1 / -1; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.selling-rate-hero strong { font-size: clamp(42px, 7vw, 72px); line-height: .98; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.selling-rate-hero > span:last-child { color: var(--ink); font-size: clamp(16px, 2vw, 22px); font-weight: 700; }
.store-section { min-width: 0; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
}
.section-heading h2,
.order-intro h2,
.receipt-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.rate-note { color: var(--muted); font-size: 12px; text-align: right; }
/* / note: Keep the opt-in balance quiet beside the selling rate and easy to scan. */
.store-float-balance { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }
.availability-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  margin: 16px 0;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 76%, white);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--ink) 6%, transparent);
}
.availability-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: var(--brand);
}
.availability-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  border-radius: 16px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 9%, white);
  font-size: 23px;
  font-weight: 650;
}
.availability-copy { min-width: 0; }
.availability-copy .eyebrow { margin-bottom: 5px; }
.availability-copy h2 { margin: 0; color: var(--ink); font-size: 19px; line-height: 1.2; letter-spacing: -.025em; }
.availability-copy > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.availability-paused { border-color: #e8d5b7; }
.availability-paused::before { background: #a87536; }
.availability-paused .availability-icon { color: #96652c; background: #f8f1e6; border-color: #ead7ba; }
.availability-preparing .availability-icon { border-radius: 50% 50% 50% 12px; }
.availability-unavailable { border-color: #ead4c7; }
.availability-unavailable::before { background: #a66c43; }
.availability-unavailable .availability-icon { color: #965f3a; background: #f8f1eb; border-color: #ead4c7; }
.availability-error { border-color: #ebc9c7; }
.availability-error::before { background: #af4f46; }
.availability-error .availability-icon { color: #a1463f; background: #fbefed; border-color: #ebc9c7; }
.availability-retry { min-width: 116px; }

.order-panel, .receipt-panel {
  margin-top: 15px;
  padding: clamp(20px, 5vw, 30px);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 78%, white);
  box-shadow: 0 12px 38px color-mix(in srgb, var(--ink) 6%, transparent);
}
.order-intro { margin-bottom: 18px; }
.order-intro p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
#checkout-form { max-width: 560px; }
.checkout-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 18px; }
.checkout-field { min-width: 0; }
.checkout-field label { display: block; margin: 17px 0 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
.checkout-field label span { margin-left: 4px; color: var(--muted); font-size: 11px; font-weight: 450; }
.order-panel label:not(.same-phone) {
  display: block;
  margin: 17px 0 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.order-panel label span { margin-left: 4px; color: var(--muted); font-size: 11px; font-weight: 450; }
.phone-input {
  height: 49px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 58%, white);
}
/* / note: A focused phone field changes only its single outer border, avoiding a second inner outline. */
.phone-input:focus-within {
  border-color: var(--brand);
  outline: 0;
}
.phone-input > span { min-width: 22px; color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.phone-input input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.phone-input input::placeholder { color: color-mix(in srgb, var(--muted) 60%, white); }
/* / note: Keep one clear outer field boundary so the input itself does not look double outlined. */
.quick-amounts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.quick-amounts button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
  border-radius: 9px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.quick-amounts button[aria-pressed="true"] { color: white; background: var(--brand); }
.quick-amounts button:disabled { opacity: .38; cursor: not-allowed; }
.same-phone {
  display: flex;
  align-items: center;
  gap: 9px;
  grid-column: 1 / -1;
  margin: 1px 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.same-phone input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.same-phone input:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 3px; }
.airtime-limits { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; margin: 12px 0 7px; color: var(--muted); font-size: 12px; }
.airtime-limits strong { color: var(--ink); font-weight: 750; }
.price-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 16%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
}
.price-preview p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.price-preview strong { display: block; margin-top: 5px; color: var(--ink); font-size: 17px; font-weight: 740; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 740;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}
.button:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.04); }
.button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 3px; }
/* / note: Text inputs use one visible focus ring on their wrapper, never an extra inner rectangle. */
.phone-input input:focus-visible { outline: 0; box-shadow: none; }
.button-primary { width: 100%; margin-top: 8px; background: var(--brand); color: #fff; }
.button-primary:disabled { background: color-mix(in srgb, var(--brand) 38%, #9aa5b7); color: #fff; cursor: not-allowed; }
.button-secondary { min-width: 135px; margin: 4px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.button-secondary:disabled { opacity: .62; cursor: wait; }
.form-hint { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
/* / note: Help is a page-level section, outside the checkout card; support always precedes its two separate cards. */
.customer-help { display: grid; gap: 18px; margin: 26px 0 0; }
.help-cards { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 18px; }
.help-card { min-width: 0; padding: 24px; border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--surface) 55%, white); box-shadow: 0 8px 28px color-mix(in srgb, var(--ink) 4%, transparent); }
.help-card .eyebrow, .merchant-support .eyebrow { margin: 0 0 8px; color: var(--brand); }
.help-card h2 { margin: 0 0 20px; font-size: 20px; letter-spacing: -.025em; line-height: 1.25; }
/* / note: Ordered steps retain their meaning for assistive technology while small number badges make them easy to scan. */
.help-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: help-step; }
.help-steps li { position: relative; padding-left: 41px; counter-increment: help-step; }
.help-steps li::before { content: counter(help-step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); color: var(--brand); font-size: 12px; font-weight: 800; }
.help-steps strong { display: block; margin-bottom: 4px; font-size: 13px; }
.help-steps span, .help-faq details p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.help-faq details { padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent); }
.help-faq details:last-child { padding-bottom: 0; border-bottom: 0; }
.help-faq summary { color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.5; cursor: pointer; }
.help-faq summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 3px; }
.help-faq details p { margin: 9px 0 0; }
/* / note: The public support number is a direct call action; long business contacts wrap without squeezing the help cards. */
.merchant-support { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.merchant-support h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.merchant-support p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.merchant-support a { flex: 0 0 auto; padding: 12px 16px; border-radius: 11px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 750; text-decoration: none; }

.receipt-panel { text-align: center; }
.receipt-dialog {
  width: min(100% - 28px, 600px);
  max-height: min(88vh, 760px);
  padding: 0;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  border-radius: 22px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 90px color-mix(in srgb, #0b1730 35%, transparent);
}
.receipt-dialog::backdrop { background: color-mix(in srgb, #101a2d 50%, transparent); backdrop-filter: blur(3px); }
.receipt-dialog .receipt-panel { margin: 0; border: 0; box-shadow: none; }
.new-purchase-confirmation { display: grid; gap: 10px; margin: 12px 0; padding: 14px; border: 1px solid color-mix(in srgb, var(--brand) 32%, #dba642); border-radius: 14px; background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.new-purchase-confirmation p { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.5; }
.new-purchase-confirmation .button { width: 100%; }
.earlier-payment { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; padding: 15px 18px; border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.earlier-payment-copy { min-width: 0; }
.earlier-payment-copy h2 { margin: 0 0 4px; font-size: 15px; }
.earlier-payment-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.earlier-payment-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.earlier-payment-actions .button { min-height: 38px; padding: 8px 12px; font-size: 13px; }
/* / note: The pre-response checkout state uses the same restrained spinner as the saved-order pending state. */
.receipt-icon-spinner { border: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); border-top-color: var(--brand); border-radius: 50%; animation: receipt-spin 0.8s linear infinite; }
@keyframes receipt-spin { to { transform: rotate(360deg); } }
.receipt-icon-idle { border: 3px solid color-mix(in srgb, var(--brand) 18%, var(--line)); border-radius: 50%; animation: none !important; }
.view-order-status { display: flex; margin: 16px auto; }
.receipt-panel .eyebrow { margin-bottom: 8px; }
.receipt-panel h2 { font-size: 23px; }
.receipt-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
  color: var(--brand);
  font-size: 20px;
}
.receipt-icon-pending { border: 3px solid color-mix(in srgb, var(--brand) 16%, var(--line)); border-top-color: var(--brand); background: transparent; animation: receipt-spin 850ms linear infinite; }
@keyframes receipt-spin { to { transform: rotate(360deg); } }
.receipt-panel { animation: receipt-enter 240ms ease-out both; }
@keyframes receipt-enter { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.receipt-icon-confirmed { background: color-mix(in srgb, #208454 10%, var(--surface)); color: #208454; }
.receipt-icon-error { background: color-mix(in srgb, #b43e32 10%, var(--surface)); color: #a83228; }
.receipt-message { max-width: 500px; margin: 9px auto 17px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.delivery-waiting { max-width: 500px; margin: 0 auto 16px; color: var(--brand); font-size: 12px; font-weight: 700; }
.delivery-delay-note {
  max-width: 500px;
  margin: 0 auto 16px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
  border-radius: 11px;
  color: var(--ink);
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
  font-size: 12px;
  line-height: 1.55;
}
.receipt-details { max-width: 500px; margin: 0 auto 16px; border-top: 1px solid var(--line); text-align: left; }
.receipt-details div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.receipt-details dt { color: var(--muted); font-size: 11px; }
.receipt-details dd { max-width: 62%; margin: 0; color: var(--ink); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; text-align: right; }

/* / note: Keep the credit band full width and aligned to the page bottom. */
.footer {
  width: 100%;
  min-height: 72px;
  margin-top: auto;
  padding: 19px 20px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  background: color-mix(in srgb, var(--surface) 86%, var(--brand) 4%);
  color: var(--muted);
  text-align: center;
}
.footer-line { margin: 0; font-size: 13px; line-height: 1.55; text-wrap: pretty; }
.footer-divider { color: color-mix(in srgb, var(--muted) 65%, transparent); }
.lyco-credit { color: var(--brand); font-size: inherit; font-weight: 800; text-decoration: none; }
.lyco-credit:hover { color: var(--brand); text-decoration: underline; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 5;
  max-width: calc(100vw - 30px);
  padding: 12px 16px;
  transform: translateX(-50%);
  border-radius: 11px;
  color: #fff;
  background: #17233b;
  box-shadow: 0 10px 30px #101e3d40;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 600px) {
  .earlier-payment { align-items: stretch; flex-direction: column; gap: 10px; padding: 13px; }
  .earlier-payment-actions { display: grid; grid-template-columns: 1fr; }
  .new-purchase-confirmation { padding: 12px; }
  .topbar { padding: 18px 17px 15px; }
  .brand-mark, .merchant-logo { width: 140px; height: 140px; flex-basis: 140px; }
  .storefront-shell { width: calc(100% - 32px); margin: 28px auto 38px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .rate-note { text-align: left; }
  .price-preview { gap: 8px; padding: 12px; }
  .price-preview strong { font-size: 15px; }
  .footer { min-height: 68px; padding: 17px 14px; text-align: center; }
  .footer-line { max-width: 100%; margin-inline: auto; font-size: 12px; }
  /* / note: Stack the separate help cards after support on small screens, following the same reading order as desktop. */
  .customer-help, .help-cards { gap: 14px; }
  .help-cards { grid-template-columns: 1fr; }
  .help-card { padding: 21px; }
  .merchant-support { align-items: flex-start; flex-direction: column; padding: 21px; gap: 14px; }
}
@media (max-width: 360px) {
  .topbar { padding-inline: 12px; }
  .storefront-shell { width: calc(100% - 24px); }
  .price-preview { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* / note: Preserve the compact friendly failure page used by the Worker route. */
.not-found { max-width: 560px; margin: 15vh auto; padding: 28px; text-align: center; }
.not-found-title { font-size: 27px; letter-spacing: -0.04em; }
.not-found .button-primary { text-decoration: none; }

/* / note: Classic uses a familiar branded heading above a clear, centered order card. */
body.layout-classic {
  background:
    radial-gradient(ellipse at 6% 0%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 34rem),
    var(--surface);
}
body.layout-classic .topbar { background: color-mix(in srgb, var(--surface) 90%, white); }
body.layout-classic .storefront-shell { width: min(100% - 44px, 900px); margin-top: 34px; }
body.layout-classic .store-intro {
  display: grid;
  grid-template-columns: minmax(150px, .45fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 26px;
  margin-bottom: 18px;
  padding: 23px 30px;
  border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--line));
  border-radius: 20px 20px 7px 20px;
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  text-align: center;
}
body.layout-classic .intro-kicker { grid-column: 2; margin-bottom: 5px; }
body.layout-classic .store-intro h1 { grid-column: 2; grid-row: 2; }
body.layout-classic .hero-description { grid-column: 2; grid-row: 3; margin-top: 7px; }
/* / note: Stack Classic's discount beneath its large rate so the offer stays readable in its narrow intro column. */
body.layout-classic .selling-rate-hero { grid-column: 1; grid-row: 1 / span 3; grid-template-columns: 1fr; align-content: center; gap: 5px; margin: 0; padding: 8px 0; }
body.layout-classic .store-section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 75%, white);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--ink) 7%, transparent);
}
body.layout-classic .order-panel { display: grid; grid-template-columns: minmax(150px, .43fr) minmax(0, 1fr); gap: 22px; }
body.layout-classic #checkout-form { max-width: none; }

/* / note: Minimal keeps the same working checkout in a flat, compact reading order. */
body.layout-minimal .storefront-shell { width: min(100% - 36px, 700px); margin-top: 35px; }
body.layout-minimal .store-intro { margin-bottom: 18px; }
body.layout-minimal .selling-rate-hero { margin-top: 12px; padding: 12px 0; border-block: 1px solid var(--line); }
body.layout-minimal .selling-rate-hero strong { font-size: 48px; }
body.layout-minimal .intro-kicker { margin-bottom: 5px; font-size: 9px; }
body.layout-minimal .store-section { border-top: 1px solid var(--line); padding-top: 20px; }
body.layout-minimal .section-heading { align-items: center; margin-bottom: 8px; }
body.layout-minimal .section-heading h2 { font-size: 19px; }
body.layout-minimal .order-panel { margin-top: 8px; padding: 14px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.layout-minimal .order-intro { margin-bottom: 8px; }
body.layout-minimal .order-intro p { font-size: 12px; }
body.layout-minimal .checkout-fields { gap: 0 14px; }
body.layout-minimal .price-preview { border-radius: 9px; box-shadow: none; }
body.layout-minimal .availability-card { margin-top: 10px; box-shadow: none; }

/* / note: Bold gives the merchant story and checkout separate visual columns with a stronger title scale. */
body.layout-bold .storefront-shell {
  width: min(100% - 52px, 1120px);
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(34px, 6vw, 76px);
  margin-top: 52px;
}
body.layout-bold .store-intro { grid-column: 1; grid-row: 1; padding: 24px 4px 20px 0; text-align: center; }
body.layout-bold .intro-kicker { display: inline-block; margin-bottom: 18px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: 999px; }
body.layout-bold .store-intro h1 { max-width: 460px; font-size: clamp(42px, 5vw, 58px); line-height: .99; letter-spacing: -.06em; }
body.layout-bold .hero-description { max-width: 360px; margin-top: 17px; font-size: 15px; line-height: 1.65; }
body.layout-bold .selling-rate-hero { grid-template-columns: 1fr; gap: 5px; margin-top: 28px; padding: 22px; border-radius: 18px; color: white; background: var(--brand); }
body.layout-bold .selling-rate-label, body.layout-bold .selling-rate-hero > span:last-child { color: white; }
body.layout-bold .selling-rate-hero strong { font-size: clamp(58px, 8vw, 88px); }
body.layout-bold .store-section { grid-column: 2; grid-row: 1; }
body.layout-bold .section-heading { align-items: center; padding: 0 5px 15px; border-bottom: 1px solid var(--line); }
body.layout-bold .section-heading h2 { font-size: 25px; }
body.layout-bold .rate-note { max-width: 180px; padding: 10px 13px; border-radius: 11px; background: color-mix(in srgb, var(--brand) 8%, var(--surface)); font-weight: 650; }
body.layout-bold .order-panel, body.layout-bold .receipt-panel { margin-top: 15px; padding: clamp(24px, 3.2vw, 36px); border-radius: 23px; }
body.layout-bold .order-intro h2 { font-size: 24px; }
body.layout-bold .checkout-fields { gap: 6px 20px; }
body.layout-bold .price-preview { padding: 16px; }
body.layout-bold .price-preview strong { font-size: 19px; }
body.layout-bold .button-primary { min-height: 54px; border-radius: 13px; font-size: 14px; }
body.layout-bold .availability-card { margin-top: 0; padding: 25px; }

/* / note: The older editorial key maps to the current Minimal saved template. */
body.layout-editorial .storefront-shell { width: min(100% - 36px, 700px); }
body.layout-editorial .store-intro { margin-bottom: 18px; }

@media (max-width: 760px) {
  body.layout-classic .storefront-shell, body.layout-bold .storefront-shell { width: calc(100% - 32px); }
  body.layout-classic .store-intro { grid-template-columns: 1fr; padding: 20px; }
  body.layout-classic .intro-kicker, body.layout-classic .store-intro h1, body.layout-classic .hero-description { grid-column: 1; grid-row: auto; }
  body.layout-classic .selling-rate-hero { grid-column: 1; grid-row: auto; margin-top: 15px; padding: 15px 0 0; border-top: 1px solid var(--line); }
  body.layout-classic .store-section { padding: 18px; }
  body.layout-classic .order-panel { grid-template-columns: 1fr; gap: 5px; }
  body.layout-bold .storefront-shell { display: block; margin-top: 28px; }
  body.layout-bold .store-intro { padding: 5px 0 22px; }
  body.layout-bold .store-intro h1 { max-width: 560px; font-size: clamp(38px, 10vw, 50px); }
  body.layout-bold .store-section { padding: 0; }
}
@media (max-width: 560px) {
  .availability-card { grid-template-columns: 44px minmax(0, 1fr); gap: 13px; padding: 17px; }
  .availability-icon { width: 44px; height: 44px; border-radius: 13px; font-size: 20px; }
  .availability-copy h2 { font-size: 17px; }
  .availability-copy > p:last-child { font-size: 12px; }
  .availability-retry { grid-column: 2; justify-self: start; }
  .footer { align-items: center; text-align: center; }
  .receipt-dialog { width: calc(100% - 20px); max-height: 92vh; border-radius: 17px; }
  .receipt-dialog .receipt-panel { padding: 22px 17px; }
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-field label { margin-top: 13px; }
  .price-preview { margin-top: 10px; }
  body.layout-bold .section-heading { align-items: flex-start; }
  body.layout-bold .rate-note { max-width: none; }
}

/* / note: Keep payment-state motion readable without requiring animation for reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .receipt-icon-pending, .receipt-panel { animation: none; }
  html { scroll-behavior: auto; }
}
