@import url('/shared/theme.css?v=13');
@import url('/shared/ui-icons.css?v=5');

/* Full-screen boot overlay (hidden once wizard or landing is ready) */
.app-boot-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-6);
  text-align: center;
  background:
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(201, 162, 39, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 50% 40%, rgba(26, 42, 74, 0.08) 0%, transparent 50%),
    var(--color-bg, #f4f6f9);
}

.app-boot-loading.hidden {
  display: none;
}

.app-boot-loading-label {
  margin: 0;
  color: var(--color-text-muted, #6b7280);
  font-size: var(--font-size-lg, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ── Boot spinner: orbital paper stack (navy + gold) ─────────────────────── */
.app-boot-spinner {
  --boot-size: clamp(5.5rem, 18vw, 6.5rem);
  position: relative;
  width: var(--boot-size);
  height: var(--boot-size);
  flex-shrink: 0;
}

.boot-spinner-ring {
  position: absolute;
  border-radius: 50%;
  border: 3px solid transparent;
}

.boot-spinner-ring--outer {
  inset: 0;
  border-top-color: var(--color-accent, #c9a227);
  border-right-color: rgba(201, 162, 39, 0.25);
  animation: boot-spin 1.35s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.boot-spinner-ring--mid {
  inset: 10%;
  border-bottom-color: var(--color-primary, #1a2a4a);
  border-left-color: rgba(26, 42, 74, 0.35);
  animation: boot-spin 1.05s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite reverse;
}

.boot-spinner-orbit {
  position: absolute;
  inset: -6%;
  animation: boot-spin 2.2s linear infinite;
}

.boot-spinner-orbit--b {
  inset: -2%;
  animation-duration: 3.1s;
  animation-direction: reverse;
}

.boot-spinner-orbit--c {
  inset: -12%;
  animation-duration: 1.7s;
}

.boot-spinner-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: -0.275rem;
  border-radius: 50%;
  background: var(--color-accent, #c9a227);
  box-shadow: 0 0 0.5rem rgba(201, 162, 39, 0.65);
}

.boot-spinner-dot--sm {
  width: 0.4rem;
  height: 0.4rem;
  margin-left: -0.2rem;
  background: var(--color-primary, #1a2a4a);
  box-shadow: 0 0 0.35rem rgba(26, 42, 74, 0.45);
}

.boot-spinner-core {
  position: absolute;
  inset: 26%;
  display: grid;
  place-items: center;
  animation: boot-core-bob 2.4s ease-in-out infinite;
}

.boot-spinner-paper {
  position: absolute;
  width: 58%;
  height: 72%;
  border-radius: 3px;
  background: #fff;
  border: 2px solid var(--color-primary, #1a2a4a);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
  transform-origin: center bottom;
}

.boot-spinner-paper--back {
  transform: rotate(-10deg) translate(-3px, 2px);
  opacity: 0.72;
}

.boot-spinner-paper--mid {
  transform: rotate(3deg);
  animation: boot-paper-flutter 1.8s ease-in-out infinite;
}

.boot-spinner-paper--front {
  transform: rotate(11deg) translate(3px, -2px);
  z-index: 1;
}

.boot-spinner-shimmer {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 3px;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(201, 162, 39, 0.55) 50%,
    transparent 62%
  );
  background-size: 220% 100%;
  animation: boot-shimmer 2.1s ease-in-out infinite;
  pointer-events: none;
}

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

@keyframes boot-core-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes boot-paper-flutter {
  0%, 100% { transform: rotate(3deg); }
  35% { transform: rotate(-2deg) translateY(-1px); }
  70% { transform: rotate(6deg); }
}

@keyframes boot-shimmer {
  0% { background-position: 130% 0; opacity: 0; }
  20% { opacity: 1; }
  55% { background-position: -30% 0; opacity: 1; }
  100% { background-position: -30% 0; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .boot-spinner-ring--outer,
  .boot-spinner-ring--mid,
  .boot-spinner-orbit,
  .boot-spinner-core,
  .boot-spinner-paper--mid,
  .boot-spinner-shimmer {
    animation: none;
  }

  .boot-spinner-ring--outer {
    border-color: rgba(201, 162, 39, 0.45);
    border-top-color: var(--color-accent, #c9a227);
  }

  .boot-spinner-ring--mid {
    border-color: rgba(26, 42, 74, 0.25);
    border-bottom-color: var(--color-primary, #1a2a4a);
  }

  .boot-spinner-shimmer {
    opacity: 0.35;
    background-position: 50% 0;
  }
}

/* Landing "Ready to print?" must not stack on the wizard (guide/start/resume). */
html.is-print-wizard-route #startPanel,
body.wizard-active #startPanel {
  display: none !important;
}

/* ── Page-top wrapper: cover image spans header + hero ───────────────────── */
.page-top-wrap {
  position: relative;
  color: #fff;
  background: url('/assets/cover.jpg') center/cover no-repeat;
}

/* Dark gradient overlay so header text and hero text stay readable */
.page-top-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(17, 29, 51, 0.82) 0%,
    rgba(26, 42, 74, 0.70) 60%,
    rgba(42, 63, 111, 0.55) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Header sits over the cover — transparent so the image shows through */
.page-top-wrap .site-header {
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

/* ── Hero / cover banner ─────────────────────────────────────────────────── */
.hero {
  /* No background of its own — inherits the wrapper */
  background: transparent;
  color: #fff;
  padding: var(--space-12) var(--space-4);
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-content { position: relative; }

/* ── EasyPrint branding: statement headline + brand chip ─────────────────── */
.hero-content--brand {
  max-width: 920px;
  margin: 0 auto;
  text-align: left;
}

.hero-content--brand h1 {
  line-height: 1.05;
  margin-bottom: var(--space-4);
}

.hero-title-accent { color: var(--color-accent, #c9a227); }

/* EasyPrint lockup replaces the Andrez wordmark in the landing header */
/* "Powered by EasyPrint" badge under the headline. The artwork already
   contains the wording and its own pill, so it needs no chrome of its own. */
.hero-powered {
  display: inline-block;
  margin-top: var(--space-4);
}

.hero-powered img {
  width: clamp(9rem, 21vw, 12rem);
  height: auto;
  display: block;
}

/* Landing hero: headline on the left, the three steps stacked on the right.
   Scoped to .landing-page so the wizard hero (index.html) is untouched. */
.landing-page .hero {
  /* Bottom padding clears the start panel, which is pulled up 32px over the
     hero — without it the third step sits behind the card. */
  padding: var(--space-8) var(--space-4) var(--space-12);
}

/* Both columns size to their own content and the resulting pair is centred
   in the window, so the hero sits on the window's midpoint rather than being
   stretched to a fixed box. Each side keeps its own internal alignment. */
.landing-page .hero-content--brand {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
  max-width: none;
}

.landing-page .hero-content--brand h1 { margin-bottom: 0; }

.landing-page .hero .hero-flow { margin: 0; }

/* Release the animation frame from its fixed-height absolute layout */
.landing-page .hero-flow-animation {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: none;
}

.landing-page .hero-flow-steps {
  position: static;
  inset: auto;
  transform: none;
  width: 100%;
  grid-template-columns: 1fr;
  gap: clamp(0.5rem, 1.4vw, 0.9rem);
}

/* Each step becomes a compact horizontal row: disc, then caption */
.landing-page .hero-flow-step {
  position: relative;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: clamp(0.65rem, 1.6vw, 1rem);
}

.landing-page .hero-flow-stage {
  width: clamp(64px, 8vw, 88px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 6px rgba(255, 255, 255, 0.045),
    0 10px 22px rgba(0, 0, 0, 0.2);
}

.landing-page .hero-flow-caption {
  justify-content: flex-start;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

/* The step number rides on the disc itself rather than sitting in the
   caption, so the labels stay flush in a single column. */
.landing-page .hero-flow-num {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Landing page has no sticky wizard action bar, so it does not need the
   tall bottom gutter the wizard reserves for one. */
.landing-page .wizard-wrap {
  padding-bottom: var(--space-8);
  flex: 1 0 auto;
}

/* Pin the footer to the bottom of the viewport on short pages, while still
   letting it be pushed down when the content runs longer. */
.landing-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.landing-page .page-top-wrap { flex: 0 0 auto; }

.landing-page .site-footer {
  margin-top: auto;
  flex: 0 0 auto;
}

.site-footer-sep {
  margin: 0 0.4rem;
  opacity: 0.55;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
}

.hero p {
  font-size: var(--font-size-lg);
  opacity: .85;
  max-width: 560px;
  margin: 0 auto var(--space-6);
}

.hero .hero-flow {
  max-width: min(960px, 100%);
  margin-bottom: var(--space-6);
  line-height: 0;
  opacity: 1;
}

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

.hero-flow-graphic {
  display: block;
  width: 100%;
  height: auto;
  max-height: 390px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.22));
}

.hero-flow-animation {
  --hero-flow-cycle: 7.8s;
  --hero-flow-gold: #c9a227;
  display: block;
  position: relative;
  width: min(1000px, 100%);
  height: clamp(254px, 28vw, 340px);
  margin: 0 auto;
  line-height: 1;
  overflow: hidden;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.24));
}

.hero-flow-rail {
  position: absolute;
  z-index: 1;
  left: 7%;
  right: 7%;
  top: 19%;
  height: 75%;
  overflow: visible;
  pointer-events: none;
}

.hero-flow-rail-track,
.hero-flow-rail-live {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-flow-rail-track {
  stroke: rgba(111, 126, 150, 0.74);
  stroke-width: 6;
}

.hero-flow-rail-live {
  stroke: url("#heroFlowGradient");
  stroke-width: 9;
  stroke-dasharray: 300 480;
  stroke-dashoffset: 0;
  opacity: 0.98;
  filter:
    drop-shadow(0 0 7px rgba(56, 185, 121, 0.5))
    drop-shadow(0 0 10px rgba(234, 210, 102, 0.44));
  animation: hero-flow-signal var(--hero-flow-cycle) linear infinite;
}

.hero-flow-steps {
  position: absolute;
  z-index: 2;
  inset: clamp(12px, 2.2vw, 28px) auto auto 50%;
  width: min(700px, calc(100% - clamp(36px, 8vw, 92px)));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(6px, 1.2vw, 16px);
/*   gap: clamp(12px, 2.6vw, 34px); */
}

.hero-flow-step {
  display: grid;
  justify-items: center;
  gap: clamp(8px, 1.4vw, 12px);
  min-width: 0;
}

.hero-flow-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(118px, 15vw, 168px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.17), transparent 54%),
    radial-gradient(circle at 50% 52%, rgba(201, 162, 39, 0.14), transparent 58%),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 9px rgba(255, 255, 255, 0.045),
    0 16px 32px rgba(0, 0, 0, 0.2);
}

.hero-flow-stage::before,
.hero-flow-stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-flow-stage::before {
  inset: 10%;
  border: 1px solid rgba(201, 162, 39, 0.24);
}

.hero-flow-stage::after {
  inset: 20%;
  border: 2px solid rgba(255, 255, 255, 0.24);
  opacity: 0;
  animation: hero-flow-orbit var(--hero-flow-cycle) ease-out infinite;
}

.hero-flow-step--upload .hero-flow-stage::after { animation-delay: 0s; }
.hero-flow-step--choose .hero-flow-stage::after { animation-delay: 1.95s; }
.hero-flow-step--pay .hero-flow-stage::after { animation-delay: 3.9s; }
/* .hero-flow-step--pickup .hero-flow-stage::after { animation-delay: 5.85s; } */

.hero-flow-caption {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  font-weight: 840;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-flow-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #111827;
  background: var(--hero-flow-gold);
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.48);
}

.hero-upload-sheet,
.hero-upload-cloud,
.hero-choose-panel,
.hero-pay-card,
.hero-pickup-stack,
.hero-pickup-check {
  position: absolute;
  display: block;
}

.hero-upload-sheet {
  width: 42%;
  height: 50%;
  top: 25%;
  left: 50%;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(217, 224, 233, 0.72)),
    linear-gradient(145deg, transparent 56%, rgba(15, 143, 137, 0.56) 57% 76%, transparent 77%);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%) rotate(-8deg);
  animation: hero-upload-sheet var(--hero-flow-cycle) ease-in-out infinite;
}

.hero-upload-sheet::before {
  content: "";
  position: absolute;
  top: 17%;
  left: 22%;
  width: 46%;
  height: 22%;
  border-top: 3px solid rgba(95, 110, 132, 0.32);
  border-bottom: 3px solid rgba(95, 110, 132, 0.25);
}

.hero-upload-sheet::after {
  content: "";
  position: absolute;
  right: 18%;
  bottom: 22%;
  width: 20%;
  height: 28%;
  border-radius: 999px 999px 4px 4px;
  background: #0f8f89;
  transform: rotate(42deg);
}

.hero-upload-cloud {
  width: 62%;
  height: 40%;
  left: 50%;
  bottom: 21%;
  transform: translateX(-50%);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 82'%3E%3Cpath d='M26 67h67c12 0 21-9 21-21 0-11-8-20-19-21C93 11 81 5 67 6 54 7 45 15 39 27c-11-2-22 4-27 15C4 45 1 53 4 60c3 8 11 12 22 12z' fill='%23fff'/%3E%3C/svg%3E")
    center / contain no-repeat;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.18));
}

.hero-choose-panel {
  width: 62%;
  height: 36%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-choose-panel::before,
.hero-choose-panel::after,
.hero-choose-panel span {
  content: "";
  position: absolute;
  left: 18%;
  width: 64%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-choose-panel::before { top: 24%; }
.hero-choose-panel span:nth-child(1) { top: 46%; }
.hero-choose-panel span:nth-child(2) { top: 68%; }

.hero-choose-panel::after,
.hero-choose-panel span:nth-child(3) {
  width: 16px;
  height: 16px;
  background: var(--hero-flow-gold);
  box-shadow: 0 0 14px rgba(201, 162, 39, 0.34);
}

.hero-choose-panel::after { top: calc(24% - 6px); left: 26%; }
.hero-choose-panel span:nth-child(3) { top: calc(46% - 6px); left: 55%; }

.hero-pay-card {
  width: 62%;
  height: 45%;
  border-radius: 8px;
  background: linear-gradient(135deg, #229796, #0f7777);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24);
  animation: hero-pay-card var(--hero-flow-cycle) ease-in-out infinite;
}

.hero-pay-card::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 12%;
  width: 22%;
  height: 20%;
  border-radius: 4px;
  background: #efd36a;
}

.hero-pay-card::after {
  content: "";
  position: absolute;
  right: -2%;
  bottom: 0;
  width: 28%;
  height: 38%;
  border-radius: 14px 14px 0 0;
  border: 6px solid #142340;
  border-bottom: 0;
}

.hero-pay-card span {
  position: absolute;
  left: 12%;
  bottom: 22%;
  width: 54%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-pickup-stack {
  width: 44%;
  height: 52%;
  border-radius: 8px;
  background: #fff;
  box-shadow:
    -10px 8px 0 rgba(255, 255, 255, 0.58),
    -14px 14px 18px rgba(0, 0, 0, 0.22);
  animation: hero-pickup-stack var(--hero-flow-cycle) ease-in-out infinite;
}

.hero-pickup-stack::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 40%;
  height: 42%;
  border-radius: 0 0 8px 0;
  background: linear-gradient(135deg, transparent 50%, rgba(222, 229, 240, 0.92) 51%);
}

.hero-pickup-check {
  right: 21%;
  bottom: 24%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(56, 185, 121, 0.9);
  box-shadow: 0 0 0 8px rgba(56, 185, 121, 0.18), 0 0 18px rgba(56, 185, 121, 0.38);
}

.hero-pickup-check::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 16px;
  height: 9px;
  border-left: 5px solid #fff;
  border-bottom: 5px solid #fff;
  transform: rotate(-45deg);
}

@keyframes hero-flow-signal {
  to { stroke-dashoffset: -780; }
}

@keyframes hero-flow-orbit {
  0%, 24%, 100% { transform: scale(0.2); opacity: 0; }
  38%, 58% { transform: scale(1.34); opacity: 0.88; }
  78% { transform: scale(1.7); opacity: 0; }
}

@keyframes hero-upload-sheet {
  0%, 14% { transform: translate(-50%, 14px) rotate(-10deg); opacity: 0.6; }
  32%, 58% { transform: translate(-50%, -2px) rotate(-4deg); opacity: 1; }
  78%, 100% { transform: translate(-50%, -12px) rotate(5deg); opacity: 0.66; }
}

@keyframes hero-pay-card {
  0%, 24%, 100% { transform: translateY(0) rotate(-1deg); }
  42%, 55% { transform: translateY(-6px) rotate(2deg); }
  70% { transform: translateY(0) rotate(0deg); }
}

/* Fourth pickup step animation disabled with the pickup step in home.html.
@keyframes hero-pickup-stack {
  0%, 28%, 100% { transform: rotate(0deg) translateY(0); }
  46%, 64% { transform: rotate(3deg) translateY(-8px); }
}
*/

.hero:has(#heroDescription.hidden) h1 {
  margin-bottom: 0;
}

/* Mobile: shorter hero band; anchor cover to storefront top (desktop unchanged) */
@media (max-width: 767px) {
  /* Mobile keeps the two-column hero — steps stay to the right of the
     headline — so everything shrinks to fit the narrow column pair. */
  /* auto columns (not 1fr) so the headline shrinks to its text and the steps
     sit right beside it, rather than being pushed to the far edge. */
  .landing-page .hero-content--brand {
    grid-template-columns: auto auto;
    gap: var(--space-2);
  }

  .landing-page .hero-flow-stage { width: 42px; }

  .landing-page .hero-flow-step { gap: 0.5rem; }

  .landing-page .hero-flow-caption { font-size: 0.8rem; }

  .landing-page .hero-flow-num {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
  }

  /* Keep the full Powered by EasyPrint lockup legible on phones. The asset
     already has a compact pill ratio, so increasing its rendered width makes
     both the label and cloud mark readable without adding vertical bulk. */
  .hero-powered img { width: 10rem; }

  /* Address drops to its own line rather than wrapping mid-street-name */
  .site-footer-sep { display: none; }

  .site-footer-address { display: block; }

  .page-top-wrap {
    background-position: top center;
  }

  .hero {
    padding:
      var(--space-5)
      max(var(--space-4), env(safe-area-inset-right, 0px))
      var(--space-4)
      max(var(--space-4), env(safe-area-inset-left, 0px));
  }

  .hero:has(#heroDescription.hidden) {
    padding-bottom: var(--space-3);
  }

  .hero h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: var(--space-2);
  }

  .hero p {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-4);
  }

  .hero .hero-flow {
    max-width: min(100%, 520px);
    margin-bottom: var(--space-4);
  }

  .hero-flow-graphic {
    max-height: 190px;
  }

  .hero-flow-animation {
    height: clamp(156px, 43vw, 184px);
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .hero-flow-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(340px, calc(100% - 12px));
    inset: 8px auto auto 50%;
    gap: 4px;

/*     width: auto;
    inset: 8px 6px;
    gap: 8px; */
  }

  .hero-flow-rail {
    top: 8px;
    right: 2%;
    left: 2%;
    width: auto;
    height: calc(100% - 4px);
  }

  .hero-flow-stage {
    width: clamp(68px, 21vw, 86px);
  }

  .hero-flow-caption {
    gap: 4px;
    font-size: clamp(0.78rem, 3vw, 0.94rem);
  }

  .hero-flow-num {
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }

  /*
   * Wizard overlap: .wizard-wrap uses margin-top: -2rem + z-index: 2 so the step
   * bar can sit on the hero gradient on desktop. On narrow viewports that pulls
   * the step bar over the "Self-Serve Printing" title — keep the bar below hero.
   */
  body.wizard-active .wizard-wrap {
    margin-top: 0;
  }

  body.wizard-active .wizard-wrap > .step-bar:not(.hidden) {
    margin-top: var(--space-2);
  }

  .wizard-wrap:has(#successPanel:not(.hidden)) {
    margin-top: 0;
  }
}

/* Tablet / small laptop: same hero overlap guard up to the configure mobile breakpoint */
@media (min-width: 768px) and (max-width: 860px) {
  body.wizard-active .wizard-wrap {
    margin-top: 0;
  }
}

/* ── Auth modal (login without leaving wizard) ───────────────────────────── */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 29, 51, 0.55);
}

.auth-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - var(--space-8));
  overflow-y: auto;
  margin: 0;
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}

.auth-modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal-close:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.auth-modal-title {
  font-size: var(--font-size-xl);
  font-weight: 800;
  margin: 0 2rem var(--space-2) 0;
}

.auth-modal-subtitle {
  margin: 0 0 var(--space-4);
}

.auth-modal-tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-5);
}

.auth-modal-tab {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}

.auth-modal-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.auth-modal-remember {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
}

.auth-modal-remember input {
  width: auto;
}

.auth-modal-remember label {
  font-weight: 400;
  font-size: var(--font-size-sm);
  cursor: pointer;
  margin-bottom: 0;
}

.auth-modal-link-btn {
  display: block;
  margin: var(--space-3) auto 0;
  padding: var(--space-1) var(--space-2);
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.auth-modal-link-btn:hover,
.auth-modal-link-btn:focus-visible {
  color: var(--color-accent);
}

.page-top-wrap .header-actions .header-login-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.page-top-wrap .header-actions .header-login-btn:hover {
  opacity: 0.9;
}

.page-top-wrap .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
  max-width: min(100%, 18rem);
}

/* ── Customer hamburger nav ─────────────────────────────────────────────── */
/* Desktop inline nav themes: default 3, ?nav=1|2|3 — customer/nav-themes/theme-{n}.css */
.customer-nav-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
}

.customer-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(17, 29, 51, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease,
    transform 0.16s ease;
}

.customer-nav-inline {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-1);
}

