@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* Paleta Rumbalia (azul océano) */
  --brand: #00a6c7;         /* azul principal (sky-500) */
  --brand-dark: #006d84;    /* azul profundo (sky-700) */
  --brand-light: #38bdf8;   /* azul claro (sky-400) */
  /* Aliases legacy — mantenidos para no romper estilos heredados de china-pwa */
  --red: var(--brand);
  --red-dark: var(--brand-dark);
  --gold: #f59e0b;          /* ámbar acento */
  --teal: #14b8a6;          /* teal */
  --teal-light: #5eead4;    /* teal claro */
  --green: #10b981;         /* verde */

  --bg: #f5f7fb;            /* azul-gris muy claro */
  --bg-soft: #fafbfd;
  --surface: #ffffff;
  --ink: #0f172a;           /* slate-900 */
  --muted: #64748b;         /* slate-500 */
  --line: #e2e8f0;          /* slate-200 */

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 6px 24px rgba(0, 166, 199, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-soft: 0 2px 10px rgba(15, 23, 42, 0.04);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Garantiza que hidden siempre oculta, aunque el CSS del componente defina display */
[hidden] { display: none !important; }

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: var(--red);
  text-decoration: none;
}

/* ───── Topbar ───── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 4px;
  padding: calc(var(--safe-top) + 12px) 8px 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark, var(--red-dark)) 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 166, 199, 0.25);
}
.topbar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}
.topbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.2px;
  font-variation-settings: "opsz" 24;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* agency logo lives in splash only now */
.agency-brand-logo { display: none !important; }
.powered-by {
  padding: 20px 14px calc(90px + var(--safe-bot));
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}
.powered-by a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}
.powered-by a:hover { text-decoration: underline; }
.powered-by span::before { content: ""; }
.iconbtn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  display: grid;
  place-items: center;
}
.iconbtn:active {
  background: rgba(255, 255, 255, 0.15);
}
.bottombar [hidden],
main [hidden] {
  display: none !important;
}
.topbar .iconbtn[hidden] {
  display: grid !important;
  visibility: hidden;
}
/* Splash agency logo */
.splash-agency-logo {
  width: auto;
  max-width: 220px;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 28px;
  border-radius: 12px;
  animation: splashPop 0.7s cubic-bezier(0.4, 1.4, 0.5, 1) both;
}

/* ───── Main ───── */
main {
  padding: 14px 14px calc(78px + var(--safe-bot));
  max-width: 720px;
  margin: 0 auto;
}
.landing-body main,
.agency-body main {
  padding: 0;
  max-width: none;
  margin: 0;
}

/* Desktop: el viewer se ensancha progresivamente */
@media (min-width: 1024px) {
  main {
    max-width: 1040px;
    padding: 24px 32px calc(90px + var(--safe-bot));
  }
  .topbar {
    padding: calc(var(--safe-top) + 16px) 24px 16px;
  }
  .topbar h1 {
    font-size: 22px;
  }
  .bottombar {
    max-width: 1040px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

@media (min-width: 1400px) {
  main {
    max-width: 1240px;
  }
  .bottombar {
    max-width: 1240px;
  }
}

h2 {
  margin: 22px 4px 12px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--teal);
}

/* ───── Cards ───── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(240, 233, 224, 0.6);
}
.card-body {
  padding: 14px;
}

/* ───── Agency logo in NOW header ───── */
.now-agency-logo {
  display: block;
  height: 48px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 12px;
  opacity: 0.92;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.06));
}
.now-agency-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brand, var(--teal));
  margin-bottom: 8px;
  opacity: 0.9;
}

/* ───── NOW view ───── */
.now-hero {
  background:
    radial-gradient(ellipse 100% 70% at 10% 10%, rgba(255,255,255,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 90% 90%, rgba(0,0,0,0.10) 0%, transparent 55%),
    linear-gradient(150deg, var(--brand, #c0392b) 0%, var(--brand-dark, #a02d23) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(0px);
}
.now-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 65%);
  pointer-events: none;
}
.now-hero::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0,0,0,0.08), transparent 70%);
  pointer-events: none;
}
.now-hero .label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.2px;
  opacity: 0.85;
  margin-bottom: 6px;
}
.now-hero .title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 6px;
}
.now-hero .meta {
  font-size: 14px;
  opacity: 0.9;
}
.now-hero .countdown {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.95;
}
.now-hero .progress {
  margin-top: 10px;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  overflow: hidden;
}
.now-hero .progress > span {
  display: block;
  height: 100%;
  background: var(--gold);
  transition: width 0.4s;
}

