/* ==========================================================================
   Componentes reutilizables
   ========================================================================== */

/* ---------- Botones ---------- */
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: .95rem;
  font-weight: 640;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-dark { color: var(--btn-fg); background: var(--btn-bg); }
.btn-dark:hover:not(:disabled) { background: var(--btn-hover); }
.btn-primary { color: var(--btn-primary-fg); background: var(--btn-primary-bg); }
.btn-primary:hover:not(:disabled) { background: var(--btn-primary-hover); }
.btn-creador { color: var(--btn-creador-fg); background: var(--btn-creador-bg); }
.btn-creador:hover:not(:disabled) { background: var(--btn-creador-hover); }
.btn-piloto { color: #1b1300; background: var(--piloto); }
.btn-piloto:hover:not(:disabled) { background: #e5a522; }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-outline:hover:not(:disabled) { border-color: var(--ink-2); }
.btn-ghost { color: var(--ink-2); background: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1rem; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .86rem; }
.btn-block { width: 100%; }

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--negocio-ink);
  font-weight: 640;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link:hover { text-decoration-thickness: 2px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .15s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  color: var(--ink-2);
  background: var(--surface);
}
.icon-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn-lg { width: 52px; height: 52px; }
.icon-btn-lg svg { width: 22px; height: 22px; }
.icon-btn[aria-pressed="true"] { border-color: var(--negocio); color: var(--negocio-ink); background: var(--negocio-soft); }

/* ---------- Chips (filtros / opciones) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  color: var(--ink-2);
  background: var(--surface);
  font-size: .87rem;
  font-weight: 560;
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"], .chip[aria-checked="true"], .chip.is-active {
  border-color: var(--ink);
  color: var(--btn-fg);
  background: var(--btn-bg);
}
.chip svg { width: 16px; height: 16px; }
.chip-lg { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.chip .chip-count { color: var(--subtle); font-size: .78rem; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip-count, .chip[aria-checked="true"] .chip-count { color: inherit; opacity: .7; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--r-full);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge-neutral { color: var(--ink-2); background: var(--surface-2); }
.badge-estable { color: var(--negocio-ink); background: var(--negocio-soft); }
.badge-beta { color: var(--creador-ink); background: var(--creador-soft); }
.badge-piloto { color: var(--piloto-ink); background: var(--piloto-soft); }
.badge-ok { color: var(--ok); background: var(--ok-soft); }
.badge-pending { color: var(--pending); background: var(--pending-soft); }
.badge-outline { color: var(--ink-2); border: 1px solid var(--line-strong); }

.relevance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 650;
  color: var(--ink-2);
}
.relevance-bars { display: inline-flex; gap: 2px; }
.relevance-bars i { width: 4px; height: 12px; border-radius: 2px; background: var(--line-strong); }
.relevance-bars i.on { background: var(--negocio); }

/* ---------- Logo de solución ---------- */
.logo {
  --size: 52px;
  width: var(--size);
  height: var(--size);
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: calc(var(--size) * .26);
  color: #fff;
  background: hsl(var(--h, 160) var(--logo-s) var(--logo-l));
  font-family: var(--font-display);
  font-size: calc(var(--size) * .34);
  font-weight: 760;
  letter-spacing: -.02em;
}
.logo::after {
  content: "";
  position: absolute;
  right: -28%; bottom: -28%;
  width: 70%; height: 70%;
  border-radius: 50%;
  background: rgb(255 255 255 / .14);
}
.logo span { position: relative; z-index: 1; }
.logo-sm { --size: 36px; }
.logo-md { --size: 52px; }
.logo-lg { --size: 76px; }

.avatar {
  --size: 44px;
  width: var(--size); height: var(--size);
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--creador-ink);
  background: var(--creador-soft);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--creador);
  font-size: calc(var(--size) * .34);
  font-weight: 720;
}
.avatar-sm { --size: 30px; }
.avatar-lg { --size: 64px; }

/* ---------- Medidor del Estándar ---------- */
.meter { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 620; color: var(--ink-2); }
.meter-dots { display: inline-flex; gap: 3px; }
.meter-dots i { width: 8px; height: 8px; border-radius: 2px; background: var(--line-strong); }
.meter-dots i.on { background: var(--negocio); }
.meter-lg .meter-dots i { width: 14px; height: 14px; border-radius: 4px; }
.meter-lg { font-size: .95rem; }

/* ---------- Tarjeta de solución (resultado) ---------- */
.result-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 220px;
  gap: 20px 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.result-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.result-card.is-top { border-color: color-mix(in srgb, var(--negocio) 45%, var(--line)); }
