.c-didactic-wizard {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.c-trip-planner__map > .c-didactic-wizard {
  position: absolute;
  inset: 0;
  z-index: 1300;
  padding: 10px 12px 14px;
  align-items: center;
  justify-content: center;
}

.c-trip-planner__map > .c-didactic-wizard .c-didactic-wizard__card {
  width: min(440px, 100%);
  max-height: min(96vh, calc(100% - 12px));
  min-height: min(460px, 84%);
}

@media (min-width: 900px) {
  .c-trip-planner__map > .c-didactic-wizard .c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) {
    width: min(820px, 94%);
    max-height: min(88vh, calc(100% - 16px));
    min-height: min(520px, 78%);
  }
}

.c-didactic-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 6px;
}

.c-didactic-steps__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

.c-didactic-steps__item.is-current {
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px #fdba74;
}

.c-didactic-steps__item.is-done {
  background: #ecfdf5;
  color: #047857;
}

.c-didactic-steps__num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  font-size: 0.72rem;
}

.c-didactic-steps__item.is-current .c-didactic-steps__num {
  background: #e85d04;
  color: #fff;
}

.c-didactic-steps__hint {
  margin: 0 0 12px;
}

.c-didactic-steps__hint-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(232, 93, 4, 0.22);
  background: linear-gradient(135deg, #fff7ed 0%, #fff 55%, #f8fafc 100%);
  box-shadow: 0 10px 28px rgba(232, 93, 4, 0.08);
}

.c-didactic-steps__hint-card--origin {
  border-color: rgba(0, 119, 200, 0.24);
  background: linear-gradient(135deg, #eff6ff 0%, #fff 55%, #f8fafc 100%);
  box-shadow: 0 10px 28px rgba(0, 119, 200, 0.08);
}

.c-didactic-steps__hint-card--destinations {
  border-color: rgba(34, 197, 94, 0.22);
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 55%, #f8fafc 100%);
}

.c-didactic-steps__hint-card--return {
  border-color: rgba(124, 58, 237, 0.2);
  background: linear-gradient(135deg, #f5f3ff 0%, #fff 55%, #f8fafc 100%);
}

.c-didactic-steps__hint-card--ready {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 60%, #f8fafc 100%);
}

.c-didactic-steps__hint-card-visual {
  position: relative;
  width: 72px;
  min-height: 72px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 93, 4, 0.12);
  color: #c2410c;
  font-size: 1.65rem;
}

.c-didactic-steps__hint-card--origin .c-didactic-steps__hint-card-visual {
  background: rgba(0, 119, 200, 0.12);
  color: #0077c8;
}

.c-didactic-steps__hint-card--destinations .c-didactic-steps__hint-card-visual {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.c-didactic-steps__hint-card--return .c-didactic-steps__hint-card-visual {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.c-didactic-steps__hint-card--ready .c-didactic-steps__hint-card-visual {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.c-didactic-steps__hint-badge {
  position: absolute;
  top: -8px;
  left: -6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.c-didactic-steps__hint-title {
  display: block;
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.25;
  color: #0f172a;
}

.c-didactic-steps__hint-text {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #475569;
}

.c-didactic-steps__hint-field-ref {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed rgba(15, 23, 42, 0.16);
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.c-didactic-steps__hint-field-ref .fa-arrow-down {
  color: #e85d04;
}

.c-didactic-steps__hint-card--origin .c-didactic-steps__hint-field-ref .fa-arrow-down {
  color: #0077c8;
}

.c-didactic-steps__hint-action {
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .c-didactic-steps__hint-card {
    grid-template-columns: 1fr;
  }

  .c-didactic-steps__hint-card-visual {
    width: 100%;
    min-height: 56px;
    font-size: 1.4rem;
  }
}

.c-didactic-flow {
  padding: 0 4px 4px;
}

.c-didactic-flow .c-route-inputs {
  margin-top: 0;
}

.page-travel-map--didactic #route-composer {
  display: none !important;
}

.page-travel-map--didactic #didactic-sidebar-panel[hidden] {
  display: none !important;
}

.c-didactic-wizard[hidden] {
  display: none !important;
}

.c-didactic-wizard__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.c-didactic-wizard__card {
  position: relative;
  width: min(440px, 100%);
  max-height: min(94vh, 720px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(140px, 1fr) auto;
  grid-template-areas:
    "hero"
    "progress"
    "bot"
    "body"
    "actions";
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  padding: 16px 18px 14px;
}

/* Con portada: sin padding superior para que la imagen llegue al borde */
.c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) {
  padding: 0;
}

.c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) .c-didactic-wizard__progress,
.c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) .c-didactic-wizard__bot,
.c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) #didactic-wizard-body {
  padding-left: 18px;
  padding-right: 18px;
}

