/* ============================================================
   HOME — the post-login hub (Inicio).
   Apple-style premium: glassmorphism, minimalism, system
   typography. Matches the landing's visual language.
   Same markup as home.js.
   ============================================================ */
:root {
  --hm-font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', sans-serif;
  --hm-glass: rgba(255, 255, 255, 0.06);
  --hm-glass-hi: rgba(255, 255, 255, 0.1);
  --hm-line: rgba(255, 255, 255, 0.1);
  --hm-line-soft: rgba(255, 255, 255, 0.05);
  --hm-blur: blur(30px) saturate(180%);
  /* Depth + frosted top-edge highlight — the Apple-glass "float". */
  --hm-shadow: 0 20px 46px -22px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --hm-shadow-hi: 0 26px 60px -24px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --hm-muted: #a6a6b0;
  --hm-muted-2: #6f6f7a;
  --hm-accent: #7c3aed;
}

/* Clean canvas: hide the shared animated background blobs on /home only
   (they come from tienda.css, which is reused by tienda/marketplace) and
   let the landing's fixed cinematic video + brand scrim show through
   instead. The page wrappers go transparent so .hm-video / .hm-bg
   (fixed, below everything) become the backdrop; the sidebar keeps its
   own solid panel. */
.tienda-content:has(.hm-content)::before,
.tienda-content:has(.hm-content)::after { display: none; }
.chat-page:has(.hm-content),
.tienda-content:has(.hm-content) { background: transparent; }

/* Fullscreen cinematic loop, fixed behind everything (below the .hm-bg
   scrim). Same asset & treatment as the landing so /home feels continuous
   with it. */
.hm-video {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background: #050507;
}
.hm-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  pointer-events: none;
}

/* Legibility scrim over the video: Uvlis brand tints + a translucent dark
   gradient so the glass cards and text stay readable while scrolling. */
.hm-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -12%, rgba(124, 58, 237, 0.20), transparent 62%),
    radial-gradient(1000px 600px at 6% 2%, rgba(6, 182, 212, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(5, 5, 7, 0.72) 0%, rgba(6, 6, 10, 0.82) 45%, rgba(5, 5, 7, 0.92) 100%);
}

.hm-content {
  max-width: 1160px;
  margin: 0 auto;
  padding: 44px 36px 120px;
  position: relative;
  z-index: 1;
  font-family: var(--hm-font);
}

/* ── Hero / welcome ───────────────────────────────────────── */
/* No card — a clean header band separated by a hairline. */
.hm-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--hm-line-soft);
}
.hm-hero-user { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hm-hero-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.45rem; font-weight: 700; color: #fff; overflow: hidden;
  background: var(--hm-accent);
  box-shadow: 0 0 0 1px var(--hm-line);
}
.hm-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
a.hm-hero-avatar { cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
a.hm-hero-avatar:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18); }
.hm-hero-hi { font-size: 1.9rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: #f5f5f7; }
.hm-hero-sub { margin-top: 6px; color: var(--hm-muted-2); font-size: 0.92rem; }

/* Balance — quiet glass pill, accent only on the value + plus */
.hm-balance {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 999px; text-decoration: none; color: var(--text-primary); font-weight: 600;
  background: var(--hm-glass);
  border: 1px solid var(--hm-line);
  backdrop-filter: var(--hm-blur);
  -webkit-backdrop-filter: var(--hm-blur);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.hm-balance:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.16); background: var(--hm-glass-hi); }
.hm-balance-ic { font-size: 1.05rem; }
.hm-balance-val { font-size: 1.05rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.hm-balance-lbl { font-size: 0.68rem; color: var(--hm-muted-2); text-transform: uppercase; letter-spacing: 0.08em; }
.hm-balance-plus {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.09); color: #e9e9ef; font-weight: 700; font-size: 1rem; margin-left: 3px;
}