/* Hero · BETWEEN (entre dos paradas) */
.hero-between {
  background:
    radial-gradient(ellipse 100% 70% at 10% 10%, rgba(255,255,255,0.2) 0%, transparent 60%),
    linear-gradient(150deg, var(--teal) 0%, #1a7a75 100%);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.hero-between .between-row {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.hero-between .between-cell {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
  min-height: 64px;
  cursor: pointer;
}
.hero-between .between-cell.done {
  opacity: 0.75;
}
.hero-between .between-cell .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.85;
  margin-bottom: 4px;
}
.hero-between .between-cell .val {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.hero-between .between-arrow {
  text-align: center;
  font-size: 22px;
  opacity: 0.85;
}
.hero-between .between-route {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  background: var(--gold);
  color: #1a1a1a;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

/* ───── Selection bar ───── */
.sel-bar {
  position: sticky;
  top: calc(var(--safe-top) + 56px);
  z-index: 8;
  background: #fff7e6;
  border: 1px solid #f0d68c;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.sel-bar .sel-count {
  font-weight: 700;
  font-size: 13px;
}
.sel-bar .sel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn.sm {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
}
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
  background: #ccc;
  box-shadow: none;
}
button.link {
  color: var(--red);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 4px;
  text-decoration: underline;
}

.next-up {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 4px 8px;
}

/* ───── Clock header ───── */
.clock-header {
  text-align: center;
  padding: 20px 10px 10px;
  margin-bottom: 8px;
}
.clock-day {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}
.clock-time {
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
  font-family: var(--font-display);
}
.clock-where {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.clock-where::first-letter {
  text-transform: uppercase;
}

/* ───── Activity rows ───── */
.activity {
  display: grid;
  grid-template-columns: 56px 1fr 40px;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.activity.activity-has-check {
  grid-template-columns: 28px 56px 1fr 40px;
}
.activity:last-child {
  border-bottom: 0;
}
.activity .map-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff3f4;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--red);
  text-decoration: none;
}
.activity .map-icon:active {
  background: #ffdde1;
}
.activity .checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--muted);
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: transparent;
}
.activity .checkbox.on {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.activity .checkbox.on::after {
  content: "✓";
  font-weight: 700;
}
.activity .time {
  font-weight: 700;
  font-size: 15px;
  color: var(--red);
}
.activity .time small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
}
.activity .body .ttl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}
.activity .body .desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.activity.now {
  background: linear-gradient(90deg, rgba(244, 194, 94, 0.18), rgba(244, 194, 94, 0.05));
  box-shadow: inset 3px 0 0 var(--gold);
}
.activity.done .ttl,
.activity.done .time {
  opacity: 0.45;
  text-decoration: line-through;
}

/* ───── Day picker ───── */
.day-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.day-card:last-child {
  border-bottom: 0;
}
.day-card .num {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(255,255,255,0.25) 0%, transparent 60%),
    linear-gradient(145deg, var(--brand, var(--teal)) 0%, var(--brand-dark, #218e88) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.day-card .num.today {
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(255,255,255,0.28) 0%, transparent 60%),
    linear-gradient(145deg, #f4c25e 0%, #d4920a 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(244, 194, 94, 0.45);
}
.day-card .info .ttl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
}
.day-card .info .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.days-export-row {
  display: flex;
  justify-content: center;
  padding: 20px 0 8px;
}
.days-export-row .btn {
  font-size: 13px;
  gap: 6px;
  color: var(--muted);
  border-color: var(--line);
}

/* ───── Day detail ───── */
.day-header {
  margin-bottom: 14px;
}
.day-header .date {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
}
.day-header .ttl {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin: 6px 0 8px;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.day-header .summary {
  font-size: 14px;
  color: var(--muted);
}

.day-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 6px;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand, #e85a6f) 0%, var(--brand-dark, #d94966) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand, #e85a6f) 35%, transparent);
  border: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:active {
  transform: scale(0.97);
}
.btn.ghost {
  background: var(--surface);
  color: var(--brand, var(--red));
  border: 1.5px solid var(--brand-light, #f4c7cf);
  box-shadow: var(--shadow-soft);
}
.btn.full {
  grid-column: 1 / -1;
}
.btn.map-btn {
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(255,255,255,0.18) 0%, transparent 55%),
    linear-gradient(145deg, var(--brand, #c0392b) 0%, var(--brand-dark, #8e2619) 100%);
  letter-spacing: 0.1px;
}

/* ───── Activity detail (modal) ───── */
.detail {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: calc(54px + var(--safe-bot));
  background: var(--bg);
  z-index: 50;
  overflow-y: auto;
  padding-bottom: 20px;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.detail .photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #ddd center/cover no-repeat;
  position: relative;
}
.detail .photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}
.detail .photo .back-btn {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  left: 10px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
  z-index: 3;
  cursor: pointer;
}
.detail .photo .back-btn:active {
  background: rgba(0, 0, 0, 0.75);
}
.detail .photo .close {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 22px;
  display: grid;
  place-items: center;
  z-index: 3;
  cursor: pointer;
}
.detail .photo .ttl-overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: #fff;
  z-index: 2;
}
.detail .photo .ttl-overlay .h {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.detail .photo .ttl-overlay .m {
  font-size: 13px;
  margin-top: 4px;
  opacity: 0.95;
}
.detail .content {
  padding: 16px;
}
.detail .content p {
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 12px;
}
.detail .tip {
  background: #fff7e6;
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin: 12px 0;
}
/* ───── Country view ───── */
.country-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.country-tabs::-webkit-scrollbar { display: none; }
.country-tab {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 20px;
  background: #fff;
  border: 1.5px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-display);
  white-space: nowrap;
}
.country-tab.active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.country-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #fdf9f4 0%, #fff 100%);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.country-flag {
  font-size: 56px;
  line-height: 1;
  flex-shrink: 0;
}
.country-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}
.country-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.country-section {
  margin-bottom: 18px;
}
.country-section h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--teal);
  margin: 0 4px 10px;
}

