/* Travel 4 Eternity — estilos compartidos (paneles y blog) */
:root {
  --tinta: #43302E;
  --tinta-2: #5A4643;
  --suave: #75645F;
  --mar: #43302E;
  --mar-claro: #DDEBF2;
  --arena: #FFF9DC;
  --papel: #FFFDF3;
  --linea: #E4DCC3;
  --coral: #b0503a;
  --coral-claro: #f6e1d8;
  --oro: #7B6560;
  --ok: #2f8a5b;
  --ok-claro: #e3f3ea;
  --warn: #b7791f;
  --warn-claro: #fbf0dc;
  --sombra: 0 2px 4px rgba(50,30,10,.06), 0 8px 22px rgba(50,30,10,.12);
  --radio: 16px;
  --serif: 'Playfair Display', Georgia, serif;
  --mano: 'Playfair Display', 'Bradley Hand', cursive;
  --display: 'Playfair Display', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --cinta: rgba(193, 219, 232, .95);
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--arena); color: var(--tinta);
  font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0; margin: 0 0 .4em; line-height: 1.15; }
h1 { font-size: 32px; } h2 { font-size: 24px; } h3 { font-size: 19px; }
a { color: var(--mar); }
img { max-width: 100%; display: block; }
.oculto { display: none !important; }
.muted { color: var(--suave); }
.chico { font-size: 13px; }
.centro { text-align: center; }

/* Estructura */
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(251,246,238,.94);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--linea); padding-top: env(safe-area-inset-top);
}
.topbar .wrap { display: flex; align-items: center; gap: 10px; min-height: 56px; }
.marca { font-family: var(--serif); font-size: 18px; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca small { display: block; font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--suave); letter-spacing: .08em; text-transform: uppercase; }
main { padding: 18px 0 calc(130px + env(safe-area-inset-bottom)); }

/* Barra inferior tipo app */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--papel);
  border-top: 1px solid var(--linea); display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar button {
  flex: 1; background: none; border: 0; font: 600 11px var(--sans); color: var(--suave);
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; cursor: pointer;
}
.tabbar button .ico { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .7; }
.tabbar button.activo { color: var(--mar); }
.tabbar button.activo .ico { filter: none; opacity: 1; }