.c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) #didactic-wizard-actions {
  padding: 10px 18px 14px;
}

.c-didactic-wizard__card-hero {
  grid-area: hero;
}

#didactic-wizard-progress {
  grid-area: progress;
}

.c-didactic-wizard__bot {
  grid-area: bot;
}

#didactic-wizard-body {
  grid-area: body;
  min-height: 0;
  padding-bottom: 10px;
}

#didactic-wizard-actions {
  grid-area: actions;
}

.c-didactic-wizard__card.is-step-compact {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "hero"
    "progress"
    "body"
    "actions";
}

.c-didactic-wizard__card.is-step-scroll {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.c-didactic-wizard__card.is-step-compact .c-didactic-wizard__progress,
.c-didactic-wizard__card.is-step-scroll .c-didactic-wizard__progress {
  margin-bottom: 8px;
}

.c-didactic-wizard__card.is-step-compact #didactic-wizard-body,
.c-didactic-wizard__card.is-step-scroll #didactic-wizard-body {
  min-height: 0;
  flex: 1 1 auto;
}

.c-didactic-wizard__card.is-step-compact .c-didactic-wizard__bot {
  display: none;
}

.c-didactic-wizard__progress,
.c-didactic-wizard__bot {
  flex-shrink: 0;
}

.c-didactic-wizard__body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  padding-right: 2px;
}

.c-didactic-wizard__body::-webkit-scrollbar {
  width: 6px;
}

.c-didactic-wizard__body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.c-didactic-wizard__progress {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.c-didactic-wizard__progress span {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background 0.25s ease;
}

.c-didactic-wizard__progress span.is-active {
  background: #fbbf24;
}

.c-didactic-wizard__progress span.is-current {
  background: #e85d04;
}

.c-didactic-wizard__bot {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
}

.c-didactic-wizard__bot-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e85d04;
  color: #fff;
  font-size: 20px;
}

.c-didactic-wizard__bot-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #7c2d12;
}

.c-didactic-wizard__title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  line-height: 1.25;
  color: #0f172a;
}

.c-didactic-wizard__lead {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 0.9rem;
}

.c-didactic-wizard__nights-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 16px 0 8px;
  padding: 20px 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  min-height: 100px;
}

.c-didactic-wizard__nights-btn {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  font-size: 1.5rem;
  font-weight: 700;
  color: #e85d04;
  cursor: pointer;
}

.c-didactic-wizard__nights-value {
  text-align: center;
  min-width: 100px;
}

.c-didactic-wizard__nights-value strong {
  display: block;
  font-size: 2.75rem;
  line-height: 1;
  color: #e85d04;
}

.c-didactic-wizard__choices {
  display: grid;
  gap: 10px;
}

.c-didactic-wizard__choices--duo {
  grid-template-columns: 1fr 1fr;
}

.c-didactic-wizard__choice.is-selected {
  border-color: #e85d04;
  background: #fff7ed;
  box-shadow: 0 0 0 1px #fdba74;
}

.c-didactic-wizard__choice-check {
  display: none;
  margin-left: auto;
  color: #16a34a;
  font-size: 1.1rem;
}

