/* Pati Guil · coaching — clean, claro y modo noche */
:root {
  --bg: #F5F6F8; --card: #FFFFFF; --ink: #0E1116; --ink2: #4A5260; --ink3: #8B93A1; --line: #E5E8EC;
  --accent: #2346E8; --accent-soft: #EAEEFE; --accent-ink: #FFFFFF;
  --green: #1FA25A; --amber: #F0A01A; --red: #E5484D;
  --c-run: #22A55B; --c-test: #E5484D; --c-race: #D69E2E; --c-strength: #8B5CF6; --c-gym: #A78BFA;
  --c-mobility: #14B8A6; --c-bike: #F08A24; --c-rest: #A0A7B4;
  --c-ctl: #2346E8; --c-atl: #E0457B; --c-tsb: #F0A01A; --bar-plan: #DDE3F0;
  --shadow: 0 1px 2px rgba(15, 20, 30, .05), 0 4px 16px rgba(15, 20, 30, .04);
  --r: 16px; color-scheme: light; --fucsia: #E0157A;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0C0F; --fucsia: #FF4FA3; --card: #15181D; --ink: #F2F4F7; --ink2: #C2C8D2; --ink3: #8A93A3; --line: #262B33;
    --accent: #6F8BFF; --accent-soft: #1A2140; --accent-ink: #0A0C0F; --bar-plan: #2A3142;
    --c-ctl: #7C95FF; --c-atl: #FF6B9B; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0C0F; --fucsia: #FF4FA3; --card: #15181D; --ink: #F2F4F7; --ink2: #C2C8D2; --ink3: #8A93A3; --line: #262B33;
  --accent: #6F8BFF; --accent-soft: #1A2140; --accent-ink: #0A0C0F; --bar-plan: #2A3142;
  --c-ctl: #7C95FF; --c-atl: #FF6B9B; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h2 { font-size: 22px; } h3 { font-size: 17px; margin-bottom: 6px; }
p { margin: 6px 0; }
.muted { color: var(--ink3); } .small { font-size: 13.5px; } .center { text-align: center; } .hide { display: none; } .pad { padding: 0 4px; }
.ic { flex: none; display: block; }

/* layout */
#app { min-height: 100dvh; }
.top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 8px) 16px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 17px; font-weight: 650; }
.top-l { min-width: 0; } .top-r { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.brand { font-weight: 750; letter-spacing: .02em; font-size: 15px; }
.demo-pill { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--accent); background: var(--accent-soft); padding: 4px 8px; border-radius: 99px; white-space: nowrap; }
.ath-select { padding: 6px 10px; border-radius: 99px; width: auto; max-width: 150px; font-weight: 650; background: var(--card); }
main { padding: 14px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink2); padding: 4px 0; }
.tabbar button.on { color: var(--accent); }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--accent); }
.badge { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; }
.fab { position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 21; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(35, 70, 232, .35); }

