/* MiViaje360 — estilos. Base turquesa (mar) + arena, modo oscuro automático. */
:root {
  --accent: #0f7c90;
  --accent-2: #e0703a;
  --bg: #f4f8f8;
  --surface: #ffffff;
  --surface-2: #e9f1f1;
  --ink: #13262b;
  --ink-2: #44595e;
  --ink-3: #7a8e92;
  --line: #d8e5e6;
  --ok: #2f855a;
  --bad: #c53030;
  --warn: #b7791f;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(19 38 43 / 6%), 0 8px 24px rgb(19 38 43 / 7%);
  --on-accent: #ffffff;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-ink: color-mix(in srgb, var(--accent) 80%, #000);
  --warm-soft: color-mix(in srgb, var(--accent-2) 14%, transparent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f1719; --surface: #172225; --surface-2: #1f2d31; --ink: #e8f2f3; --ink-2: #b4c6c9; --ink-3: #82979b; --line: #2b3b3f;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    --accent-ink: color-mix(in srgb, var(--accent) 65%, #fff);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f1719; --surface: #172225; --surface-2: #1f2d31; --ink: #e8f2f3; --ink-2: #b4c6c9; --ink-3: #82979b; --line: #2b3b3f;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  --accent-ink: color-mix(in srgb, var(--accent) 65%, #fff);
  color-scheme: dark;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 7vw, 3rem); }
h2 { font-size: clamp(1.3rem, 4vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: .875rem; }
.small { font-size: .875rem; }
.boot { display: grid; place-items: center; min-height: 100vh; font: 600 1.6rem var(--display); color: var(--ink-3); }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }
.nowrap-t { white-space: nowrap; }

