/* tribeca.travel · shell, Win y placeholders (sobre roadtrips.css) */
:root { --tabbar-h: 64px; --composer-h: 64px; }
body { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }
body[data-tab="win"] { padding-bottom: calc(var(--tabbar-h) + var(--composer-h) + var(--safe-bottom)); }

/* Barra de pestañas */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-hairline);
  padding-bottom: var(--safe-bottom);
}
.tab-bar-inner { max-width: 34rem; margin: 0 auto; height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--text-tertiary, #A1A1AA); font-size: 10.5px; letter-spacing: 0; height: 100%; -webkit-tap-highlight-color: transparent; }
.tab-item.active { color: var(--text-primary); }
.tab-icon svg { width: 22px; height: 22px; display: block; }
.tab-label { font-weight: 500; }
.tab-win-disc {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-top: -18px;
  background: var(--accent-black); color: var(--on-accent, #fff); font-family: var(--font-heading); font-weight: 600; font-size: 18px; letter-spacing: -0.02em;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18); border: 3px solid var(--bg-page);
}
.tab-win.active .tab-win-disc { transform: scale(1.04); }

/* Barra superior (Win y placeholders) */
.top-bar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-hairline); padding-top: var(--safe-top); }
.top-bar-inner { max-width: 48rem; margin: 0 auto; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; gap: .75rem; }
.top-brand { text-decoration: none; }
.wordmark { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.04em; color: var(--text-primary); }
.wordmark-suffix { font-weight: 500; color: var(--text-secondary); }
.top-right { display: flex; align-items: center; gap: .5rem; }

/* Placeholders */
.ph-main { max-width: 40rem !important; }
.ph { display: flex; flex-direction: column; gap: 1.1rem; padding-top: .5rem; }
.ph-kicker { display: flex; align-items: center; gap: .5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-secondary); }
.ph-kicker .dot { background: var(--text-primary); }
.ph-title { font-size: 2.1rem; line-height: 1.05; letter-spacing: -0.045em; }
.ph-body { margin: 0; color: var(--text-secondary); font-size: 1rem; line-height: 1.55; }
.ph-photo { border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--border-hairline); aspect-ratio: 4 / 3; background: var(--bg-muted); }
.ph-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-points { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-hairline); }
.ph-points li { padding: .8rem 0; border-bottom: 1px solid var(--border-hairline); font-size: .92rem; display: flex; justify-content: space-between; }
.ph-points li::after { content: "Pronto"; color: var(--text-tertiary, #A1A1AA); font-size: .75rem; }
.ph-cta { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .25rem; }
.ph-cta .btn-pill-primary, .ph-cta .btn-pill-ghost { padding: .7rem 1.1rem; font-size: .9rem; }

/* Win */
.win-main { max-width: 44rem !important; padding-top: 1rem !important; }
.win-meta { font-size: .72rem; color: var(--text-secondary); }
.win-thread { display: flex; flex-direction: column; gap: 1.1rem; }
.win-empty { text-align: center; padding: 2.2rem .5rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.win-hero-disc { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-black); color: var(--on-accent, #fff); display: grid; place-items: center; font-family: var(--font-heading); font-weight: 600; font-size: 26px; }
.win-empty h1 { font-size: 2rem; letter-spacing: -0.045em; }
.win-empty p { margin: 0; color: var(--text-secondary); max-width: 22rem; line-height: 1.5; }
.win-suggestions { display: flex; flex-direction: column; gap: .5rem; width: 100%; max-width: 26rem; margin-top: .8rem; }
.suggestion { text-align: left; background: var(--bg-page); border: 1px solid var(--border-hairline); border-radius: var(--radius-inner); padding: .8rem 1rem; font-size: .9rem; color: var(--text-primary); cursor: pointer; line-height: 1.35; }
.suggestion:hover { border-color: var(--border-strong); background: var(--bg-subtle); }
.msg { display: flex; flex-direction: column; gap: .35rem; }
.msg-user { align-items: flex-end; }
.msg-user .bubble { background: var(--accent-black); color: var(--on-accent, #fff); border-radius: 18px 18px 4px 18px; padding: .65rem .95rem; max-width: 85%; }
[data-brand="widers"] .msg-user .bubble { border-radius: 0; }
.msg-win .bubble { color: var(--text-primary); max-width: 100%; }
.bubble p { margin: 0 0 .6rem; line-height: 1.55; font-size: .95rem; font-weight: 450; }
.bubble p:last-child { margin-bottom: 0; }
.msg-win .bubble p:first-child { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.35; }
.bubble ul { margin: 0 0 .6rem; padding-left: 1.1rem; }
.bubble li { margin: .25rem 0; line-height: 1.5; font-size: .95rem; }
.msg-author { display: flex; align-items: center; gap: .45rem; font-size: .75rem; color: var(--text-secondary); }
.win-disc { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-black); color: var(--on-accent, #fff); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.typing { display: flex; gap: 5px; padding: .5rem 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-tertiary, #A1A1AA); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.route-card { border: 1px solid var(--border-hairline); border-radius: var(--radius-card); padding: 1rem 1.1rem; background: var(--bg-subtle); display: flex; flex-direction: column; gap: .45rem; margin-top: .3rem; }
.route-kicker { display: flex; align-items: center; gap: .45rem; font-size: .72rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; }
.route-title { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.03em; }
.route-sub { font-size: .82rem; color: var(--text-secondary); }
.route-days { margin: .2rem 0 .4rem; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.route-days li { font-size: .85rem; line-height: 1.35; }
.route-days li span { display: inline-block; min-width: 3.4rem; color: var(--text-secondary); }
.route-add { align-self: flex-start; padding: .65rem 1.1rem; font-size: .88rem; }
.route-broken { font-size: .85rem; color: var(--text-secondary); }

.composer { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); z-index: 55; background: linear-gradient(to top, var(--bg-page) 70%, rgba(255,255,255,0)); padding: .5rem .75rem .6rem; }
.composer-inner { max-width: 44rem; margin: 0 auto; display: flex; align-items: flex-end; gap: .5rem; background: var(--bg-page); border: 1px solid var(--border-strong); border-radius: 24px; padding: .35rem .35rem .35rem 1rem; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
[data-brand="widers"] .composer-inner { border-radius: 0; }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; background: transparent; font-size: 16px; line-height: 1.4; padding: .45rem 0; max-height: 140px; color: var(--text-primary); }
.send-btn { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 0; background: var(--accent-black); color: var(--on-accent, #fff); display: grid; place-items: center; cursor: pointer; }
.send-btn svg { width: 18px; height: 18px; }

/* Mis viajes dentro del shell: el footer no tapa la barra */
body[data-tab="viajes"] .app-footer { margin-bottom: 0; }
@media (max-width: 639px) {
  body[data-tab="viajes"] .header-actions .search-wrap { flex: 1; }
}

/* El aviso flota por encima de la barra de pestañas */
.toast { bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px) !important; }
body[data-tab="win"] .toast { bottom: calc(var(--tabbar-h) + var(--composer-h) + var(--safe-bottom) + 14px) !important; }