/* cards */
.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sec-h { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.sec-h h2 { font-size: 20px; }
.hello h2 { font-size: 26px; } .hello p { margin: 2px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.card .tile { background: var(--bg); }
.tile span { font-size: 12.5px; color: var(--ink2); } .tile b { font-size: 22px; font-variant-numeric: tabular-nums; } .tile small { font-size: 11.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.chip.key { background: transparent; border: 1px solid var(--line); color: var(--ink2); font-weight: 600; }
.ok-chip { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.progress { height: 8px; border-radius: 9px; background: var(--bg); overflow: hidden; margin: 10px 0 6px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
.advice { border-left: 3px solid var(--accent); padding: 8px 10px; background: var(--bg); border-radius: 0 10px 10px 0; font-size: 14px; }
.light { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.light.big { width: 18px; height: 18px; margin-top: 3px; }

/* workout card (como TrainingPeaks) */
.wcard { display: block; width: 100%; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--sc); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); }
.wcard.done { border-left-color: var(--sc); }
.wcard.skipped { opacity: .6; }
.wcard-top { display: flex; align-items: center; gap: 8px; }
.wtitle { font-size: 17px; font-weight: 600; flex: 1; min-width: 0; }
.wdate { font-size: 12px; color: var(--ink3); }
.wcard-row { display: grid; grid-template-columns: 36px 1fr 1fr 1fr; align-items: center; gap: 4px; margin: 10px 0 6px; }
.metric b { font-size: 20px; font-variant-numeric: tabular-nums; } .metric small { color: var(--ink3); }
.wcard-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.wstate { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.ok { color: var(--green); } .ko { color: var(--red); }
.card.rest, .card.locked, .card.event { display: flex; gap: 12px; align-items: flex-start; color: var(--ink2); }
.card.locked { background: repeating-linear-gradient(-45deg, var(--card), var(--card) 10px, var(--bg) 10px, var(--bg) 20px); }
.card.locked p, .card.rest p { margin: 2px 0 0; }

/* inbox coach */
.inbox { padding: 6px 8px; border-color: color-mix(in srgb, var(--amber) 50%, var(--line)); }
.inbox-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 6px; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.inbox-row:last-child { border: 0; } .inbox-row span { flex: 1; }

/* check-in / EVA */
.eva { margin: 8px 0; }
.eva-range { -webkit-appearance: none; appearance: none; height: 10px; padding: 0; border: 0; border-radius: 10px; background: linear-gradient(90deg, var(--green) 0 36%, var(--amber) 36% 68%, var(--red) 68%); margin: 12px 0 4px; --thumb: var(--ink); }
.eva-range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--card); border: 3px solid var(--thumb); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.eva-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); } .eva-row:last-child { border: 0; } .eva-row p { margin: 2px 0 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink2); }
.lbl { margin-top: 10px; }
.checkin, .form, .fb { display: flex; flex-direction: column; gap: 10px; }

/* segmented */
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; text-align: center; padding: 8px 6px; border-radius: 9px; font-size: 14px; color: var(--ink2); }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 650; box-shadow: var(--shadow); }
.seg.big { background: var(--line); border: 0; } .seg.big button.on { background: var(--card); }
.seg.feel button { font-size: 24px; padding: 6px; filter: grayscale(.8); opacity: .6; } .seg.feel button.on { filter: none; opacity: 1; }

/* buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 650; text-align: center; }
.btn.ghost { background: var(--card); color: var(--accent); border: 1px solid var(--line); }
.btn.small { padding: 10px; font-size: 14.5px; margin-top: 8px; }
.btn.danger { color: var(--red); }
.btn.rec { color: var(--red); border-color: var(--red); }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.actions.col { grid-template-columns: 1fr; }

/* calendario */
.month-h { display: flex; justify-content: space-between; align-items: center; }
.month-h b { color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.dow, .cal { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.dow span { font-size: 13px; color: var(--ink2); padding: 4px 0; }
.cal { gap: 4px 0; }
.day { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; border-radius: 14px; border: 2px solid transparent; }
.day .num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; font-variant-numeric: tabular-nums; }
.day .num.filled { background: var(--line); }
.day.today .num { color: var(--accent); font-weight: 750; }
.day.sel { border-color: var(--ink); }
.day.other { opacity: .35; } .day.lk { opacity: .55; }
.dots { display: flex; gap: 3px; height: 10px; align-items: center; color: var(--ink3); }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--dc); }
.dots i.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--dc); }
.dots i.ev { background: var(--ink); width: 5px; height: 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink2); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cal-legend { justify-content: center; }
.list { padding: 4px 0; }
.week-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.week-row:last-child { border: 0; } .week-row.cur { background: var(--accent-soft); }
.wk-n { font-weight: 750; color: var(--accent); } .wk-main { font-size: 14.5px; } .wk-main small { display: block; }
.wk-km { font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; font-variant-numeric: tabular-nums; }

