:root {
  --line-green: #06c755;
  --merchant-primary: #315846;
  --merchant-accent: #dcebe4;
  --ink: #161918;
  --muted: #69706d;
  --page: #ffffff;
  --surface: #f7f8f7;
  --surface-strong: #eef1ef;
  --border: #dfe3e1;
  --danger: #a33030;
  --shadow: 0 16px 40px rgba(23, 32, 28, 0.1);
  --radius-small: 10px;
  --radius-medium: 16px;
  --radius-large: 24px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: "Noto Sans Thai", "Leelawadee UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--merchant-primary) 28%, transparent);
  outline-offset: 2px;
}

.app-view h1:focus,
.consent-confirmation:focus {
  outline: 3px solid color-mix(in srgb, var(--merchant-primary) 28%, transparent);
  outline-offset: 3px;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

[hidden] {
  display: none !important;
}

.experience-shell {
  min-height: 100vh;
  margin: 0 auto;
  max-width: 620px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  position: relative;
}

.experience-shell::before {
  background: var(--merchant-primary);
  content: "";
  display: block;
  height: 5px;
  inset: 0 0 auto;
  position: fixed;
  z-index: 30;
}

.app-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  background: var(--merchant-primary);
  border: 5px solid var(--merchant-accent);
  border-radius: 50%;
  flex: 0 0 auto;
  height: 38px;
  width: 38px;
}

.merchant-name,
.branch-context,
.app-view p,
.confirmation-kicker {
  margin: 0;
}

.merchant-name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branch-context {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.liff-status {
  color: #047437;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.header-actions {
  align-items: end;
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  justify-items: end;
}

.profile-button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--merchant-primary);
  font-size: 0.72rem;
  font-weight: 800;
  min-height: 44px;
  padding: 0 11px;
}

.profile-button[data-state="suspended"] {
  background: #fff8e8;
  border-color: #ead39d;
  color: #765b22;
}

.message-bar {
  background: var(--merchant-accent);
  border-bottom: 1px solid color-mix(in srgb, var(--merchant-primary) 20%, var(--border));
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 20px;
  position: sticky;
  top: 72px;
  z-index: 18;
}

.message-bar[data-tone="error"] {
  background: #fff0f0;
  color: var(--danger);
}

.view-stack {
  min-height: calc(100vh - 78px);
}

.app-view {
  animation: view-in 180ms ease-out;
  padding: 28px 20px 112px;
}

.app-view h1,
.app-view h2,
.app-view h3,
.app-view strong {
  margin: 0;
}

.app-view h1 {
  font-size: clamp(1.55rem, 7vw, 2.1rem);
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.app-view h2 {
  font-size: 1.05rem;
  line-height: 1.35;
}

.app-view p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.bootstrap-view,
.payment-view,
.confirmation-view {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 100px);
  text-align: center;
}

.bootstrap-view {
  gap: 12px;
}

.loading-mark {
  animation: pulse 1s ease-in-out infinite alternate;
  background: var(--merchant-primary);
  border: 12px solid var(--merchant-accent);
  border-radius: 50%;
  height: 74px;
  margin-bottom: 14px;
  width: 74px;
}

.intro-copy {
  display: grid;
  gap: 10px;
  margin: 28px 0 30px;
}

.section-heading,
.configurator-heading {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading > div,
.configurator-heading > div {
  display: grid;
  gap: 5px;
}

.form-field {
  color: var(--ink);
  display: grid;
  font-size: 0.84rem;
  font-weight: 750;
  gap: 8px;
  margin: 18px 0;
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  color: var(--ink);
  font-size: 1rem;
  min-height: 48px;
  padding: 12px 14px;
  resize: vertical;
  width: 100%;
}

.form-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--merchant-primary) 50%),
    linear-gradient(135deg, var(--merchant-primary) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 38px;
}

.compact-field {
  max-width: 110px;
}

.primary-button,
.secondary-button,
.cart-button {
  align-items: center;
  border: 0;
  border-radius: var(--radius-small);
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 800;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
}

.primary-button {
  background: var(--merchant-primary);
  color: #fff;
}

.secondary-button {
  background: var(--merchant-accent);
  color: color-mix(in srgb, var(--merchant-primary) 78%, #111);
}

.secondary-button.danger {
  background: #fff0f0;
  color: var(--danger);
}

.secondary-button.compact {
  font-size: 0.78rem;
  min-height: 44px;
  padding: 0 12px;
}

.text-button {
  background: none;
  border: 0;
  color: var(--merchant-primary);
  font-size: 0.84rem;
  font-weight: 800;
  min-height: 44px;
  padding: 0;
}

.back-link {
  margin-bottom: 16px;
}

.stacked-actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  width: 100%;
}