/* --- Botones y formularios --- */
.btn { appearance: none; border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 1rem var(--sans);
  transition: transform .08s, filter .15s, opacity .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-warm { background: var(--accent-2); color: #fff; }
.btn-danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-red { background: var(--bad); color: #fff; }
.btn-whatsapp { background: #1fa855; color: #fff; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: .875rem; }
.btn-tiny { min-height: 30px; padding: 0 10px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-ghost-light { background: rgb(255 255 255 / 14%); color: #fff; }
.icon-btn { appearance: none; border: 0; background: none; cursor: pointer; font-size: 1.05rem; padding: 6px; border-radius: 10px; color: var(--ink-3); line-height: 1; }
.icon-btn:hover { background: var(--surface-2); }
.linkish { appearance: none; background: none; border: 0; color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; }
label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; color: var(--ink-2); }
input, select, textarea { width: 100%; font: 1rem var(--sans); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; min-height: 48px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { resize: vertical; min-height: 88px; }
input[type='checkbox'], input[type='radio'] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; color: var(--ink); margin: 0; }
.field + .field { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 > .field + .field { margin-top: 0; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }

/* --- Tarjetas --- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card-flat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin-bottom: 8px; }
.empty { text-align: center; padding: 28px 16px; color: var(--ink-3); }
.empty .big { font-size: 2.6rem; display: block; margin-bottom: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill-red { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.pill-green { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill-warm { background: var(--warm-soft); color: color-mix(in srgb, var(--accent-2) 75%, var(--ink)); }
.alert { border-radius: var(--radius); padding: 14px 16px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.alert-red { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.alert-warm { background: var(--warm-soft); border-color: color-mix(in srgb, var(--accent-2) 35%, transparent); }
.section-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin: 22px 0 10px; }
.section-title h2, .section-title h3 { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.kpi b { display: block; font: 600 1.45rem var(--display); }
.kpi span { color: var(--ink-3); font-size: .8rem; }

/* --- Barra superior y navegación inferior --- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 10px; min-height: 58px; }
.lang-btn { gap: 4px; padding-inline: 8px; font-size: .85rem; }
.lang-btn .lang-code { font-weight: 700; letter-spacing: .03em; }
.brand { font: 600 1.2rem var(--display); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.brand b { color: var(--accent); font-weight: 700; }
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottomnav a { flex: 1; display: grid; justify-items: center; gap: 1px; text-decoration: none; color: var(--ink-3); font-size: .72rem; font-weight: 600; padding: 4px 0; border-radius: 12px; position: relative; }
.bottomnav a span { font-size: 1.3rem; line-height: 1.2; }
.bottomnav a[aria-current='page'] { color: var(--accent-ink); background: var(--accent-soft); }
.bottomnav .dot { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: .65rem; display: grid; place-items: center; padding: 0 3px; }
.has-nav { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.page { padding-top: 18px; padding-bottom: 32px; }

/* --- Pestañas y chips --- */
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 14px -16px 16px; padding: 0 16px; scrollbar-width: none; position: sticky; top: 58px; z-index: 15; background: var(--bg); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; appearance: none; border: 0; background: none; padding: 12px 11px; font: 600 .92rem var(--sans); color: var(--ink-3); cursor: pointer; border-bottom: 2.5px solid transparent; }
.tab[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--accent); }
.subtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs .tab { border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 13px; font-size: .85rem; background: var(--surface); }
.subtabs .tab[aria-selected='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 500 .85rem var(--sans); cursor: pointer; white-space: nowrap; flex: none; }
.chip[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* --- Personas --- */
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; overflow: hidden; }
.av { --h: 190; background: linear-gradient(135deg, hsl(var(--h) 65% 55%), hsl(calc(var(--h) + 40) 60% 42%)); color: #fff; }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.list-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .ico { font-size: 1.35rem; width: 32px; text-align: center; flex: none; }
.list-row.done { opacity: .55; }
.list-row.done .t { text-decoration: line-through; }

/* --- Viajes --- */
.trip-list { display: grid; gap: 12px; }
.trip-card { display: block; text-decoration: none; color: inherit; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.trip-card .cv { height: 108px; background: var(--c, var(--accent)) center / cover; position: relative; }
.trip-card .cv .pill { position: absolute; top: 10px; left: 10px; }
.trip-card .bd { padding: 12px 16px 14px; }
.trip-card h3 { margin: 0 0 2px; }
.trip-hero { border-radius: var(--radius); overflow: hidden; background: var(--accent) center / cover; color: #fff; min-height: 170px; display: flex; align-items: flex-end; position: relative; box-shadow: var(--shadow); }
.trip-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgb(0 0 0 / 55%)); }
.trip-hero.plain::after { background: linear-gradient(135deg, transparent, rgb(0 0 0 / 25%)); }
.trip-hero > div { position: relative; z-index: 1; padding: 16px 18px; width: 100%; }
.trip-hero h1 { margin: 0; font-size: clamp(1.6rem, 6vw, 2.3rem); color: #fff; }
.trip-hero .faint { color: rgb(255 255 255 / 85%); }
.trip-hero .pill { background: rgb(255 255 255 / 92%); color: #13262b; }
.countdown { display: flex; align-items: center; gap: 14px; }
.countdown .num { font: 700 2.6rem var(--display); color: var(--accent); line-height: 1; }

/* --- Itinerario --- */
.day-head { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 6px; flex-wrap: wrap; }
.day-head h3 { margin: 0; }
.day-head .n { font: 700 .8rem var(--sans); color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; }
.timeline { border-left: 2px solid var(--line); margin-left: 14px; padding-left: 14px; }
.tl-item { position: relative; padding: 8px 0; display: flex; gap: 10px; align-items: flex-start; }
.tl-item::before { content: ''; position: absolute; left: -21px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--accent); }
.tl-item .time { font: 600 .9rem var(--display); color: var(--ink-2); width: 46px; flex: none; padding-top: 1px; }
.tl-item .body { flex: 1; min-width: 0; }
.tl-item .body strong { display: block; }
.tl-item.now::before { background: var(--accent); }

/* --- Votaciones --- */
.poll { padding: 12px 0; border-bottom: 1px solid var(--line); }
.poll:last-child { border-bottom: 0; }
.opt { position: relative; display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 10px 12px; margin-top: 6px; cursor: pointer; font: 500 .95rem var(--sans); overflow: hidden; }
.opt .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); z-index: 0; }
.opt > span { position: relative; z-index: 1; }
.opt.mine { border-color: var(--accent); font-weight: 600; }
.opt.right { border-color: var(--ok); }
.opt.right .fill { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.opt.wrong { border-color: var(--bad); }
.opt:disabled { cursor: default; }

/* --- Plata --- */
.money-big { font: 700 2rem var(--display); line-height: 1.1; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.transfer { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.transfer:last-child { border-bottom: 0; }
.transfer .arrow { color: var(--ink-3); }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; border-radius: 4px; }
.progress.over > div { background: var(--bad); }
.cat-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 10px; align-items: center; padding: 6px 0; }
.cat-row .progress { grid-column: 2 / 4; }
.split-grid { display: grid; gap: 6px; }
.split-grid .check { justify-content: space-between; }
.split-grid input[type='number'] { width: 76px; min-height: 36px; padding: 4px 8px; }

/* --- Fotos --- */
.grid-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 0; padding: 0; cursor: pointer; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .badge { position: absolute; top: 6px; right: 6px; background: rgb(0 0 0 / 55%); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .72rem; }
.tile .badge.l { left: 6px; right: auto; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgb(0 0 0 / 92%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; }
.lightbox img { max-height: calc(100vh - 160px); max-width: 100%; border-radius: 8px; }
.lightbox-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 14%); color: #fff; font-size: 1.2rem; cursor: pointer; z-index: 3; }
.lightbox-meta { display: flex; gap: 10px; align-items: center; color: #fff; flex-wrap: wrap; justify-content: center; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; max-width: 100%; touch-action: pan-y; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 45%); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-nav.prev { left: 6px; }
.lb-nav.next { right: 6px; }
.lb-pos { position: absolute; top: 20px; left: 16px; color: #fff; font: 600 .85rem var(--sans); opacity: .85; z-index: 2; }
.lb-pos:empty { display: none; }
.challenge-card { background: linear-gradient(135deg, var(--warm-soft), var(--accent-soft)); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.challenge-card .ico { font-size: 2rem; }

/* --- Mapa --- */
.chart { width: 100%; height: auto; display: block; }
.map-bg { fill: color-mix(in srgb, var(--accent) 7%, var(--surface)); stroke: var(--line); }
.map-path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-dasharray: 9 7; stroke-linecap: round; }
.map-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.map-photo { fill: var(--accent-2); stroke: var(--surface); stroke-width: 2; opacity: .85; }
.chart .map-num { fill: #fff; font: 700 13px var(--sans); }
.chart .map-label { fill: var(--ink); font: 600 14px var(--sans); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart .map-small { fill: var(--ink-3); font: 12px var(--sans); }
.map-scale { stroke: var(--ink-3); stroke-width: 3; }

/* --- Juegos --- */
.bingo { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.bingo button { aspect-ratio: 1; appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; font: 500 clamp(.58rem, 2.3vw, .8rem)/1.15 var(--sans); padding: 4px; cursor: pointer; overflow: hidden; word-break: break-word; hyphens: auto; }
.bingo button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.bingo button.free { background: var(--warm-soft); color: var(--ink); border: 1.5px dashed color-mix(in srgb, var(--accent-2) 55%, transparent); cursor: default; font-weight: 700; }
.rank { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rank:last-child { border-bottom: 0; }
.rank .pos-n { font: 700 1.1rem var(--display); width: 30px; text-align: center; }
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.stamp { border: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 16px; padding: 12px 8px; text-align: center; transform: rotate(var(--r, -2deg)); background: var(--surface); }
.stamp .f { font-size: 1.9rem; line-height: 1.1; }
.stamp b { display: block; font: 700 .95rem var(--display); color: var(--accent-ink); text-transform: uppercase; letter-spacing: .03em; }
.award { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.award:last-child { border-bottom: 0; }
.award .ico { font-size: 1.7rem; width: 40px; text-align: center; flex: none; }
.award select { min-height: 38px; padding: 4px 10px; max-width: 170px; }

/* --- Avisos --- */
.notif { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.notif.unread { font-weight: 600; }

/* --- Capas (hojas, preguntas, visor) --- */
#toasts { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 220; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; animation: rise .25s ease; transition: opacity .4s, transform .4s; }
.toast-error { background: var(--bad); color: #fff; }
.toast-ok { background: var(--ok); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
.sheet-back { position: fixed; inset: 0; z-index: 200; background: rgb(0 0 0 / 40%); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: 22px 22px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); animation: rise .25s; max-height: 92vh; overflow: auto; }
@media (min-width: 640px) { .sheet-back { align-items: center; } .sheet { border-radius: 22px; } }
#app[aria-busy='true']::before { content: ''; position: fixed; top: 0; left: 0; z-index: 500; height: 3px; width: 40%; background: var(--accent); animation: loadbar 1s ease-in-out infinite; }

/* --- Portada --- */
.hero { padding: 34px 0 12px; text-align: center; }
.hero .big { font-size: 3rem; }
.hero p { font-size: 1.08rem; }
.feature-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.feature .ico { font-size: 1.8rem; }
.feature h3 { margin: 6px 0 4px; }
.auth { min-height: 80vh; display: grid; place-items: center; padding: 28px 16px; }
.auth .card { width: 100%; max-width: 420px; }
.code-input { text-transform: uppercase; letter-spacing: .2em; font-weight: 700; text-align: center; }
.qr-box { background: #fff; padding: 12px; border-radius: 16px; width: 200px; margin: 0 auto; }
.qr-box svg { width: 100%; height: auto; display: block; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--ink); }
.offline-bar { position: sticky; top: 58px; z-index: 18; background: var(--ink); color: var(--bg); text-align: center; font-size: .85rem; padding: 6px; }
.emergency { border-left: 4px solid var(--bad); }
.diary-line { border-left: 3px solid var(--accent-2); padding: 4px 0 4px 12px; margin: 8px 0; }

/* --- Libro del viaje (imprimible) --- */
.book-day { break-inside: avoid; }
.book-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.book-photos img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }
@media print {
  .no-print, .topbar, .bottomnav, #toasts { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .card-flat { box-shadow: none; break-inside: avoid; }
  .has-nav { padding-bottom: 0; }
}

@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes loadbar { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* --- Hoy: acciones rápidas --- */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.quick-actions button { appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 10px 4px; display: grid; justify-items: center; gap: 2px; font: 600 .78rem var(--sans); cursor: pointer; min-height: 70px; }
.quick-actions button span { font-size: 1.5rem; line-height: 1.1; }
.quick-actions button:active { transform: scale(.96); }
details summary { cursor: pointer; color: var(--ink-2); font-weight: 600; padding: 4px 0; }

/* --- Wrapped y ruta animada (formato historia) --- */
.story-wrap { max-width: 380px; margin: 8px auto 0; position: relative; }
.story { aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #13262b; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.story img { width: 100%; height: 100%; object-fit: cover; }
.story .empty { color: #fff; }
.story-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.story-bars > div { flex: 1; height: 3px; border-radius: 2px; background: rgb(255 255 255 / 35%); overflow: hidden; }
.story-bars > div i { display: block; height: 100%; width: 0; background: #fff; }
.story-bars > div.done i { width: 100%; }
.story-bars > div.now i { animation: storybar 4.5s linear forwards; }
@keyframes storybar { to { width: 100%; } }
.route-canvas { width: 100%; height: auto; border-radius: 22px; display: block; background: #13262b; box-shadow: var(--shadow); }

/* --- Modo TV --- */
.tv { position: fixed; inset: 0; background: #000; color: #fff; display: grid; place-items: center; overflow: hidden; }
.tv-img { max-width: 100vw; max-height: 100vh; object-fit: contain; opacity: 0; transition: opacity .6s; }
.tv-img.in { opacity: 1; }
.tv-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 32px 28px; background: linear-gradient(transparent, rgb(0 0 0 / 75%)); display: grid; gap: 4px; font-size: clamp(1rem, 2.4vw, 1.6rem); }
.tv-brand { position: absolute; top: 18px; left: 24px; font: 600 clamp(1rem, 2vw, 1.4rem) var(--display); opacity: .85; }
.tv-full { position: absolute; top: 14px; right: 70px; }
.tv-exit { position: absolute; top: 14px; right: 16px; }

/* --- Modo copiloto --- */
.copilot { min-height: 100vh; background: #0f1719; color: #fff; padding: 16px; display: grid; gap: 14px; align-content: start; max-width: 640px; margin: 0 auto; }
.cp-card { background: #172225; border-radius: 22px; padding: 22px; display: grid; gap: 8px; }
.cp-title { font: 700 clamp(1.6rem, 6vw, 2.2rem) var(--display); }
.cp-big { font: 700 1.3rem var(--display); color: #8fe3f0; }
.cp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cp-btn { appearance: none; border: 0; border-radius: 20px; background: var(--accent); color: #fff; min-height: 110px; font-size: 2.2rem; display: grid; place-items: center; text-decoration: none; cursor: pointer; padding: 10px; }
.cp-btn span { font: 700 1rem var(--sans); }
.cp-card .cp-btn { min-height: 64px; font-size: 1.15rem; }

/* --- Ruleta --- */
.wheel-wrap { position: relative; max-width: 320px; margin: 0 auto; }
.wheel { width: 100%; height: auto; transition: transform 4s cubic-bezier(.12, .7, .1, 1); }
.wheel-pin { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-size: 2rem; }

/* --- Clima, estrellas, comentarios --- */
.wx { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--ink-2); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }
.stars-pick { display: inline-flex; gap: 0; }
.stars-pick button { appearance: none; background: none; border: 0; font-size: 1.15rem; padding: 0 1px; cursor: pointer; color: var(--line); }
.stars-pick button.on { color: #f5b301; }
.comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.lb-comments { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
audio { width: 100%; height: 40px; }
.quick-actions .qa-link { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 10px 4px; display: grid; justify-items: center; gap: 2px; font: 600 .78rem var(--sans); min-height: 70px; text-decoration: none; }
.quick-actions .qa-link span { font-size: 1.5rem; line-height: 1.1; }