/* ─── Dual clock ─── */
.dual-clock {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  background: linear-gradient(135deg, #2d2d3a 0%, #1a1a26 100%);
  border-radius: var(--radius);
  padding: 22px 18px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(45, 45, 58, 0.22);
}
.dual-clock.single {
  grid-template-columns: 1fr;
}
.dual-clock .clock {
  text-align: center;
}
.dual-clock .clock-flag {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 4px;
}
.dual-clock .clock-time-big {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: #fff;
}
.dual-clock .clock-label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.65;
  margin-top: 4px;
}
.dual-clock .clock-diff {
  text-align: center;
  padding: 0 6px;
}
.dual-clock .diff-arrow {
  font-size: 18px;
  opacity: 0.55;
  margin-bottom: 4px;
}
.dual-clock .diff-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(244, 194, 94, 0.12);
  border: 1px solid rgba(244, 194, 94, 0.35);
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ─── Currency calculator ─── */
.calc-box {
  background: linear-gradient(135deg, #fff7e6 0%, #fef3d9 100%);
  border: 1px solid #f0d68c;
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}
.calc-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: #8b6a14;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-align: center;
}
.calc-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: end;
}
.calc-field label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
}
.calc-input-wrap {
  position: relative;
}
.calc-input-wrap input {
  width: 100%;
  padding: 12px 34px 12px 12px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.calc-input-wrap input::-webkit-outer-spin-button,
.calc-input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.calc-input-wrap input:focus {
  outline: none;
  border-color: var(--red);
  background: #fff;
}
.calc-input-wrap .calc-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
}
.calc-eq {
  font-size: 22px;
  color: #8b6a14;
  font-weight: 700;
  padding-bottom: 10px;
}
.calc-presets {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.calc-preset {
  flex: 1;
  min-width: 60px;
  padding: 8px 6px;
  background: #fff;
  border: 1px solid #f0d68c;
  border-radius: 8px;
  color: #8b6a14;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.calc-preset:active {
  background: #fef3d9;
}
.calc-rate-note {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}
.country-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.country-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.country-kv:last-child { border-bottom: 0; }
.country-kv .k {
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}
.country-kv .v {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}
.country-para {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  margin: 10px 0;
}
.country-para strong {
  color: var(--ink);
}
.country-card .tip {
  margin-top: 10px;
}

/* Taxi apps */
.app-card {
  margin-bottom: 10px;
}
.app-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.app-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 10px;
  line-height: 1.5;
}
.app-links {
  display: flex;
  gap: 8px;
}
.app-links .btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
}

/* Payment */
.pay-app {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.pay-app:last-child { border-bottom: 0; padding-bottom: 0; }
.pay-app strong {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
}
.pay-app .note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.5;
}

/* Emergencies */
.emergency-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.emergency-row:last-child { border-bottom: 0; }
.emergency-row .k {
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
}
.emergency-row .v {
  color: var(--red);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 16px;
  font-weight: 700;
}
.country-section .hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin: 8px 0 0;
  font-style: italic;
}

/* Phrases */
.phrases-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}
.phrase {
  background: #fdf9f4;
  border-radius: 10px;
  padding: 10px 12px;
}
.phrase-es {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}
.phrase-local {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-display);
}
.phrase-pron {
  font-size: 12px;
  color: var(--teal);
  font-style: italic;
  margin-top: 2px;
}

/* Tips list */
.tips-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}
.tips-list li {
  margin-bottom: 8px;
}

/* ───── Adjuntos (viewer detalle) ───── */
.attachments {
  margin-top: 20px;
}
.attachments h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}
.attachments .att-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fdf9f4 0%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s;
}
.attachment-item:active {
  transform: scale(0.98);
  border-color: var(--red);
}
.attachment-item .att-ic {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.attachment-item .att-body {
  flex: 1;
  min-width: 0;
}
.attachment-item .att-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-item .att-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.attachment-item .att-arrow {
  font-size: 18px;
  color: var(--red);
  flex-shrink: 0;
}

.detail .dining {
  margin-top: 14px;
}
.detail .dining h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin: 0 0 8px;
}
.dining-item {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.dining-item .name {
  font-weight: 600;
  font-size: 15px;
}
.dining-item .note {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 8px;
}
.dining-item .dining-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dining-item .dining-actions .btn {
  flex: 1;
  min-width: 130px;
}

/* ───── Bottom bar ───── */
.bottombar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bot);
  z-index: 60;
  box-shadow: 0 -2px 16px rgba(15, 23, 42, 0.06);
}
.bottombar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px 10px;
  max-width: 76px;
  color: var(--muted);
  position: relative;
  transition: color 0.18s;
}
.bb-icon {
  width: 22px;
  height: 22px;
  transition: transform 0.18s;
  flex-shrink: 0;
}
.bb-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}
.bottombar button.active {
  color: var(--brand);
}
.bottombar button.active .bb-icon {
  transform: scale(1.12);
}
.bottombar button.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 2px;
  background: var(--brand);
  border-radius: 0 0 4px 4px;
}
/* Mapa desactivado del bottombar — se accede desde cada día */
.bottombar button[data-view="map"] { display: none; }