.c-didactic-wizard__choice.is-selected .c-didactic-wizard__choice-check {
  display: inline-flex;
}

.c-didactic-wizard__choices--multi .c-didactic-wizard__choice {
  display: flex;
  align-items: center;
  gap: 10px;
}

.c-didactic-wizard__service-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.c-didactic-wizard__panel-title {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.c-didactic-wizard__panel-title i {
  color: #e85d04;
}

.c-didactic-wizard__panel-label {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.c-didactic-wizard__leg-block {
  margin-bottom: 12px;
}

.c-didactic-wizard__leg-block:last-child {
  margin-bottom: 0;
}

.c-didactic-wizard__leg-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
  cursor: pointer;
  text-align: left;
}

.c-didactic-wizard__leg-toggle.is-selected {
  border-color: #e85d04;
  background: #fff7ed;
  color: #c2410c;
}

.c-didactic-wizard__leg-body {
  margin-top: 10px;
  padding-left: 4px;
}

.c-didactic-wizard__chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.c-didactic-wizard__chip-group--duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.c-didactic-wizard__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.c-didactic-wizard__chip.is-selected {
  border-color: #e85d04;
  background: #fff7ed;
  color: #c2410c;
}

.c-didactic-wizard__chip i {
  font-size: 0.95rem;
}

.c-didactic-wizard__activity-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.c-didactic-wizard__activity-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.92rem;
}

.c-didactic-wizard__activity-remove {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
}

.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.c-didactic-wizard__choice {
  display: grid;
  gap: 4px;
  padding: 16px 14px;
  text-align: left;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.c-didactic-wizard__choice:hover {
  border-color: #e85d04;
  transform: translateY(-1px);
}

.c-didactic-wizard__choice i {
  font-size: 1.75rem;
  color: #e85d04;
}

.c-didactic-wizard__choice strong {
  font-size: 1rem;
  color: #0f172a;
}

.c-didactic-wizard__choice span {
  font-size: 0.82rem;
  color: #64748b;
}

.c-didactic-wizard__choice--muted i {
  color: #22c55e;
}

.c-didactic-wizard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  justify-content: flex-end;
  flex-shrink: 0;
}

.c-didactic-wizard__actions .c-button--full {
  width: 100%;
  justify-content: center;
}

.c-didactic-wizard__success {
  text-align: center;
  padding: 12px 0 4px;
  margin-top: -6px;
}

.c-didactic-wizard__check {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

body.is-didactic-wizard-open {
  overflow: hidden;
}

/* El mapa en móvil es bajo: al abrir el wizard usamos toda la pantalla */
body.is-didactic-wizard-open .c-trip-planner__map > .c-didactic-wizard {
  position: fixed;
  inset: 0;
  z-index: 14000;
  padding: max(10px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
  align-items: center;
  justify-content: center;
}

body.is-didactic-wizard-open .c-trip-planner__map > .c-didactic-wizard .c-didactic-wizard__card {
  width: min(440px, 100%);
  max-height: min(92dvh, 720px);
  min-height: min(480px, 88dvh);
  height: auto;
}

@media (min-width: 900px) {
  body.is-didactic-wizard-open .c-trip-planner__map > .c-didactic-wizard .c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) {
    width: min(820px, 94vw);
    max-height: min(88dvh, 620px);
    min-height: min(520px, 78dvh);
    height: min(560px, 86dvh);
  }
}

.page-travel-map--didactic .c-trip-setup-guide {
  border-left-color: #e85d04;
}

.page-travel-map--didactic .c-trip-setup-guide__step-badge {
  background: #e85d04;
}

body.is-didactic-wizard-open .c-map-destination-panel {
  display: none !important;
}

/* Panel 1 — diseñador visual de destinos */
.page-travel-map--didactic #drag-alert,
.page-travel-map--didactic .c-trip-return-mode__hint {
  display: none !important;
}

/* Modo didáctico: un solo flujo, sin paneles duplicados */
.page-travel-map--didactic #map-trip-settings,
.page-travel-map--didactic #trip-setup-guide,
.page-travel-map--didactic #trip-return-mode,
.page-travel-map--didactic #origin-card,
.page-travel-map--didactic #return-card,
.page-travel-map--didactic #btn-save-draft-as,
.page-travel-map--didactic #drag-alert,
.page-travel-map--didactic .c-route-itinerary-chain {
  display: none !important;
}

/* Visibilidad de inputs de ruta la controla JS con [hidden] (paso origen / destino / regreso) */
.page-travel-map--didactic #route-inputs[hidden],
.page-travel-map--didactic #origin-input-wrap[hidden],
.page-travel-map--didactic #destination-input-wrap[hidden],
.page-travel-map--didactic #return-input-wrap[hidden] {
  display: none !important;
}

