/*
  planificador.css — Planificador de viaje (planificador.html, js/planificador.js).
  Usa los tokens de css/variables.css (fondo oscuro, dorado como unico acento).
  Movil primero; animaciones suaves que se apagan con prefers-reduced-motion.
*/

.planner-page { background: radial-gradient(1200px 600px at 80% -10%, rgba(212, 175, 55, 0.08), transparent 60%), var(--bg-base); }

.planner-skip {
  position: absolute; left: var(--space-4); top: -60px; z-index: var(--z-toast);
  background: var(--gold-500); color: var(--text-on-gold); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); font-weight: 600;
}
.planner-skip:focus { top: var(--space-2); }

.planner { max-width: 980px; margin: 0 auto; padding: 0 var(--container-padding-mobile) var(--space-10); }

/* ---------- Cabecera ---------- */
.planner-hero { text-align: center; padding: var(--space-4) 0 var(--space-6); }
.planner-hero__brand img { height: 44px; width: auto; margin: 0 auto var(--space-4); }
.planner-hero__eyebrow { color: var(--gold-300); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--space-2); }
.planner-hero__title { font-family: var(--font-display); font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.12; letter-spacing: var(--ls-heading-lg); color: var(--text-primary); margin-bottom: var(--space-3); text-wrap: balance; }
.planner-hero__lead { color: var(--text-secondary); font-size: var(--fs-md); line-height: var(--lh-content); max-width: 640px; margin: 0 auto; text-wrap: pretty; }

/* ---------- Contenedor de la app ---------- */
.planner-app {
  position: relative;
  background: linear-gradient(180deg, rgba(26, 31, 54, 0.92), rgba(19, 23, 40, 0.92));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5) var(--space-4) var(--space-6);
  scroll-margin-top: var(--space-4);
}
.planner-app:focus { outline: none; }
@media (min-width: 640px) { .planner-app { padding: var(--space-8); } }

.planner-loading, .pl-loading-inline { display: flex; align-items: center; gap: var(--space-3); color: var(--text-secondary); justify-content: center; padding: var(--space-8) 0; }
.pl-loading-inline { padding: var(--space-4) 0; justify-content: flex-start; }
.planner-loading__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold-500); animation: pl-pulse 1s ease-in-out infinite; }
.planner-noscript { color: var(--text-secondary); text-align: center; }

/* ---------- Progreso ---------- */
.planner-progress { margin-bottom: var(--space-6); }
.planner-progress__steps { display: flex; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.planner-progress__step { flex: 1; min-width: 0; }
.planner-progress__step > span, .planner-progress__step > button {
  display: flex; align-items: center; gap: var(--space-2); width: 100%;
  font-size: var(--fs-sm); color: var(--text-tertiary); background: none; border: 0; padding: 4px 0; text-align: left; cursor: default;
}
.planner-progress__step > button { cursor: pointer; color: var(--text-secondary); }
.planner-progress__step > button:hover .planner-progress__label { color: var(--gold-300); text-decoration: underline; }
.planner-progress__num {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); font-weight: 700; font-size: 0.8rem;
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}
.planner-progress__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.planner-progress__step.is-current .planner-progress__num { background: var(--gold-500); border-color: var(--gold-500); color: var(--text-on-gold); box-shadow: 0 0 0 4px var(--gold-glow-15); }
.planner-progress__step.is-current .planner-progress__label { color: var(--text-primary); font-weight: 600; }
.planner-progress__step.is-done .planner-progress__num { border-color: var(--gold-500); color: var(--gold-300); }
.planner-progress__bar { height: 4px; background: var(--bg-surface); border-radius: var(--radius-pill); overflow: hidden; }
.planner-progress__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-600), var(--gold-300)); border-radius: inherit; transition: width 500ms cubic-bezier(0.65, 0, 0.35, 1); }
@media (max-width: 420px) {
  .planner-progress__step:not(.is-current) .planner-progress__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Pasos ---------- */
.pl-step__title { font-family: var(--font-display); font-size: clamp(1.5rem, 4.5vw, 2rem); line-height: var(--lh-heading); color: var(--text-primary); margin-bottom: var(--space-2); }
.pl-step__title:focus { outline: none; }
.pl-step__title:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 4px; border-radius: var(--radius-sm); }
.pl-step__hint { color: var(--text-secondary); margin-bottom: var(--space-5); line-height: var(--lh-content); }