.bottombar button[data-view="sos"] { color: #f87171; }
.bottombar button[data-view="sos"].active { color: #ef4444; }
.bottombar button[data-view="sos"].active::before { background: #ef4444; }

/* ───────── SOS view ───────── */
.sos-view {
  padding-bottom: 30px;
}
.sos-hero {
  text-align: center;
  padding: 24px 16px 20px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-radius: 18px;
  margin-bottom: 16px;
  border: 1px solid #fca5a5;
}
.sos-hero-ic {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 6px;
}
.sos-hero h2 {
  font-family: var(--font-display);
  font-size: 22px;
  color: #991b1b;
  margin: 6px 0 4px;
}
.sos-hero p {
  margin: 0;
  font-size: 13px;
  color: #7f1d1d;
}
.sos-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}
.sos-card.sos-empty {
  opacity: 0.75;
}
.sos-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sos-card-head h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}
.sos-ic {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
/* Identidad de la agencia en SOS: logo pequeño + nombre */
.sos-agency-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.sos-agency-logo {
  max-width: 140px;
  max-height: 56px;
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  background: var(--surface);
  flex-shrink: 0;
  padding: 6px 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.10);
  border: 1px solid #e2e8f0;
}
.sos-agency-logo-letter {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.sos-agency-identity-text { min-width: 0; }
.sos-agency-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 2px;
  font-family: var(--font-display);
}
.sos-agency-tag,
.sos-coverage {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.sos-muted {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  margin: 0;
}
.sos-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.sos-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.sos-action:hover { background: #e2e8f0; }
.sos-action.phone {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #006d84;
}
.sos-action.phone:hover { background: #bae6fd; }
.sos-action.whatsapp {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}
.sos-action.whatsapp:hover { background: #bbf7d0; }
.sos-action.sos-static {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-weight: 500;
  padding: 6px 0;
}
.sos-card-insurance {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.sos-card-emergency {
  border-color: #fecaca;
  background: #fef2f2;
}
.sos-emergencies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sos-emergency {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px;
  background: #fff;
  border: 1.5px solid #fca5a5;
  border-radius: 12px;
  text-decoration: none;
  color: #7f1d1d;
  transition: transform 0.12s, box-shadow 0.12s;
}
.sos-emergency:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.18);
}
.sos-emergency-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #991b1b;
  margin-bottom: 4px;
}
.sos-emergency-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #dc2626;
}

/* ───── Notification banner ───── */
.notif-banner {
  background: #fff7e6;
  border: 1px solid #f0d68c;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.notif-banner button {
  background: var(--red);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

/* ───── Empty state ───── */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}
.empty .big {
  font-size: 42px;
  margin-bottom: 8px;
}

/* ───── Map view ───── */
.map-view { padding-bottom: 20px; }

.map-header {
  background: linear-gradient(135deg, var(--brand-tint, #f0f9ff), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.map-header-flags { font-size: 22px; letter-spacing: 3px; line-height: 1; }
.map-header-summary { font-size: 13px; color: var(--muted); line-height: 1.6; }
.map-header-summary strong { color: var(--ink); font-weight: 700; }

/* Route SVG strip */
.map-svg-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 0 16px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.map-svg-scroll::-webkit-scrollbar { display: none; }
.map-stop-dot-g { cursor: pointer; }
.map-stop-dot-g:focus { outline: none; }
@keyframes mapPulse {
  0%, 100% { opacity: 0.1; r: 17; }
  50% { opacity: 0.25; r: 20; }
}
.map-pulse { animation: mapPulse 2.2s ease-in-out infinite; }

/* Day timeline */
.map-days-timeline { display: flex; flex-direction: column; }
.map-day-card { display: flex; gap: 0; }
.map-day-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 28px;
  margin-right: 14px;
  padding-top: 4px;
}
.map-day-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--line);
  flex-shrink: 0;
  z-index: 1;
  transition: background 0.2s, box-shadow 0.2s;
}
.map-day-dot.today {
  background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
}
.map-day-line {
  flex: 1;
  width: 2px;
  background: var(--line);
  min-height: 28px;
  margin-top: 2px;
}
.map-day-card:last-child .map-day-line { visibility: hidden; }

.map-day-content {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  flex: 1;
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.map-day-card.map-day-today .map-day-content {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
.map-day-num {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--brand);
  margin-bottom: 3px;
}
.map-day-city {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}
.map-day-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.map-day-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ───── Tutorial / onboarding ───── */
#tutorial {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(45, 45, 58, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeIn 0.35s ease;
}
#tutorial.hide {
  animation: fadeOut 0.3s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}
.tut-card {
  background: var(--surface);
  border-radius: 22px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 60px rgba(45, 45, 58, 0.25);
  overflow: hidden;
  animation: tutPop 0.45s cubic-bezier(0.4, 1.4, 0.5, 1) both;
}
@keyframes tutPop {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.tut-visual {
  background: linear-gradient(135deg, #fce8ec 0%, #fdf4e8 50%, #e6f6f4 100%);
  padding: 38px 20px 24px;
  text-align: center;
  position: relative;
}
.tut-visual .ic {
  font-size: 64px;
  line-height: 1;
  display: inline-block;
  animation: tutFloat 3s ease-in-out infinite;
}
@keyframes tutFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.tut-step {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.6px;
}
.tut-skip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.tut-body {
  padding: 24px 22px 18px;
  text-align: center;
}
.tut-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
  letter-spacing: -0.2px;
}
.tut-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 8px;
}
.tut-body p strong {
  color: var(--ink);
  font-weight: 600;
}
.tut-body .mini-tip {
  background: #fff7e6;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-top: 12px;
  text-align: left;
  color: var(--ink);
}
.tut-body .ios-steps {
  text-align: left;
  font-size: 13px;
  color: var(--ink);
  margin: 14px 0 0;
  padding-left: 18px;
  line-height: 1.6;
}
.tut-body .ios-steps li {
  margin-bottom: 4px;
}
.tut-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 4px 0 14px;
}
.tut-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8e3db;
  transition: all 0.25s;
}
.tut-dot.active {
  background: var(--red);
  width: 22px;
  border-radius: 4px;
}
.tut-actions {
  padding: 4px 18px 20px;
  display: flex;
  gap: 10px;
}
.tut-actions .btn {
  flex: 1;
}

