/* ===== FitnessFeed · diseño mobile-first ===== */
:root {
  color-scheme: dark;
  --bg: #090b0a; --bg-rgb: 9, 11, 10;
  --s1: #121513;
  --s2: #1a1f1c;
  --s3: #242a26;
  --line: #2a312c;
  --text: #f3f6f1;
  --mute: #8d988f;
  /* acento (la app lo cambia segun la paleta elegida) */
  --lime: #c8ff3d;          /* relleno: botones, selecciones */
  --lime-t: #c8ff3d;        /* texto, iconos y lineas sobre el fondo */
  --lime-d: #a9dc27;
  --lime-ink: #0b1102;      /* texto sobre el relleno */
  --accent-rgb: 200, 255, 61;
  --prot: #b6f23a;
  --carb: #5ee0ff;
  --fat: #ffa24d;
  --red: #ff5d62;
  --ok: #4ade80;
  --shadow: rgba(0, 0, 0, .6);
  --r: 18px;
  --r-sm: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tab-h: 76px;
  --kb: 0px;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .9, .2, 1);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f1; --bg-rgb: 243, 245, 241;
  --s1: #ffffff;
  --s2: #ebeee8;
  --s3: #dde2da;
  --line: #d3d9cf;
  --text: #121710;
  --mute: #5c675d;
  --prot: #5b9a0a;
  --carb: #0a7fb0;
  --fat: #d9740e;
  --red: #d63a40;
  --ok: #178a46;
  --shadow: rgba(30, 40, 30, .18);
}

* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
a { color: inherit; text-decoration: none; }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body {
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text); background: var(--bg);
  overscroll-behavior-y: none; touch-action: manipulation;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button, .tap { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--lime); color: var(--lime-ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.hide { display: none !important; }
.num { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* ---------- shell ---------- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--bg); }
@media (min-width: 600px) { body { background: #050605; } #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
#view, .cghost { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(var(--safe-t) + 14px) 16px calc(var(--tab-h) + var(--safe-b) + 28px); scroll-behavior: smooth; }
#view > * + *, .cghost > * + * { margin-top: 14px; }

/* ---------- barra inferior: Liquid Glass (opaca y sobria) ---------- */
.tabbar {
  position: absolute; left: 16px; right: 16px; bottom: calc(var(--safe-b) * .4 + 6px); z-index: 30; display: flex; align-items: stretch;
  height: 62px; padding: 0 6px; border-radius: 31px; isolation: isolate;
  background: rgba(var(--bg-rgb), .8);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.tabbar::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 55%); }
:root[data-theme="light"] .tabbar { background: rgba(255, 255, 255, .86); border-color: rgba(0, 0, 0, .06); box-shadow: 0 10px 26px rgba(30, 40, 30, .16), inset 0 1px 0 #fff; }
:root[data-theme="light"] .tabbar::before { background: linear-gradient(180deg, rgba(255, 255, 255, .6), transparent 55%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .tabbar { background: rgba(var(--bg-rgb), .94); } }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mute);
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em; transition: color .25s, transform .14s var(--ease); position: relative; z-index: 1; }
.tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.tab.on { color: var(--lime-t); } .tab.on svg { transform: translateY(-1px) scale(1.1); } .tab:active { transform: scale(.9); }
.tab .dot { position: absolute; top: 9px; margin-left: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
/* la "lente" de cristal que se desliza hasta la pestaña activa y se estira como un liquido al moverse */
.tind { position: absolute; top: 5px; bottom: 5px; left: 0; width: 56px; z-index: 0; pointer-events: none; transition: transform .5s cubic-bezier(.34, 1.3, .52, 1), width .5s cubic-bezier(.34, 1.3, .52, 1), opacity .2s; }
.tind b { position: absolute; inset: 0; border-radius: 24px; background: rgba(var(--accent-rgb), .13); border: 1px solid rgba(var(--accent-rgb), .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.tind.mv b { animation: liquid .55s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes liquid { 0% { transform: scale(1, 1); } 35% { transform: scale(1.32, .86); } 70% { transform: scale(.96, 1.05); } 100% { transform: scale(1, 1); } }
:root[data-theme="light"] .tind b { background: rgba(var(--accent-rgb), .22); border-color: rgba(var(--accent-rgb), .3); box-shadow: none; }
.tab-plus { flex: 0 0 70px; }
.tab-plus span { width: 48px; height: 48px; border-radius: 24px; margin-top: -8px; display: grid; place-items: center; color: var(--lime-ink); border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(180deg, var(--lime), var(--lime-d)); box-shadow: 0 6px 16px rgba(var(--accent-rgb), .3), 0 2px 4px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .25s var(--ease); }
.tab-plus:active { transform: none; } .tab-plus:active span { transform: scale(.88) rotate(45deg); }
.tab-plus svg { stroke-width: 2.6; width: 26px; height: 26px; }

/* ---------- tipografia ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; line-height: 1; }
h1 { font-size: 34px; } h2 { font-size: 22px; } h3 { font-size: 17px; letter-spacing: .05em; color: var(--mute); font-weight: 700; }
.mute { color: var(--mute); } .small { font-size: 13px; } .xs { font-size: 12px; } .lime { color: var(--lime-t); } .red { color: var(--red); }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pagehead .sub { color: var(--mute); font-size: 13px; margin-bottom: 2px; }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--s1); border: 1px solid var(--line); color: var(--text); flex: none; transition: transform .15s; }
.iconbtn:active { transform: scale(.92); }
.iconbtn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 22px; background: var(--lime); color: var(--lime-ink); }

/* ---------- tarjetas ---------- */
.card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.pad0 { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.card-h h3 { margin: 0; }
.link { color: var(--lime-t); font-weight: 600; font-size: 14px; padding: 8px 0 8px 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.sp { height: 8px; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- botones ---------- */
.btn { min-height: 52px; padding: 0 20px; border-radius: 16px; font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--s2); border: 1px solid var(--line); transition: transform .12s var(--ease), background .2s; width: 100%; }
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); box-shadow: 0 6px 22px rgba(var(--accent-rgb), .18); }
.btn.dng { color: var(--red); border-color: rgba(255, 93, 98, .35); background: rgba(255, 93, 98, .07); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 15px; border-radius: 14px; width: auto; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btnrow { display: flex; gap: 10px; } .btnrow > * { flex: 1; }

/* ---------- formularios ---------- */
.field { display: block; } .field > span { display: block; font-size: 13px; color: var(--mute); font-weight: 600; margin: 0 0 6px 2px; }
input.in, select.in, textarea.in { width: 100%; height: 52px; padding: 0 14px; font-size: 16px; /* 16px evita el zoom de iOS */
  background: var(--s2); border: 1px solid var(--line); border-radius: 14px; outline: none; appearance: none; -webkit-appearance: none; transition: border-color .2s, box-shadow .2s; }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12); }
textarea.in { height: auto; min-height: 84px; padding: 12px 14px; resize: none; }
select.in { background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stack > * + * { margin-top: 12px; } .stack-s > * + * { margin-top: 8px; }
.unit { position: relative; } .unit .in { padding-right: 46px; } .unit i { position: absolute; right: 14px; top: 0; height: 52px; display: grid; place-items: center; color: var(--mute); font-style: normal; font-size: 14px; pointer-events: none; }

.seg { display: flex; padding: 4px; gap: 4px; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; }
.seg button { flex: 1; white-space: nowrap; padding: 0 6px; min-height: 44px; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--mute); transition: background .2s, color .2s; }
.seg button.on { background: var(--lime); color: var(--lime-ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--mute); white-space: nowrap; }
.chip.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 52px; height: 52px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); font-size: 26px; font-weight: 600; line-height: 1; }
.stepper button:active { background: var(--s3); transform: scale(.94); }
.stepper .in { text-align: center; font-family: var(--display); font-size: 26px; font-weight: 700; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; }
.switch input { appearance: none; -webkit-appearance: none; width: 54px; height: 32px; flex: none; border-radius: 16px; background: var(--s3); position: relative; transition: background .2s; border: 1px solid var(--line); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .22s var(--ease); }
.switch input:checked { background: var(--lime); } .switch input:checked::after { transform: translateX(22px); background: var(--lime-ink); }

/* ---------- listas ---------- */
.list > * { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.list > *:last-child { border-bottom: 0; }
.list > button:active, .list > a:active { background: var(--s2); }
.li-main { flex: 1; min-width: 0; } .li-title { font-weight: 600; } .li-sub { color: var(--mute); font-size: 13px; }
.li-end { text-align: right; flex: none; }
.chev { width: 18px; height: 18px; stroke: var(--mute); fill: none; stroke-width: 2; flex: none; }
.empty { text-align: center; padding: 34px 20px; color: var(--mute); }
.empty .big { font-family: var(--display); font-size: 26px; font-weight: 800; text-transform: uppercase; color: var(--text); margin-bottom: 6px; }

/* ---------- anillo y barras ---------- */
.ringwrap { position: relative; display: grid; place-items: center; }
.ringwrap .mid { position: absolute; text-align: center; }
.ring-bg { stroke: var(--s3); } .ring-fg { transition: stroke-dashoffset .9s var(--ease), stroke .3s; }
.mid .v { font-family: var(--display); font-weight: 800; font-size: 50px; line-height: .95; font-variant-numeric: tabular-nums; }
.mid .l { font-size: 12px; color: var(--mute); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.eq { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; text-align: center; gap: 4px; }
.eq .op { color: var(--mute); font-family: var(--display); font-size: 22px; font-weight: 700; }
.eq .n { font-family: var(--display); font-weight: 700; font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.eq .t { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.macro { display: block; } .macro + .macro { margin-top: 14px; }
.macro .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.macro .name { font-weight: 700; font-size: 14px; } .macro .val { font-family: var(--display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.macro .val small { font-family: system-ui; font-size: 12px; color: var(--mute); font-weight: 500; }
.bar { height: 10px; border-radius: 6px; background: var(--s3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; width: 0; transition: width .8s var(--ease); }
.macro .rem { font-size: 12px; margin-top: 5px; color: var(--mute); } .macro .rem.over { color: var(--red); font-weight: 600; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wd .d { font-size: 11px; color: var(--mute); font-weight: 700; text-transform: uppercase; }
.wd .col { width: 100%; height: 56px; border-radius: 10px; background: var(--s2); position: relative; overflow: hidden; }
.wd .col i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--s3); border-radius: 0 0 10px 10px; transition: height .8s var(--ease); }
.wd .col i.over { background: rgba(255, 93, 98, .55); }
.wd .tr { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--s3); }
.wd .tr.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.wd .tr svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 3.4; }
.wd.today .d { color: var(--lime-t); } .wd.today .col { box-shadow: inset 0 0 0 1.5px var(--lime); }

/* ---------- hojas inferiores (bottom sheets) ---------- */
#overlay { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.backdrop { position: fixed; z-index: 95; inset: 0; background: rgba(0, 0, 0, .62); opacity: 0; transition: opacity .25s; pointer-events: auto; }
.backdrop.in { opacity: 1; }
.sheet { position: fixed; z-index: 96; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px; max-height: calc(100dvh - var(--safe-t) - 24px);
  display: flex; flex-direction: column; background: var(--s1); border-radius: 26px 26px 0 0; border: 1px solid var(--line); border-bottom: 0;
  transform: translateY(100%); transition: transform .34s var(--ease); pointer-events: auto; padding-bottom: calc(var(--safe-b) + var(--kb)); will-change: transform; }
.sheet.in { transform: translateY(0); } .sheet.drag { transition: none; }
.sheet.full { height: calc(100dvh - var(--safe-t) - 10px); }
.sheet .grab { padding: 10px 0 4px; display: grid; place-items: center; touch-action: none; flex: none; }
.sheet .grab i { width: 44px; height: 5px; border-radius: 3px; background: var(--s3); }
.sheet .sh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 16px 12px; flex: none; }
.sheet .sh-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 16px 18px; }
.sheet .sh-foot { padding: 12px 16px 14px; border-top: 1px solid var(--line); flex: none; background: var(--s1); }
.page { position: fixed; inset: 0; z-index: 90; max-width: 560px; margin: 0 auto; background: var(--bg); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .32s var(--ease); pointer-events: auto; }
.page.in { transform: none; }

.toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); max-width: 536px; margin: 0 auto; z-index: 200;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--text); color: var(--bg); font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5); animation: toastin .3s var(--ease); pointer-events: auto; }
.toast.err { background: var(--red); color: #fff; } .toast b { margin-left: auto; color: inherit; text-decoration: underline; padding: 4px 6px; font-weight: 800; }
@keyframes toastin { from { transform: translateY(20px); opacity: 0; } }
.toast.out { opacity: 0; transform: translateY(10px); transition: .25s; }

/* ---------- entrenamiento activo ---------- */
.wo-head { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) 14px 10px; border-bottom: 1px solid var(--line); background: var(--s1); }
.wo-time { font-family: var(--display); font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; color: var(--lime-t); }
.wo-body { flex: 1; overflow-y: auto; padding: 14px 14px calc(110px + var(--safe-b)); overscroll-behavior: contain; }
.wo-body > * + * { margin-top: 14px; }
.ex { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ex-h { display: flex; align-items: center; gap: 10px; padding: 14px 14px 8px; }
.ex-h h2 { font-size: 21px; flex: 1; min-width: 0; line-height: 1.05; }
.ex-h .musc { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.setgrid { display: grid; grid-template-columns: 34px 1fr 1fr 1fr 56px; gap: 8px; align-items: center; padding: 0 14px; }
.setgrid.hd { font-size: 11px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; text-align: center; padding-top: 4px; }
.setrow { padding-top: 8px; padding-bottom: 0; position: relative; transition: background .3s; }
.setrow .n { font-family: var(--display); font-weight: 700; font-size: 20px; text-align: center; color: var(--mute); }
.setrow .prev { font-size: 13px; text-align: center; color: var(--mute); font-variant-numeric: tabular-nums; }
.setrow .in { height: 52px; text-align: center; font-family: var(--display); font-size: 24px; font-weight: 700; padding: 0 4px; border-radius: 12px; }
.setrow .ok { height: 52px; width: 56px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--s2); display: grid; place-items: center; transition: all .2s var(--ease); }
.setrow .ok svg { width: 26px; height: 26px; stroke: var(--mute); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.setrow.done { background: rgba(var(--accent-rgb), .06); } .setrow.done .in { color: var(--lime-t); border-color: rgba(var(--accent-rgb), .3); }
.setrow.done .ok { background: var(--lime); border-color: var(--lime); transform: scale(1.04); } .setrow.done .ok svg { stroke: var(--lime-ink); }
.setrow.flash { animation: flash .7s var(--ease); } @keyframes flash { 0% { background: rgba(var(--accent-rgb), .55); } 100% { background: rgba(var(--accent-rgb), .06); } }
.pr-tag { position: absolute; right: 78px; top: -4px; background: var(--lime); color: var(--lime-ink); font-family: var(--display); font-weight: 800; font-size: 13px; padding: 1px 8px; border-radius: 8px; letter-spacing: .06em; animation: pop .5s var(--ease); z-index: 2; }
@keyframes pop { 0% { transform: scale(0) rotate(-12deg); } 60% { transform: scale(1.3) rotate(4deg); } 100% { transform: scale(1); } }
.ex-f { display: flex; gap: 8px; padding: 10px 14px 14px; }
.ex-f button { flex: 1; min-height: 44px; border-radius: 12px; background: var(--s2); font-weight: 600; font-size: 14px; color: var(--mute); }
.ex-f button:active { background: var(--s3); }

.rest { position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 12px); z-index: 5; border-radius: 20px; padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--bg); box-shadow: 0 14px 44px var(--shadow); overflow: hidden; }
.rest .tm { font-family: var(--display); font-weight: 800; font-size: 34px; font-variant-numeric: tabular-nums; line-height: 1; }
.rest .pg { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--lime-d); transition: width .25s linear; }
.rest button { min-height: 44px; padding: 0 13px; flex: none; border-radius: 12px; background: rgba(var(--bg-rgb), .16); font-weight: 800; font-size: 15px; }
.rest.end { animation: restend .6s 3; background: var(--lime); } @keyframes restend { 50% { transform: scale(1.03); } }
.finbar { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px calc(var(--safe-b) + 12px); background: linear-gradient(transparent, var(--bg) 35%); }