.customer-nav-inline .customer-nav-link {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none !important;
  border: 1px solid transparent;
  background: transparent;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.customer-nav-inline .customer-nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
}

.customer-nav-inline .customer-nav-link[aria-current='page'] {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff !important;
}

/* Desktop inline logout — visually separated from primary nav links */
.customer-nav-inline .customer-nav-logout-inline {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  margin-left: var(--space-2);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: rgba(252, 165, 165, 0.95) !important;
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* Subtle vertical rule separating logout from the rest of the nav links */
.customer-nav-inline .customer-nav-logout-inline::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-2) - 0.5px);
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.customer-nav-inline .customer-nav-logout-inline:hover {
  background: rgba(220, 38, 38, 0.18);
  border-color: rgba(248, 113, 113, 0.75);
  color: #fca5a5 !important;
}

@media (min-width: 1024px) {
  .page-top-wrap .header-actions:has(.customer-nav-inline) {
    max-width: none;
    flex-wrap: nowrap;
  }

  .customer-nav-inline {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-2);
  }

  .customer-nav-toggle {
    display: none;
  }
}

.customer-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 34px rgba(17, 29, 51, 0.22);
}

.customer-nav-toggle:active {
  transform: translateY(1px);
}

.customer-nav-toggle[aria-expanded='true'] {
  background: #fff;
  border-color: #fff;
  color: var(--color-primary);
}

.customer-nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.customer-nav-toggle[aria-expanded='true'] .customer-nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.customer-nav-toggle[aria-expanded='true'] .customer-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.customer-nav-toggle[aria-expanded='true'] .customer-nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Drawer + backdrop are direct children of html (above wizard/guide UI; outside body overflow) */
.customer-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10200;
  background:
    linear-gradient(90deg, rgba(10, 17, 31, 0.28), rgba(10, 17, 31, 0.62)),
    rgba(17, 29, 51, 0.34);
  backdrop-filter: blur(8px) saturate(115%);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
  touch-action: none;
}

.customer-nav-backdrop.hidden {
  display: none !important;
}

.customer-nav-drawer {
  position: fixed;
  top: max(8px, env(safe-area-inset-top, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
  bottom: max(8px, env(safe-area-inset-bottom, 0px));
  z-index: 10210;
  width: min(21rem, calc(100vw - 1rem));
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2);
  color: var(--color-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    var(--color-surface);
  border: 1px solid rgba(216, 220, 228, 0.78);
  border-radius: 24px;
  box-shadow: -18px 24px 70px rgba(17, 29, 51, 0.32);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(calc(100% + 1rem), 0, 0) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.24s;
  will-change: transform;
}

.customer-nav-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

.customer-nav-drawer-head {
  flex-shrink: 0;
  min-width: 0;
  padding: var(--space-4);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(26, 42, 74, 0.98) 0%, rgba(17, 29, 51, 0.96) 70%),
    var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(17, 29, 51, 0.2);
}

.customer-nav-drawer-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  min-width: 0;
}

.customer-nav-drawer-title {
  margin: 0;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.customer-nav-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.customer-nav-email {
  margin: 0;
  max-width: 100%;
  padding: var(--space-3);
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.customer-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}

.customer-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 3rem;
  padding: var(--space-3) var(--space-4);
  border-radius: 16px;
  font-weight: 700;
  font-size: var(--font-size-base);
  color: var(--color-primary) !important;
  text-decoration: none !important;
  border: 1px solid rgba(216, 220, 228, 0.8) !important;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(17, 29, 51, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease, box-shadow 0.15s ease;
}

.customer-nav-drawer .customer-nav-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: transparent;
  color: var(--color-primary);
}

.customer-nav-drawer .customer-nav-link-icon::before {
  width: 1.5rem;
  height: 1.5rem;
}

.customer-nav-drawer .customer-nav-link-label {
  min-width: 0;
  line-height: 1.3;
}

.customer-nav-link:hover {
  background: #fff;
  border-color: rgba(201, 162, 39, 0.56) !important;
  color: var(--color-primary) !important;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(17, 29, 51, 0.09);
  transform: translateX(-2px);
}

.customer-nav-logout {
  margin: auto 0 0;
  width: 100%;
  min-height: 3rem;
  padding: var(--space-3);
  border: 1px solid rgba(220, 38, 38, 0.22) !important;
  border-radius: 16px;
  background: #fff7f7 !important;
  color: #9f1239 !important;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.customer-nav-logout:hover {
  background: #fff !important;
  border-color: rgba(220, 38, 38, 0.42) !important;
  color: #be123c !important;
  box-shadow: 0 10px 22px rgba(159, 18, 57, 0.1);
}

/* Override global header-actions link/button styles if drawer is ever nested */
.site-header .header-actions .customer-nav-drawer a,
.site-header .header-actions .customer-nav-drawer button {
  color: inherit;
  border: none;
  padding: inherit;
}

html.customer-nav-open,
body.customer-nav-open {
  overflow: hidden;
  touch-action: none;
}

body.customer-nav-open .customer-nav-toggle {
  touch-action: manipulation;
}

/* Landing: short page + .wizard-wrap stacking can hide body-mounted fixed drawers on WebKit */
body.landing-page .customer-nav-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

@media (min-width: 768px) {
  .customer-nav-drawer {
    width: 21rem;
  }
}

.page-top-wrap .header-user-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14rem;
  opacity: 0.95;
}

.page-top-wrap .header-actions #logoutBtn {
  flex-shrink: 0;
}

body.auth-modal-open {
  overflow: hidden;
}

/* ── Wizard container ────────────────────────────────────────────────────── */
.wizard-wrap {
  max-width: 1120px;
  margin: -2rem auto 0;
  padding: 0 var(--space-4) var(--space-12);
  position: relative;
  z-index: 2;
}

.wizard-wrap > .card,
.wizard-wrap > .step-bar {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ── "Job waiting" notice banner (landing page, unfinished draft) ────────── */
.job-waiting-banner {
  background: linear-gradient(180deg, #fdf6e0, #faecc0);
  border-bottom: 1px solid #e8cf82;
}

.job-waiting-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
}

.job-waiting-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.job-waiting-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.4;
  color: #6b5310;
}

.job-waiting-text .job-waiting-file {
  font-weight: 700;
  color: var(--color-primary);
  overflow-wrap: anywhere;
}

.job-waiting-continue {
  flex: 0 0 auto;
  padding: var(--space-2) var(--space-5);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-primary-dark);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
}

.job-waiting-continue:hover {
  background: var(--color-accent-hover);
}

.job-waiting-continue:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Narrow screens: text keeps the top line, Continue drops to its own row */
@media (max-width: 640px) {
  .job-waiting-inner {
    flex-wrap: wrap;
    row-gap: var(--space-2);
  }

  .job-waiting-continue {
    width: 100%;
  }
}

/* Also used by the wizard's fallback start panel (#startPanelResumeHint in
   index.html), so this rule must outlive the landing page's own resume hint. */
.start-panel-resume-hint {
  max-width: 32rem;
  margin: 0 auto var(--space-4);
  line-height: 1.45;
}

/* ── Start panel ─────────────────────────────────────────────────────────── */
.start-panel {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.start-panel h2 {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  margin-bottom: var(--space-3);
}

.start-panel > .text-muted {
  margin-bottom: var(--space-6);
}

.start-panel-auth-lead {
  max-width: 32rem;
  margin: 0 auto var(--space-6);
  line-height: 1.5;
}

.start-panel-auth-actions {
  justify-content: center;
}

.wizard-resume-actions {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.wizard-resume-actions .btn {
  width: 100%;
}

.start-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  max-width: 430px;
  margin: 0 auto var(--space-2);
  text-align: left;
}

.start-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.start-step:not(:last-child)::after {
  content: '↓';
  position: absolute;
  left: 50%;
  bottom: calc(var(--space-6) * -0.82);
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 1;
}

.start-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.start-actions {
  display: grid;
  gap: var(--space-3);
  max-width: 430px;
  margin: var(--space-6) auto 0;
}

.start-actions .btn {
  width: 100%;
}

body.landing-page .start-actions a.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Landing "ready" state: Start is the single primary action, so the
   actions block grows to the card's full width and Start gets a tall,
   unmistakably-primary treatment. */
.start-actions--primary-only {
  max-width: none;
}

.start-actions--primary-only .btn {
  min-height: 3.5rem;
  font-size: var(--font-size-lg);
  border-radius: var(--radius-lg);
  font-weight: 800;
}

/* Guide Me, demoted from a button to a plain text link underneath Start.
   Padding (not just line-height) keeps the tap target >=44px even though
   the link reads visually small. */
.start-guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-decoration: underline;
  cursor: pointer;
}

.start-guide-link:hover,
.start-guide-link:focus-visible {
  color: var(--color-accent);
}

.mobile-guide-btn {
  display: none;
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}

.mobile-guide-btn:hover:not(:disabled) {
  background: #15803d;
  border-color: #15803d;
  box-shadow: var(--shadow-md);
  color: #fff;
}

.mobile-guide-btn:not(.hidden) {
  display: inline-flex;
}

.view-my-orders-btn {
  display: none;
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

body.customer-signed-in .view-my-orders-btn:not(.hidden) {
  display: inline-flex;
}

.view-my-orders-btn:hover:not(:disabled) {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  color: #fff;
}

/* Option help tooltips (paper size, fit mode) are desktop-only; mobile uses the guide */
body.mobile-guide-device .scale-mode-tooltip,
body.mobile-guide-walkthrough-active .scale-mode-tooltip {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ── Mobile guide overlay ───────────────────────────────────────────────── */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  pointer-events: none;
}

/* Dimmed backdrop with a clip-path cutout (set in JS) so the target stays full color. */
.guide-dismiss-layer {
  position: fixed;
  inset: 0;
  z-index: 180;
  pointer-events: auto;
  cursor: default;
  background: rgba(17, 29, 51, 0.52);
  opacity: 1;
  transition: opacity 0.45s ease;
}

/* Welcome: dim fades in first, then the bubble enter animation runs (JS). */
.guide-overlay.guide-dim-fade-in:not(.guide-dim-visible) .guide-dismiss-layer {
  opacity: 0;
}

.guide-overlay.guide-dim-fade-in:not(.guide-dim-visible) .guide-bubble,
.guide-overlay.guide-dim-fade-in:not(.guide-dim-visible) .guide-target-frame {
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .guide-dismiss-layer {
    transition-duration: 0.12s;
  }
}

.guide-overlay.guide-bubble-dismissed .guide-bubble {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.guide-overlay.guide-ui-dismissed .guide-dismiss-layer,
.guide-overlay.guide-ui-dismissed .guide-target-frame,
.guide-overlay.guide-ui-dismissed .guide-bubble {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.guide-target-frame {
  position: fixed;
  z-index: 181;
  border: 3px solid var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0);
  transition: top .16s ease, left .16s ease, width .16s ease, height .16s ease, opacity .16s ease;
}

.guide-target-frame.is-visible {
  opacity: 1;
}

/* Scroll padding when the guide scrolls a section into view. */
.guide-highlight {
  scroll-margin-top: calc(env(safe-area-inset-top, 0px) + var(--space-8));
  scroll-margin-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.guide-bubble {
  position: fixed;
  z-index: 182;
  width: min(calc(100vw - var(--space-8)), 360px);
  pointer-events: auto;
}

/* Hidden until the enter animation class is applied (prevents a one-frame flash). */
.guide-bubble.guide-bubble-pre-enter,
.guide-bubble.guide-bubble-animate-ready:not(.guide-bubble-enter) {
  visibility: hidden;
  pointer-events: none;
}

.guide-bubble-shell {
  padding: var(--space-4);
  border: 1px solid rgba(17, 29, 51, 0.12);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
}

.guide-bubble.guide-bubble-compact {
  width: min(calc(100vw - var(--space-8)), 300px);
}

.guide-bubble.guide-bubble-compact .guide-bubble-shell {
  padding: var(--space-3);
}

.guide-bubble.guide-bubble-compact .guide-kicker {
  font-size: 0.6875rem;
  margin-bottom: 2px;
}

.guide-bubble.guide-bubble-compact .guide-bubble-shell h2 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-1);
}

.guide-bubble.guide-bubble-compact .guide-bubble-shell p {
  font-size: 0.8125rem;
  line-height: 1.35;
}

.guide-bubble.guide-bubble-compact .guide-actions {
  margin-top: var(--space-3);
}

.guide-bubble.guide-bubble-compact .guide-actions .btn {
  min-width: 88px;
  padding: 0.45rem 0.85rem;
  font-size: var(--font-size-sm);
}

/* Inner shell grows as a center line, then widens; copy fades in after. Arrow stays on .guide-bubble. */
.guide-bubble.guide-bubble-animate-ready .guide-bubble-shell {
  overflow: hidden;
  clip-path: inset(50% calc(50% - 2px) 50% calc(50% - 2px) round var(--radius-lg));
}

.guide-bubble.guide-bubble-animate-ready .guide-bubble-shell > * {
  opacity: 0;
}

@keyframes guide-bubble-shell-grow {
  0% {
    clip-path: inset(50% calc(50% - 2px) 50% calc(50% - 2px) round var(--radius-lg));
  }

  42% {
    clip-path: inset(0 calc(50% - 2px) 0 calc(50% - 2px) round var(--radius-lg));
  }

  72% {
    clip-path: inset(0 0 0 0 round var(--radius-lg));
  }

  100% {
    clip-path: inset(0 0 0 0 round var(--radius-lg));
  }
}

@keyframes guide-bubble-content-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes guide-bubble-arrow-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.guide-bubble.guide-bubble-enter .guide-bubble-shell {
  overflow: hidden;
  animation: guide-bubble-shell-grow 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.guide-bubble.guide-bubble-enter .guide-bubble-shell > * {
  opacity: 0;
  animation: guide-bubble-content-in 0.32s ease forwards;
  animation-delay: 0.52s;
}

.guide-bubble.guide-bubble-enter:not([data-placement="center"])::after {
  opacity: 0;
  animation: guide-bubble-arrow-in 0.28s ease forwards;
  animation-delay: 0.62s;
}

@media (prefers-reduced-motion: reduce) {
  .guide-bubble.guide-bubble-enter .guide-bubble-shell {
    animation: guide-bubble-enter-reduced 0.22s ease both;
  }

  .guide-bubble.guide-bubble-enter .guide-bubble-shell > * {
    animation: guide-bubble-content-in 0.22s ease forwards;
    animation-delay: 0.08s;
  }

  .guide-bubble.guide-bubble-enter:not([data-placement="center"])::after {
    animation-delay: 0.14s;
  }

  @keyframes guide-bubble-enter-reduced {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }
}

.guide-bubble::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--color-surface);
  border: 1px solid rgba(17, 29, 51, 0.12);
  transform: rotate(45deg);
}

.guide-bubble[data-placement="bottom"]::after {
  top: -8px;
  left: var(--guide-arrow-left, 50%);
  border-right: 0;
  border-bottom: 0;
}

.guide-bubble[data-placement="top"]::after {
  bottom: -8px;
  left: var(--guide-arrow-left, 50%);
  border-left: 0;
  border-top: 0;
}

.guide-bubble[data-placement="center"]::after,
.guide-bubble[data-placement="viewport-bottom"]::after {
  display: none;
}

.guide-kicker {
  margin-bottom: var(--space-1);
  font-size: var(--font-size-xs, 0.75rem);
  font-weight: 800;
  color: var(--color-accent-hover);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.guide-bubble-shell h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-lg);
  font-weight: 800;
  line-height: 1.25;
}

.guide-bubble-shell p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
}

.guide-bubble-shell .guide-body-lead {
  margin-bottom: var(--space-2);
}

.guide-bubble-shell .guide-upload-sources {
  margin: 0 0 var(--space-3);
  padding-left: 1.15rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.guide-bubble-shell .guide-upload-sources li {
  margin-bottom: var(--space-2);
}

.guide-bubble-shell .guide-upload-sources li:last-child {
  margin-bottom: 0;
}

.guide-bubble-shell .guide-upload-sources strong {
  color: var(--color-text);
  font-weight: 700;
}

.guide-bubble-shell .guide-body-tip {
  margin-top: var(--space-2);
  font-size: 0.8125rem;
}

/* Floating play/pause for guide audio (top-left, above overlay) */
.guide-audio-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + var(--space-3));
  left: calc(env(safe-area-inset-left, 0px) + var(--space-3));
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-surface, #fff);
  color: var(--color-accent, #0d6b4f);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.guide-audio-toggle:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.guide-audio-toggle:focus-visible {
  outline: 2px solid var(--color-accent, #0d6b4f);
  outline-offset: 2px;
}

.guide-audio-toggle.hidden {
  display: none;
}

.guide-audio-toggle-icon {
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.guide-audio-toggle-icon-pause {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 5h4v14H6V5zm8 0h4v14h-4V5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 5h4v14H6V5zm8 0h4v14h-4V5z'/%3E%3C/svg%3E");
}

.guide-audio-toggle-icon-play {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 5v14l11-7L8 5z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 5v14l11-7L8 5z'/%3E%3C/svg%3E");
}

.guide-config-choice-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.guide-config-choice-actions.hidden {
  display: none;
}

.guide-config-choice-actions .btn {
  width: 100%;
  min-width: 0;
}

.guide-mode-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.guide-mode-picker.hidden {
  display: none;
}

.guide-mode-picker .btn {
  width: 100%;
  min-width: 0;
}

.guide-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.guide-actions.hidden {
  display: none;
}

.guide-actions .btn {
  min-width: 112px;
  padding: 0.55rem 1rem;
}

@media (max-width: 420px) {
  .guide-bubble-shell {
    padding: var(--space-3);
  }

  .guide-actions {
    gap: var(--space-2);
  }

  .guide-actions .btn {
    min-width: 96px;
  }
}

/* ── Step progress bar ───────────────────────────────────────────────────── */
.step-bar {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-6);
  gap: 0;
}

.step-bar .step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  position: relative;
}

.step-bar .step::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.step-bar .step:last-child::after { display: none; }

.step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
  transition: background .2s, border-color .2s, color .2s;
}

.step-bar .step.active .step-num {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary);
}

.step-bar .step.done .step-num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.step-bar .step.done::after { background: var(--color-primary); }

.step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.step-bar .step.active .step-label { color: var(--color-accent); }
.step-bar .step.done  .step-label  { color: var(--color-primary); }

/* ── Step 1 layout: upload card centered (full width), sidebar floats right ─ */

/* The upload card stays at its original wizard-wrap width (centered). The
   sidebar is positioned absolutely just to its right so the main column
   doesn't shrink. Falls back to a stacked layout on narrower screens. */
#step1.step1-layout {
  position: relative;
}

.wizard-wrap > #step2.configure-layout {
  max-width: 1120px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Desktop: Quick setup full width, then options | preview (2×) | estimate */
#step2.configure-layout {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) minmax(220px, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "autopick autopick autopick"
    "options preview estimate";
  gap: var(--space-3) var(--space-5);
  align-items: start;
  width: 100%;
}

#step2.configure-layout:has(.configure-autopick-panel.guide-configure-autopick-hidden) {
  grid-template-rows: auto;
  grid-template-areas: "options preview estimate";
}

#step2ConfigureBody {
  display: contents;
}

#step2.configure-layout.configure-review-phase {
  display: block;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

#step2.configure-layout.configure-review-phase #checkoutPanel {
  margin-top: 0;
}

#step2.configure-layout.configure-review-phase #checkoutSummaryTotals {
  scroll-margin-bottom: calc(72px + var(--space-8));
}

.configure-options-panel {
  grid-area: options;
  padding: var(--space-4);
}

.configure-autopick-panel {
  grid-area: autopick;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  border-color: rgba(0, 102, 204, 0.18);
  background:
    linear-gradient(135deg, rgba(0, 102, 204, 0.08), rgba(20, 184, 166, 0.08)),
    var(--color-surface);
}

.configure-autopick-panel h3,
.configure-autopick-panel p {
  margin: 0;
}

.configure-autopick-panel h3 {
  font-size: var(--font-size-lg);
}