.c-trip-dates__origin.is-didactic-hidden {
  display: none !important;
}

/* Paso 1: fechas/pasajeros como tarjeta (mismo lenguaje visual que Pasos 2+) */
.c-didactic-dates-card__visual,
.c-didactic-dates-card__lead,
.c-didactic-dates-card__cta,
.c-didactic-dates-card__title {
  display: none;
}

.page-travel-map--didactic .c-trip-dates__bar-wrap {
  bottom: 0;
  margin-top: 4px;
}

.page-travel-map--didactic .c-didactic-dates-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(232, 93, 4, 0.22);
  background: linear-gradient(135deg, #fff7ed 0%, #fff 55%, #f8fafc 100%);
  box-shadow: 0 10px 28px rgba(232, 93, 4, 0.08);
  overflow: hidden;
}

.page-travel-map--didactic .c-didactic-dates-card.is-step-done {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 60%, #f8fafc 100%);
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.08);
}

.page-travel-map--didactic .c-didactic-dates-card.is-step-current {
  border-color: rgba(232, 93, 4, 0.45);
  box-shadow: 0 12px 32px rgba(232, 93, 4, 0.14);
}

.page-travel-map--didactic .c-didactic-dates-card .c-trip-dates__bar-info {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: inherit;
}

.page-travel-map--didactic .c-didactic-dates-card .c-trip-dates__bar-info:hover {
  background: rgba(255, 255, 255, 0.55);
}

.page-travel-map--didactic .c-didactic-dates-card__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-height: 72px;
  border-radius: 14px;
  background: rgba(232, 93, 4, 0.12);
  color: #c2410c;
  font-size: 1.65rem;
  flex-shrink: 0;
}

.page-travel-map--didactic .c-didactic-dates-card.is-step-done .c-didactic-dates-card__visual {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.page-travel-map--didactic .c-didactic-dates-card__body {
  display: block;
  min-width: 0;
}

.page-travel-map--didactic .c-didactic-dates-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.page-travel-map--didactic .c-didactic-dates-card__title {
  display: block;
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.25;
  color: #0f172a;
}

.page-travel-map--didactic .c-didactic-dates-card__lead {
  display: block;
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #475569;
}

.page-travel-map--didactic .c-didactic-dates-card.is-step-done .c-didactic-dates-card__lead {
  display: none;
}

.page-travel-map--didactic .c-didactic-dates-card__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.1);
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

.page-travel-map--didactic .c-didactic-dates-card__meta > span i {
  color: #e85d04;
}

.page-travel-map--didactic .c-didactic-dates-card.is-step-done .c-didactic-dates-card__meta > span i {
  color: #15803d;
}

.page-travel-map--didactic .c-didactic-dates-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: #e85d04;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
}

.page-travel-map--didactic .c-didactic-dates-card.is-step-done .c-didactic-dates-card__cta {
  background: transparent;
  color: #047857;
  border: 1px solid rgba(4, 120, 87, 0.28);
}

.page-travel-map--didactic .c-didactic-dates-card .c-trip-dates__bar-actions {
  align-self: start;
  padding: 10px 10px 0 0;
}

.page-travel-map--didactic .c-didactic-dates-card .c-trip-dates__bar-edit-hint {
  display: none;
}

