/* =========================================================
   TÁCTICO — sistema visual (misma familia que Pulso)
   Archivo (display, eje de anchura) · Geist (texto) · Geist Mono (cifras)
   Fondo casi negro, acento lima, tarjetas con bisel, esquinas suaves.
   ========================================================= */

@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-latin-standard-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-latin-ext-standard-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; src: url('../fonts/geist-latin-wght-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist'; src: url('../fonts/geist-latin-ext-wght-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geist-mono-latin-wght-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-display: swap; }

:root {
  --accent: #c6ff3d;
  --accent-rgb: 198, 255, 61;
  --accent-ink: #0a0a0a;
  --ok: #3ddc84;
  --warn: #ffb547;
  --bad: #ff5d5d;
  --info: #6aa8ff;

  --bg: #060607;
  --bg-elev: #0c0c0e;
  --surface: #111113;
  --surface-2: #17171a;
  --surface-3: #1f1f23;
  --shell: rgba(255, 255, 255, 0.025);
  --shell-line: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f3f3ef;
  --text-2: #a3a3a8;
  --text-3: #6c6c73;
  --hi: rgba(255, 255, 255, 0.07);
  --glass: rgba(14, 14, 16, 0.78);
  --field: rgba(255, 255, 255, 0.04);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.8);

  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: var(--display);

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --r-xl: 28px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px; --r-xs: 8px;

  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gx: 14px; /* margen lateral del contenido */
  color-scheme: dark;
}

/* compat: clases de color heredadas */
.red { color: var(--bad); }
.green { color: var(--ok); }
.accent { color: var(--accent); }
.dim { color: var(--text-3); }
.muted { color: var(--text-2); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 15px; line-height: 1.5;
  font-feature-settings: 'ss01', 'cv11';
  min-height: 100dvh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
input, textarea, select { user-select: text; -webkit-user-select: text; font: inherit; color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(var(--accent-rgb), 0.35); }

/* grano suave, fijo */
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

#app { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; min-height: 100dvh; }
main { padding: 6px 0 calc(var(--nav-h) + var(--safe-b) + 28px); }
main.no-nav { padding-bottom: calc(24px + var(--safe-b)); }

/* ---------- tipografía ---------- */
.lbl { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; color: var(--text-2); line-height: 1.35; }
.lbl.red { color: var(--bad); }
.lbl.green { color: var(--ok); }
.lbl.accent { color: var(--accent); }
.lbl.dim { color: var(--text-3); }
.h-xl, .h-l, .h-m { font-family: var(--display); font-stretch: 118%; font-weight: 800; letter-spacing: -0.03em; line-height: 0.98; text-transform: uppercase; }
.h-xl { font-size: clamp(2.4rem, 10vw, 3.4rem); }
.h-l { font-size: clamp(1.55rem, 6.4vw, 2rem); }
.h-m { font-size: 1.05rem; letter-spacing: -0.015em; font-stretch: 112%; }
.num-xxl, .num-xl, .num-l { font-family: var(--display); font-stretch: 125%; font-weight: 820; letter-spacing: -0.05em; line-height: 0.9; font-variant-numeric: tabular-nums; }
.num-xxl { font-size: clamp(4.6rem, 24vw, 7.2rem); }
.num-xl { font-size: clamp(3rem, 14vw, 4.6rem); }
.num-l { font-size: 2rem; }
.mono-l { font-family: var(--mono); font-size: 1.05rem; }
.tnum { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.up { text-transform: uppercase; }
.strike { text-decoration: line-through; text-decoration-color: var(--bad); }

/* ---------- estructura ---------- */
.topbar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 18px; position: sticky; top: 0; z-index: 20;
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-family: var(--display); font-stretch: 120%; font-weight: 820; font-size: 1.05rem; letter-spacing: 0.02em; }
.topbar .brand span { color: var(--accent); }
.topbar .status { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.topbar #top-center { display: block; font-size: 10px; letter-spacing: 0.12em; color: var(--text-3); }
.topbar .status .lbl { font-size: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.dot.on { background: var(--ok); box-shadow: 0 0 10px rgba(61, 220, 132, 0.8); }
.dot.red { background: var(--bad); box-shadow: 0 0 10px rgba(255, 93, 93, 0.8); }

.sec { padding: 0 var(--gx); }
.pad { padding: 16px var(--gx); }
.pad-x { padding-left: var(--gx); padding-right: var(--gx); }
.pad-y { padding-top: 14px; padding-bottom: 14px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; padding: 22px calc(var(--gx) + 6px) 10px; }
.sec-head .lbl:first-child { color: var(--text); font-family: var(--display); font-stretch: 110%; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; }
.sec-head .lbl + .lbl { flex: none; font-size: 10px; color: var(--text-3); margin-left: 12px; text-align: right; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.bz { padding: 6px; border-radius: var(--r-xl); background: var(--shell); border: 1px solid var(--shell-line); margin: 10px var(--gx); }
.bz-in { position: relative; border-radius: calc(var(--r-xl) - 6px); background: linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: inset 0 1px 0 var(--hi), var(--shadow); overflow: hidden; }

/* KPIs */
.grid { display: grid; gap: 8px; padding: 6px var(--gx); }
.grid > * { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: 1fr 1fr 1fr; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g4 .cell { padding: 12px 10px 10px; }
.cell { padding: 14px 14px 12px; min-width: 0; }
.cell .lbl { font-size: 10px; letter-spacing: 0.12em; }
.cell .v { font-family: var(--display); font-stretch: 122%; font-weight: 820; font-size: clamp(1.5rem, 7vw, 2rem); line-height: 1; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.cell .v small { font-family: var(--body); font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: 0.08em; margin-left: 4px; }

.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 6px; }
.gap-s { gap: 6px; } .gap-m { gap: 12px; } .gap-l { gap: 20px; }
.mt-s { margin-top: 8px; } .mt-m { margin-top: 16px; } .mt-l { margin-top: 28px; }
.mb-s { margin-bottom: 8px; } .mb-m { margin-bottom: 16px; }
.right { text-align: right; } .center { text-align: center; }
.flex1 { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* listas de tarjetas */
.list { display: grid; gap: 8px; padding: 4px var(--gx); }
.list > * { display: block; width: 100%; text-align: left; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--text); font: inherit; transition: transform 0.3s var(--ease), border-color 0.3s; }
.list > button:active { transform: scale(0.985); border-color: var(--line-2); }
.list .item-title { font-family: var(--display); font-stretch: 112%; font-weight: 760; font-size: 1rem; letter-spacing: -0.01em; text-transform: uppercase; line-height: 1.1; }
.list .meta { color: var(--text-2); font-size: 13px; margin-top: 5px; line-height: 1.45; }

/* ---------- botones ---------- */
.btn {
  --bh: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--bh); min-height: var(--bh); padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-weight: 650; font-size: 13.5px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  width: 100%; cursor: pointer; user-select: none;
  transition: transform 0.3s var(--ease), background-color 0.3s, border-color 0.3s, box-shadow 0.3s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 28px -10px rgba(var(--accent-rgb), 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.ghost { background: transparent; color: var(--text-2); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in oklab, var(--bad) 35%, transparent); }
.btn.big { --bh: 54px; font-size: 14.5px; }
.btn.xl { --bh: 64px; font-family: var(--display); font-stretch: 115%; font-weight: 800; font-size: 1.15rem; letter-spacing: 0; }
.btn.sm { --bh: 36px; padding: 0 14px; font-size: 12px; width: auto; }
.btn.auto { width: auto; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-row { display: flex; gap: 8px; padding: 4px var(--gx); }
.btn-row > .btn { flex: 1; padding: 0 10px; font-size: 12.5px; }

.icon-btn { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; transition: transform 0.3s var(--ease); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.red { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 35%, transparent); }
.icon-btn.sm { height: 34px; width: auto; min-width: 34px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }

/* ---------- barra inferior flotante ---------- */
nav.bottom {
  position: fixed; z-index: 30; left: 50%; bottom: max(12px, var(--safe-b)); translate: -50% 0;
  width: min(420px, calc(100vw - 24px)); height: var(--nav-h);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--line-2); box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.7);
}
nav.bottom button { background: transparent; border: 0; border-radius: 999px; color: var(--text-3); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; display: grid; place-items: center; align-content: center; gap: 3px; cursor: pointer; transition: color 0.3s, background-color 0.4s var(--ease); }
nav.bottom button .ico { width: 22px; height: 22px; display: grid; place-items: center; }
nav.bottom button .ico svg { width: 22px; height: 22px; }
nav.bottom button.on { color: var(--text); background: var(--shell); box-shadow: inset 0 0 0 1px var(--line); }
nav.bottom button.on .ico { color: var(--accent); }

/* ---------- base (home) ---------- */
.rank-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 10px var(--gx) 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.rank-badge { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-stretch: 120%; font-weight: 820; font-size: 0.95rem; color: var(--accent-ink); background: var(--accent); box-shadow: 0 8px 24px -10px rgba(var(--accent-rgb), 0.8); }
.bar { height: 6px; border-radius: 6px; background: var(--line); position: relative; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--accent); transition: width 0.6s var(--ease); }
.bar.red > i { background: var(--bad); }
.bar.green > i { background: var(--ok); }
.bar.thick { height: 10px; }

.streak-hero { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; margin: 10px var(--gx); padding: 22px 20px 18px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden; }
.streak-hero::before { content: ''; position: absolute; width: 260px; height: 260px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.22), transparent); pointer-events: none; }
.streak-hero.danger::before { background: radial-gradient(closest-side, rgba(255, 181, 71, 0.22), transparent); }
.streak-hero.broken::before { background: none; }
.streak-hero .num-xxl { color: var(--accent); }
.streak-hero.danger .num-xxl { color: var(--warn); }
.streak-hero.frozen .num-xxl { color: var(--info); }
.streak-hero.broken .num-xxl, .streak-hero.none .num-xxl { color: var(--text-3); }
.streak-hero .ascii { display: none; }
.freeze { display: inline-flex; gap: 5px; }
.freeze i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-2); display: inline-block; }
.freeze i.on { background: var(--info); border-color: var(--info); box-shadow: 0 0 10px rgba(106, 168, 255, 0.6); }