/* biblioteca */
.ex { margin: 6px 0 0; padding-left: 22px; }
.ex li { padding: 2px 0; border-bottom: 1px solid var(--line); } .ex li:last-child { border: 0; }
.ex summary { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; list-style: none; cursor: pointer; }
.ex summary::-webkit-details-marker { display: none; }
.ex summary span:first-child { display: flex; flex-direction: column; } .ex summary small { font-size: 12.5px; }
.sets { font-weight: 650; color: var(--accent); white-space: nowrap; font-size: 14px; }
.ex p { margin: 0 0 10px; font-size: 14.5px; color: var(--ink2); }
.rpe-list { padding: 16px 16px 8px; }
.rpe-row { display: flex; gap: 14px; width: 100%; padding: 10px 0 10px 14px; border-left: 4px solid var(--rc); margin-bottom: 2px; }
.rpe-row > b { font-size: 20px; width: 24px; } .rpe-row span { display: flex; flex-direction: column; } .rpe-row small { color: var(--ink2); font-size: 14px; }
button.rpe-row:active { background: var(--bg); }
.zones { width: 100%; border-collapse: collapse; font-size: 14.5px; } .zones td { padding: 6px 4px; border-bottom: 1px solid var(--line); }

/* análisis */
.chart { width: 100%; height: auto; display: block; margin-top: 6px; }
.chart .grid { stroke: var(--line); stroke-width: 1; } .chart .zero { stroke: var(--ink3); stroke-dasharray: 3 3; }
.chart .axis { fill: var(--ink3); font-size: 10px; } .chart .today { stroke: var(--ink3); stroke-dasharray: 2 3; }
.chart .bar-plan { fill: var(--bar-plan); } .chart .cur { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.empty { color: var(--ink3); font-size: 14px; padding: 18px 0; text-align: center; }
.big-num { font-size: 44px; font-weight: 750; font-variant-numeric: tabular-nums; }
.goals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0; }
.goal { background: var(--bg); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: center; }
.goal .tier { font-size: 12px; font-weight: 750; color: var(--accent); } .goal b { font-size: 19px; } .goal small { font-size: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th { text-align: left; color: var(--ink3); font-weight: 500; font-size: 12.5px; } .tbl td, .tbl th { padding: 6px 4px; border-bottom: 1px solid var(--line); }

/* más */
.profile { display: flex; gap: 12px; align-items: center; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 750; font-size: 20px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 6px 0 0; font-size: 14.5px; } .kv dt { color: var(--ink3); } .kv dd { margin: 0; }
.switch-row { flex-direction: row; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink); position: relative; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row i { width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch-row i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch-row input:checked + i { background: var(--green); } .switch-row input:checked + i::after { transform: translateX(20px); }
.ev-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); } .ev-row span { flex: 1; display: flex; flex-direction: column; }
.steps-list { padding-left: 20px; margin: 6px 0 10px; } .steps-list li { margin-bottom: 4px; }
.card > input { margin-bottom: 8px; }

/* hoja (sheet) */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0); transition: background .22s; }
.sheet-wrap.in { background: rgba(0, 0, 0, .35); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 18px); background: var(--bg); border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .22s ease-out; display: flex; flex-direction: column; max-width: 680px; margin: 0 auto; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-h { padding: 12px 12px 6px; border-bottom: 1px solid var(--line); background: var(--card); border-radius: 22px 22px 0 0; }
.sheet-h .back { display: flex; align-items: center; gap: 4px; color: var(--accent); font-size: 17px; padding: 6px; }
.sheet-b { overflow-y: auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.w-head { display: flex; gap: 12px; align-items: center; } .w-head .sport-ic { color: var(--sc); width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--sc) 14%, transparent); display: grid; place-items: center; }
.desc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0; white-space: pre-line; }
.steps { margin: 0; padding-left: 20px; } .steps li { padding: 6px 0; border-bottom: 1px solid var(--line); } .steps li:last-child { border: 0; } .steps li span { display: block; color: var(--ink2); font-size: 14.5px; }
.rpe-pick { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-left: 5px solid var(--rc); border-radius: 12px; background: var(--bg); }
.rpe-pick b { font-size: 24px; width: 28px; } .rpe-pick span { flex: 1; font-size: 14px; color: var(--ink2); }
.voice { display: flex; align-items: center; gap: 10px; } .voice .btn { width: auto; margin: 0; padding: 10px 14px; }
audio { width: 100%; }
.comments { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.cmt { background: var(--bg); padding: 8px 12px; border-radius: 14px 14px 14px 4px; max-width: 85%; } .cmt.mine { align-self: flex-end; background: var(--accent-soft); border-radius: 14px 14px 4px 14px; }
.cmt p { margin: 0; } .cmt small { color: var(--ink3); font-size: 11.5px; }
.cmt-in { display: flex; gap: 6px; align-items: center; }
.proposal { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--card); } .proposal.best { border-color: var(--accent); }
.proposal ul { margin: 6px 0; padding-left: 18px; } .warn { color: var(--amber); font-size: 14px; } .okp { color: var(--green); font-size: 14px; }
.notif { display: flex; flex-direction: column; width: 100%; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; gap: 2px; }
.notif.unread { border-left: 4px solid var(--accent); } .notif span { font-size: 14px; color: var(--ink2); }
.mono { font: 12.5px/1.4 ui-monospace, Menlo, monospace; }

