/* =========================================================================
   ESPACE CLIENT — compléments
   Chargé APRÈS components.css et animations.css, uniquement sur les pages
   de l'espace client. N'écrase aucune règle partagée : il n'ajoute que de
   nouvelles classes (+ le comportement mobile de .app-sidebar, limité à
   ≤ 900px). Mêmes tokens que le reste du site (aucune couleur en dur).
   ========================================================================= */

.app-main [hidden], .app-main .demo-banner[hidden] { display: none !important; }

/* ---------------------------------------------------------------------- */
/* 1. NAVIGATION MOBILE — barre supérieure + tiroir                        */
/*    Sur desktop rien ne change : le sidebar reste la colonne fixe.       */
/* ---------------------------------------------------------------------- */
.app-mobilebar, .app-nav-scrim, .app-nav-close { display: none; }

@media (max-width: 900px) {
  .app-mobilebar {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    position: sticky; top: 0; z-index: 700;
    background: var(--violet-900); color: #fff;
    padding: var(--sp-2) var(--sp-4);
    box-shadow: var(--shadow-sm);
  }
  .app-mobilebar .brand-logo { --logo-h: 34px; }
  .app-mobilebar-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    border-radius: var(--r-md); color: #fff;
  }
  .app-mobilebar-btn:hover { background: rgba(255,255,255,0.1); }

  .app-sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0;
    width: min(300px, 86vw); height: 100vh; height: 100dvh;
    z-index: 900; box-shadow: var(--shadow-lg);
    transform: translateX(-104%); visibility: hidden;
    transition: transform var(--dur-base) var(--ease), visibility 0s linear var(--dur-base);
  }
  html[dir="rtl"] .app-sidebar { transform: translateX(104%); }
  body.nav-open .app-sidebar { transform: none; visibility: visible; transition-delay: 0s; }

  .app-nav-close {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    border-radius: var(--r-md); color: #fff; margin-inline-start: auto;
  }
  .app-nav-close:hover { background: rgba(255,255,255,0.1); }
  .app-sidebar .sidebar-head { display: flex; align-items: flex-start; gap: var(--sp-3); }

  .app-nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 850;
    background: rgba(24, 15, 48, 0.55);
    opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease);
  }
  body.nav-open .app-nav-scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .nero-launcher, .cta-float { z-index: 600; }
}

/* ---------------------------------------------------------------------- */
/* 2. MES COMPAGNONS — cartes                                              */
/* ---------------------------------------------------------------------- */
.pet-grid {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.pet-card { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-5); color: inherit; }
.pet-card-head { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; }
.pet-card-head h2 { font-size: var(--step-1); line-height: 1.15; overflow-wrap: anywhere; }
.pet-photo {
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  object-fit: cover; background: #fff; border: 1px solid var(--line);
}
/* repli : visuel de carte ID (produit) recadré sur le médaillon */
.pet-photo.is-idcard { object-position: 78% 35%; }
.pet-sub { font-size: var(--step--1); color: var(--stone-500); }
.pet-badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pet-meta {
  display: grid; gap: var(--sp-2); margin: 0;
  border-top: 1px solid var(--line); padding-top: var(--sp-4); font-size: var(--step--1);
}
.pet-meta > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.pet-meta dt { color: var(--stone-500); }
.pet-meta dd { margin: 0; font-weight: 600; color: var(--stone-900); text-align: end; overflow-wrap: anywhere; }
.pet-card-cta { margin-top: auto; font-size: var(--step--1); font-weight: 600; color: var(--violet-600); }

.loading-note { color: var(--stone-500); padding: var(--sp-6) 0; }

/* ---------------------------------------------------------------------- */
/* 3. FICHE COMPAGNON — en-tête, onglets, listes                           */
/* ---------------------------------------------------------------------- */
.back-link { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--step--1); font-weight: 600; color: var(--violet-600); margin-bottom: var(--sp-5); min-height: 44px; }
html[dir="rtl"] .back-link svg { transform: scaleX(-1); }