.bigstat { text-align: center; } .bigstat .n { font-family: var(--display); font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.bigstat .t { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-top: 4px; }

/* ---------- comida ---------- */
.datenav { display: flex; align-items: center; gap: 8px; }
.datenav .d { flex: 1; text-align: center; min-height: 48px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); font-family: var(--display); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .03em; position: relative; display: grid; place-items: center; }
.datenav .d input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.meal-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.meal-h h2 { font-size: 20px; }
.entry { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); width: 100%; text-align: left; min-height: 60px; }
.entry:active { background: var(--s2); }
.entry .k { font-family: var(--display); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.addbtn { width: 100%; min-height: 52px; border-top: 1px solid var(--line); color: var(--lime-t); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.addbtn:active { background: var(--s2); }
.pm { display: inline-flex; gap: 10px; font-size: 12px; color: var(--mute); } .pm b { font-weight: 700; }
.pm .p { color: var(--prot); } .pm .c { color: var(--carb); } .pm .f { color: var(--fat); }
.searchbar { position: relative; } .searchbar .in { padding-left: 44px; } .searchbar svg { position: absolute; left: 14px; top: 15px; width: 22px; height: 22px; stroke: var(--mute); fill: none; stroke-width: 2; pointer-events: none; }
.foodrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 64px; }
.foodrow .main { flex: 1; min-width: 0; text-align: left; }
.foodrow .plus { width: 48px; height: 48px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: var(--lime); }
.foodrow .plus:active { background: var(--lime); color: var(--lime-ink); }
.foodrow .plus svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; }
.macroprev { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; padding: 14px; background: var(--s2); border-radius: 16px; }
.macroprev .n { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; } .macroprev .t { font-size: 11px; color: var(--mute); text-transform: uppercase; font-weight: 700; margin-top: 3px; }
.scanner { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 4/3; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner::after { content: ""; position: absolute; left: 12%; right: 12%; top: 38%; bottom: 38%; border: 2px solid var(--lime); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .45); }