.pl-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-6); }
.pl-nav__spacer { flex: 1; }
.pl-nav > .btn--primary { margin-left: auto; }
.pl-nav--end { justify-content: space-between; border-top: 1px solid var(--border-subtle); padding-top: var(--space-5); }
.pl-btn-lg { min-height: 52px; padding-inline: var(--space-6); font-size: var(--fs-base); border-radius: var(--radius-pill); }
.pl-btn-calc { gap: var(--space-2); box-shadow: var(--shadow-gold-glow); position: relative; overflow: hidden; }
.pl-btn-calc svg { width: 20px; height: 20px; }
.pl-btn-calc::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%); animation: pl-shine 3.2s ease-in-out 1s infinite;
}
@media (max-width: 479px) {
  .pl-nav { flex-direction: column-reverse; align-items: stretch; }
  .pl-nav > .btn, .pl-nav > .btn--primary { width: 100%; margin-left: 0; }
  .pl-nav__spacer { display: none; }
}

.pl-link-btn { background: none; border: 0; color: var(--gold-300); font-weight: 600; font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; cursor: pointer; }
.pl-link-btn:hover { color: var(--gold-500); }

/* ---------- Buscador ---------- */
.pl-search { position: relative; margin-bottom: var(--space-5); }
.pl-search__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--gold-300); pointer-events: none; }
.pl-search__input {
  width: 100%; min-height: 56px; padding: 0 var(--space-4) 0 48px; border-radius: var(--radius-pill);
  background: var(--bg-base); border: 1.5px solid var(--border-default); color: var(--text-primary); font-size: var(--fs-base);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.pl-search__input::placeholder { color: var(--text-tertiary); }
.pl-search__input:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 4px var(--gold-glow-15); }
.pl-search__input:disabled { opacity: 0.6; }
.pl-search__results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: var(--z-dropdown);
  background: var(--bg-surface-2); border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-height: min(60vh, 420px); overflow-y: auto; padding: var(--space-2);
}
.pl-search__opt {
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: var(--space-3);
  padding: 10px var(--space-3); border-radius: var(--radius-md); cursor: pointer; color: var(--text-primary);
}
.pl-search__opt img { width: 24px; height: 18px; border-radius: 2px; object-fit: cover; }
.pl-search__opt.is-active, .pl-search__opt:hover { background: var(--bg-surface-hover); }
.pl-search__opt.is-active { box-shadow: inset 0 0 0 1.5px var(--gold-500); }
.pl-search__opt.is-added { opacity: 0.55; cursor: default; }
.pl-search__name { display: flex; flex-direction: column; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.pl-search__meta { font-weight: 400; font-size: var(--fs-xs); color: var(--text-secondary); }
.pl-search__empty { padding: var(--space-4); color: var(--text-secondary); font-size: var(--fs-sm); }

.pl-kind { display: inline-block; font-size: 0.7rem; font-weight: 600; letter-spacing: var(--ls-uppercase-sm); padding: 3px 8px; border-radius: var(--radius-pill); border: 1px solid var(--border-default); color: var(--text-secondary); white-space: nowrap; }
.pl-kind--country { border-color: rgba(212, 175, 55, 0.55); color: var(--gold-300); }
.pl-kind--province { border-color: rgba(168, 173, 199, 0.4); }
.pl-kind--city { border-color: rgba(74, 222, 128, 0.35); color: #b9f5cf; }

/* ---------- Combos ---------- */
.pl-combos { margin-bottom: var(--space-6); }
.pl-combos__title { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: var(--space-2); }
.pl-combos__list { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.pl-chip {
  min-height: 40px; padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.03); color: var(--text-primary); font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base);
}
.pl-chip:hover { border-color: var(--gold-500); background: var(--gold-glow-15); transform: translateY(-1px); }
.pl-chip--sm { min-height: 36px; padding: 6px 12px; }
.pl-chip.is-on { background: var(--gold-500); color: var(--text-on-gold); border-color: var(--gold-500); }

/* ---------- Lista de destinos ---------- */
.pl-list-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.pl-list-head__title { font-size: var(--fs-md); font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: var(--space-2); }
.pl-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--gold-glow-35); color: var(--gold-300); font-size: var(--fs-sm); }
.pl-list { display: flex; flex-direction: column; gap: var(--space-2); counter-reset: none; }
.pl-list__tip { margin-top: var(--space-2); font-size: var(--fs-xs); color: var(--text-tertiary); }
.pl-card {
  position: relative; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-1); border-radius: var(--radius-lg);
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.pl-card:hover { border-color: var(--border-default); }
.pl-card.is-dragging { z-index: 5; border-color: var(--gold-500); box-shadow: var(--shadow-lg), 0 0 0 3px var(--gold-glow-15); background: var(--bg-surface-2); transition: none; }
.pl-card.is-new { animation: pl-pop 600ms cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.pl-card__handle { display: grid; place-items: center; width: 32px; height: 44px; border: 0; background: none; color: var(--text-tertiary); cursor: grab; touch-action: none; border-radius: var(--radius-sm); }
.pl-card__handle svg { width: 18px; height: 18px; fill: currentColor; }
.pl-card__handle:hover { color: var(--gold-300); }
.pl-card.is-dragging .pl-card__handle { cursor: grabbing; }
.pl-card__num { display: none; }
.pl-card__photo { position: relative; width: 52px; height: 52px; border-radius: var(--radius-md); overflow: hidden; background: linear-gradient(135deg, var(--bg-surface-2), var(--bg-surface-hover)); flex: none; }
.pl-card__photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 400ms ease; }
.pl-card__photo.is-loaded img { opacity: 1; }
.pl-card__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pl-card__name { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; color: var(--text-primary); line-height: 1.25; overflow-wrap: anywhere; }
.pl-flag { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.pl-card__actions { display: flex; gap: 2px; }
.pl-icon-btn { display: grid; place-items: center; width: 36px; height: 40px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-secondary); cursor: pointer; }
.pl-icon-btn svg { width: 18px; height: 18px; }
.pl-icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); }
.pl-icon-btn:disabled { opacity: 0.3; cursor: default; }
.pl-icon-btn--remove:hover:not(:disabled) { color: var(--safety-red); background: rgba(248, 113, 113, 0.1); }
@media (max-width: 479px) {
  .pl-card { grid-template-columns: auto 1fr auto; }
  .pl-card__photo { display: none; }
  .pl-icon-btn { width: 34px; }
}
@media (min-width: 640px) {
  .pl-card__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-500); color: var(--text-on-gold); font-weight: 700; font-size: 0.8rem; }
  .pl-card { grid-template-columns: auto auto auto 1fr auto; }
}