.pet-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2);
  border-bottom: 1px solid var(--line); margin-bottom: var(--sp-6);
}
.pet-tab {
  min-height: 48px; padding: 0.7em 0.8em; text-align: center;
  font-size: var(--step--1); font-weight: 600; color: var(--stone-500);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.pet-tab:hover { color: var(--violet-700); }
.pet-tab.is-active { color: var(--violet-700); border-bottom-color: var(--gold-500); }
@media (max-width: 760px) {
  .pet-tabs { grid-template-columns: repeat(2, 1fr); border-bottom: none; }
  .pet-tab { border: 1.5px solid var(--stone-200); border-radius: var(--r-md); margin-bottom: 0; background: #fff; }
  .pet-tab.is-active { border-color: var(--violet-500); background: var(--violet-050); }
}

.pet-section-title { font-size: var(--step-1); margin-bottom: var(--sp-4); }
.pet-note { font-size: var(--step--1); color: var(--stone-500); max-width: 70ch; }

.kv-grid {
  display: grid; gap: var(--sp-5) var(--sp-6); margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.kv dt { font-size: 0.78rem; font-weight: 600; color: var(--stone-500); margin-bottom: var(--sp-1); }
.kv dd { margin: 0; font-weight: 600; color: var(--stone-900); overflow-wrap: anywhere; }

/* Provenance d'une information (propriétaire / vétérinaire / document) */
.source-tag {
  display: inline-flex; align-items: center; gap: 0.4em; white-space: nowrap;
  padding: 0.25em 0.75em; border-radius: var(--r-pill);
  border: 1px solid var(--stone-200); background: var(--stone-050); color: var(--stone-700);
  font-size: 0.78rem; font-weight: 600; line-height: 1.3;
}
.source-tag.is-owner { border-style: dashed; }
.source-tag.is-vet { background: var(--info-bg); color: var(--violet-600); border-color: var(--violet-200); }
.source-tag.is-doc { background: var(--gold-100); color: var(--gold-700); border-color: transparent; }
.source-tag.is-verified { background: var(--success-bg); color: var(--success); border-color: transparent; }

.health-section + .health-section { margin-top: var(--sp-7); }
.health-title { font-size: var(--step-1); margin-bottom: var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); }
.health-title .count { font-family: var(--font-mono); font-size: var(--step--1); color: var(--stone-500); font-weight: 500; }
.entry-list { display: grid; gap: var(--sp-3); }
.entry { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); }
.entry-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sp-2) var(--sp-4); }
.entry-head strong { overflow-wrap: anywhere; }
.entry-sub { font-size: var(--step--1); color: var(--violet-600); font-weight: 600; margin-top: var(--sp-1); }
.entry-dl { display: grid; gap: var(--sp-3) var(--sp-5); margin: var(--sp-3) 0 0; font-size: var(--step--1); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.entry-dl dt { font-size: 0.75rem; font-weight: 600; color: var(--stone-500); }
.entry-dl dd { margin: 0; color: var(--stone-900); overflow-wrap: anywhere; }
.entry .source-tag { margin-top: var(--sp-3); }
.entry-head .source-tag { margin-top: 0; }

.legend { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; margin-top: var(--sp-5); }

/* Messages d'état (info / attention / erreur / succès) */
.notice {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md);
  border: 1px solid transparent; font-size: var(--step--1); color: var(--stone-900);
}
.notice svg { flex: none; margin-top: 2px; }
.notice p { color: inherit; font-size: inherit; }
.notice-info { background: var(--info-bg); border-color: var(--violet-200); }
.notice-warning { background: var(--warning-bg); border-color: var(--gold-300); }
.notice-danger { background: var(--danger-bg); border-color: var(--danger); }
.notice-success { background: var(--success-bg); border-color: var(--success); }

/* Transfert de propriété */
.transfer-step + .transfer-step { margin-top: var(--sp-7); }
.step-title { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--step-1); margin-bottom: var(--sp-4); }
.step-num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none;
  border-radius: 50%; background: var(--violet-100); color: var(--violet-700);
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600;
}
.pet-mini { display: flex; align-items: center; gap: var(--sp-4); background: var(--stone-050); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4); }
.pet-mini .pet-photo { width: 52px; height: 52px; }
.select-card-group.is-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 620px) { .select-card-group.is-3 { grid-template-columns: 1fr; } }
.share-list { display: grid; gap: var(--sp-3); }
.recap { background: var(--violet-050); border: 1px solid var(--violet-100); border-radius: var(--r-lg); padding: var(--sp-5); }
.recap .kv-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.transfer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); margin-top: var(--sp-5); }
@media (max-width: 620px) { .transfer-actions .btn { width: 100%; justify-content: center; } }

