body.page-custom-order > .custom-order-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 32px 24px 48px;
  box-sizing: border-box;
}

.custom-order-layout {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.custom-order-panels {
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}

.custom-order-nav {
  background: var(--card-bg);
  padding: 22px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  height: fit-content;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 24px;
}

.custom-order-nav-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 4px 0 22px;
  padding: 0 4px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.custom-order-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-order-nav-list li {
  margin-bottom: 4px;
}

.custom-order-nav-btn {
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  font-size: var(--font-size-sm, 15px);
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.custom-order-nav-btn:hover {
  background: var(--soft-bg);
  color: var(--text);
}

.custom-order-nav-btn.is-active {
  background: transparent;
  color: var(--primary-hover);
  font-weight: 700;
}

.custom-order-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.custom-order-nav-btn.is-active .custom-order-nav-badge {
  background: var(--danger);
  color: #fff;
}

.custom-order-panel {
  min-width: 0;
  max-width: 100%;
}

.custom-order-panel-lead {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 640px;
  overflow-wrap: anywhere;
}

.custom-order-panel[hidden] {
  display: none;
}

.custom-order-panel h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 10px;
  font-family: var(--font-display);
}

.custom-order-form label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.custom-order-form .field-hint {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mute);
  margin-bottom: 8px;
  line-height: 1.4;
}

.custom-order-form .form-group {
  margin-bottom: 20px;
}

.custom-order-form input[type="text"],
.custom-order-form input[type="number"],
.custom-order-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.custom-order-form input[type="file"] {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  box-sizing: border-box;
}

.custom-order-submit {
  width: 100%;
  margin-top: 8px;
}

.custom-requests-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#custom-requests-loading[hidden],
#custom-requests-list[hidden],
#custom-past-loading[hidden],
#custom-past-list[hidden] {
  display: none;
}

.custom-request-card--past .custom-request-card-toggle {
  opacity: 0.92;
}

.custom-request-card--past .custom-request-card-meta {
  color: var(--text-mute);
}

@media (min-width: 1080px) {
  body.page-custom-order > .custom-order-main {
    display: grid;
    grid-template-columns: 1fr minmax(0, 760px) 1fr;
    align-items: start;
    padding: 32px 0 48px;
  }

  .custom-order-layout {
    display: contents;
  }

  .custom-order-panels {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    max-width: 760px;
    margin: 0;
  }

  .custom-order-nav {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    width: 220px;
    margin-right: 28px;
    /* Never sit further left than the header logo */
    margin-left: max(
      0px,
      calc(
        clamp(32px, (100vw - 1240px) / 2 + 32px, 100vw) - (50vw - 628px)
      )
    );
    position: sticky;
    top: 24px;
  }
}

@media (min-width: 769px) and (max-width: 1079px) {
  .custom-order-layout {
    max-width: 760px;
  }
}

@media (max-width: 1079px) {
  .custom-order-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .custom-order-nav {
    position: static;
    width: 100%;
  }

  .custom-order-nav-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .custom-order-nav-list li {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
  }

  .custom-order-nav-btn {
    text-align: center;
  }
}

@media (max-width: 768px) {
  body.page-custom-order > .custom-order-main {
    padding: 20px 16px 40px;
  }

  .custom-order-nav {
    padding: 16px 12px;
  }

  .custom-order-nav-title {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .custom-order-nav-list li {
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
  }

  .custom-order-nav-btn {
    padding: 10px 8px;
    font-size: 12px;
    line-height: 1.35;
  }

  .custom-order-panels {
    padding: 0;
  }

  .custom-order-panel h1 {
    font-size: 24px;
  }

  .custom-order-panel-lead {
    font-size: 15px;
  }

  .custom-order-form.static-card,
  .static-card.custom-order-form {
    padding: 18px 16px;
  }

  .custom-request-card-top {
    padding: 14px 16px;
    gap: 10px;
  }

  .custom-request-card-toggle .custom-action-banner--compact {
    padding: 12px 16px 14px;
  }

  .custom-request-card-body {
    padding: 0 16px 16px;
  }

  .custom-chat-messages {
    max-height: min(45vh, 300px);
  }
}

@media (max-width: 480px) {
  .custom-order-nav-list li {
    flex: 1 1 100%;
  }

  .custom-order-nav-btn {
    text-align: left;
    padding: 12px 14px;
  }
}

.custom-request-card {
  background: var(--card-bg);
  border: 1px solid #e4e8e4;
  border-radius: 18px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(20, 30, 20, 0.06);
  max-width: 100%;
}

.custom-request-card.is-expanded {
  overflow: visible;
  border-color: #c5dcc9;
  box-shadow: 0 4px 20px rgba(20, 30, 20, 0.08);
}

.custom-request-card.has-unread {
  border-color: #b8d4be;
}

.custom-request-unread {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c62828;
  margin-top: 8px;
  align-self: flex-start;
}

.custom-request-detail-top {
  padding: 4px 0 16px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.custom-order-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 4px 0 0;
  width: 100%;
  overflow-x: auto;
}

.custom-order-step {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.custom-order-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 7px;
  left: calc(50% + 12px);
  width: calc(100% - 24px);
  height: 2px;
  background: #d4ddd6;
  z-index: 0;
}

.custom-order-step--done:not(:last-child)::after {
  background: #3d8f52;
}

.custom-order-step-dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d4ddd6;
  flex-shrink: 0;
}

