/* ==========================================================================
   遇幸福・喜帖製作資料表單 — Stylesheet (order-form.css)
   ========================================================================== */

[hidden] {
  display: none !important;
}

.order-page-main {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(4rem, 7vw, 6.5rem);
  background: linear-gradient(180deg, #FAF6F2 0%, #FDFBF9 38%, #FAF7F3 100%);
  overflow-x: clip;
  min-height: calc(100vh - 160px);
}

.order-deco-left {
  top: -40px;
  left: -120px;
  width: clamp(220px, 26vw, 420px);
  opacity: 0.55;
  pointer-events: none;
}

.order-deco-right {
  top: 260px;
  right: -130px;
  width: clamp(220px, 25vw, 400px);
  opacity: 0.5;
  pointer-events: none;
}

.order-container {
  position: relative;
  z-index: 2;
  max-width: 920px;
}

/* Header & Stepper */
.order-hero-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.order-main-title {
  font-family: var(--font-serif, 'Noto Serif TC', serif);
  font-size: clamp(1.85rem, 3.6vw, 2.65rem);
  font-weight: 700;
  color: var(--text-heading, #221A17);
  letter-spacing: 0.04em;
  margin: 0.4rem 0 0.85rem;
}

.order-main-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--text-body, #665850);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.75;
}

/* Sticky Top Progress Bar (Desktop Timeline & Mobile Compact Bar) */
.order-wizard-sticky-wrap {
  position: relative;
  z-index: 92;
  margin-bottom: 1.65rem;
}

.order-wizard-progress {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(155, 123, 107, 0.24);
  border-radius: 20px;
  padding: 1.2rem 1.65rem 1.3rem;
  box-shadow: 0 10px 28px rgba(110, 74, 58, 0.05);
  transition: box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.order-wizard-progress.is-pinned {
  position: fixed;
  top: calc(var(--header-height, 74px) + 8px);
  z-index: 95;
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(134, 93, 76, 0.34);
  box-shadow: 0 14px 34px rgba(82, 54, 40, 0.13);
}

/* Desktop Timeline Stepper (> 768px) */
.order-steps-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  gap: 0;
}

.order-step-pill {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.2s ease;
}

.order-step-pill:last-child {
  flex: 0 0 auto;
}

.step-top-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.58rem;
  padding-right: 0.45rem;
  white-space: nowrap;
}

.step-num-code {
  font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
  font-size: 1.14rem;
  font-weight: 800;
  color: #B4A69E;
  letter-spacing: -0.01em;
  line-height: 1;
  transition: color 0.22s ease;
}

.step-title-text {
  font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: #B4A69E;
  line-height: 1.2;
  transition: color 0.22s ease;
}

.order-step-pill.is-completed .step-num-code,
.order-step-pill.is-active .step-num-code {
  color: #221A17;
}

.order-step-pill.is-completed .step-title-text,
.order-step-pill.is-active .step-title-text {
  color: #5A4D45;
}