/* login */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px 20px; gap: 4px; max-width: 420px; margin: 0 auto; }
.login .form { width: 100%; margin-top: 18px; }
.logo { width: 72px; height: 72px; border-radius: 20px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 26px; margin-bottom: 10px; }
.empty-state { text-align: center; }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 100; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 14.5px; max-width: calc(100% - 32px); transition: all .25s; text-align: center; }
.toast.in { opacity: 1; transform: translate(-50%, 0); }

.row2 { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.row2 .btn { padding: 12px 14px; }
.hints { background: color-mix(in srgb, var(--amber) 12%, var(--card)); border-color: color-mix(in srgb, var(--amber) 40%, var(--line)); }
.hints ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; } .hints li { margin-bottom: 4px; }
.sum-text { font-size: 14.5px; line-height: 1.5; }
.btn.wa { background: #25D366; color: #0B2E17; }
.summary-card summary { cursor: pointer; list-style: none; } .summary-card summary::-webkit-details-marker { display: none; }
.wa-text { margin-top: 10px; font-size: 15px; line-height: 1.55; }
.tiles.two { grid-template-columns: 1fr 1fr; margin-bottom: 4px; }
.more-fields { border-top: 1px solid var(--line); padding-top: 8px; }
.more-fields summary { cursor: pointer; color: var(--accent); font-size: 14.5px; padding: 4px 0 8px; }
.more-fields[open] { display: flex; flex-direction: column; gap: 10px; }
.copy-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg); border-radius: 12px; margin-bottom: 6px; }
.copy-row span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .copy-row b { word-break: break-all; font-size: 14.5px; }
.copy-row .btn { width: auto; margin: 0; padding: 8px 10px; }

/* check rápido, ánimos, explicaciones, siglas, figuras */
.check-btn { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; transition: all .2s; }
.check-btn.on { background: var(--green); border-color: var(--green); color: #fff; }
.check-btn:not(.on):hover { color: var(--ink3); }
.check-btn.pop { animation: pop .35s ease-out; }
@keyframes pop { 50% { transform: scale(1.3); } }
button.tile { text-align: left; }
.tile .info { display: inline-block; vertical-align: -2px; color: var(--ink3); }
.cheer-btn { margin-top: -2px; }
.card.cheer { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-soft); border-color: transparent; }
.card.cheer p { margin: 2px 0 0; font-size: 16px; }
.cheer-av { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 750; flex: none; }
.ideas { display: flex; flex-direction: column; gap: 8px; }
.idea { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-size: 15px; }
.idea:active { border-color: var(--accent); }
.explain.focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.formula { font-size: 17px; background: var(--bg); padding: 10px 12px; border-radius: 10px; text-align: center; }
.abbr { cursor: help; text-decoration: underline dotted var(--ink3); text-underline-offset: 3px; }
.abbr sup { color: var(--accent); font-weight: 700; font-size: .7em; margin-left: 1px; }
.gloss dt { white-space: nowrap; }
.tip { font-size: 14px; background: var(--accent-soft); padding: 8px 10px; border-radius: 10px; }
.figs { display: flex; align-items: center; justify-content: center; gap: 4px; background: var(--bg); border-radius: 12px; padding: 6px; margin: 2px 0 10px; }
.fig { flex: 1; max-width: 130px; height: auto; }
.fig-arrow { color: var(--ink3); font-size: 18px; }
.fig-body { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.fig-body.back { stroke: var(--ink3); }
.fig-head { fill: var(--ink); }
.fig-weight { fill: var(--accent); }
.fig-prop { fill: var(--line); }
.fig-ground { stroke: var(--line); stroke-width: 2; }
.fig-band { fill: none; stroke: var(--c-bike); stroke-width: 2.5; stroke-dasharray: 4 3; }
.fig-bar { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }

@media (max-width: 360px) { .wcard-row { grid-template-columns: 30px 1fr 1fr 1fr; } .metric b { font-size: 17px; } .tile b { font-size: 19px; } }

/* fotos de perfil */
.av { border-radius: 50%; object-fit: cover; flex: none; display: block; background: var(--line); }
.av-txt { display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 750; }
.hello { display: flex; align-items: center; gap: 12px; }
.avatar-edit { position: relative; cursor: pointer; flex: none; }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; border: 2px solid var(--card); }
.link-btn { color: var(--accent); font-size: 14px; font-weight: 600; padding: 2px 0; }
.link-btn.muted { color: var(--ink3); }
.cmt-row { display: flex; gap: 8px; align-items: flex-end; }
.cmt-row.mine { flex-direction: row-reverse; }
.cmt-row .cmt { max-width: 80%; }