/* ───── Landing ───── */
.landing {
  text-align: center;
  padding: 40px 22px 20px;
  max-width: 440px;
  margin: 0 auto;
}
.landing-logo {
  width: 82%;
  max-width: 320px;
  margin-bottom: 18px;
}
.landing-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}
.landing-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.5;
}
.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 260px;
  margin: 0 auto;
}

/* ─────────── Offline ready toast ─────────── */
#offline-ready-toast {
  position: fixed;
  top: calc(var(--safe-top) + 72px);
  right: 14px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1e7a55 0%, #2a9b6e 100%);
  color: #fff;
  padding: 10px 14px 10px 12px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(30, 122, 85, 0.3);
  font-size: 12px;
  max-width: calc(100vw - 28px);
  animation: toastSlideIn 0.35s cubic-bezier(0.3, 1.3, 0.5, 1);
}
#offline-ready-toast.hide {
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.35s ease;
}
#offline-ready-toast .ort-icon {
  font-size: 18px;
  background: rgba(255, 255, 255, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 700;
}
#offline-ready-toast .ort-body {
  min-width: 0;
}
#offline-ready-toast .ort-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}
#offline-ready-toast .ort-meta {
  opacity: 0.85;
  font-size: 11px;
  margin-top: 1px;
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translate(10px, -10px); }
  to { opacity: 1; transform: translate(0, 0); }
}

/* ─────────── Offline preloader (post-splash) ─────────── */
#offline-preloader {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: linear-gradient(135deg, #fbf7f2 0%, #fcebe1 100%);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeIn 0.4s ease;
}
#offline-preloader.hide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#offline-preloader .preloader-card {
  background: #fff;
  border-radius: 22px;
  width: 100%;
  max-width: 360px;
  padding: 32px 24px 26px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(232, 90, 111, 0.18), 0 2px 8px rgba(0, 0, 0, 0.04);
  animation: tutPop 0.5s cubic-bezier(0.4, 1.4, 0.5, 1) both;
}
#offline-preloader .preloader-icon {
  font-size: 58px;
  line-height: 1;
  margin-bottom: 10px;
  animation: suitcaseBob 1.8s ease-in-out infinite;
}
#offline-preloader .preloader-agency-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: contain;
  margin: 0 auto 14px;
  display: block;
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
  animation: suitcaseBob 2.2s ease-in-out infinite;
}
#offline-preloader .preloader-agency-initial {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display, system-ui);
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
  animation: suitcaseBob 2.2s ease-in-out infinite;
}
@keyframes suitcaseBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}
#offline-preloader .preloader-headline {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
#offline-preloader .preloader-slogan {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 22px;
}
#offline-preloader .preloader-slogan strong {
  color: var(--red);
  font-weight: 700;
}

#offline-preloader .preloader-now {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fdf9f4;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  text-align: left;
  min-height: 42px;
}
#offline-preloader .preloader-now .pn-kind {
  font-size: 20px;
  flex-shrink: 0;
}
#offline-preloader .preloader-now .pn-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

#offline-preloader .preloader-bar {
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
#offline-preloader .preloader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 100%);
  transition: width 0.35s ease;
  border-radius: 4px;
}
#offline-preloader .preloader-count {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 22px;
}

#offline-preloader .preloader-promo {
  border-top: 1px dashed var(--line);
  padding-top: 16px;
  display: grid;
  gap: 10px;
  text-align: left;
}
#offline-preloader .promo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
#offline-preloader .promo-item span {
  font-size: 18px;
  flex-shrink: 0;
}

/* ───── Splash screen ───── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fbf7f2;
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#splash .logo-img {
  width: 80%;
  max-width: 380px;
  height: auto;
  animation: splashPop 0.7s cubic-bezier(0.4, 1.4, 0.5, 1) both;
}
#splash .loader {
  position: absolute;
  bottom: 14%;
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.6;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes splashPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.85; }
}

/* ─────────────────────────────────────────────────────────────
 * Print styles (Descargar PDF del itinerario)
 * Se aplican tanto con `body.printing` como con @media print
 * ───────────────────────────────────────────────────────────── */