/* Estado vacio */
.pl-empty { text-align: center; padding: var(--space-8) var(--space-4); border: 1.5px dashed var(--border-default); border-radius: var(--radius-lg); color: var(--text-secondary); }
.pl-empty__icon { width: 64px; height: 64px; color: var(--gold-500); margin: 0 auto var(--space-3); animation: pl-float 3.5s ease-in-out infinite; }
.pl-empty__title { color: var(--text-primary); font-weight: 600; font-size: var(--fs-md); margin-bottom: var(--space-1); }
.pl-empty--error { border-color: rgba(248, 113, 113, 0.4); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }

/* ---------- Paso 2 ---------- */
.pl-modes { display: grid; gap: var(--space-3); margin-bottom: var(--space-4); border: 0; padding: 0; }
@media (min-width: 720px) { .pl-modes { grid-template-columns: repeat(3, 1fr); } }
.pl-mode, .pl-seg {
  position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer;
  padding: var(--space-4); border-radius: var(--radius-lg); background: var(--bg-surface); border: 1.5px solid var(--border-subtle);
  transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}
.pl-mode:hover, .pl-seg:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.pl-mode input, .pl-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pl-mode:focus-within, .pl-seg:focus-within { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: var(--focus-ring-offset); }
.pl-mode.is-selected, .pl-seg.is-selected { border-color: var(--gold-500); background: linear-gradient(160deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.03)); box-shadow: 0 0 0 1px var(--gold-500) inset; }
.pl-mode__icon { width: 26px; height: 26px; color: var(--gold-300); margin-bottom: 4px; }
.pl-mode__title, .pl-seg__title { font-weight: 600; color: var(--text-primary); }
.pl-mode__desc, .pl-seg__desc { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.45; }
.pl-mode.is-selected::after, .pl-seg.is-selected::after {
  content: '✓'; position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 50%; background: var(--gold-500); color: var(--text-on-gold); font-size: 0.75rem; font-weight: 700;
}
.pl-mode-panel { padding: var(--space-4); border-radius: var(--radius-lg); background: rgba(5, 7, 13, 0.35); border: 1px solid var(--border-subtle); margin-bottom: var(--space-5); min-height: 64px; }
.pl-auto p { color: var(--text-secondary); line-height: var(--lh-content); }