/* El porqué */
.art-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.art-row:last-child { border: 0; }
.art-row.lk { opacity: .55; cursor: default; }
.art-emoji { font-size: 24px; display: grid; place-items: center; color: var(--ink3); }
.art-main { display: flex; flex-direction: column; gap: 2px; font-size: 15px; } .art-main small { font-size: 13px; }
.article { font-size: 16.5px; line-height: 1.6; }
.article h2 { font-size: 24px; line-height: 1.2; margin: 4px 0 10px; }
.article h4 { font-size: 17px; margin: 18px 0 4px; }
.article ul { padding-left: 20px; margin: 6px 0; } .article li { margin-bottom: 6px; }
.art-hero { font-size: 44px; margin-bottom: 6px; }
.art-sign { font-size: 18px; font-weight: 800; color: var(--fucsia); margin-top: 18px; letter-spacing: .01em; }
.tabbar button { position: relative; }
.tab-dot { position: absolute; top: 3px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--card); }

a.art-main { color: inherit; text-decoration: none; }
label.btn { cursor: pointer; }

/* barras tocables */
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit.sel { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: var(--accent); stroke-width: 1.5; }
.bar-tip { margin: 6px 0 0; font-weight: 650; font-size: 14.5px; min-height: 1.4em; }

/* vista previa como atleta */
.preview-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 6px) 16px 6px; background: var(--fucsia); color: #fff; font-size: 13.5px; font-weight: 650; }
.preview-bar button { margin-left: auto; background: #fff; color: var(--fucsia); border-radius: 99px; padding: 4px 12px; font-weight: 750; }
.ev-row span[role=button] { cursor: pointer; }

/* calendario continuo */
.cal-head { display: flex; align-items: center; gap: 8px; }
.cal-head .dow { flex: 1; }
.cal-scroll { max-height: 340px; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; border-radius: 14px; background: var(--card); border: 1px solid var(--line); padding: 0 0 4px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); position: relative; padding: 2px 0; }
.cal-week.cur { background: var(--accent-soft); }
.cal-wk { position: absolute; right: 4px; top: 2px; font-size: 9.5px; font-weight: 700; color: var(--ink3); pointer-events: none; }
.cal-month { position: sticky; top: 0; z-index: 2; background: var(--card); color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .04em; padding: 6px 12px 4px; border-bottom: 1px solid var(--line); }