.configure-autopick-panel p:not(.configure-autopick-eyebrow) {
  margin-top: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.configure-autopick-eyebrow {
  margin-bottom: var(--space-1) !important;
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.configure-autopick-btn {
  white-space: nowrap;
}

.configure-autopick-panel.guide-configure-autopick-hidden {
  display: none !important;
}

.step2-preview-card {
  grid-area: preview;
}

.step2-price-panel {
  grid-area: estimate;
  padding: var(--space-4);
}

.config-option-section,
.step2-price-panel {
  scroll-margin-top: var(--space-4);
}

/* ── Configure step: progressive accordion (wizard-layout-round2) ──
   Sections show/hide via CSS only - the option controls stay in the DOM
   at all times so bindOptionGrid() and the estimate/quote path keep working. */
.cfg-acc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 44px;
  padding: var(--space-3) var(--space-2);
  background: var(--color-surface);
  border: none;
  border-radius: var(--radius-md);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cfg-acc-summary:hover {
  background: var(--color-bg);
}

.cfg-acc-summary-text {
  font-weight: 700;
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.cfg-acc-edit {
  flex-shrink: 0;
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent-hover);
}

/* Scoped to the options panel on purpose: .config-option-section is also worn by
   the preview toolbar controls (#paperSizeSection, #scaleSection, #rotateSection)
   and the page-select block, which must not gain a divider. */
.configure-options-panel .config-option-section:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
}

/* Collapsed: show only the summary row, hide the section body. */
.config-option-section.is-collapsed .cfg-acc-body {
  display: none;
}

/* Expanded: hide the summary row, show the section body normally. */
.config-option-section:not(.is-collapsed) .cfg-acc-summary {
  display: none;
}

.cfg-acc-summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

/* Focus lands here when a section is opened from the keyboard; never show a ring
   for the programmatic (guide-driven) case, which does not move focus. */
.cfg-acc-body:focus {
  outline: none;
}

@media (max-width: 860px) {
  #step2.configure-layout {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-template-areas: none;
    gap: var(--space-4);
  }

  #step2.configure-layout:has(.configure-autopick-panel.guide-configure-autopick-hidden) {
    grid-template-rows: none;
    grid-template-areas: none;
  }

  #step2.configure-layout:not(.hidden) {
    padding-top: 0;
    margin-top: 0;
  }

  /* Sticky (not fixed) so scrolling to the page top still shows logo + hero above the wizard */
  #step2.configure-layout:not(.hidden) > .mobile-estimate-bar {
    display: block !important;
    position: sticky;
    /* Gap between bar and viewport top once stuck (respects iPhone safe area) */
    top: max(var(--space-3), env(safe-area-inset-top, 0px));
    left: auto;
    right: auto;
    z-index: 110;
    margin: 0 0 var(--space-1);
    border-radius: var(--radius-lg);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    grid-column: 1;
    grid-row: 1;
  }

  .step2-preview-card {
    grid-area: auto;
    grid-column: 1;
    grid-row: 3;
    margin-top: 0;
  }

  .configure-autopick-panel {
    grid-area: auto;
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 1fr;
  }

  .mobile-guide-walkthrough-active #step2.configure-layout:not(.hidden) > .mobile-estimate-bar {
    margin-bottom: 0;
  }

  .mobile-guide-walkthrough-active #step2.configure-layout .configure-autopick-panel:not(.guide-configure-autopick-hidden) {
    margin-top: 0;
    padding-top: var(--space-3);
  }

  .configure-autopick-btn {
    width: 100%;
  }

  .configure-options-panel {
    grid-area: auto;
    grid-column: 1;
    grid-row: 4;
  }

  .step2-price-panel {
    display: none !important;
  }

  .receipt-checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 600;
    cursor: pointer;
  }

  .configure-options-panel .step2-guest-email {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
  }

  #step2.configure-layout .config-option-section {
    scroll-margin-top: 5rem;
    scroll-margin-bottom: calc(72px + 3.5rem);
  }

  #sidesSection {
    scroll-margin-bottom: calc(72px + var(--space-8));
  }

  #step1 .upload-activity-section,
  #step1 .uploaded-file-row,
  #step1 .uploaded-files-list {
    scroll-margin-bottom: calc(72px + var(--space-6));
  }
}

@media (min-width: 861px) {
  #step2.configure-layout {
    column-gap: var(--space-6);
    row-gap: var(--space-3);
  }

  #step2.configure-layout > .mobile-estimate-bar {
    display: none !important;
  }
}

.upload-sidebar {
  width: 280px;
}

/* A centered 780px card needs enough right gutter for the 280px sidebar
   without creating horizontal page overflow: 780 + (280 + gap) * 2. */
@media (min-width: 1372px) {
  .upload-sidebar {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: var(--space-4);
  }
}

@media (max-width: 1371px) {
  .upload-sidebar {
    position: static;
    margin-top: var(--space-4);
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Placeholder text shown in the sidebar before a file is uploaded */
.upload-sidebar-placeholder {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Stacked (vertical) variant of the paper-size toggle for the sidebar */
.paper-size-toggle-stacked {
  flex-direction: column;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}

.configure-options-panel .paper-size-toggle-stacked {
  margin-bottom: var(--space-3);
}

.paper-size-toggle-stacked .paper-size-btn {
  border-right: none;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
}

.configure-options-panel .paper-size-toggle-stacked .paper-size-btn {
  padding: var(--space-2) var(--space-3);
}

.paper-size-toggle-stacked .paper-size-btn:last-child {
  border-bottom: none;
}

.paper-size-name {
  font-weight: 700;
}

/* ── Step 2 layout: options card centered (full width), estimate floats right
   Mirrors the upload step: the options card keeps its original wizard-wrap
   width and the estimate panel is positioned absolutely just to its right
   on wide screens. Stacks below on narrower screens. */

#step2.options-layout {
  position: relative;
}

.estimate-panel {
  width: 260px;
}

/* Same pattern as the upload sidebar, with a 260px estimate panel:
   780 + (260 + gap) * 2. */
@media (min-width: 1332px) {
  .estimate-panel {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: var(--space-4);
  }
}

@media (max-width: 1331px) {
  .estimate-panel {
    position: static;
    margin-top: var(--space-4);
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

.options-section-label {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin: var(--space-6) 0 var(--space-4);
}

.configure-options-panel .options-section-label {
  font-size: var(--font-size-base);
  margin: var(--space-3) 0 var(--space-2);
}

.options-section-label:first-child {
  margin-top: 0;
}

/* Estimate card — width/position handled by .options-layout rules above */

.estimate-title {
  font-size: var(--font-size-base);
  font-weight: 800;
  margin: 0 0 var(--space-4);
  color: var(--color-primary);
}

.estimate-pages-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.estimate-pages-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Compact qty control for the estimate panel */
.qty-control-sm button {
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-sm);
}

.qty-control-sm input {
  width: 52px;
  font-size: var(--font-size-sm);
  padding: var(--space-1) var(--space-2);
}

.estimate-box {
  margin-bottom: var(--space-3);
}

.estimate-loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  padding: var(--space-3) 0;
}

.spinner-sm {
  width: 16px !important;
  height: 16px !important;
  border-width: 2px !important;
}

.estimate-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--font-size-sm);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-2);
}

.estimate-row span:first-child {
  color: var(--color-text-muted);
}

.estimate-row span:last-child {
  font-weight: 600;
  text-align: right;
}

.estimate-row-total {
  border-bottom: none;
  padding-top: var(--space-3);
  font-size: var(--font-size-base) !important;
}

.estimate-row-total span:first-child {
  font-weight: 700;
  color: var(--color-text) !important;
}

.estimate-row-total span:last-child {
  color: var(--color-primary);
  font-size: var(--font-size-lg);
}

.estimate-note {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin: 0;
}

.estimate-error {
  font-size: var(--font-size-sm);
  color: var(--color-danger, #dc2626);
  padding: var(--space-2) 0;
}

/* ── Paper-size mini toggle (in step 1 preview) ──────────────────────────── */
.paper-size-toggle {
  display: flex;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.paper-size-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: none;
  border-right: 1px solid var(--color-border);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  transition: background .15s, color .15s;
  line-height: 1.4;
}

.paper-size-btn:last-child { border-right: none; }
.paper-size-btn:hover      { background: var(--color-bg); }
.paper-size-btn.selected {
  background: var(--color-primary);
  color: #fff;
}

.paper-size-dim {
  display: inline-block;
  font-size: 0.75em;
  opacity: .8;
  margin-left: 4px;
  font-weight: 500;
}

/* ── Page selection ──────────────────────────────────────────────────────── */
.page-select-section {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.preview-page-select {
  z-index: 4;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  box-sizing: border-box;
  width: var(--preview-paper-width, auto);
  max-width: min(var(--preview-paper-width, 100%), 100%);
  min-width: 0;
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(17, 29, 51, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(17, 29, 51, 0.14);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.configure-options-panel .page-select-section {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
}

.page-select-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.page-select-title-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 1px;
}

.page-select-title-line {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.page-select-title-main {
  font-size: var(--font-size-sm);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text);
}

.preview-page-select .page-select-title-stack {
  align-items: flex-start;
  text-align: left;
  flex-shrink: 0;
}

.configure-options-panel .page-select-header {
  margin-bottom: var(--space-2);
}

.page-select-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.preview-page-select .page-select-title {
  font-size: var(--font-size-xs);
  margin: 0;
}

.configure-options-panel .page-select-title {
  font-size: var(--font-size-base);
  margin-top: 0;
}

.page-select-count {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.75rem;
  background: rgba(37, 99, 235, 0.10);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.preview-page-select .page-select-count {
  flex-shrink: 0;
  margin-top: 0;
  width: auto;
  text-align: center;
  font-size: 0.62rem;
  padding: 2px 6px;
  line-height: 1.2;
}

.page-select-actions {
  display: flex;
  gap: var(--space-1);
}

.preview-page-select .page-select-actions {
  flex-shrink: 0;
}

.preview-page-select .btn-text {
  padding: 2px 5px;
  font-size: 0.62rem;
}

.btn-text {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  transition: background .15s, border-color .15s, color .15s;
}

.btn-text:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
}

.page-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.preview-page-select .page-select-scroll {
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  touch-action: pan-x;
}

.preview-page-select .page-tile-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-2);
  width: max-content;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.configure-options-panel .page-tile-grid {
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: var(--space-1);
  margin-bottom: var(--space-2);
  padding: var(--space-2);
}

.page-tile {
  position: relative;
  aspect-ratio: 0.77;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm, 6px);
  background: var(--color-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  transition: transform .12s ease, border-color .15s, background .15s, color .15s, box-shadow .15s;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.preview-page-select .page-tile {
  width: 36px;
  min-height: 36px;
  aspect-ratio: 1;
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .preview-paper-size-control:not(.preview-paper-size-control--chrome) {
    top: var(--space-2);
    left: var(--space-2);
  }

  .preview-page-select {
    max-width: min(var(--preview-paper-width, 100%), calc(100% - var(--space-2)));
    padding: var(--space-2);
  }

  .preview-page-select .page-tile {
    width: 32px;
    min-height: 32px;
    font-size: var(--font-size-xs);
  }
}

.page-tile:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.page-tile:active {
  transform: translateY(0);
}

.page-tile.selected {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.page-tile.selected::after {
  content: '✓';
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 0.65em;
  font-weight: 800;
  opacity: .85;
}

.page-tile.current {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.page-tile.excluded {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-muted);
  opacity: 0.55;
  box-shadow: none;
}

.page-tile.excluded:hover {
  opacity: 0.85;
  border-color: var(--color-primary);
}

.page-tile.excluded::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 18%;
  right: 18%;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-12deg);
  opacity: 0.5;
}

.page-select-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  font-style: italic;
}

/* "Page won't print" banner anchored to the paper preview */
.preview-excluded-overlay {
  position: absolute;
  left: var(--space-2);
  right: var(--space-2);
  bottom: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(243, 244, 246, 0.96);
  border: 1px solid rgba(17, 29, 51, 0.12);
  color: #374151;
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.3;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(17, 29, 51, 0.12);
}

.preview-excluded-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--color-danger);
  font-weight: 800;
  line-height: 1;
}

.preview-excluded-text {
  min-width: 0;
  text-align: center;
}

/* Estimate panel doc info row */
.estimate-doc-info {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
}

.estimate-doc-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-1);
}

.estimate-doc-info-row span:first-child  { color: var(--color-text-muted); }
.estimate-doc-info-row span:last-child   { font-weight: 600; }
.estimate-doc-info-row .estimate-filename {
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

/* ── Option grid (colour, size, sides) ───────────────────────────────────── */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.configure-options-panel .option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

/* 3-item grid variant — used for the sides selector */
.option-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.configure-options-panel #sidesOptions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.configure-options-panel #sidesOptions .option-card:first-child {
  grid-column: 1 / -1;
}

@media (max-width: 520px) {
  .option-grid-3:not(#sidesOptions) {
    grid-template-columns: 1fr;
  }

  .configure-options-panel #sidesOptions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.option-card {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-4);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, box-shadow .15s, background .15s;
  background: var(--color-surface);
  user-select: none;
}

.configure-options-panel .option-card {
  display: grid;
  grid-template-columns: minmax(4.5rem, 34%) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  column-gap: var(--space-3);
  row-gap: var(--space-3);
  justify-content: stretch;
  justify-items: stretch;
  align-items: center;
  align-content: center;
  min-height: 7rem;
  padding: var(--space-3) var(--space-4);
  text-align: left;
}

.option-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

.option-card.selected {
  border-color: var(--color-accent);
  background: #fffbee;
  box-shadow: 0 0 0 3px rgba(201,162,39,.18);
}

.option-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--space-2);
}

.option-icon::before {
  width: 1.75rem;
  height: 1.75rem;
}

.configure-options-panel .option-icon {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  height: 5.25rem;
  margin-bottom: 0;
}

.configure-options-panel .option-icon::before {
  width: min(5rem, 100%);
  height: 5rem;
}

.configure-options-panel .option-label {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  align-self: end;
}

.option-label {
  font-weight: 700;
  font-size: var(--font-size-base);
  color: var(--color-text);
}

.configure-options-panel .option-label {
  font-size: var(--font-size-base);
  line-height: 1.2;
}

.option-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.configure-options-panel .option-desc {
  grid-column: 2;
  grid-row: 3;
  font-size: var(--font-size-sm);
  line-height: 1.35;
  margin-top: 0;
  width: 100%;
  text-align: left;
  align-self: center;
}

/* The options rail is ~220px, so a tall left icon column starved the text:
   84px of icon against 64px of text meant "Flip on long edge" and
   "Best for: Documents" both wrapped to ribbons. Honour the markup's own
   grouping instead - icon inline with the label in .option-card-row-head,
   then description and recommendation across the card's full width. */
.configure-options-panel #sidesOptions .option-card:has(.option-recommendation) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  min-height: 0;
  padding: var(--space-3);
  column-gap: 0;
  row-gap: var(--space-2);
  align-items: start;
  justify-items: stretch;
  align-content: start;
  justify-content: stretch;
  text-align: left;
}

.configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-card-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  width: 100%;
  text-align: left;
}

.configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-card-row-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  grid-column: 1;
  grid-row: 1;
  width: 100%;
}

.configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-icon {
  grid-column: auto;
  grid-row: auto;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  margin: 0;
}

.configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-label {
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
}

.configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-recommendation {
  grid-column: 1;
  grid-row: 3;
  margin-top: 0;
  gap: var(--space-1);
  align-self: start;
  /* The options rail is narrow. Without wrapping, these two flex items are
     squeezed below their content width and the text breaks *inside* each one,
     rendering "Best for:" as "Best" / "for:". Let the value drop to its own
     line instead; the mobile block below already does this. */
  flex-wrap: wrap;
  row-gap: 0;
}

.configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-recommendation-label,
.configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-recommendation-value {
  /* Each phrase stays intact; only the gap between them is a break opportunity. */
  white-space: nowrap;
}

@media (max-width: 860px) {
  .configure-options-panel #colorOptions .option-card,
  .configure-options-panel #sidesOptions .option-card,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    align-content: center;
    justify-items: center;
    row-gap: var(--space-2);
    padding: var(--space-3) var(--space-2);
    text-align: center;
  }

  .configure-options-panel #colorOptions .option-card {
    min-height: 11.25rem;
  }

  .configure-options-panel #sidesOptions .option-card {
    min-height: 11.25rem;
  }

  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) {
    min-height: 16rem;
  }

  .configure-options-panel #colorOptions .option-icon,
  .configure-options-panel #sidesOptions .option-icon,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-icon {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 4.5rem;
  }

  .configure-options-panel #colorOptions .option-icon::before,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-icon::before {
    width: 4.25rem;
    height: 4.25rem;
  }

  .configure-options-panel #colorOptions .option-label,
  .configure-options-panel #sidesOptions .option-label,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-label {
    grid-column: 1;
    grid-row: 2;
    justify-content: center;
    text-align: center;
    align-self: center;
    width: 100%;
  }

  .configure-options-panel #colorOptions .option-desc,
  .configure-options-panel #sidesOptions .option-desc,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-desc {
    grid-column: 1;
    grid-row: 3;
    width: auto;
    text-align: center;
    align-self: center;
    justify-content: center;
  }

  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-recommendation {
    grid-column: 1;
    grid-row: 4;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-1);
    align-items: baseline;
    text-align: center;
  }

  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-card-row {
    display: flex;
    justify-content: center;
    text-align: center;
    width: auto;
  }

  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-card-row-head {
    display: contents;
  }

  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-recommendation-label,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-recommendation-value {
    display: inline;
    line-height: 1.25;
  }

  /* The two-sided cards have a grouped heading in their markup. Keeping that
     group as a flex row avoids CSS-grid placement from stacking its label on
     top of the description at phone widths. */
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
  }

  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-card-row-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
  }

  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-icon {
    width: 4.25rem;
    height: 4.25rem;
  }

  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-label,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-desc,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-recommendation {
    width: auto;
    margin: 0;
  }
}

.configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-desc {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
}

@media (max-width: 860px) {
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) {
    grid-template-columns: 1fr;
  }

  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-icon,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-label,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-desc,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) .option-recommendation {
    grid-column: 1;
    width: auto;
    justify-self: center;
    text-align: center;
  }
}

.configure-options-panel .option-recommendation {
  grid-column: 1 / -1;
  grid-row: 4;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  font-weight: 600;
  line-height: 1.35;
  margin-top: var(--space-1);
  width: 100%;
  text-align: left;
}

@media (min-width: 861px) {
  .configure-options-panel .option-grid,
  .configure-options-panel #sidesOptions {
    grid-template-columns: 1fr;
  }

  .configure-options-panel .option-card {
    grid-template-columns: minmax(5.5rem, 32%) minmax(0, 1fr);
    min-height: 8rem;
  }

  .configure-options-panel .option-icon {
    height: 6.25rem;
  }

  .configure-options-panel .option-icon::before {
    width: min(6rem, 100%);
    height: 6rem;
  }

  /* Sides cards only. In the ~220px options rail a 34% icon column left the
     text roughly 64px, so "Flip on long edge" and "Best for: Documents" both
     shredded into ribbons. Stack instead: a compact icon inline with the
     label, then description and recommendation across the full card width.
     Applies to all three cards so they stay visually consistent. */
  .configure-options-panel #sidesOptions .option-card,
  .configure-options-panel #sidesOptions .option-card:has(.option-recommendation) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
    column-gap: 0;
    row-gap: var(--space-2);
    align-items: start;
    align-content: start;
    text-align: left;
  }

  .configure-options-panel #sidesOptions .option-card .option-card-row-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }

  .configure-options-panel #sidesOptions .option-icon {
    height: 2.5rem;
    width: 2.5rem;
    flex: 0 0 auto;
    grid-column: auto;
    grid-row: auto;
    margin: 0;
  }

  .configure-options-panel #sidesOptions .option-icon::before {
    width: 2.5rem;
    height: 2.5rem;
  }

  .configure-options-panel #sidesOptions .option-label,
  .configure-options-panel #sidesOptions .option-desc,
  .configure-options-panel #sidesOptions .option-recommendation {
    grid-column: 1;
    min-width: 0;
  }
}

/* Preview chrome: title, then toolbar (paper left | file + scale right) */
.preview-chrome {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.preview-chrome .preview-title {
  text-align: left;
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.preview-toolbar {
  padding: 0;
  margin-bottom: var(--space-1);
  background: transparent;
  border: none;
  border-radius: 0;
  position: relative;
  z-index: 0;
  overflow: visible;
}

.preview-toolbar-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
}

.preview-paper-size-bar,
.preview-scale-modes-bar {
  flex: 0 0 auto;
  min-width: 0;
}

.preview-paper-size-bar .scale-toggle,
.preview-scale-modes-bar .scale-toggle {
  width: auto;
  border-width: 1px;
}

.preview-paper-size-bar .scale-btn,
.preview-scale-modes-bar .scale-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.35rem 0.55rem;
  font-size: var(--font-size-xs);
  line-height: 1.25;
  white-space: nowrap;
}

.preview-paper-size-bar .scale-mode-tooltip {
  left: 0;
  right: auto;
}

.preview-scale-modes-bar .scale-mode-tooltip {
  right: 0;
  left: auto;
}

.preview-file-heading {
  font-size: var(--font-size-sm);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
  white-space: nowrap;
}

.preview-scale-modes-bar {
  position: relative;
  margin-left: 0;
}

.preview-file-footer {
  display: flex;
  justify-content: center;
  width: 100%;
}

.wizard-nav-file-center .preview-file-footer {
  margin: 0;
  padding: 0;
  border: none;
}

.preview-file-name-pill {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 6px var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
  white-space: normal;
}

.preview-scale-bar {
  position: relative;
  flex-shrink: 0;
}

.scale-mode-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 12;
  max-width: min(280px, 70vw);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--font-size-xs);
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(17, 29, 51, 0.22);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.scale-mode-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* Portaled to <body> while open — above sticky print total (110) and wizard nav (100) */
.scale-mode-tooltip--floating {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 180;
}

/* Copies — top of options panel */
.configure-copies-section {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.configure-copies-section .copies-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  width: 100%;
}

.configure-copies-section .options-section-label {
  flex-shrink: 0;
  align-self: center;
}