/* ---------------------------------------------------------------------- */
/* 4. FICHE EN PAGES (modèle maquette) — hub + rubriques                    */
/* ---------------------------------------------------------------------- */
.pet-hero { display: flex; align-items: center; gap: var(--sp-5); margin-bottom: var(--sp-5); }
.pet-hero .pet-photo { width: 128px; height: 128px; border-radius: var(--r-lg); }
.pet-hero-body { flex: 1; min-width: 0; }
.pet-hero h1 { font-size: var(--step-3); overflow-wrap: anywhere; display: flex; align-items: baseline; gap: var(--sp-2); }
.sex-sym { color: var(--violet-500); font-family: var(--font-body); font-size: 0.8em; }
.pet-hero .pet-badges { margin-top: var(--sp-3); }
.pet-hero.is-compact .pet-photo { width: 88px; height: 88px; }
.pet-hero.is-compact h1 { font-size: var(--step-2); }
@media (max-width: 620px) {
  .pet-hero { padding: var(--sp-4); gap: var(--sp-4); }
  .pet-hero .pet-photo { width: 104px; height: 104px; }
  .pet-hero.is-compact .pet-photo { width: 72px; height: 72px; }
  .pet-hero h1 { font-size: var(--step-2); }
}

.page-title { font-size: var(--step-2); margin-bottom: var(--sp-5); }

.pet-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.pet-fact { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); text-align: center; }
.pet-fact span { display: block; font-size: 0.75rem; font-weight: 600; color: var(--stone-500); }
.pet-fact strong { display: block; font-size: var(--step--1); overflow-wrap: anywhere; }

.nav-rows { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); margin-bottom: var(--sp-5); }
.nav-row { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg); color: inherit; min-height: 64px; }
.nav-row .ico { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--violet-100); color: var(--violet-600); }
.nav-row .ico.is-gold { background: var(--gold-100); color: var(--gold-700); }
.nav-row .txt { flex: 1; min-width: 0; }
.nav-row .txt strong { display: block; overflow-wrap: anywhere; }
.nav-row .txt span { display: block; font-size: var(--step--1); color: var(--stone-500); }
.nav-row .chev { flex: none; color: var(--stone-300); }
html[dir="rtl"] .nav-row .chev { transform: scaleX(-1); }

.info-table { margin: 0; }
.info-table > div { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); font-size: var(--step--1); }
.info-table > div:last-child { border-bottom: none; }
.info-table dt { color: var(--stone-500); flex: none; }
.info-table dd { margin: 0; font-weight: 600; text-align: end; overflow-wrap: anywhere; }
.info-table .is-empty { color: var(--stone-500); font-weight: 500; }

.status-card { border-radius: var(--r-lg); padding: var(--sp-5); margin-top: var(--sp-5); border: 1px solid transparent; }
.status-card .lbl { font-size: var(--step--1); font-weight: 600; }
.status-card .val { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1; margin: var(--sp-1) 0; }
.status-card p { font-size: var(--step--1); color: var(--stone-700); }
.status-card.is-present { background: var(--success-bg); color: var(--success); }
.status-card.is-lost { background: var(--danger-bg); color: var(--danger); }
.status-card.is-deceased { background: var(--stone-100); color: var(--stone-700); }
.status-card.is-qr { background: var(--violet-050); color: var(--violet-700); border-color: var(--violet-100); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.tile { display: flex; align-items: center; gap: var(--sp-3); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4); }
.tile .ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-100); color: var(--gold-700); flex: none; }
.tile span { display: block; font-size: var(--step--1); color: var(--stone-500); }
.tile strong { display: block; overflow-wrap: anywhere; }
.entry-link { display: block; color: inherit; transition: border-color var(--dur-base), box-shadow var(--dur-base); }
.entry-link:hover { border-color: var(--violet-200); box-shadow: var(--shadow-md); }
.entry-more { display: block; margin-top: var(--sp-3); font-size: var(--step--1); font-weight: 600; color: var(--violet-600); }
.sub-title { font-size: var(--step-1); margin: var(--sp-6) 0 var(--sp-3); }
.sub-title:first-child { margin-top: 0; }

.vet-card { display: flex; align-items: center; gap: var(--sp-4); background: var(--stone-050); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4); margin-bottom: var(--sp-5); }
.vet-card .ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--violet-100); color: var(--violet-600); flex: none; }
.detail-block + .detail-block { margin-top: var(--sp-5); }
.detail-block h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; margin-bottom: var(--sp-2); }
.detail-block ul { list-style: disc; padding-inline-start: var(--sp-5); font-size: var(--step--1); display: grid; gap: var(--sp-1); }
.top-right { display: flex; justify-content: flex-end; margin-bottom: var(--sp-3); }