/* Progreso: marcas y orden */
.tile .up { color: var(--green); font-weight: 650; }
.tile .down { color: var(--amber); font-weight: 650; }
.reorder-row { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.reorder-row:last-child { border: 0; }
.reorder-name { flex: 1; font-weight: 600; font-size: 15px; }
.reorder-row .icon-btn[disabled] { opacity: .25; }

/* fidelidad */
.react-badge { font-size: 16px; }
.react-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.react-btn { font-size: 26px; width: 48px; height: 48px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; }
.react-btn.on { border-color: var(--accent); background: var(--accent-soft); }
.ideas.chips { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-idea { padding: 8px 12px; font-size: 14px; border-radius: 99px; }
.chip-idea.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.react-show { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-soft); border-color: transparent; }
.react-show p { margin: 2px 0 0; font-size: 16px; } .react-big { font-size: 22px; }
.streaks { padding: 10px 16px; } .streaks p { margin: 4px 0; font-size: 15px; }
.streak-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.streak-tiles div { background: var(--bg); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; }
.streak-tiles b { font-size: 24px; } .streak-tiles small { font-size: 12px; color: var(--ink3); line-height: 1.25; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge-m { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 6px; border-radius: 14px; background: var(--bg); opacity: .55; }
.badge-m.got { opacity: 1; background: color-mix(in srgb, var(--fucsia) 10%, var(--card)); }
.badge-m span { font-size: 28px; } .badge-m b { font-size: 12.5px; line-height: 1.2; margin-top: 4px; } .badge-m small { font-size: 11px; color: var(--ink3); }
.mile-ic { font-size: 20px; }
.camino-bar { position: relative; display: flex; gap: 3px; height: 14px; margin: 14px 0 8px; }
.camino-bar i { border-radius: 4px; }
.camino-pin { position: absolute; top: -7px; width: 4px; height: 28px; margin-left: -2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--card); }
.camino-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink2); }
.camino-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; }
.story-prev { width: 100%; max-width: 320px; align-self: center; border-radius: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.report { background: linear-gradient(160deg, color-mix(in srgb, var(--fucsia) 12%, var(--card)), var(--card)); }
.report-time { font-size: 44px; font-weight: 800; margin: 4px 0 0; }

/* personalizar */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; background: var(--sw); border: 2px solid var(--line); display: grid; place-items: center; color: var(--ink3); font-weight: 700; position: relative; }
.swatch.on { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch.pick { background: conic-gradient(#E5484D, #F0A01A, #1FA25A, #14B8A6, #2346E8, #8B5CF6, #E0157A, #E5484D); color: #fff; font-size: 20px; cursor: pointer; overflow: hidden; }
.swatch.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* tiempo, plan de carrera, alta */
.weather .wx-line { display: flex; gap: 14px; align-items: baseline; margin: 6px 0; font-size: 14px; color: var(--ink2); }
.weather .wx-t { font-size: 22px; font-weight: 750; color: var(--ink); }
.race-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: linear-gradient(135deg, color-mix(in srgb, var(--fucsia) 14%, var(--card)), var(--card)); }
.race-card span:nth-child(2) { flex: 1; display: flex; flex-direction: column; } .race-card small { color: var(--ink2); }
.race-ic { font-size: 30px; }
.checklist { margin: 4px 0 8px; padding-left: 20px; font-size: 14.5px; } .checklist li { margin-bottom: 5px; }
.in-q { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink2); }
.seg-opt { flex: 1; position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt span { display: block; text-align: center; padding: 8px 6px; border-radius: 9px; font-size: 14px; color: var(--ink2); }
.seg-opt input:checked + span { background: var(--card); color: var(--ink); font-weight: 650; box-shadow: var(--shadow); outline: 2px solid var(--accent); }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.chips-check { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-check .seg-opt { flex: none; } .chips-check .seg-opt span { border: 1px solid var(--line); border-radius: 99px; padding: 7px 12px; }
a.btn { text-decoration: none; }

/* fases del camino */
.inline-info { display: inline-grid; width: 28px; height: 28px; vertical-align: middle; }
.camino-legend button { font: inherit; color: inherit; padding: 2px 0; text-decoration: underline dotted var(--ink3); text-underline-offset: 3px; }

/* agujetas en el check-in */
.sore-l { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; font-weight: 600; }
.sore-l b { font-weight: 500; color: var(--ink2); font-size: 14px; }
.seg.nums { gap: 2px; padding: 2px; } .seg.nums button { padding: 8px 0; font-size: 13px; min-width: 0; }

/* textos largos sin espacios (p. ej. "JAJAJAJA…") que se salían de la tarjeta */
.react-show > div, .card.cheer > div, .cmt { min-width: 0; }
.react-show p, .card.cheer p, .comments p, .wa-text { overflow-wrap: anywhere; }

/* ── nov 2026: barra de abajo con emojis ── */
.tab-emo { font-size: 23px; line-height: 1.1; }
.tabbar button:not(.on) .tab-emo { filter: grayscale(.7); opacity: .65; }
.tabbar button.on span:last-child { font-weight: 700; }

/* Inicio */
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.row3 .btn { padding: 11px 6px; font-size: 14px; }
.center-btn { display: block; margin: 14px auto 4px; }
.msg-card { width: 100%; text-align: left; }
.msg-card .link-btn { display: inline-block; margin-top: 6px; font-size: 13px; }
.new-tag { color: var(--accent); }
.weather .link-btn.small { font-size: 13px; text-decoration: none; }

/* Chat Pati ↔ atleta */
.chat-btn { position: relative; } .chat-emo { font-size: 20px; line-height: 1; }
.chat-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .chat-h h2 { margin: 0; }
.msgs { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 2px 10px; }
.msg { max-width: 82%; align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 8px 12px; }
.msg.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink, #fff); border-color: transparent; border-radius: 18px 18px 6px 18px; }
.msg p { margin: 0; font-size: 16px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg small { display: block; font-size: 11px; opacity: .7; margin-top: 2px; text-align: right; }
.msg-day { align-self: center; font-size: 12px; color: var(--ink3); margin: 8px 0 2px; }
.chat-in { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: 0; background: var(--bg); padding-top: 6px; }
.chat-in textarea { flex: 1; margin: 0; resize: none; }
.chat-in .send { background: var(--accent); color: var(--accent-ink, #fff); border-radius: 50%; width: 44px; height: 44px; flex: none; }

/* Notas de voz */
.clips { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.clip { display: flex; align-items: center; gap: 6px; } .clip audio { flex: 1; min-width: 0; height: 40px; }

/* Calendario: columna de km y lista de la semana */
.dow, .cal-week { grid-template-columns: repeat(7, 1fr) 44px; }
.dow-km { font-size: 11px !important; font-weight: 700; color: var(--ink3) !important; }
.cal-km { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.cal-km i { font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--ink3); }
.cal-km b { font-weight: 700; } .cal-km small { color: var(--ink3); font-weight: 500; }
.wk-day { scroll-margin-top: 70px; padding: 2px 0 4px; }
.wk-day-h { display: flex; align-items: center; gap: 8px; margin: 12px 2px 6px; text-transform: capitalize; }
.wk-day-h b { flex: 1; font-size: 15px; } .wk-day.sel .wk-day-h b { color: var(--accent); }
.rest-line { margin: 0 4px 6px; }

/* Revisión semanal de la coach */
.review ul { margin: 4px 0 0; padding-left: 18px; } .review li { margin: 5px 0; font-size: 15px; line-height: 1.4; }
.review.red { border-left: 4px solid var(--red); } .review.good { border-left: 4px solid var(--green); } .review.adj { border-left: 4px solid var(--accent); }
.review li { font-weight: 400; } .review li b { font-weight: 700; }

/* ── 10 nov 2026 ── */
.ck-sleep { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: end; margin-top: 10px; }
.ck-sleep .lbl { display: block; font-size: 14px; margin-bottom: 4px; }
.move-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0; }
.move-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--card); position: relative; }
.move-day small { color: var(--ink3); } .move-day i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); }
.move-day.cur { border-color: var(--accent); background: var(--accent-soft); } .move-day[disabled] { opacity: .35; }
.reorder-row.off .reorder-name { color: var(--ink3); }
.switch-row.mini { padding: 0; border: 0; margin: 0 4px 0 0; flex: none; }
.weather .row-between span { display: flex; gap: 10px; align-items: center; }