.ring { width: 96px; height: 96px; }
.ring circle { fill: none; stroke-width: 8; }
.ring .track { stroke: var(--line-2); }
.ring .prog { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dasharray 0.8s var(--ease); }
.ring .prog.done { stroke: var(--ok); }
.ring text { fill: var(--text); font-family: var(--mono); font-weight: 600; font-size: 22px; text-anchor: middle; dominant-baseline: central; }

.mission { position: relative; margin: 10px var(--gx); padding: 20px 20px 18px; border-radius: var(--r-xl); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid rgba(var(--accent-rgb), 0.28); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.06), var(--shadow); overflow: hidden; }
.mission::before { content: ''; position: absolute; width: 220px; height: 220px; left: -90px; top: -120px; border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.16), transparent); pointer-events: none; }
.mission.rest { border-color: var(--line); }
.mission.rest::before { background: radial-gradient(closest-side, rgba(106, 168, 255, 0.14), transparent); }
.mission > * { position: relative; }
.stripes { display: none; }

.heat { display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px; margin: 0 var(--gx); padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--line); display: block; }
.heat i.l1 { background: rgba(var(--accent-rgb), 0.35); } .heat i.l2 { background: rgba(var(--accent-rgb), 0.65); } .heat i.l3 { background: var(--accent); }
.heat i.today { outline: 1.5px solid var(--text); outline-offset: 1px; }