@media print {
  @page { size: A4; margin: 16mm 14mm 20mm; }

  :root {
    --brand: #00a6c7;
  }

  html, body {
    background: #fff !important;
    color: #0f172a !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Ocultar chrome */
  #splash,
  .topbar,
  .bottombar,
  #notif-btn,
  #pdf-btn,
  .iconbtn,
  .tutorial-overlay,
  .toast,
  .offline-progress,
  .precache-ui,
  .fab,
  .detail-back,
  .back-btn,
  #back-btn { display: none !important; }

  main {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* Header imprimible (se inserta dinámicamente) */
  .print-header {
    display: block !important;
    text-align: center;
    padding-bottom: 16mm;
    border-bottom: 2px solid var(--brand);
    margin-bottom: 12mm;
  }
  .print-header h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 32pt;
    font-weight: 700;
    margin: 0 0 4mm;
    color: var(--brand);
    letter-spacing: -0.5px;
  }
  .print-header .sub {
    font-size: 14pt;
    color: #334155;
    margin: 0 0 2mm;
  }
  .print-header .traveler {
    font-size: 11pt;
    color: #64748b;
    font-style: italic;
  }
  .print-header .agency {
    display: block;
    margin-top: 6mm;
    font-size: 10pt;
    color: #64748b;
  }

  /* Un día por página (excepto el primero) */
  .day {
    break-before: page;
    page-break-before: always;
  }
  .day:first-child {
    break-before: auto;
    page-break-before: auto;
  }
  .day-head {
    font-family: "Fraunces", Georgia, serif;
    font-size: 18pt;
    color: var(--brand);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 3mm;
    margin-bottom: 5mm;
    page-break-after: avoid;
  }
  .day-summary {
    font-size: 10pt;
    color: #475569;
    margin-bottom: 6mm;
  }

  /* Actividades */
  .act-row,
  .act {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 6mm;
    padding: 3mm 0;
    border-bottom: 1px dashed #e2e8f0;
  }
  .act-row .time,
  .act .time {
    font-weight: 700;
    color: var(--brand);
    font-size: 11pt;
    font-family: "Fraunces", Georgia, serif;
  }
  .act-row .title,
  .act .title {
    font-weight: 700;
    font-size: 12pt;
    margin: 1mm 0;
  }
  .act-row .desc,
  .act .desc {
    font-size: 10pt;
    color: #475569;
    line-height: 1.4;
  }
  .act .photo,
  .act-row .photo {
    max-width: 80mm !important;
    max-height: 60mm !important;
    object-fit: cover;
    margin-top: 2mm;
  }
  .chip, .pill, .tag {
    display: none !important;
  }

  /* Pie de página */
  .print-footer {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 9pt;
    color: #94a3b8;
    padding: 4mm 14mm;
    border-top: 1px solid #e2e8f0;
  }
  .print-footer .pb {
    font-weight: 700;
    color: var(--brand);
  }

  a { color: #0f172a; text-decoration: none; }
  a[href]::after { content: ""; }

  .powered-by {
    display: none !important;
  }
}

/* Elementos que solo existen al imprimir (mostrarlos con .printing) */
.print-header,
.print-footer { display: none; }
.printing .print-header,
.printing .print-footer { display: block; }


/* ── Preview watermark bar ── */
#preview-watermark {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  pointer-events: none;
}
.pwm-bar {
  background: rgba(15,23,42,.88);
  backdrop-filter: blur(8px);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 10px 16px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pwm-sep { opacity: .4; }
.pwm-cta {
  color: #38bdf8;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(56,189,248,.4);
  transition: color 0.15s;
}
.pwm-cta:hover { color: #7dd3fc; }

/* ─────────────────────────────────────────────────────────────
   PWA Install Banner
   ───────────────────────────────────────────────────────────── */

#pwa-install-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  transform: translateY(110%);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
#pwa-install-banner.pib-visible {
  transform: translateY(0);
  pointer-events: auto;
}

.pib-inner {
  margin: 0 12px 12px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  border: 1.5px solid rgba(0,0,0,.06);
  padding: 16px 16px 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.pib-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.pib-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.pib-icon-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display, system-ui);
}

.pib-text { flex: 1; min-width: 0; }
.pib-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.pib-sub { font-weight: 500; color: #6b7280; }
.pib-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.3;
}

.pib-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pib-btn {
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 9px 16px;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.1s;
}
.pib-btn:active { transform: scale(0.96); }
.pib-btn.primary {
  background: var(--pib-color, #00a6c7);
  color: #fff;
}
.pib-btn.ghost {
  background: #f3f4f6;
  color: #6b7280;
  padding: 9px 10px;
}

/* ── iOS instructions overlay ── */
/* ─────────────────────────────────────────────────────────────
 * iOS "Añadir a pantalla de inicio" overlay (.pio-*)
 * ───────────────────────────────────────────────────────────── */
#pwa-ios-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s;
}
#pwa-ios-overlay.pio-visible { opacity: 1; }
#pwa-ios-overlay.pio-visible .pio-sheet { transform: translateY(0); }

.pio-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.pio-sheet {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(env(safe-area-inset-bottom, 0px) + 32px);
  max-height: 90dvh;
  overflow-y: auto;
  transform: translateY(60px);
  transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 0 -12px 48px rgba(0,0,0,.18);
}

.pio-handle {
  width: 36px; height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin: 0 auto 18px;
}

/* ── Header: icono + nombre + cerrar ── */
.pio-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.pio-app-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.20);
}
.pio-app-icon-letter {
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: #fff;
  font-family: var(--font-display, system-ui);
}
.pio-header-text { flex: 1; min-width: 0; }
.pio-header-title {
  font-size: 17px; font-weight: 800; color: #111827;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pio-header-sub { font-size: 13px; color: #6b7280; margin-top: 2px; }

.pio-close {
  background: #f3f4f6; border: none; border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer; font-size: 13px;
  color: #6b7280; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s;
}
.pio-close:hover { background: #e5e7eb; }

/* ── Preview "así quedará en inicio" ── */
.pio-homescreen-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 18px;
  padding: 18px 20px 14px;
  margin-bottom: 20px;
  border: 1px solid #bae6fd;
}
.pio-mock-icon {
  width: 72px; height: 72px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
  background: #e5e7eb;
  display: flex; align-items: center; justify-content: center;
}
.pio-mock-img { width: 100%; height: 100%; object-fit: cover; }
.pio-mock-letter {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; color: #fff;
}
.pio-mock-label {
  font-size: 12px; font-weight: 600; color: #006d84;
  text-align: center; max-width: 80px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pio-mock-hint {
  font-size: 11.5px; color: #007fa8; font-weight: 500;
}

/* ── Pasos ── */
.pio-steps-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.pio-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f9fafb;
  border-radius: 14px;
  padding: 12px 14px;
}
.pio-step-badge {
  width: 26px; height: 26px; border-radius: 50%; color: #fff;
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.pio-step-body {
  font-size: 14px; color: #1f2937; line-height: 1.55;
}

/* Pill del botón Share */
.pio-share-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #00a6c7; color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  vertical-align: middle; margin: 0 3px;
}
.pio-add-icon {
  display: inline-block;
  font-size: 16px; color: #16a34a;
  font-weight: 700; margin-left: 3px;
  vertical-align: middle;
}

/* ── Flecha animada apuntando al share button ── */
.pio-arrow-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 4px 0 16px;
}
.pio-arrow-text {
  font-size: 13px; color: #6b7280;
}
.pio-arrow-bounce {
  animation: pio-bounce 1.2s ease-in-out infinite;
}
@keyframes pio-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ── Footer ── */
.pio-footer {
  text-align: center;
  font-size: 12px; color: #9ca3af; line-height: 1.6;
  padding-top: 4px;
}