.pl-total__row { display: flex; align-items: center; gap: var(--space-4); margin: var(--space-2) 0 var(--space-3); }
.pl-range { flex: 1; min-width: 0; appearance: none; -webkit-appearance: none; height: 8px; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--gold-500) var(--fill, 15%), var(--bg-surface-2) var(--fill, 15%)); cursor: pointer; }
.pl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-300); border: 3px solid var(--bg-base); box-shadow: 0 0 0 2px var(--gold-500), var(--shadow-gold-glow); }
.pl-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold-300); border: 3px solid var(--bg-base); box-shadow: 0 0 0 2px var(--gold-500); }
.pl-range:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: 6px; }
.pl-total__num { display: flex; align-items: center; gap: var(--space-2); color: var(--text-secondary); }
.pl-num, .pl-select {
  min-height: 44px; border-radius: var(--radius-md); background: var(--bg-base); border: 1.5px solid var(--border-default); color: var(--text-primary); font-size: var(--fs-base);
}
.pl-num { width: 76px; text-align: center; font-weight: 700; font-size: var(--fs-md); }
.pl-select { width: 100%; padding: 0 var(--space-3); }
.pl-num:focus, .pl-select:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-glow-15); }
.pl-quick { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pl-total__hint { margin-top: var(--space-3); font-size: var(--fs-sm); color: var(--text-tertiary); }

.pl-manual { display: flex; flex-direction: column; gap: var(--space-2); }
.pl-manual__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border-subtle); }
.pl-manual__row:last-child { border-bottom: 0; }
.pl-manual__name { display: flex; flex-direction: column; font-weight: 600; color: var(--text-primary); min-width: 0; overflow-wrap: anywhere; }
.pl-manual__rec { font-weight: 400; font-size: var(--fs-xs); color: var(--gold-300); }
.pl-manual__total { margin-top: var(--space-3); color: var(--text-secondary); font-weight: 600; }

.pl-options { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .pl-options { grid-template-columns: auto 1fr; } .pl-option--wide { grid-column: 1 / -1; grid-row: 1; } }
.pl-option { border: 0; padding: 0; margin: 0; min-width: 0; }
.pl-option__label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); margin-bottom: var(--space-2); }
.pl-segmented { display: grid; gap: var(--space-2); }
@media (min-width: 560px) { .pl-segmented { grid-template-columns: repeat(3, 1fr); } }
.pl-seg { padding: var(--space-3) var(--space-4); }

.pl-stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-base); border: 1.5px solid var(--border-default); border-radius: var(--radius-pill); padding: 3px; flex: none; }
.pl-stepper__btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg-surface-2); color: var(--text-primary); font-size: 1.25rem; line-height: 1; cursor: pointer; transition: background var(--transition-fast); }
.pl-stepper__btn:hover:not(:disabled) { background: var(--gold-500); color: var(--text-on-gold); }
.pl-stepper__btn:disabled { opacity: 0.35; cursor: default; }
.pl-stepper__value { min-width: 92px; text-align: center; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* ---------- Calculando ---------- */
.pl-calculating { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--space-12) 0; color: var(--text-secondary); text-align: center; }
.pl-globe { position: relative; width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--gold-500); box-shadow: 0 0 30px var(--gold-glow-35), inset 0 0 18px var(--gold-glow-15); overflow: hidden; }
.pl-globe::before, .pl-globe span { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(212, 175, 55, 0.55); }
.pl-globe::before { inset: 0 22px; animation: pl-spin 1.6s linear infinite; }
.pl-globe span { inset: 24px -4px; border-radius: 50%; border-width: 1.5px 0; }
#pl-calc-msg { min-height: 1.6em; animation: pl-fade 1.1s ease-in-out infinite; }