.configure-copies-section .qty-control {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.configure-copies-section .qty-control input {
  flex: 1;
  width: auto;
  min-width: 3rem;
}

.copies-inline-label {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  white-space: nowrap;
}

.step2-price-panel .step2-guest-email {
  margin-top: var(--space-4);
  margin-bottom: 0;
}

.step2-price-panel .estimate-note {
  margin-top: var(--space-3);
}

/* ── Mobile configure: fixed print total bar (shown via #step2 media rules) ─ */
.mobile-estimate-bar {
  display: none;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 16px rgba(17, 29, 51, 0.14);
  backdrop-filter: blur(8px);
  overflow: visible;
}

.mobile-estimate-bar-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: none;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mobile-estimate-bar-leading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.mobile-estimate-bar-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.mobile-estimate-bar-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mobile-estimate-bar-meta {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.mobile-estimate-bar-meta:empty {
  display: none;
}

.mobile-estimate-bar-total {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.mobile-estimate-bar-chevron {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-left: var(--space-1);
}

.mobile-estimate-bar.is-expanded .mobile-estimate-bar-chevron {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.mobile-estimate-bar.is-expanded {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.mobile-estimate-details {
  border-top: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-4) var(--space-4);
  background: var(--color-bg);
}

.mobile-estimate-bar.is-expanded .mobile-estimate-details {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  padding-bottom: var(--space-5);
}

.mobile-estimate-breakdown {
  padding-right: var(--space-1);
  padding-bottom: var(--space-1);
}

.mobile-estimate-breakdown .estimate-row {
  padding: var(--space-2) 0;
}

.estimate-row-compact {
  padding: var(--space-1) 0;
  font-size: var(--font-size-xs);
}

.estimate-row-muted span:first-child {
  color: var(--color-text-muted);
}

.estimate-job-files {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-bottom: 3px;
}

.estimate-job-file {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.estimate-job-file:last-child:not(.estimate-job-file--current) {
  border-bottom: none;
  padding-bottom: 0;
}

.estimate-job-file--current {
  padding: var(--space-2) var(--space-3);
  padding-bottom: calc(var(--space-2) + 3px);
  margin: 0 0 3px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.06);
}

.estimate-job-file--current:last-child {
  border-bottom: 1px solid rgba(37, 99, 235, 0.25);
  padding-bottom: calc(var(--space-2) + 3px);
}

.estimate-job-file-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.estimate-job-file-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

.estimate-job-file--current .estimate-job-file-name {
  color: var(--color-primary);
}

.estimate-job-file-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.estimate-job-file-rate {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.estimate-job-file-total {
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  font-weight: 800;
  color: var(--color-text);
  text-align: right;
  white-space: nowrap;
  padding-right: var(--space-2);
  padding-bottom: 2px;
}

.estimate-job-summary {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  padding-right: var(--space-1);
  padding-bottom: var(--space-2);
  border-top: 1px solid var(--color-border);
}

.estimate-job-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-2) var(--space-1) 0;
}

.estimate-job-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
  padding: var(--space-1) var(--space-2) 0 0;
  font-size: var(--font-size-sm);
  font-weight: 800;
  color: var(--color-primary);
}

.estimate-job-summary-total span:last-child {
  font-size: var(--font-size-base);
}

.mobile-estimate-note {
  margin: var(--space-2) var(--space-1) 0 0;
  padding-bottom: var(--space-1);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

/* ── Upload success banner ───────────────────────────────────────────────── */
.upload-success-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.upload-change-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Phones/tablets: upload source buttons only — drag-and-drop is desktop-only. */
body.mobile-upload-context .upload-zone {
  display: none !important;
}

/* ── Upload zone ─────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed #d7dfeb;
  border-radius: var(--radius-md);
  padding: var(--space-8) var(--space-6);
  margin: var(--space-6) 0;
  text-align: center;
  transition: border-color .15s, background .15s;
  background: #f8fafc;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--color-accent);
  background: #fffbee;
}

.upload-zone .upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  height: 2rem;
  margin-bottom: var(--space-3);
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  background: #e8f0fe;
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.upload-zone p { color: var(--color-text-muted); font-size: var(--font-size-sm); margin-top: var(--space-2); }

.upload-source-panel {
  margin: var(--space-5) 0 var(--space-4);
  text-align: center;
}

.cloud-upload-hint {
  font-size: var(--font-size-sm);
  margin: var(--space-3) auto 0;
  line-height: 1.45;
  max-width: 42rem;
}

.upload-source-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}

.upload-source-btn {
  display: flex;
  min-height: 5.75rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  border: 1px solid #d9e2ef;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-primary);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color .15s, box-shadow .15s, transform .15s, background .15s;
  text-decoration: none;
}

.upload-source-btn:hover,
.upload-source-btn:focus-visible {
  border-color: var(--color-accent);
  background: #fffdf5;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
  outline: none;
}

.upload-source-btn.is-unavailable {
  opacity: .54;
  filter: grayscale(.25);
  cursor: not-allowed;
}

.upload-source-btn.is-unavailable:hover,
.upload-source-btn.is-unavailable:focus-visible {
  border-color: #d9e2ef;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transform: none;
}

.upload-source-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.upload-source-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.upload-source-icon-files svg path:first-child { fill: #f6c454; }
.upload-source-icon-files svg path:last-child { fill: #ffd979; }
.upload-source-icon-onedrive svg path:first-child { fill: #0078d4; }
.upload-source-icon-onedrive svg path:last-child { fill: #28a8ea; }
.upload-source-icon-icloud svg path { fill: #3b82f6; }

.upload-source-label {
  line-height: 1.2;
}

.onedrive-inline-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(0, 0, 0, 0.55);
}

.onedrive-inline-sheet {
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: 100%;
  margin: auto;
  overflow: hidden;
}

.onedrive-inline-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border, #edebe9);
}

.onedrive-inline-header h2 {
  margin: 0;
  flex: 1;
  font-size: var(--font-size-xl, 1.25rem);
}

.onedrive-inline-close {
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.onedrive-inline-status {
  padding: var(--space-3) var(--space-4) 0;
  margin: 0;
}

.onedrive-inline-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0 var(--space-2);
  overflow: auto;
  flex: 1;
  min-height: 12rem;
}

.onedrive-inline-row {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  background: var(--color-surface-alt, #faf9f8);
  cursor: pointer;
  font-size: 1rem;
}

.onedrive-inline-row:hover,
.onedrive-inline-row.is-selected {
  background: #deecf9;
}

.onedrive-inline-empty {
  padding: 1rem;
  color: var(--color-muted, #605e5c);
  text-align: center;
}

.onedrive-inline-footer {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-top: 1px solid var(--color-border, #edebe9);
}

.onedrive-inline-footer .btn {
  flex: 1;
}

@media (max-width: 860px) {
  .upload-source-panel {
    margin-bottom: var(--space-4);
  }

  .upload-source-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .upload-source-btn {
    min-height: 5.25rem;
    padding: var(--space-3) var(--space-2);
  }
}

/* ── Checkout step shared headers ─────────────────────────────────────────── */
.checkout-panel-header,
.pay-choice-panel .checkout-panel-header,
.qr-handoff .checkout-panel-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.checkout-panel-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.checkout-panel-lead {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  max-width: 28rem;
  margin: 0 auto;
  line-height: 1.5;
}

.checkout-panel {
  max-width: 820px;
  margin: 0 auto;
}

/* Single column at every width: file list, then the receipt-style totals
   block, then the sign-in gate, in source order. See index.html for the
   #checkoutSummary / #checkoutSummaryTotals / #checkoutAccountSection order. */

/* ── QR payment handoff (kiosk only) ─────────────────────────────────────── */
.qr-handoff {
  text-align: center;
  padding: var(--space-4) var(--space-4) var(--space-8);
  max-width: 420px;
  margin: 0 auto;
}

.qr-back {
  margin-bottom: var(--space-4);
}

.qr-code-wrap {
  display: inline-flex;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: var(--space-4) auto var(--space-3);
}

.qr-code-wrap img {
  width: 220px;
  height: 220px;
  display: block;
}

.qr-url-hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  word-break: break-all;
  margin: 0 auto var(--space-4);
  max-width: 280px;
  line-height: 1.4;
}

.qr-handoff .polling-note {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

/* ── Embedded phone payment (Stripe Elements) ───────────────────────────── */
.phone-pay-panel {
  max-width: 440px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-8);
  overflow: visible;
}

.phone-pay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.phone-pay-back {
  flex-shrink: 0;
}

.phone-pay-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.phone-pay-secure-text {
  white-space: nowrap;
}

.phone-pay-stripe-mark {
  font-weight: 700;
  color: #635bff;
}

.phone-pay-lock-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.phone-pay-hero {
  text-align: center;
  margin-bottom: var(--space-4);
}

.phone-pay-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
  line-height: 1.2;
}

.phone-pay-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.phone-pay-amount-card {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2a3f6f 100%);
  color: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
  margin-bottom: 0;
  box-shadow: var(--shadow-md);
}

.phone-pay-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0;
  min-height: 1.75rem;
}

.phone-pay-amount-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
  white-space: nowrap;
  flex-shrink: 0;
}

.phone-pay-amount-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  white-space: nowrap;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.phone-pay-currency {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.88;
}

.phone-pay-loading {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.phone-pay-loading .spinner {
  width: 40px;
  height: 40px;
  border-width: 3px;
  margin: 0 auto var(--space-3);
}

.phone-pay-loading p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.phone-pay-section {
  overflow: visible;
}

.phone-pay-method-title {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-base);
  font-weight: 800;
  color: var(--color-text);
}

.phone-pay-method-note {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  color: var(--color-text-muted);
}

.phone-pay-wallets {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  padding-top: var(--space-1);
}

.stripe-express-mount {
  min-height: 48px;
  overflow: visible;
  margin-top: var(--space-2);
}

.phone-pay-wallet-note {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-3);
  line-height: 1.45;
  padding: var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.phone-pay-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.phone-pay-divider::before,
.phone-pay-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.phone-pay-card-section {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow: visible;
}

/* Wallets + divider hidden when GPay/Apple Pay unavailable — keep gap below total due */
.phone-pay-wallets.hidden + .phone-pay-divider.hidden + .phone-pay-card-section {
  margin-top: var(--space-6);
}

.phone-pay-form {
  overflow: visible;
}

.phone-pay-card-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
}

.phone-pay-card-option input,
.saved-card-row--selectable input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.phone-pay-card-option strong {
  display: block;
  font-weight: 800;
  color: var(--color-text);
}

.phone-pay-card-option small {
  display: block;
  margin-top: 0.15rem;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.35;
}

.stripe-payment-mount {
  min-height: 120px;
  margin-bottom: var(--space-4);
  overflow: visible;
}

/* Prevent parent clipping from squashing Stripe iframes on mobile */
#step3.card {
  overflow: visible;
}

.phone-pay-submit {
  width: 100%;
  margin-top: var(--space-3);
}

.phone-pay-trust {
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-6);
  line-height: 1.5;
}

.phone-pay-trust strong {
  color: var(--color-text);
  font-weight: 600;
}

.phone-pay-error {
  color: var(--color-danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
  text-align: center;
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

/* ── Success page ────────────────────────────────────────────────────────── */
#successPanel.success-panel--order-detail {
  margin-top: var(--space-5);
}

#successPanel.success-panel--order-detail .success-wrap {
  padding-top: var(--space-4);
}

#successPanel.success-panel--order-detail .success-back-wrap {
  margin: 0 0 var(--space-2);
  padding: 0;
}

.order-detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-10) var(--space-4) var(--space-8);
  color: var(--color-text-muted);
  text-align: center;
}

.order-detail-loading.hidden {
  display: none;
}

.order-detail-loading-label {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-navy, #1a2a4a);
}

.success-detail-body.hidden {
  display: none;
}

#successPanel.success-panel--loading .success-wrap {
  padding-top: var(--space-4);
}

.success-wrap {
  text-align: center;
  padding: var(--space-8) var(--space-4) var(--space-6);
  max-width: 480px;
  margin: 0 auto;
}

.success-back-wrap {
  margin: 0 0 var(--space-4);
  text-align: left;
}

.success-back-to-orders {
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: 0;
  line-height: 1.3;
}

.success-ready-print-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  max-width: 30rem;
  margin: 0 auto var(--space-5);
  padding: var(--space-4);
  text-align: left;
  color: #fff;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0a4d68 0%, #04738a 55%, #0f766e 100%);
  box-shadow: 0 14px 34px rgba(4, 115, 138, 0.2);
}

.success-ready-print-banner.hidden {
  display: none;
}

.success-ready-print-banner-icon {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.success-ready-print-banner-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.success-ready-print-banner-title,
.success-ready-print-banner-text {
  margin: 0;
}

.success-ready-print-banner-title {
  font-size: var(--font-size-base);
  font-weight: 800;
  line-height: 1.2;
}

.success-ready-print-banner-text {
  margin-top: 0.2rem;
  font-size: var(--font-size-sm);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
}

.success-resume-wrap {
  max-width: 22rem;
  margin: 0 auto var(--space-5);
}

.success-resume-wrap .btn {
  width: 100%;
}

.success-icon {
  margin: 0 auto var(--space-3);
}

.success-icon--pickup {
  display: block;
  width: min(14rem, 58vw);
  margin: 0 auto var(--space-3);
  line-height: 0;
}

.success-icon--pickup img {
  display: block;
  width: 100%;
  height: auto;
}

.success-icon--issue {
  display: block;
  width: min(14rem, 58vw);
  margin: 0 auto var(--space-3);
  line-height: 0;
}

.success-icon--issue img {
  display: block;
  width: 100%;
  height: auto;
}

.success-wrap h2 {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.success-lead {
  margin: 0 auto var(--space-4);
  max-width: 22rem;
  line-height: 1.5;
  font-size: var(--font-size-sm);
}

.success-wrap .alert {
  max-width: 22rem;
  margin: 0 auto var(--space-4);
  text-align: left;
  font-size: var(--font-size-sm);
}

.order-status-badge-wrap {
  margin-bottom: var(--space-4);
}

.order-status-badge-wrap:empty,
.order-status-badge-wrap.hidden {
  display: none;
  margin: 0;
}

.pickup-directions {
  max-width: 440px;
  margin: var(--space-4) auto 0;
  padding: var(--space-4) var(--space-5);
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.pickup-directions-heading {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-muted);
}

.pickup-directions-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.5;
}

.pickup-directions-list li + li {
  margin-top: var(--space-2);
}

.success-panel--pickup-ready .success-wrap {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  gap: var(--space-4) var(--space-6);
  align-items: center;
  max-width: 760px;
  padding-top: var(--space-6);
  text-align: left;
}

.success-panel--pickup-ready .success-back-wrap,
.success-panel--pickup-ready .success-ready-print-banner,
.success-panel--pickup-ready .success-checkin-zone,
.success-panel--pickup-ready .success-nav-wrap,
.success-panel--pickup-ready .success-delete-wrap {
  grid-column: 1 / -1;
}

.success-panel--pickup-ready .success-icon--pickup {
  grid-column: 1;
  grid-row: 2 / span 4;
  width: min(15rem, 100%);
  margin: 0 auto;
}

.success-panel--pickup-ready .success-wrap h2,
.success-panel--pickup-ready .success-lead,
.success-panel--pickup-ready .pickup-directions,
.success-panel--pickup-ready .order-status-badge-wrap,
.success-panel--pickup-ready .success-wrap .alert {
  grid-column: 2;
}

.success-panel--pickup-ready .success-wrap h2 {
  margin: 0 0 var(--space-1);
  font-size: 2rem;
  line-height: 1.1;
}

.success-panel--pickup-ready .success-lead {
  max-width: 34rem;
  margin: 0;
  font-size: var(--font-size-base);
}

.success-panel--pickup-ready .pickup-directions {
  width: 100%;
  max-width: none;
  margin: 0;
  border-color: rgba(20, 184, 166, 0.24);
  background: #f4fbfa;
}

.success-panel--printing-issue .success-wrap {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  gap: var(--space-4) var(--space-6);
  align-items: center;
  max-width: 760px;
  padding-top: var(--space-6);
  text-align: left;
}

.success-panel--printing-issue .success-back-wrap,
.success-panel--printing-issue .success-ready-print-banner,
.success-panel--printing-issue .success-checkin-zone,
.success-panel--printing-issue .success-nav-wrap,
.success-panel--printing-issue .success-delete-wrap {
  grid-column: 1 / -1;
}

.success-panel--printing-issue .success-icon--issue {
  grid-column: 1;
  grid-row: 2 / span 4;
  width: min(15rem, 100%);
  margin: 0 auto;
}

.success-panel--printing-issue .success-wrap h2,
.success-panel--printing-issue .success-lead,
.success-panel--printing-issue .pickup-directions,
.success-panel--printing-issue .order-status-badge-wrap,
.success-panel--printing-issue .success-wrap .alert {
  grid-column: 2;
}

.success-panel--printing-issue .success-wrap h2 {
  margin: 0 0 var(--space-1);
  font-size: 2rem;
  line-height: 1.1;
}

.success-panel--printing-issue .success-lead {
  max-width: 34rem;
  margin: 0;
  font-size: var(--font-size-base);
}

.success-panel--printing-issue .pickup-directions {
  width: 100%;
  max-width: none;
  margin: 0;
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffbeb;
}

.success-panel--printing-issue .pickup-directions-heading {
  color: #92400e;
}

.success-staff-qr {
  margin: var(--space-5) auto var(--space-4);
  max-width: 15rem;
  text-align: center;
}

.success-staff-qr.hidden {
  display: none !important;
}

.success-staff-qr-label {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.success-staff-qr-image {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}

.success-staff-qr-hint {
  margin: 0;
  line-height: 1.4;
}

.success-panel--pickup-ready .success-staff-qr,
.success-panel--printing-issue .success-staff-qr {
  grid-column: 1 / -1;
  margin-top: var(--space-5);
}

.success-checkin-zone {
  margin-top: var(--space-4);
}

.success-checkin-zone:empty {
  display: none;
}

.proximity-panel {
  margin-top: 0;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: var(--space-5) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.proximity-panel .alert {
  margin-bottom: var(--space-3);
  text-align: left;
  font-size: var(--font-size-sm);
}

.proximity-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.proximity-panel-btn {
  width: 100%;
}

.location-confirm-dialog {
  max-width: 22rem;
}

.location-confirm-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.location-confirm-options .btn {
  width: 100%;
}

#locationConfirmModalError {
  margin-bottom: var(--space-3);
  text-align: left;
  font-size: var(--font-size-sm);
}

body.location-check-overlay-open {
  overflow: hidden;
}

.location-check-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background:
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(201, 162, 39, 0.14) 0%, transparent 56%),
    rgba(244, 246, 249, 0.86);
  backdrop-filter: blur(8px);
}

.location-check-overlay.hidden {
  display: none;
}

.location-check-card {
  width: min(92vw, 31rem);
  min-height: 24rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-xl, 1rem);
  border: 1px solid rgba(26, 42, 74, 0.1);
  background:
    radial-gradient(circle at 50% 12%, rgba(201, 162, 39, 0.13), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--color-text, #1a2a4a);
  box-shadow: 0 24px 70px rgba(26, 42, 74, 0.18);
}

.location-check-card::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 22% 18%, rgba(15, 143, 137, 0.12), transparent 28%),
    radial-gradient(circle at 82% 80%, rgba(201, 162, 39, 0.12), transparent 30%);
  pointer-events: none;
}

.location-check-card > * {
  position: relative;
  z-index: 1;
}

.location-check-card h2 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: clamp(1.45rem, 5vw, 1.8rem);
  line-height: 1.12;
  color: var(--color-primary, #1a2a4a);
}

.location-check-card p {
  margin: 0;
  max-width: 24rem;
  color: var(--color-text-muted, #5f697a);
  line-height: 1.5;
}

.location-check-system {
  width: 13rem;
  height: 13rem;
  position: relative;
  display: grid;
  place-items: center;
  margin-top: var(--space-1);
}

.location-check-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(201, 162, 39, 0.28);
  animation: locationCheckSpin 8s linear infinite;
}

.location-check-orbit::before,
.location-check-orbit::after {
  content: "";
  position: absolute;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.location-check-orbit::before {
  top: 0.6rem;
  left: 50%;
  background: #c9a227;
  box-shadow: 0 0 0 7px rgba(201, 162, 39, 0.08);
}

.location-check-orbit::after {
  right: 1.3rem;
  bottom: 1.25rem;
  background: #2f8a5f;
  box-shadow: 0 0 0 7px rgba(47, 138, 95, 0.08);
}

.location-check-core {
  width: 6.2rem;
  height: 6.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-primary, #1a2a4a);
  color: #fff;
  box-shadow:
    0 0 0 16px rgba(201, 162, 39, 0.12),
    0 18px 40px rgba(26, 42, 74, 0.22);
}

.location-check-core svg {
  width: 3rem;
  height: 3rem;
  stroke-dasharray: 56;
  stroke-dashoffset: 56;
  animation: locationCheckDraw 2.4s ease-in-out infinite;
}

.location-check-step-row {
  display: flex;
  gap: 0.45rem;
  margin-top: var(--space-5);
}

.location-check-step {
  width: 2.6rem;
  height: 0.3rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(26, 42, 74, 0.1);
}

.location-check-step::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: #c9a227;
  transform: translateX(-100%);
  animation: locationCheckStepFill 2.4s ease-in-out infinite;
}

.location-check-step:nth-child(2)::after {
  animation-delay: 0.28s;
}

.location-check-step:nth-child(3)::after {
  animation-delay: 0.56s;
}

.location-check-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 143, 137, 0.1);
  color: var(--color-primary, #1a2a4a);
  font-size: var(--font-size-sm);
  font-weight: 800;
}

@keyframes locationCheckSpin {
  to { transform: rotate(360deg); }
}

@keyframes locationCheckDraw {
  0%, 25% { stroke-dashoffset: 56; }
  52%, 100% { stroke-dashoffset: 0; }
}

@keyframes locationCheckStepFill {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(0); }
}

@media (max-width: 520px) {
  .location-check-card {
    min-height: 22rem;
    padding: var(--space-7) var(--space-5);
  }

  .location-check-system {
    width: 10.5rem;
    height: 10.5rem;
  }
}

.proximity-step-lead {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.proximity-approve {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border, #e5e7eb);
}

.proximity-approve-lead {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-base);
  line-height: 1.5;
}

.proximity-approve-note {
  margin: var(--space-3) 0 0;
}

.success-save-account {
  margin: var(--space-8) auto 0;
  padding-top: var(--space-6);
  max-width: 22rem;
}

.success-save-account-line {
  margin: 0;
  line-height: 1.55;
}

.success-save-account-cta,
.success-save-account-dismiss {
  font-size: inherit;
  font-weight: 500;
  padding: 0;
  vertical-align: baseline;
}

.success-save-account-dismiss {
  font-weight: 400;
  color: var(--color-text-muted);
}

.success-save-account-sep {
  margin: 0 0.2em;
  color: var(--color-text-muted);
}