@media (max-width: 640px) {
  .page-travel-map--didactic .c-didactic-dates-card .c-trip-dates__bar-info {
    grid-template-columns: 1fr;
  }

  .page-travel-map--didactic .c-didactic-dates-card__visual {
    width: 100%;
    min-height: 56px;
    font-size: 1.4rem;
  }

  .page-travel-map--didactic .c-didactic-dates-card__meta > span {
    white-space: normal;
  }
}

.page-travel-map--didactic .c-travel-compose-form__field:has(#compose-origin-input) {
  display: none;
}

.page-travel-map--didactic #draft-save-status {
  font-size: 0.78rem;
}

.c-didactic-sidebar__actions {
  margin-bottom: 10px;
}

.c-didactic-sidebar__actions:empty {
  display: none;
}

.c-trip-planner__map.is-didactic-map-pick {
  outline: 3px solid #e85d04;
  outline-offset: -3px;
  box-shadow: 0 0 0 6px rgba(232, 93, 4, 0.25);
  animation: didactic-map-pulse 1.4s ease-in-out infinite;
}

@keyframes didactic-map-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(232, 93, 4, 0.2); }
  50% { box-shadow: 0 0 0 10px rgba(232, 93, 4, 0.35); }
}

.page-travel-map--didactic .c-route-itinerary-chain .c-travel-route-card {
  display: none;
}

.page-travel-map--didactic .c-route-itinerary-chain .c-route-leg {
  display: none;
}

.c-didactic-sidebar {
  margin-top: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.c-didactic-sidebar__list-title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.c-didactic-sidebar__bot {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.c-didactic-sidebar__bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e85d04;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.c-didactic-sidebar__bot-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #7c2d12;
}

.c-didactic-sidebar__empty {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: #64748b;
}

.c-didactic-sidebar__dest {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.c-didactic-sidebar__dest-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e2e8f0;
}

.c-didactic-sidebar__dest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.c-didactic-sidebar__dest-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff7ed;
  color: #e85d04;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.c-didactic-sidebar__dest-body {
  flex: 1;
  min-width: 0;
}

.c-didactic-sidebar__dest-body strong {
  display: block;
  font-size: 0.95rem;
  color: #0f172a;
}

.c-didactic-sidebar__dest-body span {
  font-size: 0.8rem;
  color: #64748b;
}

.c-didactic-sidebar__dest-remove {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
}

.c-didactic-sidebar__add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border: 2px dashed #fdba74;
  border-radius: 14px;
  background: #fff;
  color: #c2410c;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.c-didactic-sidebar__add-btn:hover {
  background: #fff7ed;
  border-color: #e85d04;
}

.c-didactic-sidebar__search {
  margin-bottom: 12px;
}

.c-didactic-sidebar__search-label {
  display: block;
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #9a3412;
}

.c-didactic-sidebar__search .c-text-input {
  width: 100%;
}

body.is-didactic-map-pick .c-trip-planner__map-canvas {
  cursor: crosshair;
}

.c-didactic-wizard__card-hero {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  height: clamp(148px, 36vw, 220px);
  overflow: hidden;
  background: linear-gradient(135deg, #0d4a7a 0%, #1a6b9a 45%, #0a3558 100%);
}

.c-didactic-wizard__card-hero.is-compact {
  height: clamp(128px, 32vw, 190px);
}

.c-didactic-wizard__card-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.c-didactic-wizard__card-hero.is-loading img {
  opacity: 0.45;
}

.c-didactic-wizard__card-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.72) 100%);
  pointer-events: none;
}

.c-didactic-wizard__card-hero-city {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) .c-didactic-wizard__progress {
  margin-top: 12px;
}