/* ── Streak (racha) pill, next to fichas ──────────────────── */
.hm-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hm-streak {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  background: var(--hm-glass); border: 1px solid var(--hm-line);
  backdrop-filter: var(--hm-blur);
  -webkit-backdrop-filter: var(--hm-blur);
  color: var(--hm-muted-2); font-weight: 700;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
.hm-streak:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.16); background: var(--hm-glass-hi); }
.hm-streak-fire { display: block; }
.hm-streak-val { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hm-streak.is-on {
  color: #ffa14e;
  border-color: rgba(249, 115, 22, 0.32);
  background: rgba(249, 115, 22, 0.09);
}
.hm-streak.is-on .hm-streak-fire { filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.5)); }

/* ── Streak modal ─────────────────────────────────────────── */
body.hm-modal-open { overflow: hidden; }
.hm-modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(4, 4, 7, 0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: hmFade .15s ease;
}
.hm-modal-overlay[hidden] { display: none; }
@keyframes hmFade { from { opacity: 0; } to { opacity: 1; } }
.hm-modal {
  position: relative; width: min(440px, 100%); max-height: 88vh; overflow-y: auto;
  background: rgba(22, 22, 30, 0.72); border: 1px solid var(--hm-line); border-radius: 26px;
  backdrop-filter: var(--hm-blur);
  -webkit-backdrop-filter: var(--hm-blur);
  padding: 28px 24px 24px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: hmPop .18s ease both;
}
@keyframes hmPop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.hm-modal-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: none; cursor: pointer; background: rgba(255, 255, 255, 0.06); color: var(--hm-muted);
  font-size: 0.9rem; display: grid; place-items: center; transition: background .14s ease, color .14s ease;
}
.hm-modal-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.hm-streak-top { text-align: center; padding: 6px 0 18px; }
.hm-streak-bigfire { color: #ff9d3c; filter: drop-shadow(0 0 16px rgba(249, 115, 22, 0.5)); }
.hm-streak-big { font-size: 3.4rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin-top: 4px; color: #f5f5f7; }
.hm-streak-cap { color: var(--hm-muted-2); font-size: 0.76rem; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.hm-streak-meta { color: var(--hm-muted-2); font-size: 0.82rem; margin-top: 12px; }

.hm-streak-block { padding-top: 18px; border-top: 1px solid var(--hm-line-soft); margin-top: 4px; }
.hm-streak-sub { font-weight: 600; font-size: 0.95rem; }
.hm-streak-hint { color: var(--hm-muted-2); font-size: 0.82rem; margin: 6px 0 14px; line-height: 1.5; }

.hm-freeze-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hm-freeze-pack {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 8px 12px; border-radius: 16px; cursor: pointer;
  background: var(--hm-glass); border: 1px solid var(--hm-line); color: var(--text-primary);
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.hm-freeze-pack:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.18); background: var(--hm-glass-hi); }
.hm-freeze-pack b { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.hm-freeze-pack > span { font-size: 0.78rem; color: var(--hm-muted); font-weight: 600; }
.hm-freeze-pack--best { border-color: rgba(167, 139, 250, 0.38); }
.hm-freeze-tag {
  position: absolute; top: -9px; background: #7c3aed; color: #fff !important;
  font-size: 0.6rem !important; padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.05em;
}

.hm-friend-streaks { display: flex; flex-direction: column; gap: 8px; }
.hm-fs {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px;
  text-decoration: none; color: var(--text-primary); background: var(--hm-glass); border: 1px solid var(--hm-line-soft);
  transition: background .14s ease, border-color .14s ease;
}
.hm-fs:hover { background: var(--hm-glass-hi); border-color: var(--hm-line); }
.hm-fs-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.82rem; overflow: hidden; flex-shrink: 0; }
.hm-fs-av img { width: 100%; height: 100%; object-fit: cover; }
.hm-fs-name { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-fs-streak { font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.hm-fs-streak.is-alive { color: #ff9d3c; }
.hm-fs-streak.is-cold { color: var(--hm-muted); filter: grayscale(0.6); }
.hm-fs-empty { color: var(--hm-muted); font-size: 0.84rem; text-align: center; padding: 14px 6px; line-height: 1.5; }

/* ── QR button (next to the streak) ───────────────────────── */
.hm-qr-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 50%; cursor: pointer;
  background: var(--hm-glass); border: 1px solid var(--hm-line);
  backdrop-filter: var(--hm-blur);
  -webkit-backdrop-filter: var(--hm-blur);
  color: var(--text-primary);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.hm-qr-btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.16); background: var(--hm-glass-hi); }
.hm-qr-btn svg { width: 20px; height: 20px; }
/* The QR modal itself lives in the shared component (uvlis-qr.js). */

/* ── Layout ───────────────────────────────────────────────── */
.hm-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.hm-main { min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.hm-rail { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 16px; }

.hm-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.hm-section-head h2 {
  font-size: 1.15rem; font-weight: 600; color: #f5f5f7;
  letter-spacing: -0.02em;
}

/* ── Shortcuts grid ───────────────────────────────────────── */
.hm-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.hm-shortcut {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 20px 18px; border-radius: 20px; text-decoration: none;
  background: var(--hm-glass); border: 1px solid var(--hm-line); color: var(--text-primary);
  backdrop-filter: var(--hm-blur);
  -webkit-backdrop-filter: var(--hm-blur);
  box-shadow: var(--hm-shadow);
  --c: #7c3aed;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.hm-shortcut:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--hm-glass-hi);
  box-shadow: var(--hm-shadow-hi);
}
.hm-shortcut-ic {
  position: relative; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.4rem;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: #fff;
}
.hm-shortcut-label { position: relative; font-weight: 600; font-size: 0.93rem; letter-spacing: -0.01em; }
.hm-shortcut-badge {
  position: absolute; top: 14px; right: 14px;
  min-width: 22px; padding: 3px 8px; border-radius: 999px; text-align: center;
  background: rgba(34, 197, 94, 0.13); border: 1px solid rgba(34, 197, 94, 0.3); color: #86efac;
  font-size: 0.68rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1;
}
.hm-shortcut-badge.is-zero { display: none; }

/* ── Editable shortcuts ───────────────────────────────────── */
.hm-edit-btn {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--hm-line);
  background: transparent; color: var(--hm-muted);
  font-family: var(--hm-font);
  font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all .15s ease;
}
.hm-edit-btn:hover { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.18); background: var(--hm-glass); }
.hm-edit-hint { font-size: 0.8rem; color: var(--hm-muted-2); margin: -6px 0 16px; }

/* buttons reused as tiles */
button.hm-shortcut { font: inherit; text-align: left; width: 100%; cursor: pointer; }

.hm-shortcuts.is-editing .hm-sc-sel { cursor: grab; }
.hm-shortcuts.is-editing .hm-sc-sel.is-drag { opacity: 0.4; }
.hm-shortcuts.is-editing .hm-shortcut { animation: hmWiggle 0.35s ease; }

.hm-sc-remove {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(239, 68, 68, 0.92); color: #fff; font-size: 0.78rem;
  display: grid; place-items: center; line-height: 1;
}
.hm-sc-remove:hover { background: #ef4444; }

.hm-sc-add { border-style: dashed !important; opacity: 0.85; }
.hm-sc-add:hover { opacity: 1; border-color: color-mix(in srgb, var(--c) 45%, transparent) !important; }
.hm-sc-plus {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  color: color-mix(in srgb, var(--c) 85%, #fff); font-weight: 700; font-size: 1.1rem;
}

.hm-add-label {
  grid-column: 1 / -1; margin-top: 14px;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--hm-muted-2); font-weight: 600;
}

.hm-sc-empty { border-style: dashed !important; color: var(--hm-muted); align-items: center; justify-content: center; }

@keyframes hmWiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-1.2deg); }
  75% { transform: rotate(1.2deg); }
  100% { transform: rotate(0deg); }
}

