/* NEXO · línea gráfica de José: azul profundo, dorado, crema; Playfair Display + DM Sans. Móvil primero. */
:root {
  --navy: #092F60; --navy-2: #0F4A8A; --gold: #F4BA3E; --gold-d: #D9A22A; --cream: #FAF7F0; --paper: #FFFFFF;
  --ink: #1B2433; --muted: #5A6577; --line: #E6DFCF; --sky: #E4EFFB; --ok: #1F7A4D; --warn: #A15C00; --bad: #B3261E;
  --f-title: "Playfair Display", Georgia, serif; --f-body: "DM Sans", system-ui, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.5 var(--f-body); }
body { min-height: 100dvh; }
h1, h2, h3 { font-family: var(--f-title); color: var(--navy); line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 7vw, 2.4rem); } h2 { font-size: 1.5rem; } h3 { font-size: 1.15rem; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--navy-2); outline-offset: 2px; }

.app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--cream); }
@media (min-width: 900px) { .app { box-shadow: 0 0 0 1px var(--line); } body { background: #F1ECDF; } }

.top { background: var(--navy); color: #fff; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 1.25rem var(--f-title); letter-spacing: .04em; }
.top .where { font-size: .78rem; text-align: right; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.rings { width: 34px; height: 22px; flex: none; }
.progress { padding: 10px 16px 0; font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.bar { margin: 6px 16px 0; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width .3s; }

main { flex: 1; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 16px; }
main ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.home { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.tag { align-self: flex-start; background: var(--gold-d); color: #fff; font: 700 1rem var(--f-title); padding: 4px 10px; border-radius: 8px; }
.accent { background: linear-gradient(transparent 62%, rgba(244,186,62,.55) 62%); }
.sub { font-size: 1.1rem; color: var(--ink); }
.callout { background: var(--sky); border-left: 5px solid var(--gold); border-radius: 10px; padding: 12px 14px; }
.callout.gold { background: #FBF0D2; border-left-color: var(--gold-d); }
.dark { background: var(--navy); color: #fff; border-left: 5px solid var(--gold); border-radius: 10px; padding: 12px 14px; font-size: .95rem; }
.dark b { color: var(--gold); }
.note { color: var(--muted); font-size: .92rem; }
.err { background: #FDECEA; color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.ok { background: #E7F5EC; color: var(--ok); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }

.foot { position: sticky; bottom: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--cream) 22%); display: flex; flex-direction: column; gap: 8px; }
.btn { appearance: none; border: 2px solid var(--gold); background: var(--gold); color: var(--navy); font-weight: 700; font-size: 1.05rem; border-radius: 14px; min-height: 52px; padding: 10px 16px; cursor: pointer; width: 100%; }
.btn:hover:not(:disabled) { background: var(--gold-d); border-color: var(--gold-d); }
.btn.ghost { background: var(--paper); color: var(--navy); border-color: var(--navy); }
.btn.small { min-height: 44px; font-size: .95rem; width: auto; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--navy-2); text-decoration: underline; cursor: pointer; padding: 10px 4px; min-height: 44px; align-self: flex-start; }

label.f { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
input[type=text], input[type=password], textarea { border: 2px solid var(--navy); border-radius: 12px; padding: 12px; background: var(--paper); font-weight: 400; min-height: 48px; width: 100%; }
textarea { min-height: 84px; resize: vertical; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }

details.helps { background: #FBF0D2; border: 1px solid #EBD9A0; border-radius: 12px; padding: 4px 14px; }
details.helps summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
details.helps ul { margin: 0 0 10px; padding-left: 20px; }

.wave { display: block; width: 100%; height: 64px; }
.timer { font-variant-numeric: tabular-nums; font-size: .95rem; white-space: nowrap; }
.rec-row { display: flex; align-items: center; gap: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); display: inline-block; animation: pulse 1.2s infinite; margin-right: 6px; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } .bar > i { transition: none; } }

.mov { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mov > div { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.mov b { font-family: var(--f-title); font-size: 1.1rem; color: var(--navy); }
.mov .ic { font-size: 1.4rem; line-height: 1; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list > div { display: flex; gap: 10px; align-items: flex-start; }
.list .ic { font-size: 1.3rem; width: 28px; text-align: center; flex: none; }

.script { display: flex; flex-direction: column; gap: 8px; max-height: 46dvh; overflow: auto; }
.script p { padding: 8px 10px; border-radius: 10px; background: #F6F3EA; }
.script p.now { background: var(--sky); outline: 2px solid var(--navy-2); }
.script b { color: var(--navy); }
.player { background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.player .row > button { background: var(--gold); color: var(--navy); border: 0; border-radius: 10px; min-height: 44px; font-weight: 700; cursor: pointer; padding: 6px 12px; }

.scale { display: flex; gap: 8px; }
.scale label { flex: 1; position: relative; }
.scale input { position: absolute; opacity: 0; }
.scale span { display: grid; place-items: center; min-height: 48px; border: 2px solid var(--navy); border-radius: 12px; font-weight: 700; cursor: pointer; background: var(--paper); }
.scale input:checked + span { background: var(--gold); border-color: var(--gold-d); }
.scale input:focus-visible + span { outline: 3px solid var(--navy-2); outline-offset: 2px; }
.q { display: flex; flex-direction: column; gap: 8px; }
.q .ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.chk { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 500; }
.chk input { width: 22px; height: 22px; accent-color: var(--navy); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 2px solid var(--gold-d); background: #FBF0D2; border-radius: 99px; padding: 6px 14px; font-weight: 600; min-height: 40px; cursor: pointer; }
.fill { display: flex; flex-direction: column; gap: 8px; }

.ind { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.ind:first-child { border-top: 0; }
.ind .head { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.meter { height: 12px; background: #EFEADD; border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; }
.meter i.pos { background: var(--navy); } .meter i.neg { background: var(--gold); }
.pill { align-self: flex-start; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #EFEADD; color: var(--muted); white-space: nowrap; }
.pill.obs { background: var(--sky); color: var(--navy); } .pill.nc { background: #F3E6C5; color: var(--warn); }
.quote { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 8px; }
.delta { font-size: .8rem; font-weight: 700; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
svg.radar { width: 100%; max-width: 320px; align-self: center; }
.skeleton { height: 14px; border-radius: 8px; background: linear-gradient(90deg, #EFEADD, #F8F4E8, #EFEADD); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.home .conv { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }
.home .conv > div:last-child { text-align: right; }
.badge { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #EFEADD; }
.badge.done { background: #E7F5EC; color: var(--ok); } .badge.now { background: var(--gold); color: var(--navy); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (min-width: 768px) { h1 { font-size: 2.6rem; } main { padding-top: 24px; } .app { max-width: 560px; } }
input[type=file] { max-width: 100%; font-size: .9rem; }
details.note { max-width: 100%; }
textarea { field-sizing: content; }