/* ---------- cuerpo / fotos / charts ---------- */
.chart { width: 100%; touch-action: pan-y; } .chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.tip { font-size: 13px; color: var(--mute); min-height: 20px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.photos button { aspect-ratio: 3/4; background: var(--s2); border-radius: 10px; overflow: hidden; position: relative; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos .dt { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 11px; font-weight: 700; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); text-align: left; }
.photos .sel { box-shadow: 0 0 0 3px var(--lime) inset; }
.viewer { position: fixed; inset: 0; z-index: 110; background: #000; display: flex; flex-direction: column; }
.viewer img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.viewer .vb { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 8px) 12px 8px; }
.viewer .vf { padding: 10px 14px calc(var(--safe-b) + 14px); display: flex; gap: 10px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .compare img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; }

/* ---------- auth ---------- */
.auth { position: fixed; inset: 0; z-index: 150; background: var(--bg); overflow-y: auto; padding: calc(var(--safe-t) + 22px) 22px calc(var(--safe-b) + 28px); display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.auth .brand { font-family: var(--display); font-weight: 800; font-size: 54px; text-transform: uppercase; line-height: .85; letter-spacing: .01em; }
.auth .brand em { color: var(--lime-t); font-style: normal; }
.auth .brand::before { content: ""; display: block; width: 84px; height: 84px; margin: 0 0 14px -6px; background: url(/icons/logo.svg) center / contain no-repeat; }
.auth .tag { color: var(--mute); margin-top: 10px; font-size: 15px; }
.pulse { width: 100%; height: 64px; margin: 18px 0 8px; overflow: visible; }
.pulse path { fill: none; stroke: var(--lime-t); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 420; animation: beat 2.6s linear infinite; filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), .7)); }
@keyframes beat { to { stroke-dashoffset: -420; } }
.auth form { margin-top: auto; padding-top: 20px; }
.err { color: var(--red); font-size: 14px; font-weight: 600; min-height: 20px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--s2); border-radius: 14px; padding: 12px 6px; min-width: 0; text-align: center; }
.kpi .n { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; } .kpi .t { font-size: 11px; color: var(--mute); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-top: 4px; overflow-wrap: anywhere; }
.tbl { width: 100%; border-collapse: collapse; } .tbl td, .tbl th { padding: 12px 6px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.tbl th { color: var(--mute); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; } .tbl tr:last-child td { border-bottom: 0; }
.goalrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--s2); width: 100%; text-align: left; min-height: 60px; transition: border-color .2s; }
.goalrow.on { border-color: var(--lime); background: rgba(var(--accent-rgb), .07); }
.goalrow + .goalrow { margin-top: 8px; }
.note { font-size: 13px; color: var(--mute); background: var(--s2); border-radius: 12px; padding: 10px 12px; }
.note b { color: var(--text); }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- barra "entrenamiento en curso" y filas de acciones ---------- */
.resume { position: absolute; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 25; display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 16px; background: var(--lime); color: var(--lime-ink); font-size: 14px; text-align: left; box-shadow: 0 10px 32px rgba(var(--accent-rgb), .28); animation: toastin .3s var(--ease); }
.resume svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.resume .num { font-size: 22px; font-weight: 800; } .resume .go { background: var(--lime-ink); color: var(--lime); padding: 6px 12px; border-radius: 10px; font-weight: 800; font-size: 13px; }
.iconrow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 10px 14px; border-radius: 16px; background: var(--s2); text-align: left; }
.iconrow:active { background: var(--s3); }
.iconrow .ib { width: 44px; height: 44px; border-radius: 14px; background: var(--s3); color: var(--lime-t); display: grid; place-items: center; flex: none; }
.iconrow .ib svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btnrow .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.lime .chev, .chev.lime { stroke: var(--lime-t); stroke-width: 3; }