/* Arbre généalogique vertical : grands-parents → parents → compagnon */
.ped-tree { max-width: 640px; margin-inline: auto; display: flex; flex-direction: column; align-items: stretch; }
.ped-row { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ped-row.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ped-row.is-1 { grid-template-columns: minmax(0, 1fr); max-width: 320px; width: 100%; margin-inline: auto; }
.ped-link { width: 2px; height: var(--sp-5); background: var(--line); margin-inline: auto; }
.ped-node { background: #fff; border: 1.5px solid var(--stone-200); border-radius: var(--r-md); padding: var(--sp-3); display: flex; gap: var(--sp-3); align-items: flex-start; min-width: 0; }
.ped-node.is-self { border-color: var(--violet-500); background: var(--violet-050); }
.ped-node.is-empty { border-style: dashed; background: var(--stone-050); color: var(--stone-500); }
.ped-avatar { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; flex: none; background: var(--violet-100); color: var(--violet-600); display: grid; place-items: center; font-weight: 700; }
.ped-body { min-width: 0; }
.ped-role { font-size: 0.75rem; font-weight: 600; color: var(--stone-500); }
.ped-name { font-weight: 700; color: var(--stone-900); overflow-wrap: anywhere; }
.ped-detail { font-size: 0.78rem; color: var(--stone-500); overflow-wrap: anywhere; }
.ped-node .source-tag { margin-top: var(--sp-2); white-space: normal; }
@media (max-width: 620px) { .ped-row.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pet-id-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); font-size: var(--step--1); color: var(--stone-500); }

/* Modification inline (page Mon identité) */
.info-table > div { align-items: center; }
.info-table dd { flex: 1; }
.pencil-btn { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); color: var(--stone-500); margin-inline-start: var(--sp-1); }
.pencil-btn:hover { background: var(--violet-050); color: var(--violet-600); }
.info-table > div.is-editing { flex-direction: column; align-items: stretch; gap: var(--sp-2); }
.info-table > div.is-editing dd { text-align: start; }
.edit-form { display: grid; gap: var(--sp-3); }
.edit-form input, .edit-form select, .edit-form textarea {
  width: 100%; padding: 0.7em 0.9em; border: 1.5px solid var(--stone-200); border-radius: var(--r-sm); background: #fff; font-weight: 500;
}
.edit-form textarea { min-height: 96px; resize: vertical; }
.edit-form .error-msg { display: block; color: var(--danger); font-size: var(--step--1); }
.edit-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.comment-block { margin-top: var(--sp-6); border-top: 1px solid var(--line); padding-top: var(--sp-5); }
.comment-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.comment-head h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; }
.comment-text { margin-top: var(--sp-2); font-size: var(--step--1); white-space: pre-wrap; overflow-wrap: anywhere; }
.status-card .field { margin: var(--sp-4) 0 0; }
.status-card .field label { font-size: var(--step--1); font-weight: 600; display: block; margin-bottom: var(--sp-1); }
.status-card select { width: 100%; max-width: 320px; padding: 0.7em 0.9em; border: 1.5px solid var(--stone-200); border-radius: var(--r-sm); background: #fff; color: var(--stone-900); font-weight: 600; min-height: 44px; }

/* Formulaire « Ajouter une consultation » */
.consult-form .field { margin-bottom: var(--sp-4); }
.consult-form .field label { display: block; font-size: var(--step--1); font-weight: 600; margin-bottom: var(--sp-1); }
.consult-form .field.has-error input { border-color: var(--danger); }
.med-cols { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .med-cols { grid-template-columns: 1fr; } }
.med-set { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4); margin: 0 0 var(--sp-4); min-width: 0; }
.med-set legend { font-weight: 700; padding-inline: var(--sp-2); font-size: var(--step--1); }
.med-row { background: var(--stone-050); border-radius: var(--r-md); padding: var(--sp-4); margin-bottom: var(--sp-3); }
.med-row .field { margin-bottom: var(--sp-3); }
.med-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-2); }