.success-panel--arrival .success-back-wrap {
  max-width: 30rem;
  margin-left: auto;
  margin-right: auto;
}

.success-panel--arrival .success-wrap {
  max-width: 560px;
  padding-top: var(--space-7);
}

.success-panel--arrival .success-icon {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: var(--space-4);
  border-radius: 50%;
  background: #eef6ff;
  color: var(--color-primary);
  font-size: 1.65rem;
  line-height: 1;
}

.success-panel--arrival .success-wrap h2 {
  margin-bottom: var(--space-3);
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.success-panel--arrival .success-lead {
  max-width: 30rem;
  margin-bottom: var(--space-5);
  font-size: var(--font-size-base);
}

.success-panel--arrival .success-checkin-zone {
  margin-top: 0;
}

.success-order-review {
  max-width: 30rem;
  margin: 0 auto var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fbfcff;
  text-align: left;
}

.success-order-review-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.success-order-review-head h3 {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 800;
  color: var(--color-text);
}

.success-order-review-head p {
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.success-order-review-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.success-order-review-item {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border);
}

.success-order-review-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: baseline;
}

.success-order-review-side {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: 0;
}

.success-order-review-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-size-sm);
  font-weight: 800;
  color: var(--color-text);
}

.success-order-review-price {
  font-size: var(--font-size-sm);
  font-weight: 800;
  color: var(--color-primary);
}

.success-order-review-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0.16rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.success-order-review-status.status--failed {
  background: #fef2f2;
  color: var(--color-danger);
}

.success-document-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(0, 102, 204, 0.24);
  border-radius: var(--radius-full);
  background: #eef6ff;
  color: var(--color-primary) !important;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
}

.success-document-view-btn:hover {
  border-color: rgba(0, 102, 204, 0.38);
  background: #e1f0ff;
}

.success-document-unavailable {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.success-order-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.success-order-summary-card {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: var(--radius-md);
  background: #f4fbfa;
}

.success-order-summary-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.success-order-summary-card strong {
  overflow: hidden;
  color: var(--color-text);
  font-size: var(--font-size-base);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.success-panel--printing-issue .success-order-summary-card {
  border-color: rgba(245, 158, 11, 0.24);
  background: #fffbeb;
}

.success-order-review-meta {
  margin: var(--space-1) 0 0;
  font-size: var(--font-size-xs);
  line-height: 1.45;
  color: var(--color-text-muted);
}

.success-order-review-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
}

.success-order-review-total strong {
  color: var(--color-primary);
  white-space: nowrap;
}

.success-panel--arrival .proximity-panel {
  max-width: 30rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.success-panel--arrival .proximity-panel .alert {
  width: fit-content;
  max-width: 100%;
  margin-bottom: var(--space-4);
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-2) var(--space-4);
  text-align: center;
}

.success-panel--arrival-ready #proximityVerifyStatus {
  display: none;
}

.success-panel--arrival .proximity-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.success-panel--arrival .proximity-step-lead {
  grid-column: 1 / -1;
  margin-bottom: 0;
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text);
}

.success-panel--arrival .proximity-panel-btn {
  width: 100%;
  max-width: none;
}

.success-panel--arrival .proximity-approve {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.success-panel--arrival .proximity-approve-lead {
  max-width: 24rem;
  margin-left: auto;
  margin-right: auto;
}

.success-panel--arrival .proximity-approve .proximity-panel-btn {
  max-width: 22rem;
  margin: 0 auto;
}

.success-panel--arrival .success-save-account {
  display: none;
}

@media (max-width: 520px) {
  .success-ready-print-banner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: var(--space-4) var(--space-3);
  }

  .success-panel--arrival .success-wrap {
    padding: var(--space-5) 0 var(--space-4);
  }

  .success-panel--arrival .success-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: var(--space-2);
  }

  .success-panel--arrival .success-wrap h2 {
    margin-bottom: var(--space-2);
    font-size: 1.45rem;
  }

  .success-panel--arrival .success-lead {
    margin-bottom: var(--space-3);
    font-size: var(--font-size-sm);
  }

  .success-order-review {
    margin-bottom: var(--space-3);
    padding: var(--space-3);
  }

  .success-order-review-head {
    display: block;
  }

  .success-order-review-head p {
    margin-top: 0.25rem;
    white-space: normal;
  }

  .success-order-review-name {
    white-space: normal;
  }

  .success-order-review-item {
    padding: var(--space-2) 0;
  }

  .success-order-review-meta {
    margin-top: 2px;
    line-height: 1.35;
  }

  .success-order-review-total {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
  }

  .success-panel--pickup-ready .success-wrap {
    display: block;
    max-width: 480px;
    padding: var(--space-5) 0 var(--space-4);
    text-align: center;
  }

  .success-panel--pickup-ready .success-icon--pickup {
    width: min(12rem, 72vw);
    margin-bottom: var(--space-3);
  }

  .success-panel--pickup-ready .success-wrap h2 {
    font-size: 1.65rem;
  }

  .success-panel--pickup-ready .success-lead {
    margin-left: auto;
    margin-right: auto;
    font-size: var(--font-size-sm);
  }

  .success-panel--pickup-ready .pickup-directions {
    margin-top: var(--space-4);
    text-align: left;
  }

  .success-panel--printing-issue .success-wrap {
    display: block;
    max-width: 480px;
    padding: var(--space-5) 0 var(--space-4);
    text-align: center;
  }

  .success-panel--printing-issue .success-icon--issue {
    width: min(12rem, 72vw);
    margin-bottom: var(--space-3);
  }

  .success-panel--printing-issue .success-wrap h2 {
    font-size: 1.65rem;
  }

  .success-panel--printing-issue .success-lead {
    margin-left: auto;
    margin-right: auto;
    font-size: var(--font-size-sm);
  }

  .success-panel--printing-issue .pickup-directions {
    margin-top: var(--space-4);
    text-align: left;
  }

  .success-order-summary {
    grid-template-columns: 1fr;
  }

  .success-order-review-file {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }

  .success-order-review-side {
    justify-content: flex-start;
  }

  .success-document-view-btn {
    width: 100%;
    min-height: 2.25rem;
  }

  .success-panel--arrival .proximity-approve-lead {
    margin-bottom: var(--space-3);
  }

  .success-panel--arrival .proximity-actions {
    gap: var(--space-2);
  }

  .success-panel--arrival .proximity-panel .alert,
  .success-panel--arrival .proximity-approve-lead {
    text-align: left;
  }
}

.success-nav-wrap {
  margin-top: var(--space-5);
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.success-nav-wrap .btn {
  width: 100%;
}

.success-delete-wrap {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.success-delete-btn {
  width: 100%;
}

.success-panel--arrival .success-nav-wrap,
.success-panel--arrival .success-delete-wrap {
  max-width: 30rem;
  width: 100%;
}

.success-panel--arrival .success-nav-wrap .btn,
.success-panel--arrival .success-delete-btn {
  width: 100%;
  max-width: none;
}

@media (max-width: 520px) {
  .success-panel--arrival .success-nav-wrap,
  .success-panel--arrival .success-delete-wrap,
  .success-panel--arrival .proximity-panel {
    max-width: none;
    width: 100%;
  }

  .success-panel--arrival .success-nav-wrap .btn,
  .success-panel--arrival .success-delete-btn,
  .success-panel--arrival .proximity-panel-btn,
  .success-panel--arrival .proximity-approve .proximity-panel-btn {
    width: 100%;
    max-width: none;
  }
}

/* ── Account / history / billing pages ──────────────────────────────────── */
.wizard-wrap > .account-panel,
.wizard-wrap > .history-panel {
  max-width: 900px;
  padding: var(--space-6);
  overflow: hidden;
}

.wizard-wrap > .billing-panel {
  max-width: 720px;
  padding: var(--space-8);
  overflow: hidden;
}

.account-page,
.history-page,
.billing-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.account-page > :not(.account-login-gate),
.history-page > :not(.history-login-gate),
.billing-page > :not(.billing-login-gate) {
  align-self: stretch;
  width: 100%;
}

.account-loading,
.history-loading,
.billing-loading {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-8) 0;
}

.history-loading {
  padding: var(--space-8) var(--space-6);
}

.history-panel .alert {
  margin: var(--space-4) var(--space-5);
}

.account-login-gate,
.history-login-gate,
.billing-login-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-8) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  text-align: center;
  box-sizing: border-box;
}

.account-login-gate-title,
.history-login-gate-title,
.billing-login-gate-title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 800;
}

.account-login-gate-lead,
.history-login-gate-lead,
.billing-login-gate-lead {
  margin: 0;
  line-height: 1.5;
}

.account-content {
  display: grid;
  gap: var(--space-5);
}

.account-profile-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(26, 42, 74, 0.06), rgba(201, 162, 39, 0.08)),
    var(--color-bg);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-surface);
  font-size: var(--font-size-lg);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 -3px 0 rgba(201, 162, 39, 0.35);
}

.account-profile-copy {
  min-width: 0;
}

.account-eyebrow,
.account-member-line,
.account-section-note,
.account-action-desc {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.account-eyebrow,
.account-section-title {
  font-weight: 800;
}

.account-email-heading {
  margin: var(--space-1) 0;
  color: var(--color-text);
  font-size: clamp(var(--font-size-xl), 3vw, var(--font-size-2xl));
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.account-detail-card {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.account-section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.account-section-title {
  margin: 0;
  color: var(--color-text);
  font-size: var(--font-size-lg);
  line-height: 1.25;
}

.account-details {
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.account-password-form {
  display: grid;
  gap: var(--space-3);
}

.account-password-form .btn {
  justify-self: start;
}

.account-detail-row {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.account-detail-row dt {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

.account-detail-row dd {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.account-action-grid {
  display: grid;
  gap: var(--space-3);
}

.account-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  min-height: 4.75rem;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.account-action-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  text-decoration: none;
}

.account-action-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: rgba(26, 42, 74, 0.08);
  color: var(--color-primary);
  font-weight: 900;
}

.account-action-icon::before {
  width: 1.35rem;
  height: 1.35rem;
}

.account-action-icon--billing {
  background: rgba(201, 162, 39, 0.18);
}

.account-action-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.account-action-title {
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 800;
  line-height: 1.25;
}

.account-action-arrow {
  color: var(--color-text-muted);
  font-size: 1.75rem;
  line-height: 1;
}

.account-panel.account-layout-desktop-a {
  max-width: 920px;
}

.account-panel.account-layout-desktop-a .account-content {
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.9fr);
  align-items: stretch;
}

.account-panel.account-layout-desktop-a .account-profile-summary,
.account-panel.account-layout-desktop-a .account-detail-card {
  grid-column: 1;
}

.account-panel.account-layout-desktop-a .account-action-grid {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-content: stretch;
}

.account-panel.account-layout-desktop-a .account-action-card {
  min-height: 0;
}

.account-panel.account-layout-desktop-b {
  max-width: 760px;
}

.account-panel.account-layout-desktop-b .account-profile-summary {
  padding: 0 0 var(--space-5);
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
}

.account-panel.account-layout-desktop-b .account-avatar {
  width: 3.5rem;
  height: 3.5rem;
}

.account-panel.account-layout-desktop-b .account-details {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.account-panel.account-layout-desktop-b .account-detail-row {
  grid-template-columns: 10rem minmax(0, 1fr);
  align-items: baseline;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
}

.account-panel.account-layout-desktop-b .account-detail-row:last-child,
.account-panel.account-layout-desktop-b .account-action-card:last-child {
  border-bottom: 0;
}

.account-panel.account-layout-desktop-b .account-action-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.account-panel.account-layout-desktop-b .account-action-card {
  min-height: 4.25rem;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.wizard-wrap > .account-panel,
.account-panel.account-layout-desktop-a,
.account-panel.account-layout-desktop-b {
  max-width: 760px;
}

.account-panel .account-content,
.account-panel.account-layout-desktop-a .account-content,
.account-panel.account-layout-desktop-b .account-content {
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.account-panel.account-layout-desktop-a .account-detail-card,
.account-panel.account-layout-desktop-a .account-action-grid {
  grid-column: auto;
  grid-row: auto;
}

.account-panel .account-details,
.account-panel.account-layout-desktop-b .account-details {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.account-panel .account-detail-row,
.account-panel.account-layout-desktop-b .account-detail-row {
  grid-template-columns: 10rem minmax(0, 1fr);
  align-items: baseline;
  padding: var(--space-4);
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: var(--color-surface);
}

.account-panel .account-detail-row:last-child {
  border-bottom: 0;
}

.account-panel .account-action-grid,
.account-panel.account-layout-desktop-b .account-action-grid {
  display: grid;
  gap: var(--space-3);
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.account-panel .account-action-card,
.account-panel.account-layout-desktop-b .account-action-card {
  min-height: 4.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.account-panel .account-action-card:last-child,
.account-panel.account-layout-desktop-b .account-action-card:last-child {
  border-bottom: 1px solid var(--color-border);
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  gap: var(--space-3);
}

.history-empty-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
}

.history-empty-icon::before {
  width: 2.5rem;
  height: 2.5rem;
  opacity: 0.65;
}

.history-empty h3 {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: 800;
}

.history-empty .text-muted {
  max-width: 22rem;
  margin: 0;
  line-height: 1.55;
}

.history-empty-cta {
  margin-top: var(--space-4);
  min-width: 14rem;
}

/* ── History Variant A: Data Table + Mobile Cards ──────────────────── */

.history-va {
  display: flex;
  flex-direction: column;
}

/* Stats header */
.history-va-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 1.5rem 0;
}

.history-va-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
}

.history-va-page-title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.2;
  margin: 0;
}

.history-va-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.history-va-new-btn:hover { opacity: 0.85; text-decoration: none; }

/* Stats strip */
.va-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.va-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.va-stat-value {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--color-text);
}

.va-stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.va-stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
}

/* Toolbar */
.history-va-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.va-search {
  flex: 1;
  min-width: 140px;
  max-width: 280px;
  position: relative;
}

.va-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.va-search input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.125rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.va-search input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,42,74,0.13);
  background: var(--color-surface);
}
.va-search input::placeholder { color: var(--color-text-muted); }

.va-filter-chips {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.va-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3125rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.va-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.va-chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Desktop table */
.va-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.va-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.va-table thead tr {
  background: #f3f4f6;
  border-bottom: 1.5px solid var(--color-border);
}

.va-table th {
  padding: 0.625rem 1.25rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.va-table th.num    { text-align: right; }
.va-table th.center { text-align: center; }

.va-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: background 0.1s;
}
.va-table tbody tr:hover { background: rgba(26,42,74,0.035); }
.va-table tbody tr:last-child { border-bottom: none; }

.va-table td {
  padding: 0.875rem 1.25rem;
  vertical-align: middle;
}
.va-table td.num    { text-align: right; font-variant-numeric: tabular-nums; }
.va-table td.center { text-align: center; }

.va-job-name {
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.va-job-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.va-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.va-date {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.va-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.875rem;
  border: 1.5px solid var(--color-border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-surface);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: inherit;
}
.va-view-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.va-no-results {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-8) var(--space-4);
  font-size: var(--font-size-sm);
}

.va-no-results-cards {
  padding: var(--space-8) var(--space-6);
}

/* Mobile cards (shown <640px instead of table) */
.va-card-list {
  display: none;
  padding: 1rem;
  flex-direction: column;
  gap: 0.75rem;
}

.va-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.125rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.va-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.va-card-title {
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--color-text);
}

.va-card-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.va-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}

.va-card-amount {
  font-weight: 800;
  font-size: 1rem;
  color: var(--color-text);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.7375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge-done   { background: rgba(22,163,74,0.12);  color: #15803d; }
.badge-wait   { background: rgba(245,158,11,0.15); color: #92400e; }
.badge-active { background: rgba(26,42,74,0.10);   color: var(--color-primary); }
.badge-issue  { background: rgba(220,38,38,0.12);  color: #b91c1c; }
.badge-cancel { background: #f3f4f6;               color: #4b5563; }

/* Responsive */
@media (min-width: 640px) {
  .va-card-list  { display: none; }
  .va-table-wrap { display: block; }
}

@media (max-width: 639px) {
  .va-table-wrap          { display: none; }
  .va-card-list           { display: flex; }
  .history-va-toolbar     { padding: 0.75rem 1rem; }
  .history-va-header      { padding: 1rem 1rem 0; }
  .history-va-header-top  { flex-wrap: wrap; }
  .history-va-page-title  { font-size: 1.125rem; }
  .va-stats               { padding: 0.625rem 0; gap: 1rem; flex-wrap: wrap; overflow-x: visible; }
  .orders-page-header .va-stats { flex-wrap: wrap; overflow-x: visible; }
}

.billing-section {
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.billing-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.billing-section-title {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-lg);
  font-weight: 800;
}

.billing-payment-method-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.billing-payment-method {
  margin: 0;
  line-height: 1.5;
  flex: 1 1 12rem;
}

.billing-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.billing-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.billing-history-main {
  min-width: 0;
}

.billing-history-desc {
  font-weight: 600;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.billing-history-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.billing-history-amount {
  font-weight: 700;
}

.billing-history-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: max-content;
}

.billing-history-actions .btn-text {
  white-space: nowrap;
}

@media (max-width: 520px) {
  .billing-history-item {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .billing-history-actions {
    justify-content: flex-start;
    min-width: 0;
  }
}

.orders-job-cancel-btn {
  color: var(--color-danger, #b91c1c);
  border-color: var(--color-danger, #b91c1c);
}

/* ── Orders page ─────────────────────────────────────────────────────────── */
.orders-page-link {
  font-weight: 600;
  color: var(--color-accent);
}

.wizard-wrap > .orders-panel {
  max-width: 68rem;
  padding: var(--space-6) var(--space-5);
}

body.orders-page-active .page-top-wrap {
  position: relative;
  z-index: 2;
  margin-bottom: var(--space-2);
}

body.orders-page-active .wizard-wrap {
  overflow-x: hidden;
  min-width: 0;
  margin-top: var(--space-5);
  z-index: 1;
}

.wizard-wrap > .orders-at-shop-panel.vb-at-shop-banner {
  box-sizing: border-box;
  width: 100%;
  max-width: 68rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-4);
  overflow: hidden;
}

body.orders-page-active .page-top-wrap .hero {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

body.orders-page-active .hero h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
}

body.orders-page-active .hero p {
  display: none;
}

.orders-page-header {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  grid-column: 1 / -1;
}

.orders-page-header .va-stats {
  padding: 0.75rem 0;
  border-top: none;
  border-bottom: 1px solid var(--color-border);
}

.orders-va-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 0;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--color-border);
}

.orders-list.is-search-mode .vb-date-group {
  display: contents;
}

.orders-list.is-search-mode .vb-date-header {
  display: none;
}

.orders-no-results {
  margin: var(--space-6) 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.orders-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.orders-panel {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.orders-page.vb-page {
  --vb-timeline-max: 40rem;
  --vb-sidebar-w: 15rem;
  --vb-gap: var(--space-5);
  /* Variant B blue accent (overrides site gold on this page only) */
  --color-accent: #0066cc;
  --color-accent-hover: #0052a3;
  --color-accent-dim: rgba(0, 102, 204, 0.12);
  --color-accent-ring: rgba(0, 102, 204, 0.25);
  /* Status badges — distinct hues; no blue (selection uses accent blue) */
  --vb-badge-waiting-bg: rgba(245, 158, 11, 0.2);
  --vb-badge-waiting-color: #92400e;
  --vb-badge-pickup-bg: rgba(20, 184, 166, 0.16);
  --vb-badge-pickup-color: #0f766e;
  --vb-badge-printing-bg: rgba(124, 58, 237, 0.14);
  --vb-badge-printing-color: #6d28d9;
  --vb-badge-paid-bg: rgba(234, 88, 12, 0.14);
  --vb-badge-paid-color: #c2410c;
  --vb-badge-processing-bg: rgba(217, 119, 6, 0.14);
  --vb-badge-processing-color: #b45309;
  --vb-badge-pending-bg: rgba(120, 113, 108, 0.14);
  --vb-badge-pending-color: #57534e;
  --vb-badge-unavailable-bg: rgba(190, 24, 93, 0.12);
  --vb-badge-unavailable-color: #9d174d;
  --vb-badge-done-bg: rgba(34, 197, 94, 0.16);
  --vb-badge-done-color: #15803d;
  --vb-badge-issue-bg: rgba(220, 38, 38, 0.12);
  --vb-badge-issue-color: #b91c1c;
  --vb-badge-cancelled-bg: #f3f4f6;
  --vb-badge-cancelled-color: #4b5563;
  --vb-dot-waiting: #f59e0b;
  --vb-dot-pickup: #14b8a6;
  --vb-dot-printing: #8b5cf6;
  --vb-dot-paid: #ea580c;
  --vb-dot-processing: #d97706;
  --vb-dot-pending: #78716c;
  --vb-dot-done: #22c55e;
  --vb-dot-issue: #ef4444;
  --vb-dot-cancelled: #9ca3af;
  --radius-full: 9999px;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vb-gap);
  max-width: calc(var(--vb-timeline-max) + var(--vb-sidebar-w) + var(--vb-gap) * 3);
  margin: 0 auto;
  padding-bottom: var(--space-10);
}

@media (min-width: 768px) {
  .orders-page.vb-page {
    grid-template-columns: minmax(0, var(--vb-timeline-max)) var(--vb-sidebar-w);
    grid-template-areas:
      'header header'
      'feed sidebar';
    align-items: start;
  }

  .orders-page.vb-page .orders-page-header {
    grid-area: header;
  }

  .orders-page.vb-page .vb-feed-wrap {
    grid-area: feed;
  }

  .orders-page.vb-page .vb-sidebar {
    grid-area: sidebar;
    flex-direction: column;
    gap: var(--space-4);
  }

  .orders-page.has-orders .vb-sidebar {
    display: flex !important;
  }

  /* Logged-out / empty: single centered column (no phantom sidebar gutter) */
  .orders-page.vb-page:not(.has-orders) {
    grid-template-columns: minmax(0, var(--vb-timeline-max));
    justify-content: center;
  }

  .orders-page.vb-page:not(.has-orders) .vb-feed-wrap {
    width: 100%;
    max-width: var(--vb-timeline-max);
    justify-self: center;
    min-height: auto;
    align-self: start;
  }
}

@media (max-width: 767px) {
  .orders-page.vb-page .vb-sidebar {
    display: none !important;
  }

  body.orders-page-active .page-top-wrap .hero {
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }

  body.orders-page-active .hero h1 {
    font-size: 1.25rem;
  }

  .orders-va-toolbar {
    padding: 0.625rem 0;
  }

  .orders-page-header .va-stats {
    padding: 0.625rem 0;
    gap: 1rem;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .orders-page-header {
    min-width: 0;
    max-width: 100%;
  }

  .orders-va-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .orders-va-toolbar .va-search {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .orders-va-toolbar .va-filter-chips {
    width: 100%;
    min-width: 0;
  }
}

.orders-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.orders-page.vb-page > .orders-toolbar.vb-toolbar {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0 0.25rem;
  border-bottom: none;
}

.orders-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  width: 100%;
  min-width: 0;
}

.orders-toolbar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
  width: 100%;
}

.orders-count {
  margin: 0;
  margin-left: auto;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  text-align: right;
  flex-shrink: 0;
}

.orders-refresh-btn {
  flex-shrink: 0;
  margin-left: 0;
}

.orders-page:not(.has-orders) .orders-toolbar {
  display: none !important;
}

.orders-loading {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-8) 0;
}

.orders-login-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-8) var(--space-5);
  text-align: center;
}

.orders-guest-sign-in-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  max-width: 42rem;
  margin: 0 auto var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted, #f4f6f8);
  border: 1px solid var(--color-border, #e2e8f0);
}

.orders-guest-sign-in-banner-text {
  flex: 1 1 14rem;
  margin: 0;
  line-height: 1.45;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.orders-login-gate-title {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-lg);
  font-weight: 800;
}

.orders-login-gate-lead {
  margin: 0 0 var(--space-4);
  line-height: 1.5;
}

.checkout-guest-email {
  margin-bottom: var(--space-4);
}

.checkout-guest-email-hint {
  margin: var(--space-1) 0 var(--space-2);
  line-height: 1.45;
}

.checkout-account-section {
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
}

.checkout-account-gate {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.checkout-account-title {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-lg);
  font-weight: 800;
  line-height: 1.3;
}

.checkout-account-lead {
  margin: 0 0 var(--space-3);
  line-height: 1.5;
}

.checkout-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.checkout-auth-tab {
  width: 100%;
  margin: 0;
}

.orders-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: var(--space-8) var(--space-5);
  gap: 0;
}

.orders-empty-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 auto var(--space-2);
}

.orders-empty-icon::before {
  width: 2.5rem;
  height: 2.5rem;
  opacity: 0.65;
}

.orders-empty h3 {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: 800;
}

.orders-empty .text-muted {
  max-width: 22rem;
  margin: 0;
  line-height: 1.55;
}

.orders-empty-cta {
  margin-top: var(--space-4);
  min-width: 14rem;
  justify-content: center;
  text-align: center;
}

.orders-upload-link {
  flex-shrink: 0;
  white-space: nowrap;
  text-decoration: none;
  font-size: var(--font-size-sm);
}

.orders-upload-link:hover {
  text-decoration: underline;
}

/* Variant B — toolbar */
.vb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0 0.25rem;
}

.vb-toolbar-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-full);
  padding: 0.375rem 0.75rem 0.375rem 0.5rem;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.vb-toolbar-back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.vb-toolbar-back:hover {
  color: var(--color-text);
  background: var(--color-bg-muted, #f3f4f6);
  border-color: var(--color-border);
}

.vb-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vb-btn-new {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 102, 204, 0.25);
  transition: background 0.15s, box-shadow 0.15s;
}