.branch-list,
.product-list,
.cart-list,
.configuration-groups {
  display: grid;
}

.branch-row,
.product-row,
.cart-row {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  display: grid;
  gap: 4px;
  padding: 17px 2px;
  text-align: left;
  width: 100%;
}

.branch-row {
  grid-template-columns: 1fr auto;
}

.branch-row[aria-pressed="true"] {
  border-bottom-color: var(--merchant-primary);
  color: var(--merchant-primary);
}

.branch-row strong,
.product-row strong,
.cart-row strong {
  font-size: 1rem;
  line-height: 1.4;
}

.branch-row span,
.product-row span,
.cart-row span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.category-rail {
  display: flex;
  gap: 8px;
  margin: -2px -20px 14px;
  overflow-x: auto;
  padding: 2px 20px 12px;
  scrollbar-width: none;
}

.category-rail::-webkit-scrollbar {
  display: none;
}

.category-button {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 750;
  min-height: 38px;
  padding: 0 14px;
}

.category-button[aria-current="true"] {
  background: var(--merchant-primary);
  border-color: var(--merchant-primary);
  color: #fff;
}

.product-row {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 20px 2px;
}

.product-copy {
  display: grid;
  gap: 6px;
}

.product-price,
.price {
  color: var(--merchant-primary);
  font-size: 0.95rem;
  font-weight: 850;
}

.cart-button {
  background: var(--surface);
  color: var(--merchant-primary);
  min-height: 40px;
  padding: 0 12px;
}

.cart-button span {
  background: var(--merchant-primary);
  border-radius: 50%;
  color: #fff;
  display: grid;
  font-size: 0.7rem;
  height: 22px;
  margin-left: 7px;
  min-width: 22px;
  place-items: center;
}

.option-group {
  border-bottom: 1px solid var(--border);
  padding: 18px 0 20px;
}

.option-group-heading {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.option-group-heading span {
  color: var(--muted);
  font-size: 0.75rem;
}

.option-list {
  display: grid;
  gap: 9px;
}

.option-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  min-height: 50px;
  padding: 10px 13px;
  text-align: left;
}

.option-row[aria-pressed="true"] {
  background: var(--merchant-accent);
  border-color: var(--merchant-primary);
}

.option-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.quantity-control {
  align-items: center;
  display: flex;
  gap: 8px;
}

.quantity-control button {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--merchant-primary);
  font-size: 1rem;
  font-weight: 850;
  height: 32px;
  padding: 0;
  width: 32px;
}

.field-errors {
  color: var(--danger);
  display: grid;
  font-size: 0.8rem;
  gap: 5px;
  margin-top: 12px;
}

.configuration-notes {
  display: grid;
  gap: 0 16px;
  grid-template-columns: 100px 1fr;
}

.cart-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.cart-row-copy {
  display: grid;
  gap: 4px;
}

.remove-button {
  align-self: center;
  background: none;
  border: 0;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 750;
}

.cart-total-row,
.payment-total {
  align-items: center;
  border-top: 2px solid var(--ink);
  display: flex;
  font-size: 1rem;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 18px;
}

.cart-total-row strong,
.payment-total strong {
  font-size: 1.25rem;
}

.checkout-summary {
  background: var(--surface);
  border-radius: var(--radius-medium);
  display: grid;
  gap: 8px;
  padding: 16px;
}

.checkout-summary-row {
  display: flex;
  font-size: 0.86rem;
  gap: 12px;
  justify-content: space-between;
}

.pickup-checkout-card,
.payment-pickup-summary,
.order-pickup-promise,
.order-timeline-panel,
.cancellation-notice {
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  margin-top: 18px;
  padding: 16px;
  text-align: left;
  width: 100%;
}

.pickup-checkout-card {
  background: color-mix(in srgb, var(--merchant-accent) 22%, var(--page));
}