/* Tarjetas */
.card { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px; box-shadow: var(--sombra); margin-bottom: 14px; }
.card.plano { box-shadow: none; }
.card h2, .card h3 { margin-bottom: 8px; }
.seccion-titulo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.seccion-titulo h2 { margin: 0; }
.lista { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 12px; background: var(--papel); border: 1px solid var(--linea);
  border-radius: 14px; padding: 12px 14px; cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit;
}
.item:active { transform: scale(.99); }
.item .cuerpo { flex: 1; min-width: 0; }
.item .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 13px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--mar-claro); color: var(--mar); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.vacio { text-align: center; padding: 28px 16px; color: var(--suave); border: 1.5px dashed var(--linea); border-radius: var(--radio); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--mar-claro); color: var(--mar); white-space: nowrap; }
.chip.ok { background: var(--ok-claro); color: var(--ok); }
.chip.warn { background: var(--warn-claro); color: var(--warn); }
.chip.coral { background: var(--coral-claro); color: var(--coral); }
.chip.gris { background: #eee9e1; color: var(--tinta-2); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer;
  font: 700 15px var(--sans); padding: 12px 18px; border-radius: 12px; background: var(--tinta); color: #fff; text-decoration: none;
  min-height: 46px;
}
.btn:disabled { opacity: .5; }
.btn.mar { background: var(--mar); }
.btn.coral { background: var(--coral); }
.btn.sec { background: var(--papel); color: var(--tinta); border: 1px solid var(--linea); }
.btn.peligro { background: none; color: #b33a2b; border: 1px solid #f0c9c1; }
.btn.chico { padding: 8px 12px; min-height: 36px; font-size: 13px; border-radius: 10px; }
.btn.bloque { width: 100%; }
.btn.wa { background: #25d366; color: #0b3d1f; }
.fila-btn { display: flex; gap: 10px; flex-wrap: wrap; }
.fila-btn .btn { flex: 1; }
.icon-btn { background: none; border: 0; font-size: 20px; padding: 8px; cursor: pointer; border-radius: 10px; color: var(--tinta); }

/* Formularios */
label { display: block; font-size: 13px; font-weight: 700; color: var(--tinta-2); margin: 12px 0 5px; }
input, select, textarea {
  width: 100%; font: 16px var(--sans); color: var(--tinta); background: #fff; border: 1px solid var(--linea);
  border-radius: 12px; padding: 11px 12px; outline: none; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--suave) 50%), linear-gradient(135deg, var(--suave) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--mar); box-shadow: 0 0 0 3px rgba(44,108,106,.15); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
.grid2 > * { min-width: 0; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: 0 8px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; margin: 0; font-size: 15px; color: var(--tinta); }
.switch input { width: 48px; height: 28px; border-radius: 99px; background: #d9d1c5; position: relative; padding: 0; border: 0; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--mar); }
.switch input:checked::after { transform: translateX(20px); }

/* Bloques repetibles (itinerario, servicios, ítems) */
.rep { border: 1px solid var(--linea); border-radius: 14px; padding: 4px 12px 12px; margin-bottom: 10px; background: #fff; position: relative; }
.rep .rep-cab { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; font-weight: 800; font-size: 13px; color: var(--mar); }
.rep .rep-cab .icon-btn { font-size: 16px; padding: 4px 6px; }

/* Hoja (modal desde abajo) */
.hoja-fondo { position: fixed; inset: 0; background: rgba(40,30,20,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.hoja {
  background: var(--arena); width: 100%; max-width: 760px; max-height: 94vh; overflow: auto; border-radius: 22px 22px 0 0;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom)); animation: sube .22s ease-out;
}
.hoja-cab { position: sticky; top: 0; background: var(--arena); z-index: 2; display: flex; align-items: center; gap: 8px; padding: 14px 0 10px; border-bottom: 1px solid var(--linea); margin-bottom: 6px; }
.hoja-cab h2 { flex: 1; margin: 0; font-size: 19px; }
.hoja-pie { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); background: var(--arena); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin-top: 16px; border-top: 1px solid var(--linea); display: flex; gap: 10px; }
.hoja-pie .btn { flex: 1; }
@keyframes sube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 800px) { .hoja-fondo { align-items: center; } .hoja { border-radius: 22px; } }

/* Totales / dinero */
.totales { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.total-caja { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 10px; }
.total-caja .k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); }
.total-caja .v { font-family: var(--serif); font-size: 18px; font-weight: 600; margin-top: 2px; line-height: 1.2; word-break: break-word; }
.total-caja.ok .v { color: var(--ok); } .total-caja.warn .v { color: var(--coral); }
.tabla-items { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla-items td { padding: 8px 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla-items td.n { text-align: right; white-space: nowrap; padding-left: 10px; }
.tabla-items tr.total td { border-bottom: 0; font-weight: 800; font-size: 16px; padding-top: 12px; }

/* Portada / foto subida */
.foto-prev { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; background: var(--mar-claro); margin-top: 8px; }
.archivo-fila { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--linea); border-radius: 12px; margin-bottom: 8px; }
.archivo-fila a.btn { flex: none; overflow: visible; }
.archivo-fila a:not(.btn) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; text-decoration: none; }

/* Login */
.login-pantalla { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.login-caja { max-width: 420px; width: 100%; margin: 0 auto; }
.logo-grande { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 16px; box-shadow: var(--sombra); }

/* Toast */
.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -20px); background: var(--tinta); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 99; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #b33a2b; }

/* Contenido del blog */
.prosa { font-size: 17px; line-height: 1.7; }
.prosa h2 { font-size: 24px; margin-top: 1.4em; } .prosa h3 { font-size: 20px; margin-top: 1.2em; }
.prosa img { border-radius: 14px; margin: 1em 0; width: 100%; }
.prosa figure { margin: 0; }
.prosa ul { padding-left: 1.2em; }