/* ---------- Resultado ---------- */
.pl-summary { text-align: center; padding-bottom: var(--space-6); border-bottom: 1px solid var(--border-subtle); margin-bottom: var(--space-6); }
.pl-summary__kicker { color: var(--gold-300); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--space-2); }
.pl-summary__title { text-wrap: balance; }
.pl-summary__money { margin: var(--space-5) 0; }
.pl-money { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 var(--space-2); font-family: var(--font-display); font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.1; color: var(--gold-300); font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgba(212, 175, 55, 0.25); }
.pl-money__sep { color: var(--gold-600); }
.pl-money__label { color: var(--text-secondary); margin-top: var(--space-1); }
.pl-money__group { margin-top: var(--space-2); color: var(--text-primary); font-weight: 600; }
.pl-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); margin: 0 auto var(--space-4); max-width: 680px; }
@media (min-width: 640px) { .pl-stats { grid-template-columns: repeat(4, 1fr); } }
.pl-stats li { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: var(--space-3) var(--space-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-stats strong { color: var(--text-primary); font-size: var(--fs-md); overflow-wrap: anywhere; }
.pl-stats span { color: var(--text-tertiary); font-size: var(--fs-xs); }
.pl-summary__note { color: var(--text-tertiary); font-size: var(--fs-sm); max-width: 640px; margin: 0 auto var(--space-5); line-height: 1.5; }
.pl-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.pl-actions .btn { min-height: 44px; padding: 10px 18px; border-radius: var(--radius-pill); }
.pl-actions .icon { width: 18px; height: 18px; }

.pl-alert { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); margin-bottom: var(--space-6); line-height: 1.5; }
.pl-alert > .icon { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.pl-alert__title { font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.pl-alert p { color: var(--text-secondary); }
.pl-alert--warn { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.45); }
.pl-alert--warn > .icon { color: var(--safety-amber); }
.pl-alert--ok { background: rgba(74, 222, 128, 0.07); border: 1px solid rgba(74, 222, 128, 0.35); }
.pl-alert--ok > .icon { color: var(--safety-green); }

.pl-section { margin-bottom: var(--space-8); }
.pl-section__title { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--text-primary); margin-bottom: var(--space-3); }
.pl-section__hint { color: var(--text-tertiary); font-size: var(--fs-sm); margin: calc(-1 * var(--space-2)) 0 var(--space-4); }

.pl-split { display: flex; height: 34px; border-radius: var(--radius-pill); overflow: hidden; background: var(--bg-surface); margin-bottom: var(--space-4); gap: 2px; }
.pl-split__seg { flex: 0 0 var(--w); min-width: 6px; display: grid; place-items: center; background: var(--c); color: var(--text-on-gold); font-weight: 700; font-size: var(--fs-sm); transform-origin: left; animation: pl-grow 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.pl-split__seg:nth-child(2) { animation-delay: 80ms; } .pl-split__seg:nth-child(3) { animation-delay: 160ms; } .pl-split__seg:nth-child(4) { animation-delay: 240ms; } .pl-split__seg:nth-child(5) { animation-delay: 320ms; }
.pl-split__seg--transit { background: repeating-linear-gradient(135deg, var(--bg-surface-hover) 0 6px, var(--border-default) 6px 12px); color: var(--text-secondary); }
.pl-why { display: flex; flex-direction: column; gap: var(--space-3); }
.pl-why__item { display: flex; gap: var(--space-3); align-items: flex-start; }
.pl-why__dot { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c, var(--gold-500)); color: var(--text-on-gold); font-weight: 700; font-size: 0.8rem; }
.pl-why__head { color: var(--text-primary); }
.pl-why__rec { color: var(--text-tertiary); font-size: var(--fs-sm); }
.pl-why__text { color: var(--text-secondary); line-height: var(--lh-content); }

.pl-map { height: 360px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-subtle); background: var(--bg-void); position: relative; z-index: 0; }
@media (min-width: 900px) { .pl-map { height: 440px; } }
.pl-map__loading { display: grid; place-items: center; height: 100%; color: var(--text-tertiary); }
.pl-map-step span { width: 30px !important; height: 30px !important; font-size: 0.85rem !important; }