/* ─────────────────────────────────────────────────────────────
   Puerta de código de activación (access gate)
   ───────────────────────────────────────────────────────────── */
#trip-gate {
  position: fixed;
  inset: 0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  overflow-y: auto;
}
.gate-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.14);
}
.gate-header {
  padding: 36px 32px 28px;
  text-align: center;
  color: #fff;
  position: relative;
}
.gate-agency {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 8px;
}
.gate-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.gate-icon {
  font-size: 36px;
  margin-top: 12px;
}
.gate-body {
  padding: 32px;
}
.gate-desc {
  margin: 0 0 24px;
  color: #475569;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}
.gate-otp-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.gate-otp-char {
  width: 44px;
  height: 54px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  text-transform: uppercase;
  transition: border-color .15s, box-shadow .15s;
  font-family: ui-monospace, monospace;
}
.gate-otp-char:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,.18);
  background: #fff;
}
.gate-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 16px;
}
.gate-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  margin-bottom: 16px;
}
.gate-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}
.gate-btn:not(:disabled):active {
  transform: scale(.97);
}
.gate-help {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   CRUISE MODE
   Scoped under .cruise-mode on <body>
   ═══════════════════════════════════════════════════════════ */

.cruise-mode {
  --cruise-navy: #1e3a5f;
  --cruise-gold: #f59e0b;
  --cruise-sea: #0891b2;
}

/* ── Category badges ── */
.cruise-cat {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.cruise-cat-dining        { background: #fef3c7; color: #92400e; }
.cruise-cat-entertainment { background: #ede9fe; color: #5b21b6; }
.cruise-cat-wellness      { background: #d1fae5; color: #065f46; }
.cruise-cat-kids          { background: #fce7f3; color: #9d174d; }
.cruise-cat-pool          { background: #e0f2fe; color: #075985; }
.cruise-cat-sports        { background: #fee2e2; color: #991b1b; }
.cruise-cat-excursion     { background: #dbeafe; color: #1e40af; }
.cruise-cat-shopping      { background: #fef9c3; color: #854d0e; }

/* ── Day-type badges ── */
.cruise-daytype {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.cruise-daytype-sea            { background: linear-gradient(135deg, #0891b2, #06b6d4); color: #fff; }
.cruise-daytype-port           { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
.cruise-daytype-embarkation    { background: linear-gradient(135deg, #7c3aed, #8b5cf6); color: #fff; }
.cruise-daytype-disembarkation { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; }

/* ── Schedule timeline ── */
.cruise-slot {
  margin-bottom: 20px;
}
.cruise-slot-header {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cruise-navy);
  padding: 8px 0;
  border-bottom: 2px solid var(--cruise-navy);
  margin-bottom: 12px;
}
.cruise-activity-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  transition: transform 0.1s;
}
.cruise-activity-card:active {
  transform: scale(0.98);
}
.cruise-activity-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--cruise-navy);
  min-width: 50px;
}
.cruise-activity-info {
  flex: 1;
}
.cruise-activity-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.cruise-activity-venue {
  font-size: 12px;
  color: var(--muted);
}
.cruise-activity-deck {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.cruise-activity-booking {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  padding: 1px 6px;
  border-radius: 8px;
  margin-top: 4px;
}

/* ── Port excursion card ── */
.cruise-excursion {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #93c5fd;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.cruise-excursion-title {
  font-weight: 700;
  font-size: 15px;
  color: #1e3a5f;
}
.cruise-excursion-time {
  font-size: 12px;
  color: #3b82f6;
  font-weight: 600;
}
.cruise-excursion-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.cruise-excursion-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cruise-maps-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.1s;
}
.cruise-maps-btn:active {
  transform: scale(0.97);
}

/* ── Wave animation for sea days ── */
.cruise-wave-bg {
  position: relative;
  overflow: hidden;
}
.cruise-wave-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C200,120 400,0 600,60 C800,120 1000,0 1200,60 L1200,120 L0,120 Z' fill='%230891b2'/%3E%3C/svg%3E") repeat-x;
  background-size: 600px 60px;
  animation: cruise-wave 4s linear infinite;
  opacity: 0.15;
  pointer-events: none;
}
@keyframes cruise-wave {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Ship info card ── */
.cruise-ship-card {
  background: linear-gradient(135deg, #1e3a5f, #2d4a6f);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin: 16px;
}
.cruise-ship-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}
.cruise-ship-line {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 4px;
}
.cruise-cabin {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  margin-top: 16px;
  font-size: 14px;
}
.cruise-cabin-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 4px;
}
.cruise-deckplan {
  margin-top: 16px;
  border-radius: 10px;
  overflow: hidden;
}
.cruise-deckplan img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Ship directory ── */
.cship-deckplan-section { background:#fff; margin:0 0 8px; }
.cship-deckplan-title { font-weight:700; font-size:15px; color:var(--cruise-navy); padding:16px 16px 8px; }
.cship-deckplan-wrap { overflow:auto; max-height:280px; background:#f8fafc; display:flex; align-items:center; justify-content:center; }
.cship-deckplan-wrap img { width:100%; height:auto; transform-origin:center center; transition:transform .2s; }
.cship-directory { background:#fff; }
.cship-dir-title { font-family:var(--font-display); font-size:18px; font-weight:700; color:var(--cruise-navy); padding:20px 16px 4px; }
.cship-dir-sub { font-size:12px; color:var(--muted); padding:0 16px 12px; }
.cship-cat-section { border-top:1px solid #f1f5f9; }
.cship-cat-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px 8px; font-size:13px; font-weight:700; color:var(--cruise-navy); background:#f8fafc; }
.cship-cat-count { background:var(--cruise-navy); color:#fff; font-size:11px; font-weight:700; padding:2px 7px; border-radius:20px; }
.cship-act-row { display:flex; align-items:center; gap:12px; padding:10px 16px; border-bottom:1px solid #f8fafc; cursor:pointer; transition:background .1s; }
.cship-act-row:active { background:#f0f9ff; }
.cship-act-emoji { font-size:20px; width:28px; text-align:center; flex-shrink:0; }
.cship-act-info { flex:1; min-width:0; }
.cship-act-title { font-size:14px; font-weight:600; color:#1e293b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cship-act-venue { font-size:11px; color:var(--muted); margin-top:2px; }
.cship-act-time { font-size:12px; font-weight:700; color:var(--cruise-navy); flex-shrink:0; }

/* ── Now view - multiple activities ── */
.cruise-now-header {
  text-align: center;
  padding: 20px 16px;
}
.cruise-now-ship {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--cruise-navy);
  opacity: 0.7;
  margin-bottom: 2px;
}
.cruise-now-port {
  font-size: 18px;
  font-weight: 700;
  color: var(--cruise-navy);
}
.cruise-now-status {
  font-size: 13px;
  color: var(--cruise-sea);
  margin-top: 4px;
}
.cruise-now-clock {
  font-size: 36px;
  font-weight: 700;
  color: var(--cruise-navy);
  font-family: var(--font-display);
  margin-top: 4px;
}
.cruise-now-day-info {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.cruise-now-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
}
.cruise-now-section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cruise-sea);
  margin: 16px 0 8px;
  padding: 0 16px;
}
.cruise-now-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}
.cruise-now-empty .big {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ── Cruise day list ── */
.cruise-day-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.1s;
}
.cruise-day-card:active {
  background: rgba(0, 0, 0, 0.03);
}
.cruise-day-card:last-child {
  border-bottom: none;
}
.cruise-day-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cruise-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.cruise-day-num.today {
  background: var(--cruise-sea);
}
.cruise-day-info {
  flex: 1;
  min-width: 0;
}
.cruise-day-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cruise-day-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Port view cards ── */
.cruise-port-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin: 0 16px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.cruise-port-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--cruise-navy);
}
.cruise-port-date {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  margin-bottom: 12px;
}
.cruise-port-excursions-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cruise-sea);
  margin-bottom: 8px;
}

/* ── Cruise detail view ── */
.cruise-detail-hero {
  background: linear-gradient(135deg, #1e3a5f, #2d4a6f);
  color: #fff;
  padding: 28px 20px 20px;
  text-align: center;
}
.cruise-detail-emoji {
  font-size: 40px;
  margin-bottom: 8px;
}
.cruise-detail-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.cruise-detail-time {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 4px;
}
.cruise-detail-body {
  padding: 16px;
}
.cruise-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.cruise-detail-row:last-child {
  border-bottom: none;
}
.cruise-detail-label {
  font-weight: 600;
  color: var(--cruise-navy);
  min-width: 80px;
}
.cruise-detail-desc {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
  margin-top: 12px;
}

/* ── Cruise schedule day detail header ── */
.cruise-schedule-header {
  padding: 16px;
  text-align: center;
}
.cruise-schedule-header .date {
  font-size: 13px;
  color: var(--muted);
}
.cruise-schedule-header .ttl {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--cruise-navy);
  margin-top: 4px;
}
.cruise-schedule-slots {
  padding: 0 16px 16px;
}
.cruise-port-excursions-section {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 14px;
  padding: 14px;
  margin: 0 16px 16px;
}
.cruise-port-excursions-section .section-label {
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