.cargando { text-align: center; padding: 40px; color: var(--suave); }
.cargando::before { content: ''; display: block; width: 28px; height: 28px; margin: 0 auto 10px; border: 3px solid var(--linea); border-top-color: var(--mar); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Marca */
.logo-top { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px var(--linea); flex-shrink: 0; }
.mano { font-family: var(--mano); font-weight: 700; color: var(--coral); font-size: 22px; line-height: 1; }
.logo-grande { border-radius: 50%; }
.hoja { background: var(--arena); }

/* Piezas scrapbook (igual que la página) */
.tape { display: inline-block; background: var(--cinta); color: var(--tinta); font-weight: 600; font-size: 13px; padding: 5px 14px; box-shadow: 0 1px 2px rgba(60,40,20,.18); clip-path: polygon(2% 0, 98% 4%, 100% 50%, 97% 100%, 3% 96%, 0 50%); }
.papel-roto { background: var(--arena); box-shadow: 0 10px 30px rgba(60,40,20,.2);
  clip-path: polygon(0 .6%, 4% 0, 23% .4%, 48% 0, 71% .5%, 96% 0, 100% .7%, 99.5% 30%, 100% 62%, 99.3% 99.4%, 82% 100%, 55% 99.6%, 30% 100%, 6% 99.6%, 0 100%, .6% 64%, 0 33%); }
.titulo-display { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.polaroid { background: #fff; padding: 8px 8px 30px; box-shadow: 0 8px 22px rgba(50,30,10,.22); position: relative; margin: 0; }
.polaroid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font: 700 19px var(--mano); color: var(--suave); }
.polaroid::before { content: ""; position: absolute; top: -11px; left: 50%; width: 80px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: var(--cinta); box-shadow: 0 1px 2px rgba(0,0,0,.12); z-index: 1; }

/* Documento de presupuesto */
.doc-presu { padding: 26px 20px 30px; position: relative; overflow: hidden; color: var(--tinta); }
.doc-presu .dp-top { display: flex; align-items: center; gap: 12px; }
.doc-presu .dp-top img { width: 54px; height: 54px; border-radius: 50%; box-shadow: 0 0 0 1px var(--linea); }
.doc-presu .dp-kicker { font: 700 22px/1 var(--mano); color: var(--coral); }
.doc-presu .dp-marca { font: 600 15px var(--serif); color: var(--oro); letter-spacing: .02em; }
.doc-presu h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 38px; line-height: .95; margin: 18px 0 6px; }
.doc-presu h1 span { display: block; color: var(--oro); font-size: 26px; }
.doc-presu .dp-cintas { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.doc-presu .dp-cintas .tape:nth-child(2) { transform: rotate(-1.5deg); }
.doc-presu .dp-cintas .tape:nth-child(3) { transform: rotate(1deg); }
.doc-presu table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc-presu th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--suave); padding: 6px 0; border-bottom: 2px dotted var(--oro); }
.doc-presu th.n, .doc-presu td.n { text-align: right; white-space: nowrap; padding-left: 8px; }
.doc-presu td { padding: 10px 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.doc-presu td small { display: block; color: var(--suave); font-size: 12px; }
.doc-presu .dp-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding: 12px 14px; background: var(--papel); border: 2px solid var(--tinta); border-radius: 14px; }
.doc-presu .dp-total span { font-family: var(--display); text-transform: uppercase; font-size: 18px; }
.doc-presu .dp-total b { font-family: var(--display); font-weight: 400; font-size: 26px; }
.doc-presu .dp-notas { margin-top: 16px; background: var(--papel); border-left: 4px solid #78764a; padding: 10px 14px; font-size: 13px; white-space: pre-wrap; }
.doc-presu .dp-firma { margin-top: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; font-size: 13px; color: var(--suave); }
.doc-presu .dp-firma .mano { font-size: 30px; }
.doc-presu .sello-ok { position: absolute; right: 14px; top: 92px; transform: rotate(12deg); border: 3px double var(--ok); color: var(--ok); border-radius: 50%; width: 104px; height: 104px; display: grid; place-items: center; text-align: center; font: 400 14px/1.05 var(--display); text-transform: uppercase; opacity: .85; mix-blend-mode: multiply; }
.doc-presu .sello-ok small { display: block; font: 600 9px var(--sans); letter-spacing: .12em; }

/* Imprimir / guardar PDF: solo el documento */
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; padding: 0 !important; }
  body > *:not(.hoja-fondo) { display: none !important; }
  .hoja-fondo { position: static !important; background: none !important; display: block !important; }
  .hoja { max-height: none !important; overflow: visible !important; box-shadow: none !important; background: none !important; padding: 0 !important; animation: none !important; }
  .hoja-cab, .hoja-pie, .no-print { display: none !important; }
  .doc-presu { clip-path: none !important; box-shadow: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@keyframes aparece { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.aparece > * { animation: aparece .35s ease-out both; }
.aparece > *:nth-child(2) { animation-delay: .04s; } .aparece > *:nth-child(3) { animation-delay: .08s; }
.aparece > *:nth-child(4) { animation-delay: .12s; } .aparece > *:nth-child(5) { animation-delay: .16s; }
.aparece > *:nth-child(n+6) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) { .aparece > * { animation: none; } }

/* Formularios dinámicos */
.estrellas { display: flex; gap: 4px; }
.estrellas button { background: none; border: 0; font-size: 28px; line-height: 1; color: #d9cfbf; cursor: pointer; padding: 2px; }
.estrellas button.on { color: #e0a526; }
.check-linea { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--tinta); cursor: pointer; }
.check-linea input { width: 22px; height: 22px; border-radius: 6px; padding: 0; flex-shrink: 0; accent-color: var(--mar); -webkit-appearance: checkbox; appearance: auto; }
.tipo-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.tipo-chips::-webkit-scrollbar { display: none; }
.tipo-chips button { flex: 0 0 auto; border: 1.5px solid var(--linea); background: #fff; border-radius: 99px; padding: 6px 12px; font: 600 13px var(--sans); color: var(--tinta); cursor: pointer; }
.tipo-chips button.on { background: var(--tinta); color: #fff; border-color: var(--tinta); }
details.bloque { background: var(--papel); border: 1px solid var(--linea); border-radius: 16px; padding: 4px 14px; margin-top: 14px; }
details.bloque > summary { list-style: none; cursor: pointer; padding: 12px 0; font: 700 16px var(--sans); display: flex; align-items: center; justify-content: space-between; }
details.bloque > summary::-webkit-details-marker { display: none; }
details.bloque > summary::after { content: '▾'; color: var(--suave); transition: transform .2s; }
details.bloque[open] > summary::after { transform: rotate(180deg); }
details.bloque[open] { padding-bottom: 14px; }
.auto-prev { white-space: pre-wrap; font-size: 13px; background: #fff; border: 1px dashed var(--linea); border-radius: 12px; padding: 10px 12px; color: var(--tinta-2); }

/* App: la barra de abajo nunca tapa el contenido (el contenido scrollea arriba de la barra) */
#app:not(.oculto) { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
#app > .topbar { position: relative; flex-shrink: 0; }
#app > main { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; width: 100%; max-width: none; padding: 18px max(16px, calc((100% - 728px) / 2)) 28px; }
#app > .tabbar { position: relative; flex-shrink: 0; box-shadow: 0 -4px 14px rgba(50,30,10,.08); }
#app .wa-flot { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* Agenda (panel) */
.ag-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 8px; text-align: center; }
.ag-dn { font-size: 10px; font-weight: 800; color: var(--suave); padding: 4px 0; }
.ag-dia { border: 0; background: #fff; border-radius: 10px; padding: 5px 0 4px; min-height: 42px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font: 600 13px var(--sans); color: var(--tinta); }
.ag-dia span { display: flex; gap: 2px; min-height: 6px; }
.ag-dia i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.ag-dia.hoy { box-shadow: inset 0 0 0 2px var(--coral); }
.ag-dia.sel { background: var(--tinta); color: #fff; }
.ag-ley { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; color: var(--suave); margin-top: 10px; }
.ag-ley i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }

/* Viaje sin portada: etiqueta con la inicial del destino */
.ph-viaje { width: 100%; height: 100%; display: grid; place-items: center; color: #FFFDF3; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1; letter-spacing: .02em; position: relative; }
.ph-viaje::after { content: '✈'; position: absolute; right: 4px; bottom: 2px; font-family: var(--sans); font-size: 10px; opacity: .7; }
.avatar .ph-viaje { border-radius: inherit; font-size: 20px; }
.avatar:has(.ph-viaje), .avatar:has(img) { overflow: hidden; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Campanita de notificaciones (panel) */
.notif-btn { position: relative; margin-left: auto; }
.notif-btn + .btn { margin-left: 4px; }
.notif-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font: 800 11px/18px var(--sans); text-align: center; }
.notif-n.oculto { display: none; }
.item.no-leida { border-left: 4px solid var(--coral); }
.archivos-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.archivos-mini a { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; background: var(--arena); text-decoration: none; color: var(--tinta); }
/* Pedido de itinerario / cotización (Mi viaje) */
.pedido-card { border: 2px dashed var(--oro); background: linear-gradient(135deg, var(--papel), var(--arena)); }
.opciones-pedido { display: grid; gap: 8px; margin-bottom: 4px; }
.opciones-pedido .check-linea { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 12px; background: var(--papel); }
.opciones-pedido .check-linea:has(input:checked) { border-color: var(--mar); box-shadow: 0 0 0 2px var(--mar-claro); }
.chips-extras { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.chips-extras button { font: 600 13px var(--sans); padding: 7px 11px; border-radius: 999px; border: 1.5px solid var(--linea); background: var(--papel); color: var(--tinta); cursor: pointer; }
.chips-extras button.on { background: var(--mar); border-color: var(--mar); color: #fff; }
.chip-bp { border: 1.5px solid var(--mar); background: var(--mar-claro); color: var(--mar); cursor: pointer; font-family: inherit; }

/* Flechas para reordenar vouchers (panel admin) */
.orden { display: flex; flex-direction: column; flex: none; gap: 2px; }
.orden button { background: var(--mar-claro, #e8f1f3); border: 0; border-radius: 6px; font-size: 11px; line-height: 1; padding: 6px 9px; cursor: pointer; color: var(--tinta); }
.orden button:active { transform: scale(.92); }

/* Aviso en vivo */
#banner-vivo { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translate(-50%, -140%); width: min(440px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 12px; text-align: left; background: var(--papel, #FFFDF3); color: var(--tinta, #3d3a35); border: 2px solid var(--mar, #43302E);
  border-radius: 18px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(0,0,0,.22); z-index: 120; transition: transform .35s cubic-bezier(.2,.9,.3,1.2); font: inherit; cursor: pointer; }
#banner-vivo.show { transform: translate(-50%, 0); }
#banner-vivo .bv-ico { font-size: 26px; flex: none; }
#banner-vivo .bv-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#banner-vivo .bv-txt b { font-size: 15px; line-height: 1.25; }
#banner-vivo .bv-txt small { font-size: 13px; opacity: .8; line-height: 1.3; }
#banner-vivo .bv-extra { color: var(--coral, #b0503a); font-weight: 700; opacity: 1 !important; }
#banner-vivo .bv-x { font-size: 26px; color: var(--mar, #43302E); flex: none; }
.notif-btn.latido { animation: latido .6s ease 2; }
@keyframes latido { 0%,100% { transform: scale(1); } 40% { transform: scale(1.25) rotate(-12deg); } 70% { transform: scale(1.1) rotate(8deg); } }

/* ======================= ITINERARIO (nuevo diseño) ======================= */
/* Celular: calendario arriba (ancho completo), días debajo y después el itinerario. Compu (600px+): calendario a la izquierda. */
.it-grid { display: block; margin-top: 12px; }
.it-lado { min-width: 0; margin-bottom: 12px; }
.it-rail { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.it-rail::-webkit-scrollbar { display: none; }
.it-rail button { flex: 0 0 auto; min-width: 68px; border: 2px solid var(--tinta); background: var(--papel); color: var(--tinta); border-radius: 999px; padding: 6px 14px; font: 600 13px/1.15 var(--sans); display: flex; flex-direction: column; align-items: center; cursor: pointer; scroll-snap-align: center; }
.it-rail button small { font-weight: 500; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--suave); }
.it-rail button.sel { background: var(--tinta); color: var(--papel); }
.it-rail button.sel small { color: #d9cbb4; }
.it-rail button.hoy { box-shadow: 0 0 0 2px var(--coral); }
.it-der { min-width: 0; }
.it-acciones { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.it-acciones .btn { flex: 1 1 auto; font-size: 12px; padding: 8px 10px; white-space: nowrap; }
@media (min-width: 600px) {
  .it-grid { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 14px; align-items: start; }
  .it-lado { position: sticky; top: 6px; margin-bottom: 0; }
  .it-rail { display: none; }
}
@media (min-width: 600px) {
  .cal-mini { padding: 8px; border-radius: 14px; }
  .cal-mini .cal-cab b { font-size: 13px; }
  .cal-mini .cal-cab .icon-btn { padding: 0 6px; font-size: 18px; }
  .cal-mini .cal-grid { gap: 2px; }
  .cal-mini .cal-grid .dn { font-size: 9px; padding: 2px 0; }
  .cal-mini .cal-grid button { font-size: 11px; border-radius: 7px; }
  .cal-mini .cal-grid button.hoy::after { inset: 1px; border-width: 1.5px; border-radius: 6px; }
  .cal-mini .cal-grid button .em { font-size: 8px; top: -2px; right: -1px; }
  .cal-mini .cal-leyenda { font-size: 9px; gap: 3px 8px; margin-top: 6px; }
}
.it-der .dia-card { padding: 14px 12px 16px; }
.it-der .dia-card .polaroid { max-width: 250px; margin: 4px auto 14px; padding: 6px 6px 24px; }
.it-der .dia-card h2 { font-size: 22px; }
.it-der .dia-card .donde { font-size: 19px; }

.it-lista { margin: 12px 0 0; padding: 0 0 0 20px; border-left: 2px dotted var(--tinta); display: grid; gap: 12px; }
.it-act, .it-sec { position: relative; }
.it-act[hidden], .it-sec[hidden] { display: none; }
.it-chk { position: absolute; left: -32px; top: 1px; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.it-chk input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.it-chk i { display: block; width: 22px; height: 22px; border-radius: 7px; border: 2.5px solid var(--tinta); background: var(--papel); transition: background .15s; }
.it-chk input:checked + i { background: var(--mar); border-color: var(--mar); }
.it-chk input:checked + i::after { content: '✓'; color: #fff; font: 700 14px/18px var(--sans); display: block; text-align: center; }
.it-chk input:focus-visible + i { box-shadow: 0 0 0 3px rgba(44,108,106,.3); }
.it-linea { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.it-hora { background: var(--mar); color: #fff; font: 700 11px/1 var(--sans); padding: 4px 8px; border-radius: 99px; letter-spacing: .02em; white-space: nowrap; }
.it-t { font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.it-act.hecha .it-t { color: var(--suave); text-decoration: line-through; }
.it-nota { margin: 3px 0 0; font-size: 13.5px; color: var(--tinta-2); line-height: 1.45; }
.it-subs { margin: 4px 0 0; padding-left: 16px; font-size: 13.5px; color: var(--tinta-2); line-height: 1.45; }
.it-subs li::marker { color: var(--mar); }
.it-sec { font: 400 15px/1.2 var(--display); text-transform: uppercase; letter-spacing: .03em; color: var(--mar); margin: 6px 0 -2px; padding-bottom: 4px; border-bottom: 2px solid var(--mar-claro); }
.it-sec::before { content: ''; position: absolute; left: -27px; top: .3em; width: 12px; height: 12px; background: var(--mar); border-radius: 3px; transform: rotate(45deg); }
.it-link { display: inline-flex; align-items: center; gap: 3px; color: #1f6f8b; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.it-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.it-link-g { background: #e6f1f5; border-radius: 99px; padding: 7px 12px; font-size: 13px; text-decoration: none; }
.it-mas { margin: 12px 0 0; width: 100%; border: 1.5px dashed var(--mar); background: transparent; color: var(--mar); border-radius: 12px; padding: 9px; font: 700 13px var(--sans); cursor: pointer; }
.it-prog { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.it-prog span { flex: 1; height: 6px; background: var(--mar-claro); border-radius: 99px; overflow: hidden; }
.it-prog i { display: block; height: 100%; background: var(--mar); border-radius: 99px; transition: width .3s; }
.it-prog small { font-size: 11px; color: var(--suave); white-space: nowrap; }
.it-adj { margin-top: 16px; padding-top: 10px; border-top: 1px dashed var(--linea); }
.it-adj-t { font: 400 13px var(--display); text-transform: uppercase; color: var(--tinta); margin-bottom: 8px; }
.it-adj-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.it-adj-i { text-decoration: none; color: var(--tinta); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.it-adj-v { position: relative; aspect-ratio: 4/3; border-radius: 10px; border: 1px solid var(--linea); background: var(--mar-claro); display: grid; place-items: center; font-size: 24px; overflow: hidden; }
.it-adj-v img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.it-adj-v em { position: absolute; right: 3px; bottom: 3px; background: var(--tinta); color: #fff; font: 700 8px var(--sans); font-style: normal; padding: 1px 4px; border-radius: 4px; }
.it-adj-n { font-size: 11px; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.it-fotos { margin-top: 14px; width: 100%; border: 1px solid var(--linea); background: #fff; border-radius: 12px; padding: 10px; font: 700 13px var(--sans); color: var(--tinta); cursor: pointer; }
.it-fotos b { background: var(--tinta); color: #fff; border-radius: 99px; padding: 1px 8px; margin-left: 4px; font-size: 11px; }
.gal-visor { position: relative; background: #1d1a17; border-radius: 14px; overflow: hidden; margin-top: 8px; }
.gal-visor img { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.gal-flecha { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); font-size: 24px; line-height: 1; cursor: pointer; }
.gal-flecha.izq { left: 8px; } .gal-flecha.der { right: 8px; }
.gal-n { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font: 600 11px var(--sans); padding: 3px 8px; border-radius: 99px; }
.gal-tiras { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-top: 10px; }
.gal-tiras button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; aspect-ratio: 1; }
.gal-tiras button.sel { border-color: var(--mar); }
.gal-tiras img { width: 100%; height: 100%; object-fit: cover; }

/* Editor del itinerario (panel de Ari) */
.ed-barra { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ed-barra button { border: 1px solid var(--linea); background: #fff; border-radius: 9px; padding: 6px 10px; font: 700 12px var(--sans); color: var(--tinta); cursor: pointer; }
.ed-fila { border: 1px solid var(--linea); border-radius: 12px; padding: 8px; margin-bottom: 8px; background: #fffdf8; }
.ed-fila .ed-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ed-fila input[type=time] { width: auto; flex: 0 0 auto; padding: 6px 8px; font-size: 14px; }
.ed-fila input[data-r=titulo] { flex: 1 1 140px; min-width: 0; padding: 6px 8px; font-size: 14px; }
.ed-fila textarea { min-height: 44px; margin-top: 6px; font-size: 13px; }
.ed-fila.sec { background: var(--mar-claro); }
.ed-enl { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.ed-enl input { flex: 1 1 120px; min-width: 0; padding: 6px 8px; font-size: 14px; }
.ed-galeria { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ed-galeria figure { position: relative; margin: 0; width: 64px; height: 64px; }
.ed-galeria img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.ed-galeria button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--coral); color: #fff; font-size: 12px; cursor: pointer; }
.filtros-docs .btn small { opacity: .7; margin-left: 2px; }

/* Más aire entre los recuadros del final del itinerario */
#vista .pedido-card { margin: 26px 0 0; }
#vista .pedido-card + .pedido-card, #vista .card + .pedido-card { margin-top: 26px; }
#vista { padding-bottom: 32px; }
/* Recomendaciones */
.rec-sec { margin: 22px 0 0; }
.rec-sec h3 { margin: 0 0 2px; }
.rec-nota { font-size: 12px; color: var(--suave); margin: 0 0 10px; }
.rec-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 10px; border: 1.5px solid var(--linea); border-radius: var(--radio); background: var(--papel); cursor: pointer; }
.rec-item.on { border-color: var(--mar); background: var(--arena); }
.rec-item input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; accent-color: var(--mar); }
.rec-item b { display: block; }
.rec-item small { display: block; color: var(--suave); margin-top: 2px; }
.rec-item a { font-size: 13px; font-weight: 700; color: var(--mar); }

/* Preguntas frecuentes, sin conexión, opiniones */
.faq { border: 1.5px solid var(--linea); border-radius: var(--radio); background: var(--papel); margin-bottom: 8px; }
.faq summary { padding: 12px 14px; font-weight: 700; cursor: pointer; }
.faq p { margin: 0; padding: 0 14px 14px; color: var(--suave); white-space: pre-line; }
.off-bar { position: sticky; top: 0; z-index: 50; background: var(--oro); color: #3a2a00; text-align: center; font: 700 13px var(--sans); padding: 8px 12px; }
.est-op { display: flex; gap: 4px; margin: 4px 0 8px; }
.est-op button { background: none; border: 0; font-size: 32px; line-height: 1; cursor: pointer; color: var(--linea); padding: 0 2px; }
.est-op button.on { color: #e0a526; }

/* Título largo del día: ya no se sale de la foto */
.polaroid { padding: 8px 8px 12px; }
.polaroid figcaption { position: static; margin-top: 8px; padding: 0 6px; font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.it-der .dia-card .polaroid { padding: 6px 6px 10px; }
/* Check redondo que se pinta al marcar */
.rec-item input { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; border: 2px solid var(--suave); border-radius: 50%; background: #fff; display: grid; place-content: center; transition: background .15s, border-color .15s; }
.rec-item input:checked { background: var(--mar); border-color: var(--mar); }
.rec-item input:checked::after { content: "✓"; color: #fff; font-weight: 800; font-size: 16px; line-height: 1; }
.rec-item.on { border-color: var(--mar); background: var(--arena); box-shadow: inset 0 0 0 1px var(--mar); }
.rec-links a { display: inline-block; margin: 8px 14px 0 0; }
.rec-dest { font-size: 24px; margin: 28px 0 0; padding-top: 14px; border-top: 2px dashed var(--linea); }
.rec-chips { margin: 12px 0 0; }

/* Eternity */
h1,h2,h3{font-style:italic;font-weight:400}
a{color:#235288}

/* ===== Eternity v3 · paleta con más onda (océano protagonista) ===== */
:root{
  --oceano:#235288; --oceano-2:#1B4170; --manteca:#FFF1B5; --celeste:#C1DBE8; --marfil:#F5EFE0;
  --mar:#235288; --mar-claro:#DCEAF3; --arena:#F5EFE0; --papel:#FFFDF6; --linea:#E2D9C0;
  --sombra:0 2px 4px rgba(35,82,136,.06),0 8px 22px rgba(35,82,136,.12);
}
body{background:var(--marfil)}
.kicker,.mano{color:var(--oceano)}
.titulo-display,.seccion-titulo h2,.dia-card h2{color:var(--oceano)}
.btn{background:var(--oceano)}
.btn.sec{background:#fff;color:var(--oceano-2);border:1px solid var(--celeste)}
.btn.coral{background:var(--coral)}
.chip{background:var(--celeste);color:var(--oceano-2)}
.chip.ok{background:var(--ok-claro);color:var(--ok)} .chip.warn{background:var(--manteca);color:#7a5a00} .chip.coral{background:var(--coral-claro);color:var(--coral)} .chip.gris{background:#eee9e1;color:var(--tinta-2)}
.card{border:0;border-radius:20px;box-shadow:0 6px 18px rgba(35,82,136,.10)}
.card.plano{box-shadow:0 3px 10px rgba(35,82,136,.08)}
.item,.rec-item,.faq{border-color:var(--celeste)}
.pedido-card{border:2px dashed var(--oceano);background:linear-gradient(135deg,#fff,var(--manteca))}
/* Encabezado sólido (antes translúcido y borroso) */
.topbar{background:var(--oceano);backdrop-filter:none;-webkit-backdrop-filter:none;border-bottom:0;box-shadow:0 4px 14px rgba(35,82,136,.25)}
.marca{color:#fff;font-size:17px}
.marca small{color:var(--manteca);font-size:10px}
.topbar .icon-btn{color:#fff}
.topbar .btn.sec{background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.35)}
.logo-e{width:42px;height:42px;border-radius:50%;background:var(--manteca);color:var(--tinta);display:grid;place-items:center;flex-shrink:0;
  font:italic 500 30px/1 'Playfair Display',Georgia,serif;padding-bottom:5px;box-shadow:0 0 0 2px rgba(255,255,255,.55)}
.topbar .notif-n{background:var(--coral);box-shadow:0 0 0 2px var(--oceano)}
/* Barra inferior */
.tabbar{background:#fff;border-top:0;box-shadow:0 -6px 20px rgba(35,82,136,.14)}
.tabbar button{border-radius:14px}
.tabbar button.activo{background:var(--manteca);color:var(--oceano-2)}
#app > main{background:linear-gradient(180deg,#E3EEF5 0,var(--marfil) 280px)}
#app > .tabbar{box-shadow:0 -6px 20px rgba(35,82,136,.14)}
/* Login */
.login-pantalla{background:radial-gradient(circle at 50% -10%,var(--celeste) 0,var(--marfil) 62%)}
.logo-grande{width:128px;height:128px;border-radius:50%;margin:0 auto 14px;box-shadow:0 0 0 5px var(--oceano),0 12px 30px rgba(35,82,136,.32)}
.login-titulo{font-family:'Playfair Display',Georgia,serif;font-style:normal!important;font-weight:600;text-transform:none;font-size:34px;color:var(--oceano);margin:6px 0 4px}
.login-caja .card{border-top:5px solid var(--oceano)}
/* Inicio */
.hero{min-height:290px;background:linear-gradient(135deg,var(--oceano),#3f7fb0)}
.hero::after{background:linear-gradient(180deg,rgba(35,82,136,0) 5%,rgba(16,40,72,.9))}
.hero h1{font-size:27px;font-style:normal}
.hero .tape{background:var(--manteca);color:var(--oceano-2);font-weight:700}
.reloj-hero{margin-top:12px}
.reloj-hero div{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.35);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.reloj-hero b{color:#fff;font-size:24px}.reloj-hero span{color:var(--manteca)}
.hero-sale{margin-top:8px;font-size:12px;font-weight:600;opacity:.95}
.accesos{grid-template-columns:repeat(auto-fit,minmax(60px,1fr));gap:8px}
.accesos button,.accesos a{border:0;color:var(--oceano-2);box-shadow:0 4px 10px rgba(35,82,136,.12);background:#fff}
.accesos>:nth-child(odd){background:var(--celeste)} .accesos>:nth-child(even){background:var(--manteca)}
.proximo{border:0;background:linear-gradient(135deg,#fff,var(--manteca));border-left:6px solid var(--oceano)}
.serv .i{background:var(--celeste)}
.dia-btn{border-color:var(--oceano)} .dia-btn.sel{background:var(--oceano);color:#fff}
.viaje-card.sel{border-color:var(--oceano)}
.barra i{background:linear-gradient(90deg,var(--oceano),#5aa0d0)}
.reloj b,.reloj-hero b{font-family:var(--display)}
/* Carrusel "Sobre tu destino" */
.carrusel{margin:0 -4px 14px}
.car-pista{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:4px}
.car-pista::-webkit-scrollbar{display:none}
.car-slide{flex:0 0 100%;scroll-snap-align:center}
.car-slide .card{margin:0;height:100%}
.car-slide img{width:100%;height:190px;object-fit:cover;border-radius:14px;margin-bottom:10px}
.car-dots{display:flex;justify-content:center;gap:6px;margin-top:10px}
.car-dots i{width:7px;height:7px;border-radius:99px;background:var(--celeste);transition:all .25s}
.car-dots i.on{width:22px;background:var(--oceano)}
/* Ficha */
.ficha-pax{background:#fff;border:2px solid var(--celeste);border-radius:16px;padding:10px 12px;margin:10px 0}
.ficha-pax .rep-cab{display:flex;justify-content:space-between;align-items:center}
.ficha-falta{border-color:var(--coral)!important;box-shadow:0 0 0 3px var(--coral-claro)}
.rec-migas{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 4px}
.rec-dest-btn{border-color:var(--celeste);background:#fff;box-shadow:0 4px 10px rgba(35,82,136,.08)}
.rec-dest-btn .ico{background:var(--manteca);border-radius:12px;width:44px;height:44px;display:grid;place-items:center}
.rec-item.on{border-color:var(--oceano);background:#EEF5FA}
/* Tamaños más finos en el celular (Pagos, Lugares, FAQ) */
#vista .titulo-display{font-size:24px!important}
#vista .kicker{font-size:18px}
.total-caja{padding:9px 8px}
.total-caja .k{font-size:10px}
.total-caja .v{font:700 14px/1.25 var(--sans);letter-spacing:-.01em}
.presu-card h3{font-size:18px!important}
.presu-card .titulo-display{font-size:20px!important}
@media (max-width:520px){
  body{font-size:14px}
  .card{padding:14px}
  .hero h1{font-size:24px}
  h1{font-size:26px} h2{font-size:20px} h3{font-size:17px}
  .seccion-titulo h2{font-size:18px}
  .presu-items{font-size:13px}
}