/* ---------- operación en curso ---------- */
.op-head { position: sticky; top: 61px; z-index: 15; padding: 10px 18px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.op-progress { display: grid; grid-auto-flow: column; gap: 3px; padding: 0 18px 10px; background: var(--glass); position: sticky; top: 117px; z-index: 15; border-bottom: 1px solid var(--line); }
.op-progress i { height: 4px; border-radius: 4px; background: var(--line-2); }
.op-progress i.done { background: var(--ok); }
.op-progress i.cur { background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7); }

.ex-title { padding: 18px var(--gx) 10px; }
.prev-ref { margin: 0 var(--gx) 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--text-2); font-size: 13px; line-height: 1.5; }
.prev-ref b { color: var(--text); font-weight: 600; font-family: var(--mono); }

.stepper { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; margin: 8px var(--gx) 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stepper + .stepper { margin-top: 8px; }
.stepper button { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: 26px; font-weight: 500; cursor: pointer; margin: 0 auto; transition: transform 0.25s var(--ease), background-color 0.25s; }
.stepper button:active { transform: scale(0.92); background: var(--surface-3); }
.stepper .val { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stepper .val input { background: transparent; border: 0; color: var(--text); font-family: var(--display); font-stretch: 125%; font-weight: 820; font-size: 3rem; width: 100%; text-align: center; letter-spacing: -0.05em; line-height: 1; outline: none; padding: 0; font-variant-numeric: tabular-nums; }
.stepper .val input:focus { color: var(--accent); }
.stepper .val .lbl { margin-top: 4px; font-size: 10px; }

.set-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.set-dots i { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-3); }
.set-dots i.done { background: var(--ok); color: var(--accent-ink); border-color: transparent; }
.set-dots i.cur { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15); }
.set-dots i.f5 { background: var(--bad); border-color: transparent; color: #fff; }

/* hoja de sensaciones */
.feel-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(4, 4, 5, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; flex-direction: column; justify-content: flex-end; max-width: 560px; margin: 0 auto; }
.feel-overlay .head { padding: 18px calc(var(--gx) + 6px) 10px; }
.feel-list { display: grid; gap: 8px; padding: 0 var(--gx) calc(14px + var(--safe-b)); }
.feel-btn { --tone: var(--text-2); display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; min-height: 66px; padding: 0 18px 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--text); text-align: left; cursor: pointer; transition: transform 0.25s var(--ease), border-color 0.25s; }
.feel-btn:active { transform: scale(0.98); border-color: var(--tone); }
.feel-btn .k { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-stretch: 120%; font-weight: 820; font-size: 1.15rem; color: var(--accent-ink); background: var(--tone); }
.feel-btn .t { font-family: var(--display); font-stretch: 112%; font-weight: 760; font-size: 1.05rem; text-transform: uppercase; letter-spacing: -0.01em; }
.feel-btn .s { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.feel-btn.f1 { --tone: var(--ok); }
.feel-btn.f2 { --tone: var(--accent); }
.feel-btn.f3 { --tone: var(--warn); }
.feel-btn.f4 { --tone: #ff8a5b; }
.feel-btn.f5 { --tone: var(--bad); }
.feel-btn.f5 .k { color: #fff; }
.feel-btn[data-act='cancelFeel'] { grid-template-columns: 1fr; min-height: 48px !important; justify-items: center; background: transparent; border-style: dashed; }
.feel-btn[data-act='cancelFeel'] .k, .feel-btn[data-act='cancelFeel'] > span:last-child { display: none; }
.feel-btn .lbl.dim { font-size: 12px; letter-spacing: 0.08em; }

/* descanso */
.rest { margin: 10px var(--gx); padding: 26px 18px 20px; text-align: center; border-radius: var(--r-xl); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.rest .num-xxl { color: var(--text); margin-top: 6px; }
.rest.ending .num-xxl { color: var(--warn); animation: blink 0.5s steps(2) infinite; }
@keyframes blink { to { opacity: 0.35; } }
.rest .next { margin-top: 12px; color: var(--text-2); font-size: 14px; }
.rest .next b { color: var(--text); font-weight: 600; }

/* ---------- informe (debrief) ---------- */
.verdict { margin: 10px var(--gx); padding: 22px 20px 20px; border-radius: var(--r-xl); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.verdict .tag { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--warn); background: color-mix(in oklab, var(--warn) 14%, transparent); border: 1px solid color-mix(in oklab, var(--warn) 30%, transparent); margin-bottom: 12px; }
.verdict .tag.good { color: var(--ok); background: color-mix(in oklab, var(--ok) 12%, transparent); border-color: color-mix(in oklab, var(--ok) 26%, transparent); }
.action { display: inline-flex; align-items: center; justify-content: center; min-width: 92px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; background: var(--shell); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.action.subir, .action.subir_reps, .action.mas_series { color: var(--ok); background: color-mix(in oklab, var(--ok) 12%, transparent); border-color: color-mix(in oklab, var(--ok) 26%, transparent); }
.action.bajar { color: var(--bad); background: color-mix(in oklab, var(--bad) 12%, transparent); border-color: color-mix(in oklab, var(--bad) 26%, transparent); }
.action.omitido { opacity: 0.5; }
.ex-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin: 0 var(--gx) 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); align-items: start; }
.ex-row .reason { color: var(--text-2); font-size: 13px; margin-top: 6px; line-height: 1.5; }
.ex-row .delta { font-family: var(--mono); font-weight: 600; font-size: 1rem; margin-top: 8px; text-align: right; white-space: nowrap; }
.ex-row .delta .arrow { color: var(--accent); }
.flag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 10px; font-weight: 650; letter-spacing: 0.1em; background: var(--shell); border: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.flag.pr { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.xp-pop { font-family: var(--display); font-stretch: 122%; font-weight: 820; font-size: 2.4rem; color: var(--accent); letter-spacing: -0.04em; line-height: 1; }

.ai-box { margin: 0 var(--gx) 8px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); line-height: 1.55; font-size: 14.5px; }
.ai-box p { margin-bottom: 10px; }
.ai-box ul { list-style: none; }
.ai-box li { padding: 8px 0 8px 20px; position: relative; border-top: 1px solid var(--line); }
.ai-box li::before { content: ''; position: absolute; left: 4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ai-box .alert { border: 1px solid color-mix(in oklab, var(--warn) 40%, transparent); background: color-mix(in oklab, var(--warn) 10%, transparent); border-radius: var(--r-sm); padding: 12px; margin: 10px 0; }
.ai-box .quote { font-family: var(--display); font-stretch: 112%; font-weight: 760; font-size: 1.1rem; text-transform: uppercase; margin-top: 14px; line-height: 1.15; letter-spacing: -0.01em; }

/* ---------- formularios ---------- */
.field { display: grid; gap: 7px; padding: 8px var(--gx); }
.field > .lbl { font-size: 12px; letter-spacing: 0.08em; text-transform: none; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--field); color: var(--text); font-size: 15px; outline: none; appearance: none; -webkit-appearance: none; transition: border-color 0.25s, box-shadow 0.25s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14); }
.field input[type=number] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.field select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%23888' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.field.inline { grid-template-columns: 1fr auto; align-items: center; }
.field.inline input[type=checkbox] { width: 46px; height: 28px; appearance: auto; -webkit-appearance: auto; accent-color: var(--accent); }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.fields-grid .field { padding-left: var(--gx); padding-right: 0; }
.fields-grid .field:nth-child(2n) { padding-left: 0; padding-right: var(--gx); }
select option { background: var(--surface-2); }

/* ---------- modal (hoja inferior) ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: flex-end; justify-content: center; }
.modal { width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: var(--bg-elev); border: 1px solid var(--line-2); border-bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 0 0 calc(16px + var(--safe-b)); animation: sheet-in 0.45s var(--ease) both; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.modal .head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 10px; }
.modal .head .lbl { font-family: var(--display); font-stretch: 112%; font-weight: 760; font-size: 15px; color: var(--text); letter-spacing: 0; }
.modal .list { padding-top: 6px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 24px); transform: translateX(-50%); z-index: 70; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; max-width: 92vw; text-align: center; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7); animation: toast-in 0.3s var(--ease-spring); }
.toast.red { background: var(--bad); color: #fff; }
@keyframes toast-in { from { transform: translate(-50%, 12px) scale(0.96); opacity: 0; } }

/* ---------- medallas ---------- */
.medals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px var(--gx); }
.medal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 12px; min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; opacity: 0.55; }
.medal.on { opacity: 1; border-color: rgba(var(--accent-rgb), 0.4); }
.medal .ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--shell); border: 1px solid var(--line); color: var(--text-3); }
.medal.on .ico { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.medal .n { font-family: var(--display); font-stretch: 112%; font-weight: 760; font-size: 0.78rem; text-transform: uppercase; line-height: 1.1; }
.medal .d { font-size: 11.5px; color: var(--text-3); line-height: 1.35; margin-top: 3px; }

/* ---------- gráfica ---------- */
.chart { width: 100%; height: 180px; display: block; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--text); rx: 2; }
.chart text { fill: var(--text-2); font-family: var(--mono); font-size: 10px; }