.prow .ib { width: 40px; height: 40px; border-radius: 12px; background: var(--s2); color: var(--lime-t); display: grid; place-items: center; flex: none; }
.btnrow { flex-wrap: wrap; } .btnrow .btn { flex: 1 1 auto; }

/* anillos del Home */
.rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 6px; }
.rt { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 4px 0; border-radius: 16px; min-width: 0; }
.rt:active { background: var(--s2); }
.rt .ringwrap svg { max-width: 100%; height: auto; }
.rt-name { font-weight: 700; font-size: 13px; margin-top: 4px; }
.rt-left { font-size: 12px; color: var(--mute); line-height: 1.2; }
.rt-left.ok { color: var(--ok); font-weight: 600; }

.tbadge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.rbar { height: 8px; border-radius: 4px; background: var(--s3); overflow: hidden; } .rbar i { display: block; height: 100%; border-radius: 4px; background: var(--lime); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--s3); color: var(--mute); }
.badge.god { background: rgba(255, 93, 98, .18); color: var(--red); } .badge.trainer { background: rgba(var(--accent-rgb), .16); color: var(--lime-t); } .badge.off { background: rgba(255, 162, 77, .18); color: var(--fat); }

/* paleta de colores */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); transition: transform .15s var(--ease); }
.swatch i { font-style: normal; font-weight: 900; font-size: 18px; opacity: 0; }
.swatch.on { border-color: var(--bg); box-shadow: 0 0 0 3px var(--text); transform: scale(1.06); } .swatch.on i { opacity: 1; }