.order-step-pill:hover .step-num-code,
.order-step-pill:hover .step-title-text {
  color: var(--brown-primary, #865D4C);
}

.step-track-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.step-node-circle {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #FFFFFF;
  border: 1.5px solid #DED2C8;
  color: #FFFFFF;
  transition: all 0.24s ease;
}

.node-check-icon {
  width: 8px;
  height: 8px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.node-mobile-num {
  display: none;
}

.order-step-pill.is-completed .step-node-circle {
  background: var(--brown-primary, #865D4C);
  border-color: var(--brown-primary, #865D4C);
  color: #FFFFFF;
}

.order-step-pill.is-completed .node-check-icon {
  opacity: 1;
  transform: scale(1);
}

.order-step-pill.is-active .step-node-circle {
  background: #FFFFFF;
  border: 2px solid var(--brown-primary, #865D4C);
  box-shadow: 0 0 0 2px rgba(134, 93, 76, 0.14);
}

.step-connector-line {
  flex: 1;
  height: 0;
  border-top: 2px solid #E4D8CF;
  margin: 0 0.55rem;
  transition: border-color 0.25s ease;
}

.order-step-pill:last-child .step-connector-line {
  display: none;
}

.order-step-pill.is-completed .step-connector-line {
  border-top: 2.5px solid var(--brown-primary, #865D4C);
}

.order-step-pill.is-prev-of-active .step-connector-line {
  border-top: 2.5px dashed var(--brown-primary, #865D4C);
}

/* Mobile bottom progress line (hidden on desktop) */
.wizard-progress-track {
  display: none;
}

/* Main Card */
.order-form-card {
  background: #FFFFFF;
  border: 1.5px solid rgba(155, 123, 107, 0.28);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  box-shadow: 0 18px 48px rgba(110, 74, 58, 0.07);
  min-width: 0;
}

@keyframes stepSectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section {
  padding-bottom: 1.25rem;
  margin-bottom: 0.5rem;
  border-bottom: none;
  scroll-margin-top: 100px;
  min-width: 0;
  animation: stepSectionFadeIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-section-header {
  margin-bottom: 1.65rem;
}

.form-section-title {
  font-family: var(--font-serif, 'Noto Serif TC', 'PMingLiU', serif);
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
  font-weight: 700;
  color: var(--text-heading, #221A17);
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
}

.form-section-desc {
  font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
  font-size: 0.94rem;
  color: var(--text-body, #665850);
  line-height: 1.65;
  letter-spacing: 0.02em;
}

.req {
  color: #C85A53;
  font-weight: 700;
  margin-left: 2px;
}

.opt-tag {
  display: inline-block;
  font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
  font-size: 0.75rem;
  font-weight: 500;
  color: #8C7365;
  background: #F6EFEA;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Grid & Inputs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem 1.5rem;
}

.form-col-full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-family: var(--font-serif, 'Noto Serif TC', 'PMingLiU', serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading, #221A17);
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.82rem 1rem;
  font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
  font-size: 0.96rem;
  color: #221A17;
  background: #FCF9F7;
  border: 1.5px solid #DFD3CA;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #A5968C;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--brown-primary, #865D4C);
  box-shadow: 0 0 0 3.5px rgba(134, 93, 76, 0.14);
}

.form-input.is-invalid,
.form-textarea.is-invalid {
  border-color: #C85A53;
  background: #FFF9F8;
}

.field-hint {
  font-size: 0.8rem;
  color: #8C7A70;
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* Photo Upload Dropzones */
.upload-block {
  margin-bottom: 1.85rem;
}

.upload-block:last-child {
  margin-bottom: 0;
}

.upload-label-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.upload-title {
  font-family: var(--font-serif, 'Noto Serif TC', 'PMingLiU', serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading, #221A17);
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.upload-format-note {
  font-size: 0.84rem;
  color: #7D6D63;
}

.upload-format-note strong {
  color: var(--brown-primary, #865D4C);
}

.upload-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brown-primary, #865D4C);
  background: #F6EFEA;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

.dropzone {
  position: relative;
  border: 2px dashed #CBB7AA;
  border-radius: 16px;
  background: #FCF9F6;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--brown-primary, #865D4C);
  background: #F9F2EC;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: #F2E7DF;
  color: var(--brown-primary, #865D4C);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-icon svg {
  width: 24px;
  height: 24px;
}

.dropzone-primary-text {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-heading, #221A17);
  margin-bottom: 0.3rem;
}

.dropzone-sub-text {
  font-size: 0.84rem;
  color: #85756B;
}

/* Hero Photo Preview */
.hero-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-preview-img {
  max-height: 320px;
  width: auto;
  max-width: 100%;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(34, 26, 23, 0.12);
}

.hero-preview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: 520px;
  background: #FFFFFF;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid #E5D9D0;
}

.preview-file-info {
  font-size: 0.83rem;
  color: #5E5047;
  font-weight: 500;
}

.hero-preview-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-small-outline,
.btn-small-danger {
  padding: 0.38rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-small-outline {
  background: #FFFFFF;
  border: 1px solid #B89886;
  color: #6E4A3A;
}

.btn-small-outline:hover {
  background: #F6EFEA;
}

.btn-small-danger {
  background: #FFF5F5;
  border: 1px solid #E8B4B0;
  color: #B8443E;
}

.btn-small-danger:hover {
  background: #FFE8E6;
}

/* Gallery Previews Grid */
.gallery-previews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.gallery-thumb-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #F7F2EE;
  border: 1px solid #E2D5CC;
  aspect-ratio: 4 / 3;
}

.gallery-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  background: rgba(34, 26, 23, 0.72);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

.gallery-thumb-remove {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(190, 58, 50, 0.9);
  color: #FFFFFF;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-thumb-remove:hover {
  background: #A32921;
}

/* Template Choice Cards */
.style-selector-block {
  margin-bottom: 2rem;
  min-width: 0;
}

.template-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.15rem 1rem;
  margin-top: 0.75rem;
}

.template-choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}

.template-choice-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.template-choice-card:hover {
  transform: translateY(-5px);
}

.template-choice-card.is-selected {
  background: transparent;
  box-shadow: none;
}

.template-choice-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19;
  background: #1A1A1C;
  border-radius: 26px;
  padding: 7px;
  border: 2px solid #3A3735;
  box-shadow:
    0 14px 28px rgba(48, 34, 26, 0.14),
    0 4px 10px rgba(48, 34, 26, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.25s ease;
  overflow: visible;
}

.template-choice-card:hover .template-choice-thumb {
  border-color: #6B5B53;
}

.template-choice-card.is-selected .template-choice-thumb,
.template-choice-card:has(input[type="radio"]:checked) .template-choice-thumb {
  border-color: var(--brown-primary, #865D4C);
  box-shadow:
    0 0 0 3px var(--brown-primary, #865D4C),
    0 18px 36px rgba(134, 93, 76, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.template-choice-thumb .work-phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #FAF6F2;
}

.template-choice-thumb .work-phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.template-choice-card:hover .template-choice-thumb .work-phone-screen img {
  transform: scale(1.04);
}

.template-check-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brown-primary, #865D4C);
  color: #FFFFFF;
  font-size: 0.74rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(34, 26, 23, 0.32);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.template-choice-card.is-selected .template-check-mark,
.template-choice-card:has(input[type="radio"]:checked) .template-check-mark {
  opacity: 1;
  transform: scale(1);
}

.template-choice-body {
  padding: 0.65rem 0.2rem 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.template-choice-body .admin-tpl-caption-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.template-choice-body .work-card-title {
  font-family: var(--font-serif, 'Noto Serif TC', serif);
  font-size: 0.94rem;
  font-weight: 700;
  color: #2B211C;
  margin: 0;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.template-choice-card.is-selected .work-card-title,
.template-choice-card:has(input[type="radio"]:checked) .work-card-title {
  color: var(--brown-primary, #865D4C);
}

.template-choice-body .work-card-sub {
  font-size: 0.8rem;
  color: #7D6D63;
  margin: 0;
  line-height: 1.35;
}

.template-choice-body .tpl-standalone-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--brown-primary, #865D4C);
  background: #F3EBE4;
  font-size: 0.72rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.template-choice-body .tpl-standalone-link:hover {
  background: var(--brown-primary, #865D4C);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Music Options List */
.music-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.music-option-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid #E5D9D0;
  border-radius: 12px;
  background: #FCF9F7;
  cursor: pointer;
  transition: all 0.2s ease;
}

.music-option-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.music-option-item:hover {
  border-color: #B89886;
}

.music-option-item.is-selected {
  border-color: var(--brown-primary, #865D4C);
  background: #FDF7F2;
}

.music-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #C2B0A3;
  flex-shrink: 0;
}

.music-option-item.is-selected .music-radio-dot {
  border-color: var(--brown-primary, #865D4C);
  background: var(--brown-primary, #865D4C);
  box-shadow: inset 0 0 0 3px #FFFFFF;
}

.music-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.music-info strong {
  font-family: var(--font-serif, 'Noto Serif TC', 'PMingLiU', serif);
  font-size: 0.96rem;
  font-weight: 700;
  color: #221A17;
  letter-spacing: 0.02em;
}

.music-info span {
  font-size: 0.8rem;
  color: #7D6D63;
}

.btn-music-preview {
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--brown-primary, #865D4C);
  background: #FFFFFF;
  color: var(--brown-primary, #865D4C);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-music-preview:hover,
.btn-music-preview.is-playing {
  background: var(--brown-primary, #865D4C);
  color: #FFFFFF;
}

/* RSVP Mandatory & Optional Checkboxes */
.rsvp-mandatory-box {
  background: #FAF5F0;
  border: 1px solid #E6D8CE;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.rsvp-sub-heading {
  font-family: var(--font-serif, 'Noto Serif TC', 'PMingLiU', serif);
  font-size: 1rem;
  font-weight: 700;
  color: #221A17;
  letter-spacing: 0.03em;
  margin-bottom: 0.65rem;
}

.rsvp-sub-heading small {
  font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
  font-weight: 400;
  color: #7D6D63;
  font-size: 0.84rem;
}

.mandatory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.mandatory-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  background: #FFFFFF;
  border: 1px solid #D9C8BC;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #5C473B;
}

.checkbox-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid #E5D9D0;
  border-radius: 12px;
  background: #FCF9F7;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brown-primary, #865D4C);
  margin: 0;
  cursor: pointer;
}

.checkbox-card.is-checked {
  border-color: var(--brown-primary, #865D4C);
  background: #FDF7F2;
}

.checkbox-text {
  font-size: 0.93rem;
  font-weight: 600;
  color: #221A17;
}

/* Alert Banner & Step Navigation */
.dropzone.is-invalid {
  border-color: #C85A53;
  background: #FFF7F6;
}

.form-alert-banner {
  padding: 0.95rem 1.2rem;
  border-radius: 12px;
  background: #FFF3F2;
  border: 1px solid #E8B4B0;
  color: #B43C35;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.form-step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px dashed rgba(155, 123, 107, 0.32);
  flex-wrap: wrap;
}

.step-nav-spacer {
  display: none;
}

.step-page-indicator {
  font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
  font-size: 0.88rem;
  font-weight: 500;
  color: #8C7A70;
  margin: 0 auto;
}

.btn-step-prev {
  padding: 0.88rem 1.45rem;
  font-size: 0.96rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-step-next,
.btn-submit-order {
  padding: 0.92rem 2rem;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.btn-submit-order {
  min-width: 250px;
}

.btn-submit-order:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Success Card */
.order-success-card {
  background: #FFFFFF;
  border: 2px solid var(--brown-primary, #865D4C);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  box-shadow: 0 20px 50px rgba(134, 93, 76, 0.12);
}

.success-icon-circle {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: #F4EAE3;
  color: var(--brown-primary, #865D4C);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon-circle svg {
  width: 34px;
  height: 34px;
}

.success-title {
  font-family: var(--font-serif, 'Noto Serif TC', 'PMingLiU', serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: #221A17;
  margin: 0.35rem 0 0.85rem;
}

.success-desc {
  font-size: 0.98rem;
  color: #5E5047;
  line-height: 1.8;
  margin-bottom: 1.85rem;
}

.order-receipt-box {
  background: #FCF9F6;
  border: 1px solid #E5D9D0;
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 640px;
  margin: 0 auto 1.85rem;
  text-align: left;
}

.receipt-id-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px dashed #DFD3CA;
}

.receipt-label {
  font-size: 0.88rem;
  color: #7D6D63;
  font-weight: 500;
}

.receipt-id-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.receipt-id-code {
  font-family: var(--font-serif, 'Noto Serif TC', 'PMingLiU', serif);
  font-size: 1.15rem;
  color: var(--brown-primary, #865D4C);
  letter-spacing: 0.04em;
}

.btn-copy-id {
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #C8B5A6;
  background: #FFFFFF;
  color: #5C473B;
  cursor: pointer;
}

.btn-copy-id:hover {
  background: #F4EAE3;
}

.receipt-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.receipt-item strong {
  color: #7D6D63;
  font-weight: 500;
  display: block;
  font-size: 0.8rem;
}

.receipt-item span {
  color: #221A17;
  font-weight: 600;
}

.success-next-steps p {
  font-size: 0.94rem;
  color: #5E5047;
  margin-bottom: 1.35rem;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

@media (max-width: 820px) {
  .template-cards-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.95rem;
    padding: 6px 4px 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #CBB7AA transparent;
  }

  .template-cards-grid::-webkit-scrollbar {
    height: 6px;
  }

  .template-cards-grid::-webkit-scrollbar-thumb {
    background: #CBB7AA;
    border-radius: 999px;
  }

  .template-choice-card {
    flex: 0 0 calc((100% - 0.95rem) / 2);
    max-width: 190px;
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  .form-grid,
  .receipt-details-grid {
    grid-template-columns: 1fr;
  }

  .music-option-item {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
  }

  .music-info {
    min-width: 0;
    flex: 1;
  }

  .btn-music-preview {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: auto;
    padding: 0.38rem 0.8rem;
  }

  .order-stack-card {
    grid-template-columns: 1fr;
  }
}

/* Schedule & Story Stack Cards */
.order-stack-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.order-stack-card {
  position: relative;
  background: #FAF7F4;
  border: 1.5px solid #E5D9D0;
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.85rem 1.15rem;
  transition: border-color 0.2s ease;
}

.order-story-card {
  padding-top: 2.3rem;
}

.order-stack-card:hover {
  border-color: #CBB7AA;
}

.order-stack-full {
  grid-column: 1 / -1;
}

.form-label-sm {
  font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  color: #6B5C53;
  margin-bottom: 0.35rem;
}

.order-story-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.remove-story-toggle-card {
  flex: 1 1 240px;
  background: #FAF6F3;
  border-color: #DFD2C8;
}

.btn-order-add-story {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.2rem;
  border-radius: 12px;
  border: 1.5px solid #865D4C;
  background: #FFFFFF;
  color: #865D4C;
  font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-order-add-story:hover {
  background: #865D4C;
  color: #FFFFFF;
}

.btn-order-story-del {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #EBC5C5;
  background: #FFF5F5;
  color: #B93838;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-order-story-del:hover {
  background: #FEE2E2;
  border-color: #DC2626;
  color: #991B1B;
}

/* Mobile & Compact Tablet Stepper (<= 780px) */
@media (max-width: 780px) {
  .order-wizard-sticky-wrap {
    margin-bottom: 1.25rem;
  }

  .order-wizard-progress {
    padding: 0.78rem 1rem 0;
    border-radius: 16px;
    overflow: hidden;
  }

  .order-wizard-progress.is-pinned {
    top: calc(var(--header-height, 64px) + 6px);
  }

  .order-steps-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    padding-bottom: 0.75rem;
    overflow: visible;
  }

  .order-step-pill {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.48rem;
    padding: 0;
  }

  /* Active step pushes all subsequent upcoming circles to the right */
  .order-step-pill.is-active {
    margin-right: auto;
  }

  .step-track-row {
    order: 1;
    width: auto;
  }

  .step-top-label {
    order: 2;
    display: none;
    margin: 0;
    padding: 0;
  }

  .order-step-pill.is-active .step-top-label {
    display: inline-flex;
    align-items: center;
  }

  .step-num-code,
  .step-connector-line {
    display: none !important;
  }

  .order-step-pill.is-active .step-title-text {
    font-size: 0.94rem;
    font-weight: 600;
    color: #221A17;
  }

  .step-node-circle {
    width: 14px;
    height: 14px;
  }

  /* Mobile Completed Circle: Solid fill + Checkmark */
  .order-step-pill.is-completed .step-node-circle {
    background: var(--brown-primary, #865D4C);
    border: 1px solid var(--brown-primary, #865D4C);
    color: #FFFFFF;
    box-shadow: none;
  }

  .order-step-pill.is-completed .node-check-icon {
    display: block;
    width: 8px;
    height: 8px;
    opacity: 1;
    transform: scale(1);
  }

  .order-step-pill.is-completed .node-mobile-num {
    display: none;
  }

  /* Mobile Active Circle: Solid fill + Step Number */
  .order-step-pill.is-active .step-node-circle {
    background: var(--brown-primary, #865D4C);
    border: 1px solid var(--brown-primary, #865D4C);
    color: #FFFFFF;
    box-shadow: 0 2px 5px rgba(134, 93, 76, 0.24);
  }

  .order-step-pill.is-active .node-check-icon {
    display: none;
  }

  .order-step-pill.is-active .node-mobile-num {
    display: inline;
    font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
    font-size: 0.56rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1;
  }

  /* Mobile Upcoming Circle: White pill + Muted Step Number */
  .order-step-pill.is-upcoming .step-node-circle {
    background: #FFFFFF;
    border: 1px solid #EAE0D8;
    color: #8C7F77;
    box-shadow: 0 1px 3px rgba(110, 74, 58, 0.08);
  }

  .order-step-pill.is-upcoming .node-check-icon {
    display: none;
  }

  .order-step-pill.is-upcoming .node-mobile-num {
    display: inline;
    font-family: var(--font-sans, 'Noto Sans TC', sans-serif);
    font-size: 0.56rem;
    font-weight: 600;
    color: #8C7F77;
    line-height: 1;
  }

  /* Bottom thin progress bar line on mobile */
  .wizard-progress-track {
    display: block;
    width: calc(100% + 2rem);
    height: 3.5px;
    margin: 0 -1rem;
    background: #EAE0D8;
    border-radius: 0;
    overflow: hidden;
  }

  .wizard-progress-fill {
    height: 100%;
    background: var(--brown-primary, #865D4C);
    border-radius: 0;
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

@media (max-width: 640px) {
  .hide-on-mobile {
    display: none;
  }

  .order-stack-card {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .order-story-card {
    padding-top: 2.3rem;
  }

  .btn-order-add-story {
    width: 100%;
  }

  .form-step-nav {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
  }

  .step-page-indicator {
    display: none;
  }

  .btn-step-prev {
    padding: 0.82rem 1.15rem;
    font-size: 0.9rem;
  }

  .btn-step-next,
  .btn-submit-order {
    grid-column: -2 / -1;
    width: 100%;
    min-width: 0;
    padding: 0.88rem 1.25rem;
    font-size: 0.94rem;
  }

  .form-step-nav.is-step-first {
    grid-template-columns: 1fr;
  }

  .form-step-nav.is-step-first .btn-step-next {
    grid-column: 1 / -1;
  }
}