/* ── Discover cards ("Para ti") ───────────────────────────── */
.hm-discover { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.hm-disc {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 0;
  padding: 22px; min-height: 172px; border-radius: 20px; text-decoration: none;
  background: var(--hm-glass); border: 1px solid var(--hm-line); color: var(--text-primary);
  backdrop-filter: var(--hm-blur);
  -webkit-backdrop-filter: var(--hm-blur);
  box-shadow: var(--hm-shadow);
  --a: #7c3aed;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.hm-disc:hover { transform: translateY(-3px); background: var(--hm-glass-hi); border-color: color-mix(in srgb, var(--a) 36%, transparent); box-shadow: var(--hm-shadow-hi); }
.hm-disc.is-featured {
  background: linear-gradient(150deg, color-mix(in srgb, var(--a) 14%, var(--hm-glass)) 0%, var(--hm-glass) 62%);
  border-color: color-mix(in srgb, var(--a) 26%, transparent);
}
.hm-disc-wm { position: absolute; right: -16px; bottom: -20px; color: var(--a); opacity: 0.08; pointer-events: none; }
.hm-disc-wm svg { width: 118px; height: 118px; display: block; }
.hm-disc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; position: relative; z-index: 1; }
.hm-disc-ic {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--a) 16%, transparent);
  color: color-mix(in srgb, var(--a) 58%, #ffffff);
}
.hm-disc-ic svg { width: 18px; height: 18px; display: block; }
.hm-disc-kicker { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--hm-muted-2); font-weight: 700; margin: 0; }
.hm-disc-title {
  font-weight: 600; font-size: 1.1rem; line-height: 1.3; letter-spacing: -0.015em; color: #f5f5f7;
  white-space: normal; position: relative; z-index: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hm-disc-meta { font-size: 0.82rem; color: var(--hm-muted); margin-top: 8px; position: relative; z-index: 1; }
.hm-disc-people {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  color: var(--hm-muted-2); font-weight: 600; font-size: 0.82rem; position: relative; z-index: 1;
}
.hm-disc-people svg { width: 15px; height: 15px; }
.hm-disc-progress { display: flex; align-items: center; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.hm-disc-bar { flex: 1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.hm-disc-bar span { display: block; height: 100%; border-radius: inherit; background: var(--a); }
.hm-disc-pct { font-size: 0.78rem; font-weight: 700; color: var(--hm-muted); font-variant-numeric: tabular-nums; }
.hm-disc-empty { grid-column: 1 / -1; padding: 28px; text-align: center; color: var(--hm-muted); font-size: 0.88rem; }

/* ── Rail cards ───────────────────────────────────────────── */
.hm-card {
  background: var(--hm-glass); border: 1px solid var(--hm-line); border-radius: 22px; padding: 22px;
  backdrop-filter: var(--hm-blur);
  -webkit-backdrop-filter: var(--hm-blur);
  box-shadow: var(--hm-shadow);
}
.hm-card-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--hm-muted-2); margin-bottom: 18px;
}
.hm-card-ic { display: inline-flex; align-items: center; }
.hm-card-ic svg { width: 16px; height: 16px; display: block; }
.hm-live-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: hmLivePulse 2.2s ease-in-out infinite;
}
@keyframes hmLivePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }
.hm-nov-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: #a78bfa; box-shadow: 0 0 8px rgba(167, 139, 250, 0.55);
}