/* Desktop: cuadro más horizontal · portada 40% a la izquierda a altura completa */
@media (min-width: 900px) {
  .c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) {
    width: min(820px, 94vw);
    max-height: min(88vh, 620px);
    height: min(560px, 86vh);
    grid-template-columns: 40% minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "hero progress"
      "hero bot"
      "hero body"
      "hero actions";
    padding: 0;
  }

  .c-didactic-wizard__card.is-step-compact:has(#didactic-wizard-hero:not([hidden])),
  .c-didactic-wizard__card.is-step-scroll:has(#didactic-wizard-hero:not([hidden])) {
    grid-template-columns: 40% minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "hero progress"
      "hero body"
      "hero actions";
  }

  .c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) .c-didactic-wizard__card-hero,
  .c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) .c-didactic-wizard__card-hero.is-compact {
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) .c-didactic-wizard__card-hero-overlay {
    background:
      linear-gradient(90deg, rgba(15, 23, 42, 0.15) 0%, transparent 55%),
      linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.78) 100%);
  }

  .c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) .c-didactic-wizard__progress {
    margin-top: 16px;
    margin-bottom: 10px;
  }

  .c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) .c-didactic-wizard__bot {
    margin-right: 4px;
  }

  .c-didactic-wizard__card:has(#didactic-wizard-hero:not([hidden])) #didactic-wizard-body {
    padding-top: 2px;
  }
}

/* Panel 2 — confirmación destino */
.c-didactic-wizard__dest-cover {
  position: relative;
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #0d4a7a 0%, #1a6b9a 45%, #0a3558 100%);
  border: 1px solid #bae6fd;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.c-didactic-wizard__dest-cover::before {
  content: '';
  display: block;
  padding-top: 52%;
}

.c-didactic-wizard__dest-cover--compact::before {
  padding-top: 38%;
}

.c-didactic-wizard__dest-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.c-didactic-wizard__dest-cover.is-loading img {
  opacity: 0.35;
}

.c-didactic-wizard__dest-cover-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 28px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.78) 100%);
  color: #fff;
}

.c-didactic-wizard__dest-cover-pin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e85d04;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.c-didactic-wizard__dest-cover-city {
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.c-didactic-wizard__map-preview {
  text-align: center;
  padding: 20px 12px;
  border-radius: 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.c-didactic-wizard__map-pin {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #e85d04;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.c-didactic-wizard__map-city {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.c-didactic-wizard__map-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: #0369a1;
}

/* Panel 4 — traslados secuenciales */
.c-didactic-wizard__transfer-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
  padding: 10px 8px;
  border-radius: 12px;
  background: #f8fafc;
}

.c-didactic-wizard__transfer-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #94a3b8;
  min-width: 56px;
}

.c-didactic-wizard__transfer-phase i {
  font-size: 1.1rem;
}

.c-didactic-wizard__transfer-phase.is-done,
.c-didactic-wizard__transfer-phase.is-current {
  color: #e85d04;
  font-weight: 600;
}

.c-didactic-wizard__transfer-line {
  flex: 1;
  height: 3px;
  max-width: 28px;
  border-radius: 999px;
  background: #e2e8f0;
}

/* Panel 5 — resumen final */
.c-didactic-wizard__summary-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.c-didactic-wizard__summary-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

.c-didactic-wizard__summary-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff7ed;
  color: #e85d04;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.c-didactic-wizard__summary-check {
  margin-left: auto;
  color: #16a34a;
}

.c-didactic-wizard__final-form label {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  color: #475569;
}

.c-didactic-wizard__final-form input {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
}

.c-didactic-wizard__final-grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 480px) {
  .c-didactic-wizard__final-grid {
    grid-template-columns: 1fr 1fr;
  }

  .c-didactic-wizard__final-grid label:nth-child(3),
  .c-didactic-wizard__final-grid label:nth-child(4),
  .c-didactic-wizard__final-grid label:nth-child(5) {
    grid-column: 1 / -1;
  }
}

.c-didactic-wizard__card--wide {
  width: min(520px, 100%);
}

@media (max-width: 480px) {
  .c-didactic-wizard__choices--duo {
    grid-template-columns: 1fr;
  }
}