.custom-order-step--done {
  color: #3d6b47;
}

.custom-order-step--done .custom-order-step-dot {
  background: #3d8f52;
}

.custom-order-step--current {
  color: #1f4d2c;
  font-weight: 700;
}

.custom-order-step--current .custom-order-step-dot {
  width: 14px;
  height: 14px;
  background: #2e8b46;
  box-shadow: 0 0 0 4px #e8f2ea;
}

.custom-order-step--upcoming .custom-order-step-dot {
  background: #d4ddd6;
}

.custom-order-step--cancelled {
  color: var(--text-mute);
}

.custom-order-step--cancelled .custom-order-step-dot {
  background: var(--danger);
}

.custom-action-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.custom-action-banner::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.custom-action-banner--compact {
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
}

.custom-request-card-toggle .custom-action-banner--compact {
  margin: 0;
  padding: 14px 20px 18px;
  border: none;
  border-top: 1px solid #e8ece8;
  border-radius: 0;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}

.custom-request-card.is-expanded .custom-action-banner--compact {
  display: none;
}

.custom-action-banner--action {
  background: #f5f0e6;
  border: 1px solid #e0d4bc;
  color: #4a3200;
}

.custom-action-banner--action::before {
  background: var(--warning);
}

.custom-action-banner--wait {
  background: #e8f2ea;
  border: 1px solid #c5dcc9;
  color: #1f4d2c;
}

.custom-action-banner--info {
  background: #e8f2ea;
  border: 1px solid #c5dcc9;
  color: #1f4d2c;
}

.custom-request-card-toggle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s ease;
}

.custom-request-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 18px 20px;
  background: #f2f4f2;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.custom-request-card-toggle:hover .custom-request-card-top {
  background: var(--soft-bg);
}

.custom-request-card-toggle:hover .custom-action-banner--compact {
  background: #fafbfa;
}

.custom-request-card-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.custom-request-card-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.custom-request-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.3;
  display: block;
}

.custom-copy-id-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--soft-bg);
  color: #333;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body, inherit);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.custom-copy-id-btn:hover {
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--primary-hover);
}

.custom-copy-id-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.custom-copy-id-btn.is-copied {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-hover);
}

.custom-order-response-hint {
  margin: -4px 0 20px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: #2a2a2a;
  background: #eef5ef;
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
}

.custom-request-card-meta {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.35;
}

.custom-request-summary {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.custom-request-summary--pay {
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.custom-copy-id-btn--plain,
.custom-request-card .custom-copy-id-btn--plain {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  border-radius: 0;
  vertical-align: baseline;
}

.custom-copy-id-btn--plain:hover {
  color: var(--primary-hover);
  background: none;
  border: none;
}

.custom-request-card-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.2s ease;
}

.custom-request-card.is-expanded .custom-request-card-chevron {
  transform: rotate(-135deg);
  margin-top: 6px;
}

.custom-request-card-body {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  min-width: 0;
  max-width: 100%;
}

.custom-request-card-body[hidden] {
  display: none;
}

.custom-request-empty {
  margin: 16px 4px 0;
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
}

/* Conversation panel — matches site cards */
/* Basket-style compact buttons (matches basket.css) */
.custom-chat .btn {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
  white-space: nowrap;
}

.custom-chat .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.custom-chat .btn-reject {
  background: #fff;
  color: #6b3030;
  border: 1.5px solid #6b3030;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
}

.custom-chat .btn-reject:hover {
  background: #faf5f5;
  color: #6b3030;
  border-color: #6b3030;
  transform: none;
}

.custom-chat .btn-confirm {
  background: #1f4d2c;
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

.custom-chat .btn-confirm:hover {
  background: #163d22;
  transform: none;
}

.custom-chat {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: transparent;
  box-shadow: none;
  min-height: 200px;
  max-height: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.custom-chat-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.custom-chat-status-bar--wait,
.custom-chat-status-bar--info {
  background: transparent;
}

.custom-chat-status-bar--action {
  background: transparent;
}

.custom-chat-status-bar--quote {
  background: transparent;
}

.custom-chat-status-text {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: #1f4d2c;
}

.custom-chat-status-text--action {
  color: #4a3200;
}

.custom-chat-status-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e8b46;
}

.custom-chat-status-text--action .custom-chat-status-dot {
  background: var(--warning);
}

.custom-chat-status-bar .btn-confirm {
  padding: 8px 18px;
  font-size: 13px;
  flex-shrink: 0;
}

.custom-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 160px;
  max-height: 360px;
  background: #fafaf8;
  border-radius: var(--radius-md);
}

.custom-chat-footer {
  flex-shrink: 0;
  border-top: none;
  background: transparent;
  margin-top: 4px;
}

.custom-chat-loading,
.custom-chat-empty,
.custom-chat-error {
  margin: auto;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  padding: 20px;
}

.custom-chat-error {
  color: var(--danger);
}

.chat-row {
  display: flex;
  width: 100%;
}

.chat-row--in {
  justify-content: flex-start;
}

.chat-row--out {
  justify-content: flex-end;
}

.chat-row--system {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(88%, 440px);
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  box-shadow: none;
  word-break: break-word;
}

.chat-bubble--in {
  background: #e4ede4;
  border-radius: 14px 14px 14px 6px;
}

.chat-bubble--out {
  background: #fff;
  border: 1px solid #d8ddd8;
  border-radius: 14px 14px 6px 14px;
}

.chat-bubble--system {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: min(92%, 480px);
  margin: 0;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  box-shadow: none;
}

.chat-bubble--quote {
  background: #e4ede4;
  color: #1a3d24;
}

.chat-bubble--declined {
  background: #f8e8e8;
  color: #5c3030;
}

.chat-bubble--info {
  background: #eef2ee;
  color: var(--text-dim);
}

.chat-bubble--system .chat-bubble-text {
  font-weight: 600;
}

.chat-bubble--system .chat-bubble-time {
  text-align: left;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-mute);
}