/* Three plain headline stats in a row */
.hm-live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.hm-stat { padding: 0; background: none; border: none; }
.hm-stat-num { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #f5f5f7; line-height: 1; letter-spacing: -0.03em; }
.hm-stat-num.is-green { color: #5fe08a; }
.hm-stat-num.is-cyan { color: #6fe3f2; }
.hm-stat-lbl { font-size: 0.68rem; color: var(--hm-muted-2); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 7px; }

/* Overlapping avatar stack + wide "+N" pill */
.hm-online-title { font-size: 0.76rem; color: var(--hm-muted); margin-bottom: 12px; }
.hm-online-list { display: flex; flex-wrap: nowrap; gap: 0; align-items: center; }
.hm-av {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.82rem; font-weight: 700; color: #fff; overflow: hidden; text-decoration: none;
  border: 2px solid #101016; margin-left: -11px;
  transition: transform .14s ease;
}
.hm-av:first-child { margin-left: 0; }
.hm-av:hover { transform: translateY(-3px) scale(1.06); z-index: 2; }
.hm-av img { width: 100%; height: 100%; object-fit: cover; }
.hm-av-more {
  margin-left: -11px; width: auto; min-width: 44px; padding: 0 12px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--hm-muted);
  font-size: 0.78rem; font-weight: 700; border: 2px solid #101016;
}
.hm-online-empty { color: var(--hm-muted); font-size: 0.84rem; }

/* "Ver todos" button */
.hm-see-all {
  display: block; width: 100%; margin-top: 18px; padding: 12px;
  border-radius: 999px; border: 1px solid var(--hm-line); background: transparent;
  color: var(--text-primary); text-align: center; font-weight: 600; font-size: 0.86rem;
  text-decoration: none; transition: background .15s ease, border-color .15s ease;
}
.hm-see-all:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.18); }