/* foto de perfil */
.pic { position: relative; border-radius: 50%; overflow: hidden; background: var(--s3); color: var(--lime-t); display: grid; place-items: center; font-family: var(--display); font-weight: 800; flex: none; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avbtn { position: relative; display: block; border-radius: 50%; } .avcam { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; border: 2px solid var(--bg); }
.avcam svg { width: 12px; height: 12px; stroke-width: 2.4; }

/* pagina publica de ganadores */
.pubpage { position: fixed; inset: 0; overflow-y: auto; background: var(--bg); } .pubwrap { max-width: 520px; margin: 0 auto; padding: calc(var(--safe-t) + 28px) 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.pubwrap .brand { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: .9; letter-spacing: .01em; text-transform: uppercase; } .pubwrap .brand em { color: var(--lime-t); font-style: normal; }
.pubwrap .brand::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 0 10px -4px; background: url(/icons/logo.svg) center / contain no-repeat; }
.pubhero { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 8px 0; } .pubhero h1 { font-size: 40px; } .pubmedal { font-size: 54px; line-height: 1; margin-bottom: -22px; z-index: 1; filter: drop-shadow(0 4px 10px var(--shadow)); }

/* liga */
.lrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); } .lrow:last-child { border-bottom: 0; }
.lrow.me { background: rgba(var(--accent-rgb), .08); }
.lrank { width: 30px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--mute); flex: none; } .lrank.top { font-size: 26px; }
.badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bdg { position: relative; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 4px; opacity: .5; filter: grayscale(1); }
.bdg.on { opacity: 1; filter: none; border-color: rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .06); }
.bico { width: 44px; height: 44px; border-radius: 14px; background: var(--s3); color: var(--lime-t); display: grid; place-items: center; margin-bottom: 4px; } .bico svg { width: 24px; height: 24px; }
.bnew { position: absolute; top: 10px; right: 10px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 8px; letter-spacing: .05em; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 8px 0 0; }
.pcol { display: grid; justify-items: center; gap: 4px; min-width: 0; flex: 1; max-width: 110px; }
.pbase { width: 100%; border-radius: 12px 12px 0 0; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--lime-ink); background: var(--lime); }
.pbase.r1 { height: 92px; } .pbase.r2 { height: 66px; opacity: .8; } .pbase.r3 { height: 46px; opacity: .6; }

/* feedback y legales */
.stars { display: flex; gap: 6px; } .star { font-size: 34px; line-height: 1; color: var(--s3); padding: 4px; } .star.on { color: var(--lime-t); }
.legal .chip { display: inline-flex; align-items: center; text-decoration: none; }
.legal h1 { font-size: 40px; } .legal section { margin-top: 10px; } .legal .brand { text-decoration: none; }
.terms-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; } .terms-check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--lime); } .terms-check a { color: var(--lime-t); text-decoration: underline; }