.pl-countries { display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .pl-countries { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.pl-country { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.pl-country__title { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-md); color: var(--text-primary); }
.pl-country__block p, .pl-country__list { color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.55; }
.pl-country__label { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-primary) !important; margin-bottom: 2px; }
.pl-country__label .icon, .pl-safety__title .icon, .pl-safety-chip .icon { width: 16px; height: 16px; color: var(--gold-300); flex: none; }
.pl-country__list { display: flex; flex-direction: column; gap: 4px; }
.pl-safety { border-radius: var(--radius-md); padding: var(--space-3); font-size: var(--fs-sm); line-height: 1.5; color: var(--text-secondary); }
.pl-safety__title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.pl-safety--high { background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.4); }
.pl-safety--high .pl-safety__title .icon { color: var(--safety-red); }
.pl-safety--medium { background: rgba(245, 158, 11, 0.07); border: 1px solid rgba(245, 158, 11, 0.32); }
.pl-safety--medium .pl-safety__title .icon { color: var(--safety-amber); }
.pl-safety__more { margin-top: 4px; }
.pl-safety-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-secondary); }
.pl-safety-chip .icon { color: var(--safety-green); }

.pl-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-300); font-weight: 600; font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(232, 199, 102, 0.4); min-height: 32px; }
.pl-link:hover { color: var(--gold-500); text-decoration-color: currentColor; }
.pl-link--partner { color: var(--text-primary); text-decoration-color: var(--border-strong); }
.pl-partner-note { font-size: var(--fs-xs); color: var(--text-tertiary); }

/* Destino */
.pl-dest { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-left: 4px solid var(--c); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-3); }
.pl-dest__head { position: relative; display: flex; flex-direction: column; }
.pl-dest__photo { position: relative; margin: 0; height: 170px; overflow: hidden; background: var(--bg-surface-2); }
@media (min-width: 640px) { .pl-dest__photo { height: 220px; } }
.pl-dest__photo img { width: 100%; height: 100%; object-fit: cover; }
.pl-dest__photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 14, 23, 0) 40%, rgba(19, 23, 40, 0.95)); pointer-events: none; }
.pl-credit { position: absolute; right: 8px; bottom: 6px; z-index: 1; font-size: 0.68rem; color: rgba(244, 245, 249, 0.75); background: rgba(5, 7, 13, 0.55); padding: 2px 6px; border-radius: var(--radius-sm); max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-credit a { color: inherit; text-decoration: underline; }
.pl-dest__photo .pl-credit { top: 8px; bottom: auto; }
.pl-dest__titles { padding: var(--space-4) var(--space-4) 0; }
.pl-dest__photo + .pl-dest__titles { margin-top: -56px; position: relative; z-index: 1; }
.pl-dest__kicker { display: flex; align-items: center; gap: var(--space-2); color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: 4px; }
.pl-dest__title { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.15; color: var(--text-primary); overflow-wrap: anywhere; }
.pl-dest__facts { color: var(--gold-300); font-weight: 600; font-size: var(--fs-sm); margin-top: 4px; }
.pl-days { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.pl-day { display: grid; grid-template-columns: 64px 1fr; gap: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px dashed var(--border-subtle); }
.pl-day:last-child { border-bottom: 0; padding-bottom: 0; }
.pl-day__num { font-size: var(--fs-xs); font-weight: 700; letter-spacing: var(--ls-uppercase-sm); text-transform: uppercase; color: var(--c, var(--gold-300)); padding-top: 3px; }
.pl-day__title { color: var(--text-primary); font-weight: 600; font-size: var(--fs-base); line-height: 1.35; overflow-wrap: anywhere; }
.pl-day__note { color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.55; margin-top: 4px; }
.pl-day--libre .pl-day__title { color: var(--text-secondary); }
.pl-highlights { margin-top: var(--space-2); display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.5; }
.pl-highlights li { padding-left: 14px; position: relative; }
.pl-highlights li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--gold-500)); }
.pl-highlights strong { color: var(--text-primary); }
.pl-stops { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); }
.pl-stop { display: flex; gap: var(--space-3); align-items: flex-start; }
.pl-stop__photo { position: relative; flex: none; width: 84px; height: 84px; margin: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-surface-2); }
.pl-stop__photo img { width: 100%; height: 100%; object-fit: cover; }
.pl-stop__photo .pl-credit { display: none; }
.pl-stop__body { min-width: 0; }
.pl-stop__name { font-weight: 600; color: var(--text-primary); font-size: var(--fs-sm); }
.pl-stop__desc { color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.55; margin-top: 2px; }
.pl-stop__meta { color: var(--text-tertiary); font-size: var(--fs-xs); line-height: 1.5; margin-top: 4px; }
.pl-stop__meta span { color: var(--gold-300); font-weight: 600; }
@media (max-width: 479px) {
  .pl-day { grid-template-columns: 1fr; gap: 4px; }
  .pl-stop__photo { width: 64px; height: 64px; }
}
.pl-dest__links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); padding: 0 var(--space-4) var(--space-2); }
.pl-dest > .pl-partner-note { padding: 0 var(--space-4) var(--space-4); }