.vb-btn-new svg {
  width: 14px;
  height: 14px;
}

.vb-btn-new:hover {
  background: var(--color-accent-hover, #0052a3);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.35);
}

.vb-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.65rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.vb-state-card .vb-btn-primary {
  justify-content: center;
  text-align: center;
}

.vb-btn-primary:hover {
  background: var(--color-accent-hover, #0052a3);
  color: #fff;
}

.vb-state-card-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 1rem;
  opacity: 0.55;
}

.vb-state-card h3 {
  font-size: 1.125rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
}

.vb-state-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

.orders-select-all-btn.hidden {
  display: none !important;
}

.vb-feed-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

#ordersError.alert,
.vb-feed-wrap .alert {
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.orders-page.vb-page:not(.has-orders) .vb-feed-wrap {
  min-height: auto;
}

/* Empty / login: one surface (outer .orders-panel.card); inner card is layout-only */
.orders-empty .vb-state-card,
.orders-login-gate .vb-state-card {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.vb-loading-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.vb-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: vb-spin 0.7s linear infinite;
}

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

.vb-state-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: var(--space-8) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

/* Ready to print banner */
.orders-at-shop-panel.vb-at-shop-banner {
  position: relative;
  padding: 0;
  border: none;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    #0a1628 0%,
    #0d2847 32%,
    #0052a3 58%,
    var(--color-accent, #0066cc) 82%,
    #1a6bb5 100%
  );
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 102, 204, 0.28);
}

.orders-at-shop-panel.vb-at-shop-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='28' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='1'/%3E%3C/svg%3E")
    repeat;
  pointer-events: none;
}

.vb-at-shop-inner {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 1rem 1.25rem 0.875rem;
  text-align: center;
}

.vb-at-shop-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
  text-align: left;
  width: 100%;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.vb-at-shop-head-text {
  min-width: 0;
}

.vb-at-shop-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vb-at-shop-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.vb-at-shop-title,
.orders-at-shop-panel .orders-at-shop-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

.vb-at-shop-subtitle,
.orders-at-shop-panel .orders-at-shop-lead {
  margin: var(--space-1) 0 0;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.88);
  max-width: none;
}

.vb-at-shop-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.vb-at-shop-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
  opacity: 0.92;
}

.vb-at-shop-step-num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.vb-at-shop-divider {
  opacity: 0.45;
}

.vb-at-shop-steps--flow {
  flex-wrap: nowrap;
  gap: 0.25rem 0.4rem;
  margin-bottom: 0.625rem;
}

.vb-at-shop-flow-step {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.vb-at-shop-steps--flow .vb-at-shop-divider {
  font-size: 0.8125rem;
  flex-shrink: 0;
}

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

.vb-at-shop-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.125rem;
}

.orders-location-block,
.orders-shop-confirm-block,
.orders-approve-selected-wrap {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vb-btn-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.5rem 1.25rem;
  background: #fff;
  color: var(--color-accent);
  font-size: var(--font-size-base);
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 18rem;
}

.vb-btn-location:hover {
  background: #f0f7ff;
}

.vb-btn-approve {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: var(--font-size-base);
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-full);
  cursor: pointer;
  width: 100%;
  max-width: 18rem;
}

.vb-btn-approve:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.25);
}

.vb-btn-approve:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.orders-location-status {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.orders-location-hint {
  margin: var(--space-2) 0 0;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.orders-shop-confirm-label {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}

.orders-at-shop-panel.is-location-confirmed .vb-at-shop-steps {
  display: none;
}

.orders-at-shop-panel.is-location-confirmed .vb-at-shop-head .vb-at-shop-title {
  display: none;
}

.orders-at-shop-sentinel {
  height: 1px;
  width: 100%;
  pointer-events: none;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  max-width: 100%;
}

.orders-list .vb-timeline--flat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Timeline feed */
.vb-date-group {
  margin-bottom: var(--space-1);
}

.vb-date-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0 0.625rem;
  background: transparent;
}

.vb-date-label {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
  background: transparent;
}

.vb-date-line {
  flex: 1;
  height: 1px;
  border: none;
  margin: 0;
  background: var(--color-border);
}

.vb-timeline {
  position: relative;
  padding-left: 2rem;
  min-width: 0;
  max-width: 100%;
}

.vb-timeline::before {
  content: '';
  position: absolute;
  left: 0.5625rem;
  top: 0.875rem;
  bottom: 0.875rem;
  width: 2px;
  background: var(--color-border);
}

.vb-entry {
  position: relative;
  padding: 0.125rem 0 var(--space-4);
  min-width: 0;
  max-width: 100%;
}

.vb-entry-dot {
  position: absolute;
  left: -1.5rem;
  top: 0.875rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--color-surface);
  background: var(--vb-dot-cancelled);
  box-shadow: 0 0 0 2px var(--color-border);
}

.vb-entry.is-waiting .vb-entry-dot {
  background: var(--vb-dot-waiting);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.vb-entry.is-ready .vb-entry-dot {
  background: var(--vb-dot-pickup);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.28);
}

.vb-entry.is-printing .vb-entry-dot {
  background: var(--vb-dot-printing);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.28);
}

.vb-entry.is-paid .vb-entry-dot {
  background: var(--vb-dot-paid);
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.25);
}

.vb-entry.is-processing .vb-entry-dot {
  background: var(--vb-dot-processing);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
}

.vb-entry.is-pending .vb-entry-dot {
  background: var(--vb-dot-pending);
  box-shadow: 0 0 0 2px rgba(120, 113, 108, 0.22);
}

.vb-entry.is-ready .vb-entry-dot::after,
.vb-entry.is-printing .vb-entry-dot::after,
.vb-entry.is-waiting .vb-entry-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: vb-dot-pulse 2s ease-out infinite;
}

.vb-entry.is-ready .vb-entry-dot::after {
  color: var(--vb-dot-pickup);
}

.vb-entry.is-printing .vb-entry-dot::after {
  color: var(--vb-dot-printing);
}

.vb-entry.is-waiting .vb-entry-dot::after {
  color: var(--vb-dot-waiting);
}

@keyframes vb-dot-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  70% {
    transform: scale(1.7);
    opacity: 0;
  }

  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vb-entry.is-ready .vb-entry-dot::after,
  .vb-entry.is-printing .vb-entry-dot::after,
  .vb-entry.is-waiting .vb-entry-dot::after {
    animation: none;
  }
}

.vb-entry.is-done .vb-entry-dot {
  background: var(--vb-dot-done);
}

.vb-entry.is-issue .vb-entry-dot {
  background: var(--vb-dot-issue);
}

.vb-entry.is-cancelled .vb-entry-dot {
  background: var(--vb-dot-cancelled);
}

.vb-entry-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.vb-entry-card:hover {
  box-shadow: var(--shadow-md);
}

.vb-entry.is-waiting .vb-entry-card {
  border-color: rgba(245, 158, 11, 0.28);
}

.vb-entry.is-ready .vb-entry-card {
  border-color: rgba(20, 184, 166, 0.28);
}

.vb-entry.is-printing .vb-entry-card {
  border-color: rgba(139, 92, 246, 0.28);
}

.vb-entry.is-paid .vb-entry-card,
.vb-entry.is-processing .vb-entry-card {
  border-color: rgba(234, 88, 12, 0.22);
}

.vb-entry.is-pending .vb-entry-card {
  border-color: rgba(120, 113, 108, 0.22);
}

.vb-entry.is-issue .vb-entry-card {
  border-color: rgba(220, 53, 69, 0.2);
}

.vb-entry-card::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--color-border);
}

.vb-entry.is-waiting .vb-entry-card::before {
  background: var(--vb-dot-waiting);
}

.vb-entry.is-ready .vb-entry-card::before {
  background: var(--vb-dot-pickup);
}

.vb-entry.is-printing .vb-entry-card::before {
  background: var(--vb-dot-printing);
}

.vb-entry.is-paid .vb-entry-card::before,
.vb-entry.is-processing .vb-entry-card::before {
  background: var(--vb-dot-paid);
}

.vb-entry.is-pending .vb-entry-card::before {
  background: var(--vb-dot-pending);
}

.vb-entry.is-done .vb-entry-card::before {
  background: var(--vb-dot-done);
}

.vb-entry.is-issue .vb-entry-card::before {
  background: var(--vb-dot-issue);
}

.vb-entry.is-cancelled .vb-entry-card::before {
  background: var(--vb-dot-cancelled);
}

.vb-entry-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.vb-entry.is-selectable {
  cursor: pointer;
}

.vb-entry.is-selectable .vb-entry-header:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
  border-radius: var(--radius-lg);
}

.vb-entry.is-selectable.is-selected .vb-entry-card {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-ring), 0 4px 14px rgba(0, 102, 204, 0.1);
  background: rgba(0, 102, 204, 0.04);
}

.vb-entry.is-selectable.is-selected .vb-entry-card::before {
  background: var(--color-accent);
}

.vb-entry-meta {
  flex: 1;
  min-width: 0;
}

.vb-entry-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}

.vb-entry-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 22ch;
  flex-shrink: 1;
  min-width: 0;
}

@media (min-width: 480px) {
  .vb-entry-title {
    max-width: 30ch;
  }
}

.orders-page.vb-page .vb-entry-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
}

.orders-page.vb-page .vb-entry-badge.badge--waiting,
.orders-page.vb-page .vb-entry-badge.status-waiting {
  background: var(--vb-badge-waiting-bg);
  color: var(--vb-badge-waiting-color);
}

.orders-page.vb-page .vb-entry-badge.badge--pickup {
  background: var(--vb-badge-pickup-bg);
  color: var(--vb-badge-pickup-color);
}

.orders-page.vb-page .vb-entry-badge.badge--printing {
  background: var(--vb-badge-printing-bg);
  color: var(--vb-badge-printing-color);
}

.orders-page.vb-page .vb-entry-badge.badge--paid {
  background: var(--vb-badge-paid-bg);
  color: var(--vb-badge-paid-color);
}

.orders-page.vb-page .vb-entry-badge.badge--processing,
.orders-page.vb-page .vb-entry-badge.badge--active,
.orders-page.vb-page .vb-entry-badge.status-active {
  background: var(--vb-badge-processing-bg);
  color: var(--vb-badge-processing-color);
}

.orders-page.vb-page .vb-entry-badge.badge--pending {
  background: var(--vb-badge-pending-bg);
  color: var(--vb-badge-pending-color);
}

.orders-page.vb-page .vb-entry-badge.badge--unavailable {
  background: var(--vb-badge-unavailable-bg);
  color: var(--vb-badge-unavailable-color);
}

.orders-page.vb-page .vb-entry-badge.badge--done,
.orders-page.vb-page .vb-entry-badge.status-done {
  background: var(--vb-badge-done-bg);
  color: var(--vb-badge-done-color);
}

.orders-page.vb-page .vb-entry-badge.badge--issue,
.orders-page.vb-page .vb-entry-badge.status-issue {
  background: var(--vb-badge-issue-bg);
  color: var(--vb-badge-issue-color);
}

.orders-page.vb-page .vb-entry-badge.badge--cancelled,
.orders-page.vb-page .vb-entry-badge.status-cancelled {
  background: var(--vb-badge-cancelled-bg);
  color: var(--vb-badge-cancelled-color);
}

.vb-entry-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem 0.625rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.vb-entry-sub-sep {
  opacity: 0.45;
}

.vb-entry-right {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  align-self: stretch;
}

.vb-entry-price-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.25rem;
  flex-shrink: 0;
  text-align: right;
}

.vb-entry-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  border-radius: var(--radius-md, 0.375rem);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.vb-entry-expand-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.vb-entry-price {
  font-size: 0.9375rem;
  font-weight: 800;
  white-space: nowrap;
}

.vb-entry-price.is-muted {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.vb-entry-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.vb-entry.is-open .vb-entry-chevron {
  transform: rotate(180deg);
}

.vb-entry-details {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
  opacity: 0;
}

.vb-entry.is-open .vb-entry-details {
  max-height: 500px;
  opacity: 1;
}

.vb-entry-details-inner {
  border-top: 1px solid var(--color-border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.vb-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem 1rem;
}

.vb-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.vb-detail-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.vb-detail-value {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.vb-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.125rem;
}

@media (max-width: 767px) {
  .vb-entry-actions--in-progress {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .vb-entry-actions--in-progress .vb-btn {
    justify-content: center;
    min-width: 0;
    width: 100%;
  }
}

.vb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.vb-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.vb-btn--details {
  background: var(--color-bg-muted, #f3f4f6);
  color: var(--color-text);
  border-color: var(--color-border);
}

.vb-btn--details:hover {
  background: #e9ebef;
  border-color: #c9cdd5;
}

.vb-btn--print {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 1px 4px rgba(0, 102, 204, 0.22);
}

.vb-btn--print:hover {
  background: var(--color-accent-hover, #0052a3);
  border-color: var(--color-accent-hover, #0052a3);
  color: #fff;
}

.vb-btn--cancel {
  background: transparent;
  color: #b02a37;
  border-color: rgba(176, 42, 55, 0.3);
}

.vb-btn--cancel:hover {
  background: rgba(220, 53, 69, 0.06);
  border-color: rgba(176, 42, 55, 0.55);
}

.vb-entry-alert {
  margin: 0 1rem 1rem;
  font-size: 0.75rem;
  max-width: calc(100% - 2rem);
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.vb-entry.is-complete .vb-entry-card {
  opacity: 0.92;
}

@media (prefers-reduced-motion: reduce) {
  .vb-entry-details {
    transition: none;
  }
}

.vb-sidebar {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
  position: sticky;
  top: var(--space-5);
}

.vb-summary-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.vb-summary-card-title {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-4);
}

.vb-summary-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.vb-summary-stat {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

.vb-summary-stat-value.highlight {
  color: var(--color-accent);
  font-weight: 800;
}

.vb-summary-divider {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: 0 0 var(--space-4);
}

.vb-btn-new-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 102, 204, 0.22);
  transition: background 0.15s, box-shadow 0.15s;
}

.vb-btn-new-sidebar:hover {
  background: var(--color-accent-hover, #0052a3);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.32);
}

.vb-btn-new-sidebar svg {
  width: 15px;
  height: 15px;
}

.vb-status-breakdown {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.vb-status-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

.vb-status-dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vb-summary-help p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}

.orders-mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-surface);
  border-top: 1.5px solid rgba(0, 102, 204, 0.25);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: var(--space-4) var(--space-5) max(var(--space-4), env(safe-area-inset-bottom));
}

.orders-mobile-sticky-bar.is-visible {
  display: block;
}

.orders-mobile-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: 34rem;
  margin: 0 auto;
}

.orders-mobile-sticky-label {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1.35;
}

.orders-select-all-wrap {
  display: none !important;
}

@media (min-width: 768px) {
  .orders-mobile-sticky-bar {
    display: none !important;
  }

  .vb-at-shop-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  body.orders-page-active .hero {
    padding:
      var(--space-5, var(--space-4))
      max(var(--space-4), env(safe-area-inset-right, 0px))
      var(--space-7, var(--space-6))
      max(var(--space-4), env(safe-area-inset-left, 0px));
  }

  body.orders-page-active .hero h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
    margin-bottom: var(--space-2);
  }

  body.orders-page-active .hero p {
    font-size: var(--font-size-sm);
    line-height: 1.5;
    padding: 0 var(--space-2);
    margin-bottom: var(--space-4);
  }

  body.orders-page-active .wizard-wrap {
    margin-top: var(--space-3);
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
    padding-bottom: var(--space-8);
  }

  .wizard-wrap > .orders-panel {
    padding: var(--space-5) var(--space-4);
  }

  .orders-page.vb-page {
    padding-bottom: 5.5rem;
  }

  body.orders-page-active.orders-mobile-sticky-visible .wizard-wrap {
    padding-bottom: 5rem;
  }

  .wizard-wrap > .orders-at-shop-panel.vb-at-shop-banner {
    margin-bottom: var(--space-3);
  }

  .vb-at-shop-inner {
    padding: 0.75rem 0.875rem 0.625rem;
  }

  .vb-at-shop-head {
    margin-bottom: 0.375rem;
  }

  .vb-at-shop-steps--flow {
    justify-content: center;
    gap: 0.2rem 0.35rem;
    margin-bottom: 0.5rem;
  }

  .vb-at-shop-flow-step {
    font-size: 0.6875rem;
  }

  .vb-at-shop-steps--flow .vb-at-shop-divider {
    font-size: 0.75rem;
  }

  .orders-location-block,
  .orders-shop-confirm-block,
  .orders-approve-selected-wrap {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .vb-btn-location,
  .vb-btn-approve {
    max-width: 100%;
  }

  .vb-entry-header {
    padding: 0.75rem 0.75rem;
    gap: 0.5rem;
  }

  .vb-entry-title {
    max-width: 14ch;
  }

  .vb-entry-price {
    font-size: 0.875rem;
  }

  .orders-login-gate {
    padding: var(--space-6) var(--space-4);
  }

  .orders-empty {
    padding: var(--space-6) var(--space-4);
    gap: 0;
  }

  .orders-empty-icon {
    font-size: 2.25rem;
    margin-bottom: var(--space-1);
  }

  .orders-empty h3 {
    font-size: var(--font-size-lg);
  }

  .orders-empty .text-muted {
    font-size: var(--font-size-sm);
    padding: 0 var(--space-3);
  }

  .orders-empty-cta {
    width: 100%;
    min-width: 0;
    margin-top: var(--space-4);
    justify-content: center;
    text-align: center;
  }

  .wizard-wrap > .account-panel {
    padding: var(--space-6) var(--space-5, var(--space-4));
  }

  .account-page {
    gap: var(--space-4);
  }

  .account-content,
  .account-panel.account-layout-desktop-a .account-content {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .account-panel.account-layout-desktop-a .account-profile-summary,
  .account-panel.account-layout-desktop-a .account-detail-card,
  .account-panel.account-layout-desktop-a .account-action-grid {
    grid-column: auto;
    grid-row: auto;
  }

  .account-panel.account-layout-mobile-a .account-profile-summary {
    padding: var(--space-5) var(--space-4);
  }

  .account-panel.account-layout-mobile-a .account-avatar {
    width: 3.25rem;
    height: 3.25rem;
    font-size: var(--font-size-base);
  }

  .account-panel.account-layout-mobile-a .account-section-head {
    display: none;
  }

  .account-panel.account-layout-mobile-a .account-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-panel.account-layout-mobile-a .account-detail-row {
    padding: var(--space-3);
  }

  .account-panel.account-layout-mobile-a .account-action-card {
    min-height: 4rem;
    padding: var(--space-3);
  }

  .account-panel.account-layout-mobile-a .account-action-desc {
    display: none;
  }

  .account-panel.account-layout-mobile-b .account-profile-summary {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: var(--space-6) var(--space-4);
    background: var(--color-primary);
    color: var(--color-surface);
    text-align: center;
  }

  .account-panel.account-layout-mobile-b .account-avatar {
    background: var(--color-accent);
    color: var(--color-primary);
    box-shadow: none;
  }

  .account-panel.account-layout-mobile-b .account-profile-summary .account-eyebrow,
  .account-panel.account-layout-mobile-b .account-profile-summary .account-member-line {
    color: rgba(255, 255, 255, 0.78);
  }

  .account-panel.account-layout-mobile-b .account-profile-summary .account-email-heading {
    color: var(--color-surface);
  }

  .account-panel.account-layout-mobile-b .account-detail-card {
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
  }

  .account-panel.account-layout-mobile-b .account-details {
    gap: var(--space-2);
  }

  .account-panel.account-layout-mobile-b .account-detail-row {
    grid-template-columns: 1fr;
    padding: var(--space-3) 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
  }

  .account-panel.account-layout-mobile-b .account-detail-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .account-panel.account-layout-mobile-b .account-action-grid {
    gap: var(--space-2);
  }

  .account-panel.account-layout-mobile-b .account-action-card {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 3.75rem;
    padding: var(--space-3) var(--space-4);
  }

  .account-panel.account-layout-mobile-b .account-action-icon {
    display: none;
  }

  .account-panel.account-layout-mobile-b .account-action-desc {
    font-size: var(--font-size-xs, 0.8125rem);
  }

  .account-panel .account-content,
  .account-panel.account-layout-desktop-a .account-content,
  .account-panel.account-layout-desktop-b .account-content {
    gap: var(--space-4);
  }

  .account-panel .account-section-head,
  .account-panel.account-layout-mobile-a .account-section-head {
    display: flex;
  }

  .account-panel .account-detail-card,
  .account-panel.account-layout-mobile-b .account-detail-card {
    padding: var(--space-5);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
  }

  .account-panel .account-details,
  .account-panel.account-layout-mobile-a .account-details,
  .account-panel.account-layout-mobile-b .account-details {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .account-panel .account-detail-row,
  .account-panel.account-layout-mobile-a .account-detail-row,
  .account-panel.account-layout-mobile-b .account-detail-row {
    grid-template-columns: 1fr;
    padding: var(--space-4);
    border-width: 0 0 1px;
    border-radius: 0;
    background: var(--color-surface);
  }

  .account-panel .account-action-grid,
  .account-panel.account-layout-mobile-b .account-action-grid {
    gap: var(--space-3);
  }

  .account-panel .account-action-card,
  .account-panel.account-layout-mobile-b .account-action-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 4.75rem;
    padding: var(--space-4);
  }

  .account-panel .account-action-icon,
  .account-panel.account-layout-mobile-b .account-action-icon {
    display: grid;
  }

  .account-panel .account-action-desc,
  .account-panel.account-layout-mobile-a .account-action-desc,
  .account-panel.account-layout-mobile-b .account-action-desc {
    display: block;
    font-size: var(--font-size-sm);
  }

  .account-login-gate,
  .history-login-gate,
  .billing-login-gate {
    padding: var(--space-5) var(--space-4);
    gap: var(--space-3);
  }

  .history-empty {
    padding: var(--space-8) var(--space-2);
    gap: var(--space-3);
  }

  .history-empty h3 {
    font-size: var(--font-size-lg);
  }

  .history-empty .text-muted {
    font-size: var(--font-size-sm);
    padding: 0 var(--space-3);
  }

  .history-empty-cta {
    width: 100%;
    min-width: 0;
    margin-top: var(--space-4);
  }

  .history-item {
    padding: var(--space-5, var(--space-4)) var(--space-4);
  }

  .orders-job-card {
    padding: var(--space-5, var(--space-4)) var(--space-4);
  }

  .orders-job-grid {
    column-gap: var(--space-2);
  }

  .orders-job-badge {
    white-space: normal;
    text-align: left;
  }

  .orders-job-action-btn {
    min-width: 4.25rem;
    padding-inline: var(--space-2);
  }

  .orders-toolbar-end {
    width: 100%;
    justify-content: flex-end;
  }

  .orders-at-shop-panel.is-location-confirmed .vb-at-shop-inner {
    padding: 0.5rem 0.75rem;
  }
}

.order-status-badge {
  display: inline-block;
}

/* ── Copies input ────────────────────────────────────────────────────────── */
.copies-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}


.copies-row label { font-weight: 600; white-space: nowrap; min-width: 80px; }

.qty-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}

.qty-control button {
  width: 38px; height: 38px;
  background: var(--color-bg);
  border: none;
  cursor: pointer;
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-primary);
  transition: background .1s;
  flex-shrink: 0;
}

.qty-control button:hover { background: var(--color-border); }

.qty-control input {
  width: 60px;
  text-align: center;
  border: none;
  font-size: var(--font-size-lg);
  font-weight: 700;
  outline: none;
  border-radius: 0;
}

/* ── Fixed bottom navigation bar ─────────────────────────────────────────── */
.wizard-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(0);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s ease;
}