/* ── Novedades ────────────────────────────────────────────── */
.hm-updates { display: flex; flex-direction: column; gap: 16px; }
.hm-update { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--hm-line-soft); }
.hm-update:last-child { border-bottom: none; padding-bottom: 0; }
.hm-update-top { display: flex; align-items: center; gap: 8px; }
.hm-update-tag { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.hm-update-tag.nuevo { background: rgba(34, 197, 94, 0.14); color: #86efac; }
.hm-update-tag.mejora { background: rgba(124, 58, 237, 0.16); color: #c4b5fd; }
.hm-update-tag.arreglo { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.hm-update-tag.aviso { background: rgba(34, 211, 238, 0.12); color: #67e8f9; }
.hm-update-title { font-weight: 600; font-size: 0.92rem; }
.hm-update-body { font-size: 0.82rem; color: var(--hm-muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-card-more { display: inline-block; margin-top: 16px; color: #a78bfa; font-size: 0.84rem; font-weight: 600; text-decoration: none; }
.hm-card-more:hover { text-decoration: underline; }
.hm-skel { color: var(--hm-muted-2); font-size: 0.86rem; padding: 8px 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hm-content { padding: 32px 28px 110px; }
  .hm-grid { grid-template-columns: 1fr; gap: 36px; }
  .hm-rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .hm-rail .hm-card { flex: 1; min-width: 280px; }
}
@media (max-width: 560px) {
  .hm-content { padding: 24px 18px 90px; }
  .hm-hero { padding-bottom: 22px; margin-bottom: 28px; }
  .hm-hero-avatar { width: 50px; height: 50px; }
  .hm-hero-hi { font-size: 1.5rem; }
  .hm-main { gap: 38px; }
  .hm-shortcuts { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  .hm-shortcut { padding: 16px 14px; gap: 12px; }
  .hm-rail { flex-direction: column; }
}

/* ============================================================
   ENTRANCE ANIMATIONS (on load) — same staggered fade-up feel as
   the landing's reveals. We animate the STABLE wrappers with a
   rise (they're never hover-translated, so fill:both is safe) and
   fade the inner tiles in with a stagger using OPACITY ONLY, so the
   cards' hover translateY keeps working. Live-updated blocks
   (online avatars / stats) are intentionally not targeted so they
   don't re-animate on every socket tick.
   ============================================================ */
@keyframes hmRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes hmFadeIn { from { opacity: 0; } to { opacity: 1; } }

.hm-hero,
.hm-main > .hm-section,
.hm-rail > .hm-card {
  animation: hmRise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hm-hero { animation-delay: 0.04s; }
.hm-main > .hm-section:nth-child(1) { animation-delay: 0.12s; }
.hm-main > .hm-section:nth-child(2) { animation-delay: 0.20s; }
.hm-rail > .hm-card:nth-child(1) { animation-delay: 0.16s; }
.hm-rail > .hm-card:nth-child(2) { animation-delay: 0.24s; }

/* Inner tiles cascade in (opacity only → hover transforms stay intact) */
.hm-shortcuts > .hm-shortcut,
.hm-discover > .hm-disc {
  animation: hmFadeIn 0.55s ease both;
}
.hm-shortcuts > .hm-shortcut:nth-child(1) { animation-delay: 0.20s; }
.hm-shortcuts > .hm-shortcut:nth-child(2) { animation-delay: 0.26s; }
.hm-shortcuts > .hm-shortcut:nth-child(3) { animation-delay: 0.32s; }
.hm-shortcuts > .hm-shortcut:nth-child(4) { animation-delay: 0.38s; }
.hm-shortcuts > .hm-shortcut:nth-child(5) { animation-delay: 0.44s; }
.hm-shortcuts > .hm-shortcut:nth-child(6) { animation-delay: 0.50s; }
.hm-shortcuts > .hm-shortcut:nth-child(n+7) { animation-delay: 0.56s; }
.hm-discover > .hm-disc:nth-child(1) { animation-delay: 0.06s; }
.hm-discover > .hm-disc:nth-child(2) { animation-delay: 0.12s; }
.hm-discover > .hm-disc:nth-child(3) { animation-delay: 0.18s; }
.hm-discover > .hm-disc:nth-child(4) { animation-delay: 0.24s; }
.hm-discover > .hm-disc:nth-child(n+5) { animation-delay: 0.30s; }

/* Cinematic bg: lighter on phones, off when motion is reduced. */
@media (max-width: 760px) {
  .hm-video video { opacity: 0.35; }
}
:root[data-theme="light"] .hm-video video { opacity: 0.28; }

/* Respect reduced motion — no entrance/scroll/video motion. */
@media (prefers-reduced-motion: reduce) {
  .hm-live-dot { animation: none !important; }
  .hm-shortcuts.is-editing .hm-shortcut { animation: none !important; }
  .hm-video video { display: none; }
  .hm-hero,
  .hm-main > .hm-section,
  .hm-rail > .hm-card,
  .hm-shortcuts > .hm-shortcut,
  .hm-discover > .hm-disc { animation: none !important; opacity: 1 !important; transform: none !important; }
}
:root[data-reduce-motion] .hm-video video { display: none; }
:root[data-reduce-motion] .hm-hero,
:root[data-reduce-motion] .hm-main > .hm-section,
:root[data-reduce-motion] .hm-rail > .hm-card,
:root[data-reduce-motion] .hm-shortcuts > .hm-shortcut,
:root[data-reduce-motion] .hm-discover > .hm-disc { animation: none !important; opacity: 1 !important; transform: none !important; }

/* ============================================================
   SVG line-icon sizing/coloring (replaces the old emojis).
   ============================================================ */
/* Topbar (mobile) */
.tienda-topbar-title { display: inline-flex; align-items: center; gap: 8px; }
.hm-topbar-ic { width: 19px; height: 19px; }

/* Shortcut tiles — tinted line icon in a soft accent box */
.hm-shortcut-ic {
  color: color-mix(in srgb, var(--c) 72%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
}
.hm-shortcut-ic svg { width: 24px; height: 24px; display: block; }
.hm-shortcut:hover .hm-shortcut-ic {
  color: color-mix(in srgb, var(--c) 55%, #ffffff);
  background: color-mix(in srgb, var(--c) 22%, transparent);
}
.hm-sc-empty .hm-shortcut-ic { color: var(--hm-muted); border-color: var(--hm-line); }

/* Balance pill */
.hm-balance-ic { display: inline-flex; align-items: center; color: #f5b544; }
.hm-balance-ic svg { width: 18px; height: 18px; display: block; }
.hm-balance-plus svg { width: 13px; height: 13px; display: block; }

/* Streak modal sub-headers + inline coins */
.hm-streak-sub { display: flex; align-items: center; gap: 8px; }
.hm-sub-ic { width: 17px; height: 17px; flex-shrink: 0; }
.hm-streak-sub .hm-sub-ic { color: #c4b5fd; }
.hm-coin-sm { width: 13px; height: 13px; vertical-align: -2px; color: #f5b544; }

/* Friend streak fire */
.hm-fs-streak { display: inline-flex; align-items: center; gap: 5px; }
.hm-fs-streak svg { width: 15px; height: 15px; }
.hm-fs-streak.is-alive svg { filter: drop-shadow(0 0 4px rgba(249, 115, 22, 0.5)); }

/* Edit shortcuts button */
.hm-edit-btn { display: inline-flex; align-items: center; gap: 6px; }
.hm-edit-btn svg { width: 14px; height: 14px; }
