/* Vigía · recorrido interactivo (/tour). Fondo claro, ámbar solo de acento; el panel simulado usa el azul del ícono del panel. */
:root {
  --ink: #10151c; --muted: #5b6674; --line: #e3e8ef; --bg: #f4f6f9; --card: #fff;
  --brand: #f59e0b; --brand-dark: #b45309; --brand-soft: #fffbeb; --brand-line: #fde68a;
  --blue: #0284c7; --blue-soft: #f0f9ff; --blue-line: #bae6fd;
  --ok: #16a34a; --bad: #dc2626; --radius: 16px;
  --shadow: 0 1px 2px rgba(16,21,28,.06), 0 12px 32px rgba(16,21,28,.08);
  --ease-out: cubic-bezier(.23,1,.32,1); --ease-in-out: cubic-bezier(.77,0,.175,1); --ease: var(--ease-out);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.45; overflow-x: hidden; }
html { overflow-x: hidden; }
img, svg { max-width: 100%; }
button { font-family: inherit; }
a { color: inherit; }
b { font-weight: 800; }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100; overflow: hidden;
  background: radial-gradient(900px 500px at 50% 40%, #1a2030, #0b0e13 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: clamp(12px, 3.5vh, 26px);
  padding: 24px 20px calc(86px + env(safe-area-inset-bottom));
  color: #fff; transition: opacity .5s var(--ease-out), visibility .5s;
}
.intro.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-eye { width: min(44vw, 30vh, 240px); height: auto; flex: none; filter: drop-shadow(0 0 30px rgba(245,158,11,.35)); }
.eye-lid { stroke-dasharray: 110; stroke-dashoffset: 110; animation: draw 1s .1s var(--ease-out) forwards; }
.eye-iris { transform-origin: 32px 32px; transform: scale(.6); opacity: 0; animation: iris .5s .9s var(--ease-out) forwards; }
.eye-glint { opacity: 0; animation: fade .3s 1.3s forwards; }
.intro-lines { display: grid; gap: 5px; max-width: 100%; }
.intro-lines b { font-size: clamp(25px, 7.5vw, 34px); letter-spacing: clamp(3px, 1.4vw, 6px); opacity: 0; animation: up .5s 1.2s var(--ease-out) forwards; }
.intro-lines b i { color: var(--brand); font-style: normal; }
.intro-lines span { font-size: clamp(14.5px, 4.2vw, 22px); color: #c9d1db; opacity: 0; line-height: 1.35; }
.intro-lines .l1 { animation: up .5s 1.6s var(--ease-out) forwards; }
.intro-lines .l2 { animation: up .5s 2s var(--ease-out) forwards; }
.intro-skip {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.25); color: #c9d1db;
  min-height: 44px; padding: 11px 20px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 700;
}
.intro-skip:active { background: rgba(255,255,255,.14); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes iris { to { transform: scale(1); opacity: 1; } }
@keyframes fade { to { opacity: 1; } }
@keyframes up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- barra ---------- */
.tp-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 18px; background: rgba(244,246,249,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.tp-brand svg { width: 34px; height: 34px; }
.tp-brand b { font-size: 17px; letter-spacing: 3px; display: block; line-height: 1; }
.tp-brand b i { color: var(--brand); font-style: normal; }
.tp-brand small { font-size: 11.5px; color: var(--muted); }
.tp-nav { display: flex; gap: 18px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tp-nav a { text-decoration: none; }
.tp-nav a:hover { color: var(--ink); }
.tp-actions { display: flex; gap: 8px; }
.tp-btn { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 13.5px; font-weight: 800; padding: 10px 15px; border-radius: 999px; background: var(--ink); color: #fff; }
.tp-btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
@media (max-width: 820px) { .tp-nav { display: none; } }

/* ---------- comunes ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 18px 60px; }
.kicker { font-size: 12.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--brand-dark); }
.kicker-sm { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: 13px; border: 0; cursor: pointer; font-size: 15px; font-weight: 800; text-decoration: none; transition: transform 160ms var(--ease-out), box-shadow 160ms ease; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1206; box-shadow: 0 8px 20px rgba(245,158,11,.3); }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.blue { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #04121c; box-shadow: 0 8px 20px rgba(2,132,199,.25); }
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); will-change: opacity, transform; }
[data-reveal].in { opacity: 1; transform: none; will-change: auto; }
.chapter { padding: 64px 0 24px; }
.chapter-head { max-width: 760px; margin-bottom: 28px; }
.chapter-head h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.12; margin: 6px 0 10px; letter-spacing: -.4px; }
.chapter-head p { color: var(--muted); font-size: 16px; }
.hint-pill { display: inline-block; margin-top: 8px; padding: 6px 10px; border-radius: 999px; background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-dark); font-size: 13.5px; font-weight: 700; }
.hint-pill.ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 30px; display: grid; gap: 16px; max-width: 860px; position: relative; }
.hero::before { content: ""; position: absolute; inset: -80px -30vw auto -30vw; height: 520px; background: radial-gradient(600px 300px at 30% 20%, rgba(245,158,11,.16), transparent 70%); z-index: -1; pointer-events: none; }
.hero h1 { font-size: clamp(34px, 5.6vw, 62px); line-height: 1.04; letter-spacing: -1px; }
.hero .hl { color: var(--brand-dark); background: linear-gradient(transparent 62%, var(--brand-line) 62%); }
.lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 720px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-chips span { font-size: 13px; font-weight: 700; padding: 7px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.hero-day { margin-top: 14px; display: grid; gap: 6px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-width: 460px; }
.day-line { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.day-line b { color: var(--muted); font-weight: 700; min-width: 44px; }
.day-line small { margin-left: auto; color: var(--muted); font-size: 12px; }
.day-line.now { font-weight: 800; }
.day-line.now small { color: var(--brand-dark); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.now { background: var(--brand); box-shadow: 0 0 0 0 rgba(245,158,11,.6); animation: pulse 1.6s 6; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(245,158,11,0); } 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); } }

/* ---------- capítulo 1: escenario ---------- */
.stage { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .stage { grid-template-columns: 1fr; } }
.phone-wrap { display: grid; gap: 12px; justify-items: center; position: sticky; top: 74px; }
@media (max-width: 900px) { .phone-wrap { position: static; } }
.phone { width: min(375px, 100%); height: min(720px, calc(100dvh - 320px)); min-height: 460px; background: #0b0e13; border-radius: 44px; padding: 12px; box-shadow: 0 30px 80px rgba(16,21,28,.35), inset 0 0 0 2px #2a313c; position: relative; }
.phone-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 120px; height: 26px; background: #0b0e13; border-radius: 0 0 16px 16px; z-index: 3; }
.phone-screen { position: relative; height: 100%; background: var(--bg); border-radius: 34px; overflow: hidden; display: flex; flex-direction: column; }
.app-top { display: flex; align-items: center; justify-content: space-between; padding: 34px 14px 10px; background: linear-gradient(150deg, #12161d, #0c0f14); color: #fff; }
.app-brand { display: flex; align-items: center; gap: 8px; }
.app-brand svg { width: 26px; height: 26px; }
.app-brand b { font-size: 15px; letter-spacing: 2.5px; display: block; line-height: 1; }
.app-brand b i { color: var(--brand); font-style: normal; }
.app-brand small { font-size: 10.5px; color: #9aa6b5; }
.app-pill { font-size: 11.5px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.12); }
.app-prog { display: flex; align-items: center; gap: 10px; padding: 10px 14px 6px; }
.app-bar { flex: 1; height: 6px; border-radius: 999px; background: #e3e8ef; position: relative; overflow: hidden; }
.app-bar::after { content: ""; position: absolute; inset: 0; transform: scaleX(var(--p, .11)); transform-origin: left; background: linear-gradient(90deg, #f59e0b, #d97706); border-radius: 999px; transition: transform .45s var(--ease-out); }
.app-prog span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.app-body { flex: 1; overflow-y: auto; padding: 8px 12px 12px; -webkit-overflow-scrolling: touch; }
.app-body::-webkit-scrollbar { width: 0; }
.app-nav { display: flex; gap: 8px; padding: 10px 12px calc(12px + 6px); background: #fff; border-top: 1px solid var(--line); }
.app-btn { flex: 1; padding: 12px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--ink); transition: transform 160ms var(--ease-out); }
.app-btn:active { transform: scale(.97); }
.app-btn.dark { background: #10151c; border-color: #10151c; color: #fff; }
.app-btn.primary { background: linear-gradient(135deg, #f59e0b, #d97706); border-color: transparent; color: #1a1206; }
.app-btn.ghost { color: var(--muted); }
.app-btn[disabled] { opacity: .45; cursor: default; }
.app-toast { position: absolute; left: 12px; right: 12px; bottom: 76px; background: #10151c; color: #fff; padding: 11px 13px; border-radius: 12px; font-size: 13px; z-index: 5; box-shadow: var(--shadow); animation: up .3s var(--ease); }
.app-sending { position: absolute; inset: 0; z-index: 6; background: rgba(244,246,249,.92); display: grid; place-items: center; padding: 20px; }
.sending-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px; text-align: center; width: 100%; box-shadow: var(--shadow); display: grid; gap: 8px; }
.sending-ic { font-size: 40px; }
.sending-card b { font-size: 17px; }
.sending-card p { color: var(--muted); font-size: 13.5px; }
.sending-bar { height: 8px; border-radius: 999px; background: #eef2f6; overflow: hidden; }
.sending-bar div { height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, #f59e0b, #d97706); transition: transform .4s var(--ease-out); }

/* look de la app real dentro del teléfono */
.step { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 13px; animation: up .3s var(--ease-out); }
.step h1 { font-size: 17px; margin-bottom: 3px; }
.step .hint { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.field { margin-bottom: 11px; }
.field label, .field-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 11px; font-size: 14.5px; border: 1.5px solid #dde3ea; border-radius: 10px; background: #fbfcfe; outline: none; color: var(--ink); font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 70px; padding: 10px 8px; border: 2px solid var(--line); border-radius: 10px; background: #fbfcfe; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.foto-slot { border: 1.5px dashed #dde3ea; border-radius: 12px; padding: 10px; margin-bottom: 10px; background: #fbfcfe; }
.foto-slot.req-miss { animation: shake .35s; border-color: var(--bad); }
.foto-slot label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.foto-btn { width: 100%; padding: 10px; border-radius: 10px; border: 1.5px solid var(--brand-line); background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 13.5px; cursor: pointer; }
.foto-tile { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: linear-gradient(135deg, #e0e7ff, #fef3c7); animation: up .3s var(--ease); }
.foto-tile .ic { width: 52px; height: 52px; border-radius: 9px; display: grid; place-items: center; font-size: 26px; background: rgba(255,255,255,.7); }
.foto-tile b { display: block; font-size: 13px; }
.foto-tile small { color: var(--muted); font-size: 11.5px; }
.selfie-slot { border-color: #f6c35b; background: #fffaf0; }
.gps-chip { display: flex; align-items: center; padding: 10px; font-size: 12.5px; border: 1.5px solid #a7f3d0; border-radius: 10px; color: #047857; background: #ecfdf5; min-height: 42px; }
.radio-cards { display: grid; gap: 8px; }
.radio-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 2px solid var(--line); background: #fbfcfe; border-radius: 12px; padding: 11px 12px; cursor: pointer; font-size: 13.5px; }
.radio-card .rc-ic { font-size: 20px; }
.radio-card b { display: block; font-size: 14px; }
.radio-card small { color: var(--muted); font-size: 12px; }
.radio-card.on { border-color: var(--brand); background: var(--brand-soft); }
.note { background: var(--brand-soft); border: 1px solid var(--brand-line); color: #92400e; border-radius: 10px; padding: 9px 11px; font-size: 12.5px; }
.counter { display: flex; align-items: center; gap: 8px; }
.counter button { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 20px; font-weight: 800; cursor: pointer; }
.counter b { flex: 1; text-align: center; font-size: 22px; }
.inv-total { text-align: center; padding: 8px; border-radius: 10px; background: #f1f5f9; font-size: 13px; color: var(--muted); }
.inv-total b { color: var(--ink); font-size: 16px; }
.suc-box { position: relative; }
.suc-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 4; list-style: none; padding: 4px; background: #fff; border: 1.5px solid var(--brand); border-radius: 12px; box-shadow: var(--shadow); max-height: 210px; overflow-y: auto; }
.suc-list li { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.suc-list li:active, .suc-list li:hover { background: var(--brand-soft); }
.suc-list li b { font-size: 14px; }
.suc-list li small { font-size: 12px; color: var(--muted); }
.field-help { margin-top: 5px; font-size: 12px; color: var(--muted); }
.fecha-status { margin: -2px 0 11px; padding: 9px 11px; border-radius: 10px; font-size: 13px; font-weight: 700; border: 1.5px solid; }
.fecha-status.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.fecha-status.warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.fecha-status.bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.material-flow { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbfcfe; margin-bottom: 10px; }
.sub { font-weight: 800; font-size: 11.5px; color: var(--brand-dark); text-transform: uppercase; letter-spacing: .6px; margin: 10px 0 6px; }
.comp-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbfcfe; display: grid; gap: 8px; }
.resumen { display: grid; gap: 6px; padding: 10px 11px; border-radius: 12px; background: #f1f5f9; font-size: 12.5px; margin-top: 8px; }
.resumen span b { font-weight: 800; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--brand); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* controles y narración */
.phone-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.side { display: grid; gap: 16px; }
.narr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.narr::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(#f59e0b, #d97706); }
.narr-step { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--brand-dark); background: var(--brand-soft); border: 1px solid var(--brand-line); padding: 4px 9px; border-radius: 999px; }
.narr h3 { font-size: 21px; margin: 10px 0 6px; letter-spacing: -.2px; }
.narr p { color: var(--muted); font-size: 15px; }
.narr-checks { list-style: none; margin-top: 12px; display: grid; gap: 6px; }
.narr-checks li { font-size: 13.5px; padding-left: 22px; position: relative; color: var(--ink); }
.narr-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.narr.flash { animation: flash .6s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,.5); } 100% { box-shadow: 0 0 0 14px rgba(245,158,11,0); } }
.mapcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.mapcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mapcard h4 { font-size: 17px; margin-top: 2px; }
.live-badge { font-size: 11.5px; font-weight: 800; color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.tour-map { height: 300px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #e9eef3; }
.map-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.map-stats span { display: grid; text-align: center; padding: 8px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); }
.map-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.map-stats small { font-size: 11.5px; color: var(--muted); }
.map-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.leaflet-container { font-family: inherit; }
.ana-marker { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(245,158,11,.3); }
.stop-marker { width: 24px; height: 24px; border-radius: 50%; background: #10151c; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.stop-marker.new { background: var(--brand); color: #1a1206; animation: pulse 1.6s 5; }
.stop-marker.other { background: var(--blue); }

/* ---------- capítulo 2: panel ---------- */
.device-switch { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 16px; }
.device-switch button { border: 0; background: transparent; min-height: 44px; padding: 10px 15px; border-radius: 999px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.device-switch button.on { background: var(--ink); color: #fff; }
.device-frame { margin: 0 auto; background: #0b0e13; padding: 12px; border-radius: 26px; box-shadow: 0 30px 80px rgba(16,21,28,.3); transition: max-width .45s var(--ease-in-out); max-width: 1100px; }
.device-frame[data-device="tablet"] { max-width: 820px; padding: 16px; border-radius: 30px; }
.device-frame[data-device="phone"] { max-width: 390px; padding: 12px; border-radius: 40px; }
.pm { display: grid; grid-template-columns: 210px 1fr; min-height: 560px; background: var(--bg); border-radius: 16px; overflow: hidden; }
.device-frame[data-device="tablet"] .pm { grid-template-columns: 64px 1fr; }
.device-frame[data-device="tablet"] .pm-nav button span, .device-frame[data-device="tablet"] .pm-brand span, .device-frame[data-device="tablet"] .pm-user { display: none; }
.device-frame[data-device="phone"] .pm { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 700px; border-radius: 30px; }
.device-frame[data-device="phone"] .pm-side { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; padding: 30px 10px 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.device-frame[data-device="phone"] .pm-side::-webkit-scrollbar { height: 0; }
.device-frame[data-device="phone"] .pm-brand { display: none; }
.device-frame[data-device="phone"] .pm-nav { flex-direction: row; flex: none; gap: 4px; min-width: max-content; }
.device-frame[data-device="phone"] .pm-nav button { padding: 7px 9px; font-size: 12px; white-space: nowrap; }
.device-frame[data-device="phone"] .pm-user { display: none; }
.pm-side { background: linear-gradient(170deg, #12161d, #0c0f14); color: #fff; padding: 16px 12px; display: flex; flex-direction: column; gap: 14px; }
.pm-brand { display: flex; align-items: center; gap: 8px; }
.pm-brand svg { width: 30px; height: 30px; }
.pm-brand b { display: block; font-size: 14px; line-height: 1; }
.pm-brand small { font-size: 11px; color: #9aa6b5; }
.pm-nav { display: flex; flex-direction: column; gap: 4px; }
.pm-nav button { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #c9d1db; text-align: left; padding: 9px 10px; border-radius: 9px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.pm-nav button.on { background: rgba(56,189,248,.16); color: #fff; }
.pm-user { margin-top: auto; font-size: 12px; color: #9aa6b5; }
.pm-main { display: flex; flex-direction: column; min-width: 0; position: relative; }
.pm-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); font-size: 14px; }
.pm-topbar span { color: var(--muted); font-size: 12.5px; }
.pm-content { padding: 14px; flex: 1; overflow: auto; }
.pm-toast { position: absolute; right: 14px; top: 54px; max-width: calc(100% - 28px); background: #10151c; color: #fff; padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.35; box-shadow: var(--shadow); animation: up .3s var(--ease); z-index: 3; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.kpi b { display: block; font-size: 26px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi.new b { color: var(--brand-dark); }
.kpi .delta { font-size: 12px; color: #047857; font-weight: 700; }
.pm-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.pm-card h4 { font-size: 14px; margin-bottom: 8px; }
.bars { display: grid; gap: 6px; }
.bars div { display: grid; grid-template-columns: 90px 1fr 34px; gap: 8px; align-items: center; font-size: 12.5px; }
.bars i { display: block; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #d97706); transform-origin: left; animation: grow .8s var(--ease); }
@keyframes grow { from { transform: scaleX(0); } }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 8px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
.tbl tr.new-row td { background: var(--brand-soft); animation: rowin .8s var(--ease); }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #f8fafc; }
@keyframes rowin { from { background: #fde68a; } }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tag.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.tag.bad { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.tag.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.tag.mut { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.tag.new { background: var(--brand); color: #1a1206; animation: pulse 1.6s 4; }
.ficha { display: grid; gap: 10px; }
.ficha-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ficha-head b { font-size: 16px; }
.md-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.dt-cell { background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
.dt-cell .l { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.dt-cell .v { font-size: 13.5px; margin-top: 2px; }
.fotos-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fotos-row span { width: 64px; height: 64px; border-radius: 9px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(135deg, #e0e7ff, #fef3c7); border: 1px solid var(--line); }
.pm-map { height: 360px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #e9eef3; }
.device-frame[data-device="phone"] .pm-map { height: 300px; }
.excel { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.excel table { border-collapse: collapse; font-size: 12px; min-width: 1500px; }
.excel th { background: #217346; color: #fff; padding: 6px 8px; text-align: left; font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
.excel td { padding: 6px 8px; border-bottom: 1px solid #eef2f6; border-right: 1px solid #f1f5f9; white-space: nowrap; }
.excel tr.new-row td { background: var(--brand-soft); }
.excel-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.excel-bar .btn { padding: 9px 14px; font-size: 13px; }
.device-note { margin-top: 12px; color: var(--muted); font-size: 14px; text-align: center; }
.empty { color: var(--muted); font-size: 13.5px; padding: 14px; text-align: center; }

/* ---------- módulos ---------- */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.mod { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: transform .25s var(--ease-out), box-shadow .25s ease; }
.mod[data-reveal] { transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), box-shadow .25s ease; }
.mod[data-reveal].in { transition: transform .25s var(--ease-out), box-shadow .25s ease; }
@media (hover: hover) and (pointer: fine) { .mod:hover { transform: translateY(-4px); box-shadow: var(--shadow); } }
.mod-ic { font-size: 26px; }
.mod h3 { font-size: 17px; margin: 8px 0 6px; }
.mod p { color: var(--muted); font-size: 14px; }

/* ---------- pantallas ---------- */
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.screen-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; box-shadow: var(--shadow); }
.screen-card h3 { font-size: 22px; }
.screen-card ul { padding-left: 18px; color: var(--muted); font-size: 14.5px; display: grid; gap: 6px; }
.screen-card ul b { color: var(--ink); }
.screen-card .btn { justify-self: start; margin-top: 4px; }
.screen-tag { justify-self: start; font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--brand-line); }
.screen-tag.blue { background: var(--blue-soft); color: #075985; border-color: var(--blue-line); }
.campo-card { border-top: 4px solid var(--brand); }
.panel-card { border-top: 4px solid var(--blue); }

/* ---------- detrás ---------- */
.detras-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.detras-grid article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.detras-grid span { font-size: 26px; }
.detras-grid h3 { font-size: 16px; margin: 8px 0 5px; }
.detras-grid p { color: var(--muted); font-size: 14px; }

/* ---------- cta / footer ---------- */
.cta { margin-top: 60px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 40px 28px; text-align: center; display: grid; gap: 12px; justify-items: center; box-shadow: var(--shadow); }
.cta h2 { font-size: clamp(24px, 3vw, 34px); max-width: 720px; letter-spacing: -.3px; }
.cta p { color: var(--muted); max-width: 600px; }
.tp-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); max-width: 1180px; margin: 0 auto; }
.tp-foot a { color: var(--brand-dark); font-weight: 700; text-decoration: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #10151c; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); z-index: 60; animation: up .3s var(--ease); max-width: calc(100% - 32px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: 150ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal], .step, .intro-lines *, .eye-iris, .eye-glint { opacity: 1 !important; transform: none !important; }
  .eye-lid { stroke-dashoffset: 0; }
}
@media (max-width: 720px) {
  .device-switch { display: none; }
}
@media (max-width: 900px) {
  /* en el celular no hay barra pegada ni columna lateral: el teléfono puede respirar */
  .phone { height: min(660px, calc(100dvh - 150px)); min-height: 470px; padding: 7px; border-radius: 34px; }
  .phone-screen { border-radius: 28px; }
  .phone-notch { width: 96px; height: 20px; }
  .app-top { padding: 26px 12px 9px; }
}
@media (max-width: 560px) {
  .chapter { padding: 46px 0 18px; }
  .hero { padding: 40px 0 20px; }
  .device-frame { padding: 8px; }
}

/* ---------- inicio de la app simulada: jornada y visitas ---------- */
.home { display: grid; gap: 10px; animation: up .3s var(--ease-out); }
.hola { font-size: 15px; color: var(--muted); }
.hola b { color: var(--ink); }
.big-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 14px; padding: 14px; cursor: pointer; background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1206; box-shadow: 0 8px 20px rgba(245,158,11,.3); transition: transform 160ms var(--ease-out); }
.big-cta:active { transform: scale(.97); }
.big-cta[disabled] { opacity: .5; cursor: default; }
.big-cta .cta-ic { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.35); display: grid; place-items: center; font-size: 16px; flex: none; }
.big-cta b { display: block; font-size: 17px; }
.big-cta small { font-size: 12px; opacity: .85; }
.jcard, .hblock { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 13px; }
.jhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.jhead h2, .hblock h2 { font-size: 15px; margin-top: 2px; }
.j-badge { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.j-badge.live { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.j-badge.pause { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.j-badge.off { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.jstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.jstats span { display: grid; text-align: center; padding: 8px 4px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); }
.jstats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.jstats small { font-size: 11px; color: var(--muted); }
.jactions { display: flex; gap: 8px; }
.jhelp, .jnote { margin-top: 9px; font-size: 12.5px; color: var(--muted); }
.jnote { color: #047857; font-weight: 700; }
.hv { padding: 9px 0; border-top: 1px solid #eef2f6; font-size: 13.5px; }
.hv small { display: block; color: var(--muted); font-size: 12px; }
.hv.new { background: var(--brand-soft); margin: 0 -13px; padding: 9px 13px; border-top-color: var(--brand-line); }
.live-badge.pause { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.live-badge.off { color: #64748b; background: #f1f5f9; border-color: #e2e8f0; }
.sending-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sending-stats span { display: grid; padding: 8px 4px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); }
.sending-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.sending-stats small { font-size: 11px; color: var(--muted); }
/* "En una frase": la explicación que entiende cualquiera */
.simple { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); font-size: 15px; color: var(--ink); line-height: 1.5; max-width: 760px; }
.simple b { color: var(--brand-dark); }
.chapter-head .simple { color: var(--ink); font-size: 15px; }

/* ---------- controles: escenarios y velocidad ---------- */
.phone-controls { width: min(375px, 100%); display: grid; gap: 8px; justify-items: stretch; }
.ctrl-label { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: -3px; line-height: 1.35; }
.ctrl-help { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.35; }
.escenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.escenarios button {
  display: grid; gap: 1px; text-align: center; padding: 8px 5px; border-radius: 11px; cursor: pointer; min-height: 44px;
  border: 2px solid var(--line); background: #fff; color: var(--ink);
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.escenarios button:active { transform: scale(.98); }
.escenarios button b { font-size: 12.5px; font-weight: 800; line-height: 1.2; }
.escenarios button small { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.escenarios button.on { border-color: var(--brand); background: var(--brand-soft); }
.escenarios button.on small { color: var(--brand-dark); }
.ctrl-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ctrl-row .btn { flex: 1 1 auto; padding: 11px 14px; font-size: 14px; }
.vel { display: flex; align-items: center; gap: 6px; justify-content: center; flex-wrap: wrap; }
.vel span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.vel button {
  border: 1px solid var(--line); background: #fff; color: var(--muted); font-weight: 700; font-size: 13px;
  min-height: 44px; padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: all 160ms var(--ease-out);
}
.vel button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
/* motivo cuando no se pudo tomar la foto (permiso restrictivo) */
.foto-motivo {
  display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border-radius: 10px;
  background: #fffbeb; border: 1px solid var(--brand-line); color: #78520b; font-size: 12.5px; line-height: 1.4;
  animation: up .3s var(--ease-out);
}
.foto-motivo b { display: block; color: var(--brand-dark); font-size: 12px; }

@media (max-width: 460px) {
  .escenarios { grid-template-columns: 1fr; }
  .escenarios button { text-align: left; padding: 9px 12px; }
}

/* pantallas bajas (laptops de 13") : el teléfono y sus controles siguen cabiendo juntos */
@media (min-width: 901px) and (max-height: 840px) {
  .ctrl-help { display: none; }
  .ctrl-label { font-size: 12px; }
  .escenarios button small { display: none; }
  .escenarios button { min-height: 38px; }
}

/* ---------- teléfonos: la intro y el resto siempre dentro de la pantalla ---------- */
@media (max-width: 560px) {
  main { padding: 0 14px 46px; }
  .tp-top { padding: 8px 12px; gap: 8px; }
  .tp-brand svg { width: 30px; height: 30px; }
  .tp-brand small { display: none; }
  .tp-actions { gap: 6px; }
  .tp-btn { padding: 10px 12px; font-size: 13px; }
  .hero { padding: 30px 0 16px; }
  .hero-day { padding: 12px 13px; }
  .day-line { font-size: 13px; gap: 8px; }
  .day-line b { min-width: 40px; }
  .day-line small { font-size: 11.5px; }
  .chapter-head { margin-bottom: 20px; }
  .simple { font-size: 14.5px; padding: 11px 13px; }
  .narr { padding: 16px; }
  .narr h3 { font-size: 19px; }
  .narr p { font-size: 14.5px; }
  .mapcard { padding: 13px; }
  .tour-map { height: 240px; }
  .cta { padding: 30px 18px; border-radius: 18px; }
  .tp-foot { flex-direction: column; gap: 4px; text-align: center; }
}
/* pantallas muy angostas (320 px): nada se sale ni se encima */
@media (max-width: 360px) {
  main { padding: 0 12px 40px; }
  .hero-chips span { font-size: 12px; padding: 6px 9px; }
  .escenarios button { padding: 9px 10px; }
  .vel { gap: 4px; }
  .vel button { padding: 9px 12px; font-size: 12.5px; }
  .vel span { width: 100%; text-align: center; }
  .map-stats { grid-template-columns: 1fr 1fr; }
  .map-stats span:last-child { grid-column: 1 / -1; }
  .jstats { grid-template-columns: 1fr 1fr; }
  .jstats span:last-child { grid-column: 1 / -1; }
}
/* la app simulada dentro del teléfono: que el contenido no se desborde nunca */
.app-body .step, .app-body .home { max-width: 100%; }
.suc-list li b, .suc-list li small, .hv b, .hv small { overflow-wrap: anywhere; }
.pm-content, .pm-main { min-width: 0; }

/* el panel simulado, en el celular, nunca más ancho que la pantalla */
@media (max-width: 700px) {
  .device-frame,
  .device-frame[data-device="phone"],
  .device-frame[data-device="tablet"],
  .device-frame[data-device="desktop"] { max-width: 100%; padding: 8px; border-radius: 24px; }
  .device-frame[data-device="phone"] .pm { min-height: 560px; border-radius: 18px; }
  .device-frame .pm { border-radius: 18px; }
  .pm-content { padding: 11px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi b { font-size: 22px; }
  .pm-map { height: 260px; }
  .md-grid { grid-template-columns: 1fr 1fr; }
  .bars div { grid-template-columns: 72px 1fr 26px; font-size: 11.5px; }
}
@media (max-width: 380px) {
  .kpis { grid-template-columns: 1fr; }
  .md-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .toast { bottom: calc(14px + env(safe-area-inset-bottom)); font-size: 13.5px; padding: 11px 14px; }
}