.result-top-label {
  position: absolute;
  z-index: 4; /* sobre el borde animado (beam-border) */
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  top: -11px; left: 20px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  color: var(--btn-primary-fg);
  background: var(--btn-primary-bg);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.result-name { color: var(--muted); font-size: .86rem; font-weight: 650; }
.result-card h3 { margin-bottom: 6px; font-size: 1.18rem; font-weight: 680; letter-spacing: -.015em; line-height: 1.3; }
.result-card h3 a { text-decoration: none; }
.result-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.result-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.result-summary { color: var(--muted); font-size: .94rem; }
.result-helper, .mini-helper { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: .84rem; }
.result-helper strong { color: var(--ink-2); }
.mini-helper { margin-top: 0; font-size: .8rem; }
.result-top-label svg { width: 13px; height: 13px; }

.reasons {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-m);
  background: var(--negocio-soft);
  list-style: none;
}
.reasons-title { color: var(--negocio-ink); font-size: .74rem; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.reasons li { display: flex; gap: 8px; color: var(--ink-2); font-size: .87rem; line-height: 1.4; }
.reasons li svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--negocio); }
.reasons li.warn svg { color: var(--pending); }

.result-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-left: 22px;
  border-left: 1px dashed var(--line-strong);
}
.fact { display: grid; gap: 1px; }
.fact dt, .fact-label { color: var(--subtle); font-size: .74rem; font-weight: 600; }
.fact dd, .fact-value { margin: 0; font-size: .92rem; font-weight: 650; line-height: 1.3; }
.result-actions {
  grid-column: 2 / -1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ---------- Tarjeta compacta ---------- */
.mini-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.mini-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.mini-card-head { display: flex; align-items: center; gap: 12px; }
.mini-card-head strong { display: block; font-size: .98rem; }
.mini-card-head > div > span { color: var(--muted); font-size: .8rem; }
.mini-card p { color: var(--ink-2); font-size: .92rem; line-height: 1.4; }
.mini-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 7px; }
fieldset.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field-label { font-size: .88rem; font-weight: 650; }
.field-hint { color: var(--muted); font-size: .8rem; }
.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  color: var(--ink);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--subtle); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--negocio);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--negocio) 22%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--subtle); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .9rem;
  line-height: 1.4;
  cursor: pointer;
}
.check-lg { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2); font-size: .95rem; }
.check-lg input { width: 22px; height: 22px; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--negocio); flex: none; }

/* Opciones grandes tipo radio */
.options { display: grid; gap: 10px; }
.option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-m);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}
.option:hover { border-color: var(--ink-2); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option-radio {
  width: 20px; height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  transition: border .15s ease;
}
.option strong { display: block; font-size: .95rem; font-weight: 640; }
.option small { display: block; margin-top: 2px; color: var(--muted); font-size: .84rem; }
.option:has(input:checked) { border-color: var(--negocio); background: var(--negocio-soft); }
.option:has(input:checked) .option-radio { border: 6px solid var(--negocio); }
.option:has(input:focus-visible) { outline: 2.5px solid var(--focus); outline-offset: 2px; }

/* ---------- Callouts ---------- */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-m);
  font-size: .9rem;
  line-height: 1.5;
}
.callout svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.callout-info { color: var(--ink-2); background: var(--surface-2); }
.callout-pending { color: var(--ink-2); background: var(--pending-soft); }
.callout-pending svg { color: var(--pending); }
.callout-ok { color: var(--ink-2); background: var(--ok-soft); }
.callout-ok svg { color: var(--ok); }

/* ---------- Lista con checks ---------- */
.check-list { display: grid; gap: 10px; list-style: none; }
.check-list li { display: flex; gap: 10px; color: var(--ink-2); font-size: .93rem; line-height: 1.45; }
.check-list li svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ok); }
.check-list.is-cross li svg { color: var(--subtle); }
.check-list.is-dot li::before {
  content: "";
  width: 7px; height: 7px;
  flex: none;
  margin-top: .55em;
  border-radius: 50%;
  background: var(--line-strong);
}

/* ---------- Estándar (lista de criterios) ---------- */
.standard-list { display: grid; list-style: none; }
.standard-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
  line-height: 1.35;
}
.standard-list li:last-child { border-bottom: 0; }
.standard-list li > svg { width: 20px; height: 20px; }
.standard-list li.is-ok > svg { color: var(--ok); }
.standard-list li.is-pending > svg { color: var(--pending); }
.standard-list .std-state { font-size: .74rem; font-weight: 650; }
.standard-list li.is-ok .std-state { color: var(--ok); }
.standard-list li.is-pending .std-state { color: var(--pending); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-full);
  color: var(--muted);
  background: transparent;
  font-size: .9rem;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1); }