/* Traslado */
.pl-move { display: flex; gap: var(--space-3); margin: var(--space-2) 0 var(--space-3) var(--space-4); padding: var(--space-3) var(--space-4); border-left: 2px dashed var(--gold-600); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: rgba(212, 175, 55, 0.05); }
.pl-move__icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold-glow-15); color: var(--gold-300); }
.pl-move__icon .icon { width: 18px; height: 18px; }
.pl-move__body { min-width: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-secondary); }
.pl-move__title { color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; }
.pl-move__km { color: var(--gold-300); font-weight: 600; white-space: nowrap; }
.pl-badge { display: inline-block; font-size: 0.68rem; font-weight: 600; padding: 1px 7px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); color: var(--text-tertiary); vertical-align: 1px; }
.pl-move__days { color: var(--gold-300); }
.pl-move__routes { margin-top: var(--space-2); }
.pl-move__routes-title { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--ls-uppercase-sm); color: var(--safety-green); }
.pl-move__routes li { margin-top: 4px; }
.pl-move__routes strong { color: var(--text-primary); }
.pl-move__tip { margin-top: var(--space-2); }
.pl-move__tip summary { cursor: pointer; color: var(--gold-300); font-weight: 600; }
.pl-move__tip p { margin-top: 4px; }

/* Presupuesto */
.pl-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); }
.pl-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.pl-table th, .pl-table td { padding: 10px var(--space-3); text-align: right; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.pl-table th[scope="row"], .pl-table thead th:first-child { text-align: left; color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; }
.pl-table thead th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-uppercase-sm); color: var(--text-tertiary); background: var(--bg-surface); }
.pl-table tfoot th, .pl-table tfoot td { color: var(--gold-300); font-weight: 700; border-bottom: 0; background: rgba(212, 175, 55, 0.06); }
.pl-budget-notes { margin-top: var(--space-3); display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); color: var(--text-tertiary); line-height: 1.5; }
.pl-budget-notes li { padding-left: 14px; position: relative; }
.pl-budget-notes li::before { content: '·'; position: absolute; left: 2px; color: var(--gold-500); font-weight: 700; }
.pl-flights { margin-top: var(--space-4); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.pl-flights .icon { width: 18px; height: 18px; }

/* ---------- Contenido estatico (SEO) ---------- */
.planner-info { margin-top: var(--space-10); }
.planner-info h2 { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--text-primary); margin-bottom: var(--space-4); }
.planner-info__steps { display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .planner-info__steps { grid-template-columns: repeat(3, 1fr); } }
.planner-info__steps li { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-4); }
.planner-info__steps h3 { color: var(--gold-300); font-size: var(--fs-base); margin-bottom: var(--space-2); }
.planner-info__steps p, .planner-info__note, .planner-faq p { color: var(--text-secondary); line-height: var(--lh-content); font-size: var(--fs-sm); }
.planner-info__note { margin-top: var(--space-4); }
/* Ideas de viaje: combinaciones que abren el planificador ya calculado + enlaces a las guias */
.planner-ideas > p { color: var(--text-secondary); line-height: var(--lh-content); font-size: var(--fs-sm); margin-bottom: var(--space-3); }
.planner-ideas__list { display: grid; gap: var(--space-2); }
@media (min-width: 760px) { .planner-ideas__list { grid-template-columns: repeat(2, 1fr); } }
.planner-ideas__list li { display: flex; flex-direction: column; gap: 4px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); font-size: var(--fs-sm); color: var(--text-tertiary); }
.planner-ideas__list a { color: var(--gold-300); }
.planner-ideas__plan { font-weight: 600; font-size: var(--fs-base); min-height: 24px; }
.planner-faq details { border-bottom: 1px solid var(--border-subtle); padding: var(--space-3) 0; }
.planner-faq summary { cursor: pointer; color: var(--text-primary); font-weight: 600; line-height: 1.4; list-style: none; display: flex; justify-content: space-between; gap: var(--space-3); }
.planner-faq summary::-webkit-details-marker { display: none; }
.planner-faq summary::after { content: '+'; color: var(--gold-300); font-size: 1.3rem; line-height: 1; flex: none; transition: transform var(--transition-base); }
.planner-faq details[open] summary::after { transform: rotate(45deg); }
.planner-faq details p { margin-top: var(--space-2); }
.planner-info__more { margin-top: var(--space-5); color: var(--text-secondary); font-size: var(--fs-sm); }
.planner-info__more a { color: var(--gold-300); }