/* ---- servicios profesionales ---- */
.track { display: flex; align-items: flex-start; margin: 4px 0 2px; }
.track .st { flex: 1; text-align: center; font-size: 11px; font-weight: 600; color: var(--mute); position: relative; }
.track .st i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--s3); border: 2px solid var(--line); margin: 0 auto 6px; position: relative; z-index: 1; }
.track .st::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.track .st:first-child::before { display: none; }
.track .st.on { color: var(--text); } .track .st.on i { background: var(--lime); border-color: var(--lime); } .track .st.on::before { background: var(--lime); }
.track .st.cur i { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .25); }
.prorow { display: block; width: 100%; text-align: left; color: inherit; font: inherit; }
.ptag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--s3); color: var(--mute); }
.ptag.ok { background: rgba(74, 222, 128, .14); color: var(--ok); } .ptag svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.kv { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; } .kv .k { color: var(--mute); flex: none; } .kv .v { text-align: right; }
.plist { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot { min-height: 42px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; }
.slot.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.hrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); } .in.tm::-webkit-calendar-picker-indicator { display: none; } .hday { width: 78px; flex: none; font-weight: 600; font-size: 14px; padding-top: 12px; }
.in.tm { min-width: 0; text-align: center; padding-left: 6px; padding-right: 6px; }
.seghold { display: block; }
.ptag.star-tag { background: rgba(255, 200, 61, .14); color: #ffd04d; } .ptag.star-tag b { font-weight: 800; }
.rstars { color: #ffd04d; letter-spacing: 2px; font-size: 15px; }
.rsum { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.rbig { text-align: center; } .rbig .n { font-family: var(--display); font-size: 46px; line-height: 1; font-weight: 800; }
.rbars { display: grid; gap: 5px; } .rb { display: grid; grid-template-columns: 12px 1fr 20px; gap: 8px; align-items: center; font-size: 12px; color: var(--mute); }
.rb .bar { height: 8px; border-radius: 4px; background: var(--s3); overflow: hidden; } .rb .bar i { display: block; height: 100%; background: #ffd04d; border-radius: 4px; } .rb .c { text-align: right; }
.stars.big .star.on { color: #ffd04d; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .pbox .ptitle { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.padd { width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; border: 1.5px dashed var(--line); background: var(--s2); color: var(--mute); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center; }
.padd svg { width: 26px; height: 26px; stroke: var(--lime-t); fill: none; stroke-width: 1.8; } .padd span { font-weight: 700; color: var(--text); } .padd small { font-size: 11px; line-height: 1.3; }
.pprev { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--s2); } .pprev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdel { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; min-height: 0; background: rgba(0, 0, 0, .6); }
.fphotos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .fphotos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: var(--s2); }
.chips span.chip { display: inline-flex; align-items: center; }

/* ---------- animaciones ---------- */
.rip { overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .2; transform: scale(0); animation: ripple .55s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.btn, .chip, .slot, .prow, .iconrow, .seg button, .prorow { transition: transform .14s var(--ease), background-color .2s, border-color .2s, color .2s, opacity .2s; }
.btn:active, .chip:active, .slot:active, .prow:active, .iconrow:active, .prorow:active, .seg button:active { transform: scale(.96); }
.tab { transition: color .2s, transform .14s var(--ease); } .tab:active { transform: scale(.9); }

/* la pestaña activa: el icono salta y la barrita se abre */
.tab.on svg { animation: tabpop .5s var(--ease); }
@keyframes tabpop { from { transform: translateY(3px) scale(.7); } 55% { transform: translateY(-6px) scale(1.25); } }
.tab.on::before { animation: tabbar .32s var(--ease); }
@keyframes tabbar { from { transform: scaleX(0); opacity: 0; } }

/* celebracion de insignias */
.celebrate { padding: 6px 0 10px; } .celebrate + .celebrate { border-top: 1px solid var(--line); padding-top: 16px; }
.cbig { font-size: 66px; line-height: 1.1; animation: cpop .75s var(--ease); display: grid; place-items: center; }
.cbig svg { width: 62px; height: 62px; stroke: var(--lime-t); fill: none; stroke-width: 1.6; }
@keyframes cpop { from { transform: scale(0) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.25) rotate(8deg); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .tab.on svg, .tab.on::before, .cbig, .ripple { animation: none !important; }
  .btn:active, .chip:active, .slot:active, .prow:active, .tab:active { transform: none; }
}
.pic.zoomable { cursor: zoom-in; }
.photo-big { width: min(100%, 420px); aspect-ratio: 1; margin: 4px auto; border-radius: 22px; overflow: hidden; background: var(--s2); display: grid; place-items: center; animation: cpop .45s var(--ease); }
.photo-big img { width: 100%; height: 100%; object-fit: cover; display: block; } .pic-big { font-family: var(--display); font-weight: 800; font-size: 120px; color: var(--lime-t); }

.songcard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, rgba(var(--accent-rgb), .12), var(--s2)); border: 1px solid rgba(var(--accent-rgb), .25); }
.sart { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--s3); } .sart-ph { display: grid; place-items: center; color: var(--lime-t); } .sart-ph svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.quote { font-size: 17px; line-height: 1.4; font-weight: 600; text-align: center; padding: 6px 10px; font-style: italic; }
.small-photo { width: min(70%, 240px); } .photo-big { transition: width .3s var(--ease); cursor: zoom-in; }
/* nube de pensamiento pegada a la foto (ocupa poca altura) */
.cwrap { position: relative; margin-top: 3px; padding-left: 0; }
.cwrap i { position: absolute; border-radius: 50%; background: var(--s2); border: 1px solid var(--line); top: 50%; }
.cwrap .d1 { width: 4px; height: 4px; left: -13px; margin-top: 1px; } .cwrap .d2 { width: 6px; height: 6px; left: -8px; margin-top: -4px; }
.cloud { position: relative; margin: 0; padding: 2px 9px; max-width: 100%; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); font-size: 11.5px; line-height: 1.35; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: fit-content; font-style: italic; }
.cloud b { color: var(--text); font-weight: 700; font-style: normal; } .cloud.song { color: var(--lime-t); font-style: normal; border-color: rgba(var(--accent-rgb), .3); background: rgba(var(--accent-rgb), .08); }
.merow { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); } .cloud.empty { border-style: dashed; background: transparent; font-style: normal; }