/* Mobile steps 1–2: nav slides up only after the user scrolls past the last option. */
.wizard-nav-bar.wizard-nav-bar--scroll-gated:not(.wizard-nav-bar--revealed) {
  transform: translateY(100%);
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .wizard-nav-bar {
    transition-duration: 0.12s;
  }
}

.wizard-nav-bar-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
}

/* Extra bottom padding on the wizard so content doesn't vanish under the bar */
.wizard-wrap {
  padding-bottom: calc(var(--space-12) + 72px);
}

/* ── Navigation buttons ──────────────────────────────────────────────────── */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.step-nav-primary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  min-width: 0;
}

.wizard-nav-hint {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: right;
  line-height: 1.35;
}

.wizard-nav-bar .btn-primary:disabled {
  background: var(--color-bg);
  color: var(--color-text-muted);
  border-color: var(--color-border);
  opacity: 1;
  box-shadow: none;
}

.step-nav-configure {
  display: grid;
  grid-template-columns: minmax(100px, auto) minmax(0, 1fr) minmax(100px, auto);
  align-items: center;
  gap: var(--space-2);
}

.step-nav-configure #step2Back {
  grid-column: 1;
  justify-self: start;
}

.step-nav-configure .wizard-nav-file-center {
  grid-column: 2;
}

.step-nav-configure #step2Next,
.step-nav-configure #checkoutProceed {
  grid-column: 3;
  justify-self: end;
  width: max-content;
  max-width: 100%;
}

.wizard-nav-file-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-width: 0;
  width: 100%;
  max-width: min(100%, 28rem);
  justify-self: center;
}

.wizard-nav-bar .file-progress-strip {
  margin: 0;
  padding: var(--space-1) var(--space-2);
  width: 100%;
  justify-content: center;
  border-radius: var(--radius-md);
}

.step-nav .btn { min-width: 120px; }

@media (max-width: 520px) {
  .step-nav-configure {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: var(--space-1);
  }

  .step-nav-configure #step2Back {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .step-nav-configure .wizard-nav-file-center {
    grid-column: 2;
    grid-row: 1;
    max-width: 100%;
  }

  .step-nav-configure #step2Next,
  .step-nav-configure #checkoutProceed {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .step-nav-configure .btn {
    min-width: 0;
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }

  .step-nav-configure .btn.btn-lg {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .wizard-nav-file-center .preview-file-name-pill {
    width: auto;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    white-space: nowrap;
    font-size: var(--font-size-xs);
  }
}

/* ── Checkout summary ─────────────────────────────────────────────────────── */
.checkout-summary {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

#checkoutSummaryItems {
  display: grid;
  gap: var(--space-3);
}

.checkout-receipt-request {
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}

.payment-receipt-section {
  margin: var(--space-5) var(--space-5) 0;
}

.payment-receipt-section .payment-receipt-hint {
  margin: var(--space-2) 0 0;
  line-height: 1.45;
}

.checkout-receipt-request .payment-receipt-hint {
  margin: var(--space-2) 0 0;
  line-height: 1.45;
}

.payment-receipt-section .checkout-receipt-request {
  margin-bottom: 0;
}

.receipt-email-field {
  margin-top: var(--space-3);
}

.receipt-email-field label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.receipt-email-field input {
  width: 100%;
}

.phone-saved-card-section {
  margin-bottom: var(--space-4);
}

.saved-card-default {
  display: inline-flex;
  align-items: center;
  margin-left: var(--space-2);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  font-size: var(--font-size-xs);
  font-weight: 800;
  text-transform: uppercase;
}

.bundle-payment-dialog {
  max-width: 520px;
}

.bundle-payment-eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bundle-payment-jobs {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-5) 0;
}

.bundle-payment-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.bundle-payment-job strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bundle-payment-job span {
  flex: 0 0 auto;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.combine-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2210;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background:
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(201, 162, 39, 0.14) 0%, transparent 56%),
    rgba(244, 246, 249, 0.88);
  backdrop-filter: blur(9px);
}

.combine-loading-overlay.hidden {
  display: none;
}

body.combine-loading-overlay-open {
  overflow: hidden;
}

.combine-loading-card {
  width: min(92vw, 31rem);
  min-height: 24rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-xl, 1rem);
  color: var(--color-text, #1a2a4a);
  border: 1px solid rgba(26, 42, 74, 0.1);
  background:
    radial-gradient(circle at 50% 12%, rgba(201, 162, 39, 0.13), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 24px 70px rgba(26, 42, 74, 0.18);
}

.combine-loading-card::before {
  content: "";
  position: absolute;
  inset: -28%;
  background:
    radial-gradient(circle at 20% 20%, rgba(15, 143, 137, 0.12), transparent 24%),
    radial-gradient(circle at 80% 78%, rgba(201, 162, 39, 0.12), transparent 28%);
  pointer-events: none;
}

.combine-loading-card > * {
  position: relative;
  z-index: 1;
}

.combine-loading-card h2 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: clamp(1.45rem, 5vw, 1.8rem);
  line-height: 1.12;
  color: var(--color-primary, #1a2a4a);
}

.combine-loading-card p {
  margin: 0;
  max-width: 24rem;
  color: var(--color-text-muted, #5f697a);
  line-height: 1.5;
}

.combine-loading-graphic {
  width: 13rem;
  height: 13rem;
  position: relative;
  display: grid;
  place-items: center;
}

.combine-sheet {
  position: absolute;
  width: 4.8rem;
  height: 6.4rem;
  border-radius: 0.45rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), #eef3f7 70%),
    repeating-linear-gradient(0deg, transparent 0 0.54rem, rgba(15, 24, 39, 0.08) 0.56rem 0.6rem);
  border: 1px solid rgba(26, 42, 74, 0.12);
  box-shadow: 0 18px 38px rgba(26, 42, 74, 0.14);
}

.combine-sheet::after {
  content: "";
  position: absolute;
  inset: 0.7rem 0.65rem auto;
  height: 0.18rem;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.58);
  box-shadow:
    0 1rem 0 rgba(15, 24, 39, 0.12),
    0 2rem 0 rgba(47, 138, 95, 0.16);
}

.combine-core {
  position: absolute;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--color-primary, #1a2a4a);
  box-shadow:
    0 0 0 0.9rem rgba(201, 162, 39, 0.12),
    0 0 2.4rem rgba(26, 42, 74, 0.18);
}

.combine-core::before {
  content: "";
  position: absolute;
  left: 0.82rem;
  top: 0.76rem;
  width: 1.2rem;
  height: 0.66rem;
  border-left: 0.22rem solid #fff;
  border-bottom: 0.22rem solid #fff;
  transform: rotate(-45deg);
}

.combine-beam {
  position: absolute;
  width: 7.2rem;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.7), transparent);
  transform-origin: center;
}

.combine-beam-one {
  transform: rotate(24deg);
}

.combine-beam-two {
  transform: rotate(-24deg);
}

.combine-loading-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 143, 137, 0.1);
  color: var(--color-primary, #1a2a4a);
  font-size: var(--font-size-sm);
  font-weight: 800;
}

.combine-loading-variant-a .combine-sheet-one {
  transform: translate(-4.8rem, -1.1rem) rotate(-12deg);
  animation: combineStackLeft 2.4s ease-in-out infinite;
}

.combine-loading-variant-a .combine-sheet-two {
  transform: translate(4.8rem, -0.8rem) rotate(12deg);
  animation: combineStackRight 2.4s ease-in-out infinite;
}

.combine-loading-variant-a .combine-sheet-three {
  transform: translateY(1rem) scale(0.9);
  animation: combineStackCenter 2.4s ease-in-out infinite;
}

.combine-loading-variant-a .combine-beam {
  opacity: 0;
}

.combine-loading-variant-a .combine-core {
  animation: combineCorePulse 2.4s ease-in-out infinite;
}

.combine-loading-variant-b .combine-loading-graphic::before,
.combine-loading-variant-b .combine-loading-graphic::after {
  content: "";
  position: absolute;
  inset: 0.8rem;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.34);
  animation: combineOrbitSpin 7s linear infinite;
}

.combine-loading-variant-b .combine-loading-graphic::after {
  inset: 2.2rem;
  border-color: rgba(47, 138, 95, 0.28);
  animation-direction: reverse;
  animation-duration: 5.5s;
}

.combine-loading-variant-b .combine-sheet-one {
  transform: translate(-4.5rem, 0) scale(0.72) rotate(-8deg);
  animation: combineRouteLeft 2.6s ease-in-out infinite;
}

.combine-loading-variant-b .combine-sheet-two {
  transform: translate(4.5rem, 0) scale(0.72) rotate(8deg);
  animation: combineRouteRight 2.6s ease-in-out infinite;
}

.combine-loading-variant-b .combine-sheet-three {
  transform: translateY(-0.2rem) scale(0.84);
  animation: combineRouteCenter 2.6s ease-in-out infinite;
}

.combine-loading-variant-b .combine-beam {
  animation: combineBeamSweep 2.6s ease-in-out infinite;
}

.combine-loading-variant-c .combine-sheet-one {
  transform: translate(-2.4rem, -1rem) rotate(-7deg);
  animation: combineDeckOne 2.2s ease-in-out infinite;
}

.combine-loading-variant-c .combine-sheet-two {
  transform: translate(0, -0.25rem);
  animation: combineDeckTwo 2.2s ease-in-out infinite;
}

.combine-loading-variant-c .combine-sheet-three {
  transform: translate(2.4rem, 0.5rem) rotate(7deg);
  animation: combineDeckThree 2.2s ease-in-out infinite;
}

.combine-loading-variant-c .combine-core {
  transform: translateY(3.8rem) scale(0.86);
  animation: combineCheckRise 2.2s ease-in-out infinite;
}

.combine-loading-variant-c .combine-beam {
  opacity: 0;
}

@keyframes combineStackLeft {
  0%, 100% { transform: translate(-4.8rem, -1.1rem) rotate(-12deg); opacity: 0.72; }
  48%, 68% { transform: translate(-0.45rem, -0.2rem) rotate(-2deg); opacity: 1; }
}

@keyframes combineStackRight {
  0%, 100% { transform: translate(4.8rem, -0.8rem) rotate(12deg); opacity: 0.72; }
  48%, 68% { transform: translate(0.45rem, 0.05rem) rotate(2deg); opacity: 1; }
}

@keyframes combineStackCenter {
  0%, 100% { transform: translateY(1rem) scale(0.9); }
  48%, 68% { transform: translateY(0) scale(1); }
}

@keyframes combineCorePulse {
  0%, 35% { transform: scale(0.78); opacity: 0.65; }
  58%, 100% { transform: scale(1); opacity: 1; }
}

@keyframes combineOrbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes combineRouteLeft {
  0%, 100% { transform: translate(-4.5rem, 0) scale(0.72) rotate(-8deg); }
  52%, 72% { transform: translate(-0.7rem, 0) scale(0.9) rotate(-2deg); }
}

@keyframes combineRouteRight {
  0%, 100% { transform: translate(4.5rem, 0) scale(0.72) rotate(8deg); }
  52%, 72% { transform: translate(0.7rem, 0) scale(0.9) rotate(2deg); }
}

@keyframes combineRouteCenter {
  0%, 38% { filter: brightness(0.94); }
  56%, 100% { filter: brightness(1.08); }
}

@keyframes combineBeamSweep {
  0%, 24% { opacity: 0; transform: scaleX(0.4) rotate(var(--beam-rotation, 24deg)); }
  46%, 72% { opacity: 1; transform: scaleX(1) rotate(var(--beam-rotation, 24deg)); }
  100% { opacity: 0; }
}

.combine-loading-variant-b .combine-beam-one {
  --beam-rotation: 24deg;
}

.combine-loading-variant-b .combine-beam-two {
  --beam-rotation: -24deg;
}

@keyframes combineDeckOne {
  0%, 100% { transform: translate(-2.4rem, -1rem) rotate(-7deg); }
  50%, 72% { transform: translate(-0.3rem, -0.35rem) rotate(-1deg); }
}

@keyframes combineDeckTwo {
  0%, 100% { transform: translate(0, -0.25rem); }
  50%, 72% { transform: translate(0, -0.35rem) scale(1.04); }
}

@keyframes combineDeckThree {
  0%, 100% { transform: translate(2.4rem, 0.5rem) rotate(7deg); }
  50%, 72% { transform: translate(0.3rem, -0.35rem) rotate(1deg); }
}

@keyframes combineCheckRise {
  0%, 36% { transform: translateY(4.6rem) scale(0.72); opacity: 0.62; }
  58%, 100% { transform: translateY(3.8rem) scale(0.86); opacity: 1; }
}

/* Payment screen previews: default C, or compare with ?payment=a, ?payment=b, ?payment=c */
.payment-variant-a #step3 {
  max-width: 760px;
  margin-inline: auto;
}

.payment-variant-a .phone-pay-panel {
  max-width: 500px;
}

.payment-variant-b #step3 {
  width: min(100%, 440px);
  max-width: 520px;
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.payment-variant-b .pay-choice-panel {
  max-width: 620px;
}

.payment-variant-b .phone-pay-panel {
  max-width: 440px;
  min-height: min(820px, calc(100svh - 2rem));
  padding: 0 0 calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  border-radius: 22px;
  background: #f4f7fb;
  box-shadow: 0 16px 42px rgba(21, 35, 61, 0.14);
  overflow: clip;
}

.payment-variant-b .phone-pay-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4) var(--space-4) var(--space-3);
  background:
    radial-gradient(circle at 92% 0, rgba(198, 154, 53, 0.26), transparent 34%),
    var(--color-primary);
  color: #fff;
}

.payment-variant-b .phone-pay-back {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}

.payment-variant-b .phone-pay-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.payment-variant-b .phone-pay-secure-badge {
  height: auto;
  min-height: 32px;
  padding: 0;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.payment-variant-b .phone-pay-stripe-mark {
  color: #fff;
}

.payment-variant-b .phone-pay-hero {
  text-align: left;
  margin: 0;
  padding: 0 var(--space-4) 1.75rem;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  background: var(--color-primary);
}

.payment-variant-b .phone-pay-title {
  margin: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1.08;
}

.payment-variant-b .phone-pay-subtitle {
  max-width: 300px;
  margin: var(--space-2) 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.payment-variant-b .phone-pay-loading,
.payment-variant-b .phone-pay-wallets,
.payment-variant-b .phone-pay-card-section,
.payment-variant-b .phone-pay-amount-card,
.payment-variant-b .phone-pay-divider,
.payment-variant-b .phone-pay-error {
  margin-right: var(--space-4);
  margin-left: var(--space-4);
}

.payment-variant-b .phone-pay-wallets,
.payment-variant-b .phone-saved-card-section,
.payment-variant-b .phone-pay-card-section,
.payment-variant-b .phone-pay-amount-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 12px 28px rgba(21, 35, 61, 0.08);
}

.payment-variant-b .phone-pay-wallets {
  display: block;
  margin-top: var(--space-4);
  margin-bottom: 0;
  padding: var(--space-4);
}

.payment-variant-b .stripe-express-mount {
  margin-top: var(--space-3);
}

.payment-variant-b .phone-pay-amount-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text);
  background: #fff;
}

.payment-variant-b .phone-pay-amount-row {
  display: contents;
}

.payment-variant-b .phone-pay-amount-label {
  color: var(--color-text-muted);
  letter-spacing: 0;
  text-transform: none;
}

.payment-variant-b .phone-pay-amount-value {
  color: var(--color-text);
  font-size: 1.18rem;
}

.payment-variant-b .phone-pay-card-section {
  margin-top: var(--space-4);
  padding: var(--space-4);
  overflow: visible;
}

.payment-variant-b .phone-saved-card-section {
  margin: var(--space-4) var(--space-4) 0;
  padding: var(--space-4);
}