/* ---------- figuras de ejercicio ---------- */
.exfig { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; cursor: pointer; }
.exfig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: saturate(0.55) contrast(1.05); display: block; }
.exfig img.f2 { animation: exswap 2.4s steps(1) infinite; }
/* con GIF disponible se muestra el GIF; si falla (sin red y sin caché) vuelven las fotos */
.exfig img.gif { filter: none; background: #fff; z-index: 2; }
.exfig.hasgif img.ph { visibility: hidden; }
.exfig.hasgif.nogif img.ph { visibility: visible; }
.exfig.nogif img.gif { display: none; }
@keyframes exswap { 0%, 50% { opacity: 0; } 50.01%, 100% { opacity: 1; } }
.exfig .tag { position: absolute; left: 10px; top: 10px; background: rgba(6, 6, 7, 0.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--text-2); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); }
.exfig.big { height: 165px; margin: 4px var(--gx) 10px; }
.exfig.form { height: 150px; margin: 6px var(--gx) 0; }
.exfig.rest { width: 150px; height: 110px; margin: 14px auto 0; }
.exfig.thumb { width: 64px; height: 48px; flex: none; border-radius: 10px; }
.exfig.thumb .tag { display: none; }
.exfig.modal-fig { height: 62dvh; margin: 0 var(--gx); border-radius: var(--r-lg); }
.exfig.none { display: flex; align-items: center; justify-content: center; cursor: default; }
.exfig.none .lbl { font-size: 10px; }
.exfig.thumb.none .lbl { display: none; }
.exfig.thumb.none::before { content: '?'; color: var(--text-3); font-family: var(--display); font-weight: 800; }

/* ---------- varios ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--text-3); font-size: 14.5px; }
.empty .h-l { color: var(--text-2); margin-bottom: 8px; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0; }
.tbl th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); padding: 10px calc(var(--gx) + 4px); border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px calc(var(--gx) + 4px); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 14px; }
.tbl td.r, .tbl th.r { text-align: right; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-2); background: var(--shell); border: 1px solid var(--line); text-transform: uppercase; vertical-align: middle; }
.chip.on { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.hidden { display: none !important; }
.fade-in { animation: fade 0.35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
.offline-bar { background: var(--warn); color: var(--accent-ink); text-align: center; font-size: 12px; font-weight: 600; padding: 4px; }