.tab .count-badge { background: var(--surface-3); color: var(--ink-2); }
.tab[aria-selected="true"] .count-badge, .tab[aria-current="page"] .count-badge { background: var(--piloto); color: #1b1300; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Estado vacío ---------- */
.empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-l);
  background: var(--surface);
}
.empty h2, .empty h3 { font-size: 1.15rem; }
.empty p { max-width: 58ch; color: var(--muted); }
.empty .btn { margin-top: 6px; }

/* ---------- Diálogo ---------- */
dialog.modal {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-3);
}
dialog.modal::backdrop { background: rgb(10 16 13 / .5); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .18s ease-out; }
.modal-inner { padding: 26px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal-head h2 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 720; letter-spacing: -.02em; }
.modal-head p { margin-top: 6px; color: var(--muted); font-size: .92rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Toast ---------- */
.toast-region {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: 24px;
  display: grid;
  gap: 8px;
  width: min(440px, calc(100% - 24px));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--r-m);
  color: var(--btn-fg);
  background: var(--btn-bg);
  box-shadow: var(--shadow-3);
  font-size: .9rem;
  line-height: 1.4;
  animation: toast-in .2s ease-out;
}
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--piloto); }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
body.has-tray .toast-region { bottom: 96px; }

/* ---------- Bandeja de comparación ---------- */
.compare-tray {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  transform: translateX(-50%);
  animation: tray-in .22s ease-out;
  max-width: calc(100% - 24px);
}
@keyframes tray-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translateX(-50%); } }
.compare-tray-label { font-size: .86rem; font-weight: 650; white-space: nowrap; }
.compare-tray-logos { display: flex; }
.compare-tray-logos .logo { margin-left: -8px; border: 2px solid var(--surface); }
.compare-tray-logos .logo:first-child { margin-left: 0; }
.compare-tray-slot {
  width: 36px; height: 36px;
  margin-left: -8px;
  border: 2px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
}

/* ---------- Línea de tiempo ---------- */
.timeline { display: grid; list-style: none; counter-reset: tl; }
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 20px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  top: 28px; bottom: 0; left: 13px;
  width: 2px;
  background: var(--line);
}
.timeline li:last-child::before { display: none; }
.tl-mark {
  position: relative;
  z-index: 1;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 750;
}
.tl-mark svg { width: 15px; height: 15px; }
.timeline li.is-done .tl-mark { border-color: var(--negocio); background: var(--negocio); color: var(--btn-primary-fg); }
.timeline li.is-done::before { background: var(--negocio); }
.timeline li.is-current .tl-mark { border-color: var(--piloto); background: var(--piloto); color: #1b1300; box-shadow: 0 0 0 5px var(--piloto-soft); }
.tl-body strong { display: block; font-size: .94rem; font-weight: 660; }
.tl-body span { display: block; color: var(--muted); font-size: .85rem; }
.timeline li.is-current .tl-body strong::after {
  content: "Ahora";
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  color: var(--piloto-ink);
  background: var(--piloto-soft);
  font-size: .7rem;
  font-weight: 700;
  vertical-align: 2px;
}

/* ---------- Progreso por pasos ---------- */
.stepper { display: flex; gap: 6px; list-style: none; }
.stepper li { flex: 1; display: grid; gap: 8px; color: var(--subtle); font-size: .8rem; font-weight: 620; }
.stepper li::before { content: ""; height: 4px; border-radius: 4px; background: var(--line); }
.stepper li.is-done::before { background: var(--negocio); }
.stepper li.is-current::before { background: var(--piloto); }
.stepper li.is-current { color: var(--ink); }
.stepper li.is-done { color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  font-weight: 620;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 10px; height: 10px;
  flex: none;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { max-width: 70ch; padding-bottom: 18px; color: var(--muted); font-size: .93rem; }

@media (max-width: 760px) {
  .result-card { grid-template-columns: auto minmax(0, 1fr); padding: 18px; gap: 14px 16px; }
  .result-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px dashed var(--line-strong);
  }
  .result-actions { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-inner { padding: 20px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
  .result-card .logo { --size: 42px; }
  .compare-tray {
    left: 12px; right: 12px;
    justify-content: space-between;
    gap: 8px;
    max-width: none;
    padding-left: 10px;
    transform: none;
    animation: none;
  }
  .compare-tray-slot { display: none; }
  .compare-tray-label .long { display: none; }
}