.payment-variant-b .saved-card-section-title {
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.payment-variant-b .saved-card-row,
.payment-variant-b .phone-pay-card-option {
  min-height: 58px;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #f9fbfd;
}

.payment-variant-b .saved-card-row--selectable:has(input:checked),
.payment-variant-b .phone-pay-card-option:has(input:checked) {
  border-color: var(--color-success, #198754);
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.14);
}

.payment-variant-b .saved-card-info {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.payment-variant-b .saved-card-details {
  white-space: normal;
  line-height: 1.35;
}

.payment-variant-b .phone-pay-card-option {
  align-items: center;
  margin-bottom: var(--space-3);
}

.payment-variant-b .phone-pay-method-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
}

.payment-variant-b .phone-pay-method-icon--add {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
}

.payment-variant-b .saved-card-rail-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.payment-variant-b .phone-pay-method-copy {
  min-width: 0;
}

.payment-variant-b .phone-payment-receipt {
  margin: var(--space-3) 0 0;
}

.payment-variant-b .phone-payment-receipt .checkout-receipt-request {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.payment-variant-b .phone-payment-receipt .receipt-checkbox-label,
.payment-variant-b .save-card-checkbox-wrap .receipt-checkbox-label {
  min-height: 52px;
  color: var(--color-text);
  font-weight: 750;
}

.payment-variant-b .phone-payment-receipt .payment-receipt-hint {
  display: none;
}

.payment-variant-b .phone-pay-form {
  display: flex;
  flex-direction: column;
}

.payment-variant-b .phone-pay-amount-card {
  order: -2;
  margin: 0 0 var(--space-3);
  box-shadow: none;
}

.payment-variant-b .phone-pay-card-option {
  order: -1;
}

.payment-variant-b .phone-pay-actions {
  margin-top: var(--space-4);
}

.payment-variant-b .phone-pay-submit {
  min-height: 56px;
  margin-top: 0;
  border-radius: var(--radius-md);
  background: var(--color-success, #198754);
  border-color: var(--color-success, #198754);
  font-size: 1rem;
  font-weight: 900;
}

.payment-variant-b .phone-pay-trust {
  margin: var(--space-3) 0 0;
  text-align: center;
}

.payment-variant-c #step3 {
  max-width: 860px;
  margin-inline: auto;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.payment-variant-c .pay-choice-panel,
.payment-variant-c .phone-pay-panel {
  max-width: 620px;
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius-lg) * 1.25);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.payment-variant-c .phone-pay-amount-card {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f5132 0%, #198754 100%);
}

.payment-variant-c .phone-pay-card-section {
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px rgba(15, 81, 50, 0.06);
}

@media (max-width: 767px) {
  .payment-variant-b .phone-pay-panel {
    max-width: 440px;
    border-radius: 0;
    box-shadow: none;
  }

  .payment-variant-c .pay-choice-panel,
  .payment-variant-c .phone-pay-panel {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }

  .bundle-payment-actions .btn {
    width: 100%;
  }
}

.checkout-receipt-request .receipt-checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
  cursor: pointer;
}

.checkout-summary-totals {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
  margin-bottom: var(--space-6);
}

.checkout-job,
.checkout-total-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: visible;
}

.checkout-job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
}

.checkout-job-row span,
.checkout-job-grid span,
.checkout-total-row span:first-child {
  color: var(--color-text-muted);
}

.checkout-filename {
  max-width: min(42vw, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-job-title-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.checkout-job-actions {
  position: relative;
  flex: 0 0 auto;
}

.checkout-job-menu-toggle {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-muted);
  background: var(--color-bg);
  font-size: 0.9rem;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
}

.checkout-job-menu-toggle:hover,
.checkout-job-menu-toggle:focus-visible,
.checkout-job-menu-toggle[aria-expanded="true"] {
  border-color: rgba(201, 162, 39, 0.55);
  color: var(--color-text);
  background: rgba(201, 162, 39, 0.1);
  outline: none;
}

.checkout-job-actions-menu {
  position: absolute;
  top: calc(100% + var(--space-1));
  right: 0;
  z-index: 20;
  min-width: 12rem;
  padding: var(--space-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.checkout-job-actions-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: transparent;
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.checkout-job-actions-menu button:hover,
.checkout-job-actions-menu button:focus-visible {
  background: var(--color-bg);
  outline: none;
}

.checkout-job-actions-menu .checkout-job-delete-action {
  color: #b91c1c;
}

.checkout-job-actions-menu .checkout-job-delete-action:hover,
.checkout-job-actions-menu .checkout-job-delete-action:focus-visible {
  background: #fee2e2;
}

.checkout-job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border);
}

.checkout-job-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  font-size: var(--font-size-sm);
  min-width: 0;
}

.checkout-job-grid strong {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.checkout-job-file-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  padding: var(--space-2) var(--space-3);
  margin: 0;
  background: var(--color-bg);
}

.checkout-job-file-subtotal span {
  color: var(--color-text-muted);
}

.checkout-job-file-subtotal strong {
  font-size: var(--font-size-base);
}

.checkout-total-box {
  background: var(--color-surface);
  /* Clip the dark total bar to the box's rounded corners (the shared
     .checkout-job rule above sets overflow: visible for the file-action
     dropdown menu, which this receipt block doesn't have). */
  overflow: hidden;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--font-size-sm);
}

.checkout-total-row:last-child {
  border-bottom: none;
}

.checkout-total-final {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-4);
}

.checkout-total-final span:first-child {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

.checkout-total-final strong {
  font-size: var(--font-size-xl);
}

.minimum-charge-notice,
.checkout-minimum-notice {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.minimum-charge-notice--compact {
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
  margin-right: var(--space-1);
  margin-bottom: var(--space-1);
  font-size: 0.6875rem;
  line-height: 1.4;
  border-radius: var(--radius-md);
}

.minimum-charge-notice-title,
.checkout-minimum-notice-title {
  margin: 0 0 var(--space-2);
  font-weight: 700;
  font-size: var(--font-size-base);
  color: #1e40af;
}

.minimum-charge-notice--compact .minimum-charge-notice-title {
  margin-bottom: var(--space-1);
  font-size: var(--font-size-xs);
}

.minimum-charge-notice p:last-child,
.checkout-minimum-notice p:last-child {
  margin: 0;
}

.checkout-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

@media (max-width: 520px) {
  .checkout-panel-header,
  .pay-choice-panel .checkout-panel-header,
  .qr-handoff .checkout-panel-header {
    margin-bottom: var(--space-3);
    text-align: left;
  }

  .checkout-panel-title {
    margin-bottom: var(--space-1);
    font-size: var(--font-size-xl);
  }

  .checkout-panel-lead {
    max-width: none;
    margin: 0;
    line-height: 1.4;
  }

  .checkout-actions {
    flex-direction: column;
  }

  .checkout-filename {
    max-width: 100%;
    text-align: left;
  }

  .checkout-job-title-actions {
    flex: 1 1 auto;
  }

  .checkout-job-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkout-job-grid > div {
    padding: 0.45rem var(--space-2);
    font-size: var(--font-size-xs);
  }

  .checkout-job-file-subtotal,
  .checkout-total-row,
  .checkout-total-final {
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }

  .checkout-account-gate {
    padding: var(--space-3);
  }

  .checkout-auth-tabs {
    gap: var(--space-2);
  }

  .checkout-actions .btn {
    width: 100%;
  }
}

/* ── Payment method choice ────────────────────────────────────────────────── */
.pay-choice-panel {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--space-2) var(--space-2) var(--space-6);
}

.pay-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.pay-choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-8) var(--space-4) var(--space-6);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, box-shadow .15s, background .15s;
  font-family: inherit;
  width: 100%;
}

.pay-choice-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  background: #fffbee;
}

.pay-choice-card:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.pay-choice-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-2);
  border-radius: 0 var(--radius-lg) 0 var(--radius-md);
}

.pay-choice-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto;
}

.pay-choice-icon::before {
  width: 2.5rem;
  height: 2.5rem;
}

.pay-choice-label {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
}

.pay-choice-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  max-width: 200px;
}

.pay-choice-note {
  font-size: var(--font-size-xs, 0.75rem);
  color: #b45309;
  background: #fef3c7;
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  margin-top: var(--space-1);
  font-weight: 600;
}

/* ── Print preview section ────────────────────────────────────────────────── */
.preview-section-upload {
  margin-top: 0;
}
/* .preview-section {
  margin-bottom: var(--space-6);
} */


/* Floating overlay variant (only when not embedded in preview toolbar) */
.preview-paper-size-control:not(.preview-paper-size-control--chrome) {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 4;
  display: grid;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  padding: var(--space-2);
  border: 1px solid rgba(17, 29, 51, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(17, 29, 51, 0.14);
  backdrop-filter: blur(6px);
}

.preview-paper-size-control:not(.preview-paper-size-control--chrome) label {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--color-text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.preview-paper-size-control:not(.preview-paper-size-control--chrome) select {
  width: auto;
  min-width: 5.25rem;
  max-width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm, 6px);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 700;
  padding: 4px 26px 4px 8px;
}

/* Embedded in preview toolbar — flat, no overlay card */
.preview-paper-size-control.preview-paper-size-control--chrome {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  width: auto;
  max-width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.preview-paper-size-control.preview-paper-size-control--chrome label {
  margin: 0;
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.preview-paper-size-control.preview-paper-size-control--chrome select {
  min-width: 6.5rem;
  padding: var(--space-2) var(--space-3);
  padding-right: 1.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--font-size-sm);
  font-weight: 600;
  box-shadow: none;
}


/* Fit / Fill toggle button group */
.scale-toggle {
  display: flex;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.scale-btn {
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: none;
  border-right: 1px solid var(--color-border);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  transition: background .15s, color .15s;
  line-height: 1.4;
}

.scale-btn:last-child { border-right: none; }
.scale-btn:hover { background: var(--color-bg); }
.scale-btn.active {
  background: var(--color-primary);
  color: #fff;
}

/* Rotation button group */
.rotate-controls {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.rotate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--color-text);
  transition: background .15s;
}

.rotate-btn:hover { background: var(--color-bg); }

.rotate-label {
  font-size: var(--font-size-xs, 0.7rem);
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 28px;
  text-align: center;
  padding: 0 var(--space-1);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

/* Grey stage area that holds the paper */
.preview-viewport {
  background: #d1d5db;
  border-radius: var(--radius-md);
  min-height: 260px;
  overflow: hidden;
  position: relative;
  touch-action: pinch-zoom;
}

/* Default: document centered; page select docked bottom-center */
.preview-viewport:not(.preview-viewport--zoomed) {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: max-content minmax(200px, auto) max-content;
  gap: var(--space-2);
  padding: var(--space-2);
  align-items: center;
}

.preview-viewport:not(.preview-viewport--zoomed) .preview-rotate-bar {
  position: static;
  transform: none;
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  z-index: 4;
  pointer-events: auto;
}

.preview-viewport:not(.preview-viewport--zoomed) .preview-zoom-stage {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  justify-self: center;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  z-index: 1;
  isolation: isolate;
}

.preview-viewport:not(.preview-viewport--zoomed) .preview-page-select {
  position: static;
  grid-column: 1;
  grid-row: 3;
  justify-self: center;
  align-self: end;
  width: var(--preview-paper-width, 100%);
  max-width: 100%;
  min-width: 0;
  z-index: 4;
}

.preview-viewport:not(.preview-viewport--zoomed) .preview-loading {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  align-self: center;
  justify-self: center;
}

/* Zoomed: the document stage scrolls and pans, while its controls remain docked. */
.preview-viewport.preview-viewport--zoomed {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: max-content minmax(200px, auto) max-content;
  gap: var(--space-2);
  padding: var(--space-2);
  align-items: center;
}

.preview-viewport.preview-viewport--zoomed .preview-rotate-bar {
  position: static;
  transform: none;
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  z-index: 4;
}

.preview-viewport.preview-viewport--zoomed .preview-page-select {
  position: static;
  transform: none;
  grid-column: 1;
  grid-row: 3;
  justify-self: center;
  align-self: end;
  width: var(--preview-paper-width, 100%);
  max-width: 100%;
  min-width: 0;
  z-index: 4;
}

.preview-viewport.preview-viewport--zoomed .preview-zoom-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  grid-column: 1;
  grid-row: 2;
  min-height: 200px;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

.preview-viewport.preview-viewport--zoomed .preview-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.preview-rotate-bar .rotate-controls {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(17, 29, 51, 0.14);
  backdrop-filter: blur(6px);
}

.preview-zoom-stage {
  position: relative;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
}

.preview-zoom-stage--pannable {
  cursor: grab;
}

.preview-zoom-stage--dragging {
  cursor: grabbing;
  user-select: none;
}

.preview-zoom-inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
}

/* Paper simulation — JS sets width/height based on paper size */
.preview-paper {
  position: relative;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.06);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

/* Canvas is always pre-scaled by JS (fit, fill, or actual, with rotation)
   and *centred* inside the paper frame for every mode — this matches the
   server's print pipeline (backend/app/services/printing.py::_bake_page),
   which composites the source page centred on a paper-sized PDF before
   sending to SumatraPDF. Keeping preview + print centred together is what
   makes the kiosk WYSIWYG.
   Fill mode clips overflow via overflow:hidden on .preview-paper. */
#previewCanvas {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 0.125 in margin guide overlay — JS sets insets dynamically per paper size */
.preview-margin-guide {
  position: absolute;
  pointer-events: none;
  border: 1px dashed rgba(59, 130, 246, 0.45);
  border-radius: 1px;
  z-index: 3;
  /* inset is set inline by JS */
}

/* Loading state */
.preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  padding: var(--space-6);
  width: 100%;
}

/* Page navigation row — match preview toolbar scale-btn sizing */
.preview-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.preview-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 31px;
  padding: 0 0.55rem;
  font-size: inherit;
  line-height: 1.25;
  font-weight: 600;
  border-width: 1px;
}

.preview-nav-indicator {
  font-size: var(--font-size-sm);
  line-height: 1.25;
  color: var(--color-text-muted);
  min-width: 90px;
  text-align: center;
}

/* ── Upload activity (progress + file list) ─────────────────────────────── */

.upload-activity-section {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(26, 42, 74, 0.03);
}

.upload-activity-title {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--color-primary);
}

.upload-activity-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.upload-activity-progress-text {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

.upload-activity-progress-bar {
  position: relative;
  height: 8px;
  border-radius: 9999px;
  background: var(--color-border);
  overflow: hidden;
}

.upload-activity-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: var(--color-primary);
  transition: width 0.15s ease-out;
}

.upload-activity-progress-bar--indeterminate .upload-activity-progress-fill {
  width: 40%;
  transition: none;
  animation: conversion-sweep 1.1s ease-in-out infinite;
}

.upload-activity-section--uploading .uploaded-files-list:not(:empty) {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* ── Uploaded files list (Step 1) ────────────────────────────────────────── */

.uploaded-files-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.uploaded-file-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
}

.uploaded-file-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.uploaded-file-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

.uploaded-file-icon::before {
  width: 1.125rem;
  height: 1.125rem;
}

/* ── Conversion step (shown below non-PDF uploads) ───────────────────────── */

.conversion-step {
  margin-top: 2px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.conversion-step-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.conversion-step-icon {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
}

.conversion-step-icon::before {
  width: 1rem;
  height: 1rem;
}

.conversion-step-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.conversion-step-title {
  font-weight: 600;
  font-size: var(--font-size-xs);
}

.conversion-step-detail {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.conversion-step--done {
  border-color: var(--color-success, #2e7d32);
  background: color-mix(in srgb, var(--color-success, #2e7d32) 8%, var(--color-surface));
}

.conversion-step--failed {
  border-color: var(--color-error);
  background: color-mix(in srgb, var(--color-error) 8%, var(--color-surface));
}

.conversion-step--failed .conversion-step-detail {
  color: var(--color-error);
}

.conversion-bar {
  position: relative;
  margin-top: var(--space-2);
  height: 5px;
  border-radius: 9999px;
  background: var(--color-border);
  overflow: hidden;
}

/* Queued: gentle full-width pulse while waiting for the shop PC to claim it. */
.conversion-bar--queued {
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  opacity: .45;
  animation: conversion-pulse 1.4s ease-in-out infinite;
}

/* Processing: indeterminate sweep while the shop PC converts the file. */
.conversion-bar--active {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  border-radius: 9999px;
  background: var(--color-accent);
  animation: conversion-sweep 1.1s ease-in-out infinite;
}

@keyframes conversion-pulse {
  0%, 100% { opacity: .25; }
  50%      { opacity: .65; }
}

@keyframes conversion-sweep {
  0%   { left: -40%; }
  100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .conversion-bar--queued,
  .conversion-bar--active { animation: none; opacity: .5; }
}

.uploaded-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.uploaded-file-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uploaded-file-meta {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.uploaded-file-remove {
  flex-shrink: 0;
  color: var(--color-error);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

/* ── Inline estimate panel (inside sidebar) ──────────────────────────────── */

.estimate-panel-inline {
  margin-top: 0;
}

/* ── File progress strip (Step 2 bottom) ─────────────────────────────────── */

.file-progress-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
}

.file-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full, 9999px);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: default;
  max-width: min(100%, 320px);
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
  white-space: normal;
  transition: background .15s, border-color .15s, color .15s;
}

.file-pill-current {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-primary);
}

.file-pill-done {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
}

.file-pill-done:hover {
  opacity: .85;
}

/* ── Item status list (Success panel) ────────────────────────────────────── */

.item-status-list {
  margin-top: var(--space-5);
  text-align: left;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: var(--font-size-sm);
}

.item-status-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.item-status-row:last-child {
  border-bottom: none;
}

.item-status-icon {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
}

.item-status-icon::before {
  width: 1rem;
  height: 1rem;
}

.item-status-filename {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-status-badge {
  flex-shrink: 0;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm, 4px);
}

.item-status-pending  { background: var(--color-bg); color: var(--color-text-muted); }
.item-status-printing { background: #fef3c7; color: #92400e; }
.item-status-done     { background: #d1fae5; color: #065f46; }
.item-status-failed   { background: #fee2e2; color: #991b1b; }

.item-status-error {
  grid-column: 1 / -1;
  font-size: var(--font-size-xs);
  color: var(--color-error);
  padding-top: var(--space-1);
}

@media (max-width: 520px) {
  .preview-toolbar-controls {
    gap: var(--space-1);
  }

  .preview-paper-size-bar .scale-btn,
  .preview-scale-modes-bar .scale-btn,
  .preview-rotate-bar .rotate-btn {
    min-height: 30px;
    padding: 0.3rem 0.25rem;
    font-size: 0.6875rem;
  }

  .preview-nav-btn {
    height: 30px;
    min-height: 30px;
    padding: 0 0.25rem;
    font-size: 0.6875rem;
  }

  .preview-rotate-bar .rotate-btn {
    min-width: 30px;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .preview-paper-size-bar,
  .preview-scale-modes-bar {
    flex: 1 1 0;
    min-width: 0;
  }

  .preview-paper-size-bar .scale-toggle,
  .preview-scale-modes-bar .scale-toggle {
    width: 100%;
  }

  .preview-scale-bar {
    margin-left: 0;
    width: 100%;
  }

  .preview-viewport:not(.preview-viewport--zoomed) .preview-page-select {
    width: var(--preview-paper-width, 100%);
    max-width: 100%;
  }

  .preview-viewport.preview-viewport--zoomed {
    padding: var(--space-2);
    min-height: 220px;
  }

  .preview-viewport.preview-viewport--zoomed .preview-page-select {
    width: var(--preview-paper-width, 100%);
    max-width: 100%;
  }
}

/* ── Saved card section in payChoicePanel ───────────────────────────────── */
.saved-card-section {
  margin-bottom: var(--space-5);
}

.saved-card-section-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  margin: 0 0 var(--space-3);
  color: var(--color-text);
}

.saved-card-section-alt {
  margin: var(--space-3) 0 0;
}

.saved-card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.saved-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  gap: var(--space-3);
}

.saved-card-row--selectable {
  justify-content: flex-start;
  cursor: pointer;
}

.saved-card-row--selectable:has(input:checked),
.phone-pay-card-option:has(input:checked) {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(26, 42, 74, 0.12);
}

.saved-card-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.saved-card-brand {
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.saved-card-details {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* ── Save-card modal: ensure Stripe iframes are not clipped ─────────────── */
#saveCardModal .auth-modal-dialog {
  overflow: visible;
}

/* ── Save-card checkbox in phone pay form ───────────────────────────────── */
.save-card-checkbox-wrap {
  margin: var(--space-3) 0;
}

/* ── Shop closed page (design contest shell) ─────────────────────────────── */
.shop-closed-panel {
  max-width: 640px;
  margin-inline: auto;
}

.shop-closed-hero {
  min-height: 160px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface-muted, #f3f4f6);
}

.shop-closed-title {
  margin: 0 0 var(--space-3);
}

.shop-closed-lead {
  margin: 0 0 var(--space-4);
}

.shop-closed-hours {
  margin-bottom: var(--space-4);
}

.shop-closed-hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shop-closed-hours-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.shop-closed-hours-list li:last-child {
  border-bottom: none;
}

.shop-closed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.scale-btn.is-converting::after {
  content: '…';
  margin-left: .25rem;
  font-weight: 700;
}

.scale-btn.is-failed {
  color: #a4262c;
  border-color: #a4262c;
}

.paper-size-conversion-status {
  min-height: 1.25rem;
  margin: .35rem 0 0;
  font-size: .85rem;
  color: var(--text-muted, #5f6368);
}
.paper-variant-badge {
  display: block;
  font-size: .67rem;
  line-height: 1.1;
  opacity: .78;
}

.scale-btn.is-converting .paper-variant-badge::before {
  content: '';
  display: inline-block;
  width: .65em;
  height: .65em;
  margin-right: .28em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: paper-variant-spin .8s linear infinite;
}

.scale-btn.is-failed .paper-variant-badge { color: var(--color-danger, #b42318); }
@keyframes paper-variant-spin { to { transform: rotate(360deg); } }