.chat-bubble-name {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #3d6b47;
  margin-bottom: 4px;
}

.chat-row--in .chat-bubble-name {
  color: #3d6b47;
}

.chat-bubble-you {
  font-weight: 700;
  color: var(--text);
}

.chat-bubble-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--text);
}

.chat-bubble-time {
  display: block;
  text-align: left;
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 6px;
}

.chat-row--out .chat-bubble-time {
  text-align: right;
}

/* Attachment chips inside bubbles */
.chat-attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.chat-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--card-bg) 65%, transparent);
  border: 1px solid var(--border);
  max-width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-attachment:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--card-bg) 55%, var(--primary-soft));
}

.chat-bubble--out .chat-attachment {
  background: #f8faf8;
}

.chat-attach-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
}

.chat-row--in .chat-attach-icon {
  color: var(--accent);
}

.chat-attachment-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-attachment-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-meta {
  font-size: 11px;
  color: var(--text-mute);
}

/* Composer */
.custom-chat-compose {
  padding: 16px 0 0;
}

.custom-chat-compose-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.custom-chat-attach-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.custom-chat-attach-btn svg {
  width: 20px;
  height: 20px;
}

.custom-chat-attach-btn:hover {
  color: var(--primary);
  background: #eef2ee;
}

.custom-chat-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border: 1px solid #d8ddd8;
  border-radius: var(--radius-pill);
  padding: 11px 18px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  box-sizing: border-box;
  background: #fff;
  color: var(--text);
  width: auto;
}

.custom-chat-input::placeholder {
  color: var(--text-mute);
}

.custom-chat-input:focus {
  outline: none;
  border-color: #9eb0a0;
  box-shadow: 0 0 0 2px #e8f2ea;
}

.custom-chat-send-btn {
  min-width: 72px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
}

.custom-chat-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.custom-chat-file-list[hidden] {
  display: none;
}

.custom-chat-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 6px 4px 8px;
  border-radius: var(--radius-pill);
  background: var(--soft-bg);
  border: 1px solid var(--border);
  font-size: 11px;
}

.custom-chat-file-chip .chat-attach-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--primary);
}

.custom-chat-file-chip-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}

.custom-chat-file-remove {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-mute);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.custom-chat-file-remove:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.custom-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 14px;
  padding-top: 0;
  border-top: none;
}

.custom-chat-compose--actions-only {
  padding: 16px 0 0;
}

.custom-reply-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  margin: 8px 2px 0;
}

@media (max-width: 768px) {
  .custom-chat:has(.custom-chat-status-bar .custom-pay-btn)
    .custom-chat-footer
    .custom-pay-btn {
    display: none;
  }

  .custom-chat-messages {
    max-height: min(50vh, 360px);
  }
}

@media (min-width: 769px) {
  .custom-chat-status-bar .custom-pay-btn {
    display: none;
  }
}

/* Mobile stepper — must come after base .custom-order-stepper flex rules */
@media (max-width: 768px) {
  .custom-order-stepper {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 8px;
    overflow: visible;
    width: 100%;
  }

  .custom-order-step {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 4px;
    font-size: 9px;
    letter-spacing: 0.02em;
    white-space: normal;
    line-height: 1.25;
    min-width: 0;
  }

  .custom-order-step:not(:last-child)::after {
    display: none !important;
  }

  .custom-order-step-label {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .chat-attachment-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .custom-request-card-chevron {
    flex-shrink: 0;
  }

  .custom-request-card.is-expanded {
    overflow: visible;
  }

  .custom-request-card-title {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .custom-request-card-meta {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .custom-request-summary,
  .custom-request-summary--pay {
    font-size: 11px;
    padding: 3px 8px;
  }

  .chat-bubble {
    max-width: 92%;
  }
}