/* Mes commandes : tableau (ordinateur) / cartes (mobile) + messages */
.order-cards { display: none; gap: var(--sp-3); }
.order-card { padding: var(--sp-4) var(--sp-5); }
.order-card .entry-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .orders-table { display: none; }
  .order-cards { display: grid; }
}
.order-notices { display: grid; gap: var(--sp-4); margin-top: var(--sp-6); }
.order-notice { border-radius: var(--r-lg); padding: var(--sp-5) var(--sp-6); border: 1px solid transparent; }
.order-notice h3 { font-size: var(--step-1); margin-bottom: var(--sp-3); }
.order-notice p { color: var(--stone-900); font-size: var(--step--1); line-height: 1.7; }
.order-notice p + p { margin-top: var(--sp-3); }
.order-notice .sign { font-weight: 700; margin-top: var(--sp-4); }
.order-notice.is-pickup { background: var(--warning-bg); border-color: var(--gold-300); }
.order-notice.is-thanks { background: var(--success-bg); border-color: var(--success); }
@media (max-width: 620px) { .order-notice { padding: var(--sp-4); } }

/* Notifications */
.notif-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.notif-filter { min-height: 44px; padding: 0.5em 1.1em; border: 1.5px solid var(--stone-200); border-radius: var(--r-pill); background: #fff; font-weight: 600; font-size: var(--step--1); color: var(--stone-700); }
.notif-filter.is-active { border-color: var(--violet-500); background: var(--violet-050); color: var(--violet-700); }
.notif-list { display: grid; gap: var(--sp-3); }
.notif { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5); }
.notif.is-unread { border-inline-start: 4px solid var(--violet-500); background: var(--violet-050); }
.notif-main { min-width: 0; flex: 1; }
.notif-main p { font-size: var(--step--1); margin: var(--sp-1) 0 var(--sp-2); overflow-wrap: anywhere; }
.notif-top { display: flex; align-items: center; gap: var(--sp-2); }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold-500); flex: none; }
.notif-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: flex-end; flex: none; }
@media (max-width: 620px) {
  .notif { flex-direction: column; padding: var(--sp-4); }
  .notif-actions { justify-content: flex-start; width: 100%; }
}

/* Parcours d'achat « Ajouter un compagnon » */
.select-card-group.is-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 620px) { .select-card-group.is-2 { grid-template-columns: 1fr; } }
.select-card span { display: block; margin-top: var(--sp-1); }
.buy-steps { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-5); padding: 0; }
.buy-step { display: flex; align-items: center; gap: var(--sp-2); color: var(--stone-500); font-size: var(--step--1); font-weight: 600; }
.buy-step + .buy-step::before { content: ""; width: 14px; height: 2px; background: var(--stone-200); margin-inline-end: var(--sp-1); }
.buy-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--stone-100); font-family: var(--font-mono); font-size: 0.8rem; }
.buy-step.is-done .buy-num { background: var(--violet-100); color: var(--violet-700); }
.buy-step.is-current { color: var(--violet-700); }
.buy-step.is-current .buy-num { background: var(--violet-600); color: #fff; }
@media (max-width: 620px) { .buy-step .buy-label { display: none; } .buy-step.is-current .buy-label { display: inline; } }
.buy-card { max-width: 760px; }
.buy-nav { display: flex; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-6); }
.buy-nav .btn { min-height: 48px; }
@media (max-width: 620px) { .buy-nav { flex-direction: column-reverse; } .buy-nav .btn { width: 100%; justify-content: center; } }
.photo-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .photo-grid { grid-template-columns: 1fr; } }
.photo-box { border: 2px dashed var(--stone-200); border-radius: var(--r-lg); padding: var(--sp-4); text-align: center; background: var(--stone-050); }
.photo-preview img { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--r-md); margin: var(--sp-3) 0; }
.photo-status { min-height: 1.6em; margin: var(--sp-2) 0; }
.photo-pick { position: relative; cursor: pointer; overflow: hidden; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.review-photo { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--r-md); }
.review-block { padding: var(--sp-4) 0; border-top: 1px solid var(--line); }
.review-block h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; }
.price-table { margin: 0; }
.price-table > div { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.price-table dd { margin: 0; font-weight: 600; white-space: nowrap; }
.price-table .is-discount dd { color: var(--success); }
.price-table .is-total { border-bottom: none; font-size: var(--step-1); font-weight: 700; }
.promo-row { display: flex; gap: var(--sp-2); }
.promo-row input { flex: 1; min-width: 0; }
.confirm-card { max-width: 720px; }
.confirm-check { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--success-bg); color: var(--success); margin-bottom: var(--sp-4); }
.consult-form .error-msg, .photo-box .error-msg { color: var(--danger); font-size: var(--step--1); }
.consult-form .field.has-error .error-msg, .photo-box .error-msg:not(:empty) { display: block; }
.photo-box.has-error { border-color: var(--danger); }