/* ---------- Animaciones ---------- */
.pl-anim { animation: pl-in 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.pl-reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.pl-reveal.is-in { opacity: 1; transform: none; }
.pl-reveal.pl-anim { animation: none; }
@keyframes pl-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pl-pop { 0% { transform: scale(0.92); box-shadow: 0 0 0 0 var(--gold-glow-35); } 60% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(212, 175, 55, 0); } 100% { transform: none; } }
@keyframes pl-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes pl-spin { to { transform: rotateY(360deg); } }
@keyframes pl-pulse { 50% { transform: scale(0.6); opacity: 0.5; } }
@keyframes pl-fade { 50% { opacity: 0.55; } }
@keyframes pl-float { 50% { transform: translateY(-6px); } }
@keyframes pl-shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce) {
  .pl-anim, .pl-split__seg, .pl-card.is-new, .pl-empty__icon, .planner-loading__dot, #pl-calc-msg, .pl-globe::before, .pl-btn-calc::after { animation: none !important; }
  .pl-reveal { opacity: 1; transform: none; transition: none; }
  .planner-progress__bar span { transition: none; }
}

/* ---------- Impresion / PDF ---------- */
@media print {
  @page { margin: 14mm; }
  body, .planner-page { background: #fff !important; color: #111 !important; }
  .detail-topbar, .detail-footer, .planner-hero, .planner-progress, .planner-info, .pl-actions, .pl-nav, .pl-dest__links, .pl-partner-note, .pl-flights, .planner-skip, .toast-container, .pl-map, #pl-map-title, ins.adsbygoogle, .google-auto-placed { display: none !important; }
  .planner { max-width: none; padding: 0; }
  .planner-app { background: none !important; border: 0; box-shadow: none; padding: 0; }
  .pl-reveal { opacity: 1 !important; transform: none !important; }
  .pl-anim, .pl-split__seg { animation: none !important; }
  .pl-step__title, .pl-section__title, .pl-dest__title, .pl-day__title, .pl-stop__name, .pl-why__head, .pl-country__title, .pl-move__title, .pl-alert__title, .pl-stats strong, .pl-country__label, .pl-table th[scope="row"] { color: #111 !important; }
  .pl-money, .pl-dest__facts, .pl-day__num, .pl-move__km, .pl-stop__meta span, .pl-summary__kicker, .pl-table tfoot th, .pl-table tfoot td { color: #6b5212 !important; text-shadow: none; }
  p, li, td, .pl-why__text, .pl-day__note, .pl-stop__desc, .pl-stop__meta, .pl-move__body, .pl-summary__note, .pl-budget-notes { color: #333 !important; }
  .pl-dest, .pl-country, .pl-stats li, .pl-table-wrap, .pl-alert, .pl-safety, .pl-move { background: #fff !important; border-color: #ccc !important; box-shadow: none; break-inside: avoid; }
  .pl-dest { break-inside: auto; }
  .pl-day { break-inside: avoid; }
  .pl-dest__photo { height: 120px; }
  .pl-dest__photo::after { display: none; }
  .pl-dest__photo + .pl-dest__titles { margin-top: 0; }
  .pl-stop__photo { display: none; }
  .pl-table thead th { background: #f3f3f3 !important; }
  a { color: #111 !important; }
}

/* Celular: combos en una fila deslizable (no empujan el buscador hacia abajo). */
@media (max-width: 639px) {
  .pl-combos__list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--space-4)); padding: 2px var(--space-4) 6px; scroll-snap-type: x proximity; }
  .pl-combos__list::-webkit-scrollbar { display: none; }
  .pl-combos__list .pl-chip { flex: none; white-space: nowrap; scroll-snap-align: start; }
  .planner-hero__lead { font-size: var(--fs-base); }
}