.pickup-card-heading,
.timeline-heading {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.pickup-card-heading > div {
  display: grid;
  gap: 3px;
}

.pickup-card-kicker,
.pickup-time-zone,
.timeline-heading span {
  color: var(--merchant-primary);
  font-size: 0.72rem;
  font-weight: 850;
}

.pickup-time-zone {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
}

.pickup-policy-help {
  font-size: 0.78rem !important;
  margin-top: -7px !important;
}

.pickup-select-button {
  width: 100%;
}

.pickup-promise {
  background: var(--page);
  border-left: 4px solid var(--merchant-primary);
  border-radius: var(--radius-small);
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 13px 14px;
}

.pickup-promise span,
.payment-pickup-summary span,
.order-pickup-promise span {
  color: var(--muted);
  font-size: 0.75rem;
}

.pickup-promise strong,
.payment-pickup-summary strong,
.order-pickup-promise strong {
  font-size: 0.95rem;
  line-height: 1.45;
}

.payment-pickup-summary,
.order-pickup-promise {
  background: var(--surface);
  display: grid;
  gap: 4px;
  max-width: 360px;
}

.cancellation-notice {
  background: #fff4f0;
  border-color: #efc8b9;
  color: #763626;
  display: grid;
  gap: 5px;
}

.cancellation-notice strong {
  font-size: 0.92rem;
}

.cancellation-notice p {
  color: #763626;
  font-size: 0.8rem;
}

.order-timeline-panel {
  background: var(--page);
  max-width: 430px;
}

.order-timeline {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.order-timeline li {
  border-left: 2px solid var(--merchant-accent);
  display: grid;
  gap: 2px;
  margin-left: 6px;
  padding: 0 0 16px 18px;
  position: relative;
}

.order-timeline li:last-child {
  padding-bottom: 0;
}

.order-timeline li::before {
  background: var(--merchant-primary);
  border: 3px solid var(--page);
  border-radius: 50%;
  content: "";
  height: 12px;
  left: -7px;
  position: absolute;
  top: 2px;
  width: 12px;
}

.order-timeline strong {
  font-size: 0.82rem;
}

.order-timeline time,
.order-timeline-empty {
  color: var(--muted);
  font-size: 0.74rem;
}

.promotion-summary {
  background: color-mix(in srgb, var(--merchant-accent) 42%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--merchant-primary) 15%, var(--border));
  border-radius: var(--radius-medium);
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 15px;
  text-align: left;
  width: 100%;
}

.pricing-rows,
.line-price-breakdown {
  display: grid;
  gap: 8px;
}

.pricing-row,
.line-price-row {
  align-items: baseline;
  display: flex;
  font-size: 0.82rem;
  gap: 14px;
  justify-content: space-between;
}

.pricing-row span,
.line-price-row > span:first-child {
  color: var(--muted);
}

.pricing-row.saving strong {
  color: var(--merchant-primary);
}

.pricing-row.total-saving {
  border-top: 1px dashed color-mix(in srgb, var(--merchant-primary) 24%, var(--border));
  padding-top: 8px;
}

.pricing-row.pricing-final {
  border-top: 1px solid color-mix(in srgb, var(--merchant-primary) 32%, var(--border));
  font-size: 0.92rem;
  padding-top: 9px;
}

.promotion-labels,
.promotion-reasons {
  color: var(--muted);
  display: grid;
  font-size: 0.76rem;
  gap: 5px;
  line-height: 1.5;
  margin: 0;
  padding-left: 18px;
}

.line-price-breakdown {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.line-price-row > span:last-child {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.line-price-row s {
  color: var(--muted);
  font-size: 0.72rem;
}

.bundle-explanation {
  background: var(--page);
  border-radius: var(--radius-small);
  display: grid;
  font-size: 0.76rem;
  gap: 4px;
  line-height: 1.5;
  padding: 11px;
}

.bundle-explanation span {
  color: var(--muted);
}

.coupon-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 15px;
}

.reward-panel {
  border: 1px solid color-mix(in srgb, var(--merchant-primary) 24%, var(--border));
  border-radius: var(--radius-medium);
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 15px;
}

.reward-coupons,
.reward-line-choices {
  display: grid;
  gap: 10px;
}

.reward-empty {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.cart-reward-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  display: grid;
  gap: 10px;
  padding: 13px;
}

.cart-reward-card.is-applied {
  background: color-mix(in srgb, var(--merchant-accent) 55%, var(--page));
  border-color: var(--merchant-primary);
}

.reward-card-heading,
.loyalty-progress-heading {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.reward-card-heading > div,
.reward-price-result,
.saved-contact,
.reward-summary-row > div,
.loyalty-activity-row > div,
.paid-history-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reward-card-heading span,
.reward-price-result span,
.reward-summary-row span,
.reward-summary-row small,
.loyalty-activity-row span,
.paid-history-row span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.reward-status {
  background: var(--page);
  border-radius: 999px;
  color: var(--merchant-primary) !important;
  flex: 0 0 auto;
  font-size: 0.68rem !important;
  font-weight: 800;
  padding: 5px 8px;
}

.cart-reward-card > p {
  font-size: 0.76rem;
}

.reward-line-label {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.reward-line-button {
  min-height: 44px;
  text-align: left;
}

.reward-price-result {
  border-top: 1px solid color-mix(in srgb, var(--merchant-primary) 20%, var(--border));
  padding-top: 10px;
}

.danger-text {
  color: var(--danger);
}

.post-paid-opt-in {
  background: color-mix(in srgb, var(--merchant-accent) 54%, var(--page));
  border: 1px solid color-mix(in srgb, var(--merchant-primary) 25%, var(--border));
  border-radius: var(--radius-medium);
  display: grid;
  gap: 9px;
  margin-top: 12px;
  max-width: 390px;
  padding: 16px;
  text-align: left;
  width: 100%;
}

.post-paid-opt-in h2 {
  font-size: 1rem;
}

.post-paid-opt-in p {
  font-size: 0.8rem;
}

.post-paid-actions {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.post-paid-actions .text-button {
  min-height: 44px;
}

.post-paid-choice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  display: grid;
  gap: 7px;
  padding: 12px;
}

.post-paid-choice span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.profile-view {
  padding-bottom: 48px;
}

.profile-content {
  display: grid;
  gap: 16px;
}

.profile-heading {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 8px 0 4px;
}

.profile-heading > div {
  display: grid;
  gap: 7px;
}

.profile-kicker {
  color: var(--merchant-primary);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-state {
  background: var(--surface-strong);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 850;
  padding: 7px 10px;
}

.profile-state.state-registered {
  background: #e9f8ef;
  color: #17663a;
}

.profile-state.state-suspended {
  background: #fff8e8;
  color: #765b22;
}

.profile-state.state-deleted {
  background: #fff0f0;
  color: var(--danger);
}

.profile-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  display: grid;
  gap: 13px;
  padding: 16px;
}

.profile-card h2 {
  font-size: 1rem;
}

.profile-card h3 {
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  padding-top: 12px;
}

.profile-card p {
  font-size: 0.8rem;
}

.profile-section-heading > div {
  display: grid;
  gap: 4px;
}

.guest-boundary,
.deletion-complete {
  background: var(--surface);
}

.consent-row,
.loyalty-activity-row,
.paid-history-row,
.reward-summary-row {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 13px;
}

.consent-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.consent-row span,
.profile-fine-copy {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.compact-profile-action {
  flex: 0 0 auto;
  font-size: 0.76rem;
  min-height: 44px;
  padding-inline: 12px;
}

.consent-confirmation {
  background: #fff8e8;
  border: 1px solid #ead39d;
  border-radius: var(--radius-small);
  display: grid;
  gap: 8px;
  padding: 12px;
}

.consent-confirmation-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.contact-editor {
  align-items: end;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 12px;
}

.contact-editor .form-field {
  margin: 0;
}

.contact-editor .saved-contact {
  grid-column: 1 / -1;
}

.disclosure-check {
  align-items: flex-start;
  color: var(--muted);
  display: flex;
  font-size: 0.72rem;
  gap: 8px;
  grid-column: 1 / -1;
  line-height: 1.45;
}

.disclosure-check input {
  flex: 0 0 auto;
  height: 20px;
  margin-top: 1px;
  width: 20px;
}

.saved-contact strong {
  overflow-wrap: anywhere;
}

.saved-contact .text-button {
  justify-self: start;
}

.loyalty-progress-card {
  background: var(--surface);
  border-radius: var(--radius-small);
  display: grid;
  gap: 8px;
  padding: 13px;
}

.loyalty-progress-card progress {
  accent-color: var(--merchant-primary);
  height: 10px;
  width: 100%;
}

.loyalty-progress-card > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.loyalty-progress-card .adjustment-debt-message {
  color: #765b22;
  font-weight: 750;
}

.loyalty-activity-row > strong,
.paid-history-row > strong {
  color: var(--merchant-primary);
  flex: 0 0 auto;
  font-size: 0.82rem;
}

.profile-empty {
  background: var(--surface);
  border-radius: var(--radius-small);
  padding: 12px;
}

.deletion-card {
  border-color: #efc9c9;
}

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

.coupon-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.coupon-heading > div {
  display: grid;
  gap: 3px;
}

.coupon-heading h2 {
  font-size: 0.95rem;
}

.coupon-heading p {
  font-size: 0.74rem;
}

.coupon-state {
  background: var(--surface-strong);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  max-width: 46%;
  overflow: hidden;
  padding: 6px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coupon-entry {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.coupon-entry .form-field {
  margin: 0;
}

.coupon-entry .primary-button {
  min-height: 48px;
}

.payment-pricing,
.final-pricing {
  max-width: 360px;
}

.quote-change-card {
  background: #fff8e8;
  border: 1px solid #ead39d;
  border-radius: var(--radius-medium);
  color: #6c4a00;
  display: grid;
  gap: 9px;
  margin-top: 4px;
  max-width: 360px;
  padding: 15px;
  text-align: left;
  width: 100%;
}

.quote-change-card p {
  color: #765b22;
  font-size: 0.8rem;
}

.final-total-row {
  margin-top: 18px;
}

.bottom-action-dock {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  bottom: 0;
  display: grid;
  inset-inline: max(0px, calc((100vw - 620px) / 2));
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  position: fixed;
  z-index: 25;
}

.configurator-actions {
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.configurator-actions .primary-button:only-child,
.configurator-actions .primary-button:last-child:nth-child(3) {
  grid-column: auto;
}

.payment-view,
.confirmation-view {
  gap: 14px;
}

.status-symbol {
  background: var(--merchant-primary);
  border: 10px solid var(--merchant-accent);
  border-radius: 50%;
  height: 72px;
  margin-bottom: 10px;
  position: relative;
  width: 72px;
}

.status-symbol:not(.pending)::after {
  border: solid #fff;
  border-width: 0 4px 4px 0;
  content: "";
  height: 22px;
  left: 27px;
  position: absolute;
  top: 16px;
  transform: rotate(45deg);
  width: 11px;
}

.status-symbol.pending::after {
  animation: spin 900ms linear infinite;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  border-top-color: #fff;
  content: "";
  inset: 14px;
  position: absolute;
}

.status-symbol.failed {
  background: var(--danger);
  border-color: #ffe1e1;
}

.status-symbol.failed::after {
  border: 0;
  color: #fff;
  content: "×";
  font-size: 2.7rem;
  font-weight: 500;
  inset: 1px 0 0;
  line-height: 1.25;
  position: absolute;
  transform: none;
  width: auto;
}

.payment-total {
  border-color: var(--border);
  margin: 18px 0 2px;
  min-width: min(100%, 320px);
}

.confirmation-kicker {
  color: var(--merchant-primary) !important;
  font-size: 0.82rem !important;
  font-weight: 850;
}

.pickup-identity {
  background: var(--surface);
  border-radius: var(--radius-large);
  display: grid;
  gap: 2px;
  margin: 16px 0;
  min-width: min(100%, 330px);
  padding: 20px;
}

.pickup-identity span {
  color: var(--muted);
  font-size: 0.78rem;
}

.pickup-identity strong {
  color: var(--merchant-primary);
  font-size: clamp(2.4rem, 16vw, 4rem);
  letter-spacing: 0.12em;
  line-height: 1.2;
}

.order-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.74rem;
  gap: 8px 16px;
  justify-content: center;
}

.notification-preview {
  background: #effcf4;
  border: 1px solid #ccefd9;
  border-radius: var(--radius-small);
  color: #17663a;
  font-size: 0.8rem;
  padding: 10px 12px;
}

[data-template="coffee-quick-order"] .product-row {
  padding-block: 17px;
}

[data-template="coffee-quick-order"] .configuration-groups {
  gap: 2px;
}

[data-template="pizza-configurator"] .catalog-heading {
  margin-bottom: 18px;
}

[data-template="pizza-configurator"] .category-rail {
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

[data-template="pizza-configurator"] .configurator-heading {
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  to { transform: scale(0.9); }
}

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

@media (min-width: 720px) {
  body {
    background: #f1f3f2;
  }

  .experience-shell {
    background: var(--page);
    border-inline: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
}

@media (max-width: 420px) {
  .app-header {
    padding-inline: 16px;
  }

  .app-view {
    padding-inline: 16px;
  }

  .section-heading {
    gap: 12px;
  }

  .configuration-notes {
    grid-template-columns: 88px 1fr;
  }

  .bottom-action-dock {
    padding-inline: 16px;
  }

  .coupon-entry {
    grid-template-columns: 1fr;
  }

  .coupon-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .coupon-state {
    max-width: 100%;
    width: fit-content;
  }

  .merchant-name {
    max-width: 175px;
  }

  .profile-heading,
  .consent-row {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-state {
    align-self: flex-start;
  }

  .compact-profile-action {
    width: 100%;
  }

  .contact-editor {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