/* ---------- cubo 3D entre pestañas ---------- */
.stage { flex: 1; min-height: 0; position: relative; }
.cube { position: absolute; inset: 0; }
#view, .cghost { position: absolute; inset: 0; }
.stage.s3d { perspective: 1300px; perspective-origin: 50% 45%; overflow: hidden; }
.stage.s3d .cube { transform-style: preserve-3d; transform: translateZ(calc(var(--hw) * -1)) rotateY(0deg); transition: transform .5s cubic-bezier(.3, .7, .1, 1); will-change: transform; }
.stage.s3d .face, .stage.s3d #view, .stage.s3d .shade { backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: transform; }
.stage.s3d .shade { position: absolute; inset: 0; }
.stage.s3d .cghost { background: var(--bg); transform: translateZ(var(--hw)); pointer-events: none; }
.stage.s3d.f #view { transform: rotateY(90deg) translateZ(var(--hw)); } .stage.s3d.b #view { transform: rotateY(-90deg) translateZ(var(--hw)); }
.stage.s3d #view { background: var(--bg); overflow-y: hidden; }
.stage.s3d .shade { background: #000; pointer-events: none; transition: opacity .5s cubic-bezier(.3, .7, .1, 1); }
.stage.s3d .shade-g { transform: translateZ(calc(var(--hw) + 1px)); opacity: 0; }
.stage.s3d.f .shade-n { transform: rotateY(90deg) translateZ(calc(var(--hw) + 1px)); opacity: .5; } .stage.s3d.b .shade-n { transform: rotateY(-90deg) translateZ(calc(var(--hw) + 1px)); opacity: .5; }
.stage.s3d.go.f .cube { transform: translateZ(calc(var(--hw) * -1)) rotateY(-90deg); } .stage.s3d.go.b .cube { transform: translateZ(calc(var(--hw) * -1)) rotateY(90deg); }
.stage.s3d.go .shade-g { opacity: .55; } .stage.s3d.go .shade-n { opacity: 0; }
/* mientras gira el cubo la barra no desenfoca el fondo (recalcular el blur cada cuadro es lo que hace que se trabe) */
#app.cubing .tabbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(var(--bg-rgb), .9); }
@media (prefers-reduced-motion: reduce) { .stage.s3d .cube, .stage.s3d .shade { transition: none; } .tind, .tind.mv b { transition: none; animation: none; } }
.dot-l { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
/* categorias de temporada */
.tierchip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: rgb(var(--tr)); background: rgba(var(--tr), .13); border: 1px solid rgba(var(--tr), .4); vertical-align: middle; }
.tierchip i { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--tr)); }
.tiermedal { border-radius: 50%; display: grid; place-items: center; flex: none; color: rgba(0, 0, 0, .55); font-weight: 900; box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .2), inset 0 2px 3px rgba(255, 255, 255, .5), 0 4px 12px rgba(0, 0, 0, .35); }
.tbar { position: relative; height: 12px; border-radius: 6px; background: var(--s3); margin: 22px 2px 26px; }
.tbar .fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, var(--lime-d), var(--lime)); min-width: 6px; transition: width .6s var(--ease); }
.tbar .mk { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--mute); border-radius: 1px; }
.tbar .mk b { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: var(--mute); white-space: nowrap; }
.tbar .mk.end b { transform: translateX(-100%); left: 100%; } .tbar .mk span { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--mute); white-space: nowrap; }
.tbar .mk.end span { transform: translateX(-100%); left: 100%; }
.trow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); } .trow:last-child { border-bottom: 0; }
.trow.cur { background: rgba(var(--accent-rgb), .07); border-radius: 12px; padding-left: 10px; padding-right: 10px; }
.lrow.off { opacity: .62; }
