/* Mi app: sistema visual
   Paleta de gráficos: paleta categórica validada (azul, naranja, aqua, amarillo, magenta…).
   Marca: azul mediterráneo sobre blancos cálidos (la luz del Mediterráneo). */
:root {
  color-scheme: light;
  --page: #f6f4f0;
  --surface: #ffffff;
  --surface-2: #faf8f5;
  --ink: #1b2430;
  --ink-2: #4b5563;
  --muted: #8b8f97;
  --line: #ebe7e0;
  --line-strong: #dcd6cc;

  --brand-1: #1d4e89;
  --brand-2: #2b8cc4;
  --brand-grad: linear-gradient(135deg, #1d4e89 0%, #2b8cc4 100%);
  --accent: #1f6fb2;

  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s7: #6250d6; --s8: #e34948;
  --pos: #0f8a5f; --pos-bg: #e3f6ee; --neg: #d03b3b; --neg-bg: #fdecec;
  --warn: #9a6a00; --warn-bg: #fff4d6;
  --good: #0ca30c; --warning: #fab219; --critical: #d03b3b;  /* estado (recuperación Whoop), siempre con etiqueta */

  --fin: #2a78d6; --fin-bg: #e6f0fc;
  --wb: #1baf7a;  --wb-bg: #e2f6ee;
  --cul: #e87ba4; --cul-bg: #fcebf2;
  --pat: #6250d6; --pat-bg: #ece9fb;

  --sidebar: #fbfaf7;
  --sidebar-2: #f6f3ee;
  --sidebar-ink: #4b5563;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(18, 20, 42, .04), 0 6px 24px rgba(18, 20, 42, .06);
  --shadow-lg: 0 12px 40px rgba(42, 60, 140, .18);
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0c0d18; --surface: #161829; --surface-2: #1c1f33; --ink: #eef0fa; --ink-2: #b9bcd3; --muted: #80839c;
    --line: #262a42; --line-strong: #333852;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s7: #9085e9; --s8: #e66767;
    --pos: #3ccf95; --pos-bg: #12301f; --neg: #f07470; --neg-bg: #3a1a1c; --warn: #f0c96a; --warn-bg: #352a10;
    --fin-bg: #172a45; --wb-bg: #123326; --cul-bg: #3a1a2a; --pat-bg: #241f48;
    --sidebar: #090a14; --sidebar-2: #12142a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { flex: none; vertical-align: -0.2em; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--sidebar-ink); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
}
.logo { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; color: #fff; }
.logo:hover { text-decoration: none; }
.logo img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 18px rgba(98, 80, 214, .45); }
.logo b { display: block; font-size: 1.05rem; letter-spacing: -.01em; }
.logo small { display: block; color: var(--sidebar-ink); opacity: .7; font-size: .75rem; }
.nav-group { margin-top: 14px; }
.nav-title { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #7d80a3; padding: 6px 12px; display: flex; align-items: center; gap: 8px; }
.nav-title .dot { width: 8px; height: 8px; border-radius: 50%; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--sidebar-ink); font-size: .92rem; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 3px 0 0 #8f80ff; }
.nav a.soon { opacity: .45; pointer-events: none; }
.nav a .tag { margin-left: auto; font-size: .65rem; background: rgba(255, 255, 255, .1); color: #fff; padding: 1px 7px; border-radius: 99px; }
/* Secciones desplegables del menú con iconos */
.nav-group { margin-top: 8px; border-radius: 14px; }
.nav-group[open] { background: rgba(255, 255, 255, .04); }
.nav-section { list-style: none; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; color: #fff; font-weight: 600; font-size: .95rem; user-select: none; }
.nav-section::-webkit-details-marker { display: none; }
.nav-section:hover { background: rgba(255, 255, 255, .06); }
.nav-section .chip { width: 32px; height: 32px; border-radius: 10px; }
.nav-section .chip.fin { background: rgba(42, 120, 214, .22); color: #8cbcf5; }
.nav-section .chip.wb { background: rgba(27, 175, 122, .22); color: #6fdcb2; }
.nav-section .chip.cul { background: rgba(232, 123, 164, .22); color: #f3a9c5; }
.nav-section .chev { margin-left: auto; opacity: .6; transition: transform .2s ease; }
.nav-section .tag { margin-left: auto; font-size: .65rem; background: rgba(255, 255, 255, .1); color: #fff; padding: 1px 7px; border-radius: 99px; border: 0; }
.nav-group[open] .chev { transform: rotate(180deg); }
a.nav-section { margin-top: 6px; }
a.nav-section:hover { text-decoration: none; }
a.nav-section.active { background: rgba(255, 255, 255, .1); box-shadow: inset 3px 0 0 #8f80ff; }
a.nav-section.soon { opacity: .55; }
/* Pestañas con iconos grandes de la sección, encima del contenido */
.section-tabs { display: flex; gap: 6px; padding: 6px; margin: -6px 0 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); overflow-x: auto; }
.section-tabs a { flex: 1 0 auto; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 12px;
  border-radius: 13px; color: var(--ink-2); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.section-tabs a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.section-tabs a.active { background: var(--brand-grad); color: #fff; box-shadow: 0 6px 16px rgba(42, 120, 214, .25); }
.section-tabs .sec-home { flex: 0 0 auto; min-width: 0; justify-content: center; padding: 8px; }
.section-tabs .sec-home .chip { width: 44px; height: 44px; border-radius: 12px; }
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.hub-card { display: flex; flex-direction: column; gap: 10px; margin: 0; color: var(--ink); padding: 26px 22px; transition: transform .15s ease, box-shadow .15s ease; }
.hub-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.hub-card .chip { width: 60px; height: 60px; border-radius: 18px; }
.hub-card b { font-size: 1.15rem; }
.nav-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 8px 10px; animation: drop .18s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sidebar { overflow-x: hidden; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 2px 8px; border-radius: 12px; color: var(--sidebar-ink); font-size: .68rem; text-align: center; line-height: 1.15; min-width: 0; overflow-wrap: anywhere; }
.tile:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.tile.active { background: rgba(143, 128, 255, .22); color: #fff; box-shadow: inset 0 0 0 1px rgba(143, 128, 255, .5); }
.sidebar-foot { margin-top: auto; padding: 14px 12px 0; font-size: .78rem; color: #8f92b3; display: grid; gap: 8px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #3ccf95; box-shadow: 0 0 0 3px rgba(60, 207, 149, .2); }
.status-dot.off { background: #f0c96a; box-shadow: 0 0 0 3px rgba(240, 201, 106, .2); }
.main { min-width: 0; }
.content { max-width: 1240px; margin: 0 auto; padding: 30px 32px 80px; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; gap: 2px; }
  .logo { padding: 4px 8px; width: 100%; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; width: 100%; }
  .nav-group { margin: 0; width: 100%; }
  .nav-tiles { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .nav-title, .sidebar-foot { display: none; }
  .nav a { padding: 6px 10px; font-size: .85rem; }
  .content { padding: 20px 16px 60px; }
}

/* ---------- Tipografía y cabeceras ---------- */
h1 { font-size: 1.85rem; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
h2 { font-size: 1.2rem; letter-spacing: -.01em; margin: 28px 0 12px; }
h3 { font-size: .98rem; margin: 0 0 12px; letter-spacing: -.005em; }
.eyebrow { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.row.between:has(> h1) { margin-bottom: 20px; }
.content > h1 { margin-bottom: 20px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
table.card { padding: 0; overflow: hidden; display: table; border-collapse: separate; border-spacing: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .grid2, .grid2 + .card, .kpis + .grid2 { margin-top: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 18px; }
.grid3 > .card { margin-bottom: 0; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.chip { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; }
.chip.fin { background: var(--fin-bg); color: var(--fin); }
.chip.wb { background: var(--wb-bg); color: var(--wb); }
.chip.cul { background: var(--cul-bg); color: var(--cul); }
.chip.pat { background: var(--pat-bg); color: var(--pat); }
.chip.pos { background: var(--pos-bg); color: var(--pos); }
.chip.neg { background: var(--neg-bg); color: var(--neg); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: grid; gap: 2px; align-content: start; }
.kpi > span:first-child { color: var(--muted); font-size: .8rem; font-weight: 600; }
.kpi strong { font-size: 1.55rem; letter-spacing: -.02em; line-height: 1.25; }
.kpi .small, .kpi > span.small { color: var(--muted); font-size: .76rem; }
.kpi.with-icon { grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
.kpi.with-icon .chip { grid-row: span 3; }

/* ---------- Héroe ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 28px 30px; color: #fff; margin-bottom: 20px;
  background: radial-gradient(1200px 400px at 110% -40%, rgba(255, 255, 255, .25), transparent 60%), var(--brand-grad);
  box-shadow: var(--shadow-lg);
}
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.hero .eyebrow { color: rgba(255, 255, 255, .75); }
.hero .big { font-size: clamp(2.2rem, 4vw, 3.1rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0; }
.hero .sub { color: rgba(255, 255, 255, .85); }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.hero-stat { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(6px); }
.hero-stat span { display: block; font-size: .75rem; color: rgba(255, 255, 255, .78); }
.hero-stat b { font-size: 1.2rem; letter-spacing: -.01em; }
.seg { position: relative; z-index: 1; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 12px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); }
.seg button { font: 600 .82rem var(--font); color: rgba(255, 255, 255, .85); background: transparent; border: 0; border-radius: 9px; padding: 6px 14px; cursor: pointer; }
.seg button:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.seg button.active { background: #fff; color: var(--brand-1); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.view[hidden] { display: none; }
.private > summary { list-style: none; }
.private > summary::-webkit-details-marker { display: none; }
.private-bar { display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
.private-bar:hover { border-color: var(--line-strong); }
.private-bar .dots { margin-left: auto; font-size: 1.3rem; letter-spacing: .1em; color: var(--muted); }
.private[open] > .private-bar { margin-bottom: 12px; }
.private[open] .dots { visibility: hidden; }
.hero.wb { background: radial-gradient(1200px 400px at 110% -40%, rgba(255, 255, 255, .25), transparent 60%), linear-gradient(135deg, #0f8a5f 0%, #1baf7a 55%, #2a9fd6 100%); }

/* ---------- Cabeceras con foto ---------- */
.photo-hero { position: relative; overflow: hidden; border-radius: 28px; min-height: 360px; margin-bottom: 22px;
  display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow-lg); isolation: isolate; background: #12142a; }
.photo-hero.small { min-height: 230px; }
.photo-hero .slide { position: absolute; inset: 0; background-size: cover; opacity: 0; transform: scale(1.06);
  transition: opacity 1.6s ease, transform 9s ease-out; z-index: -2; }
.photo-hero .slide.on { opacity: 1; transform: scale(1); }
.photo-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 12, 30, .05) 0%, rgba(10, 12, 30, .15) 40%, rgba(10, 12, 30, .72) 100%),
              linear-gradient(90deg, rgba(10, 12, 30, .45) 0%, rgba(10, 12, 30, 0) 60%); }
.photo-hero-content { padding: 32px 34px; max-width: 640px; }
.photo-hero-content h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.2rem); letter-spacing: -.03em; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.photo-hero-content p { margin: 6px 0 0; color: rgba(255, 255, 255, .88); font-size: 1.05rem; }
.photo-hero .eyebrow { color: rgba(255, 255, 255, .8); }
.photo-caption { position: absolute; right: 18px; bottom: 16px; font-size: .78rem; color: rgba(255, 255, 255, .85);
  background: rgba(10, 12, 30, .35); backdrop-filter: blur(8px); padding: 4px 12px; border-radius: 99px; letter-spacing: .02em; }
.photo-caption:empty { display: none; }
.btn.glass { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(8px); box-shadow: none; }
@media (max-width: 700px) { .photo-hero { min-height: 280px; border-radius: 20px; } .photo-hero-content { padding: 22px; } }

/* Foto muy tenue de fondo en la barra lateral */
.sidebar { position: sticky; isolation: isolate; }
.sidebar::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--side-photo, none);
  background-size: cover; background-position: center 60%; opacity: .16; mix-blend-mode: luminosity; pointer-events: none; }
.sidebar::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 20, 42, .2) 0%, rgba(18, 20, 42, .85) 70%); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.split-col + .split-col { border-left: 1px solid var(--line); padding-left: 22px; }
@media (max-width: 760px) { .split-col + .split-col { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; } }

/* Mis fotos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.photo-card { padding: 10px; margin: 0; display: grid; gap: 10px; }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }

/* ---------- Tarjetas de área (portada) ---------- */
.area-card { display: block; color: var(--ink); position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.area-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.area-card .big { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.area-card .stripe { position: absolute; inset: 0 0 auto 0; height: 4px; }
.area-card.soon { opacity: .6; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mini-stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.mini-stats span { display: block; font-size: .72rem; color: var(--muted); }
.mini-stats b { font-size: .98rem; }

/* ---------- Tablas ---------- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; background: var(--surface-2); }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
.card table th { background: transparent; }
.card table th:first-child, .card table td:first-child { padding-left: 0; }
table.card th:first-child, table.card td:first-child { padding-left: 20px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.scroll { overflow-x: auto; margin: 12px 0; }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-grad); color: #fff; border: 0; border-radius: 12px; padding: 10px 18px; font: 600 .92rem var(--font); cursor: pointer; box-shadow: 0 6px 16px rgba(42, 120, 214, .25); transition: transform .1s ease, filter .1s ease; }
.btn:hover { filter: brightness(1.07); text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary { background: var(--surface); color: var(--accent); border: 1px solid var(--line-strong); box-shadow: none; }
.btn.secondary:hover { border-color: var(--accent); }
.btn.white { background: #fff; color: var(--brand-1); box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.btn.small { padding: 6px 12px; font-size: .82rem; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.danger { color: var(--neg); }
select, input[type=search], input[type=file], input[type=text], input[type=number], input[type=date], textarea {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); outline: none;
}
input[type=text], input[type=number], input[type=date], textarea { width: 100%; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42, 120, 214, .18); }
input[type=file] { padding: 7px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; align-items: end; }
.form-grid label, .mapping label { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.form-grid .wide { grid-column: 1 / -1; }
.mapping { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.upload { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.catform { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.catform select { padding: 4px 8px; font-size: .85rem; }
details > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .88rem; }
details[open] > summary { margin-bottom: 12px; }

/* ---------- Avisos, etiquetas, barras ---------- */
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: .92rem; border: 1px solid transparent; }
.flash.ok { background: var(--pos-bg); color: var(--pos); border-color: rgba(15, 138, 95, .2); }
.flash.err { background: var(--neg-bg); color: var(--neg); border-color: rgba(208, 59, 59, .2); }
.flash.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(154, 106, 0, .2); }
.tag { font-size: .72rem; background: var(--surface-2); color: var(--ink-2); padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line); }
.src { font-size: .7rem; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.src-claude { background: var(--pat-bg); color: var(--pat); border-color: transparent; }
.src-manual { background: var(--pos-bg); color: var(--pos); border-color: transparent; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.pill.pos { background: var(--pos-bg); color: var(--pos); }
.pill.neg { background: var(--neg-bg); color: var(--neg); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.score { display: inline-block; min-width: 28px; text-align: center; border-radius: 8px; padding: 2px 7px; font-weight: 700; font-size: .82rem; }
.score-1, .score-2 { background: var(--neg-bg); color: var(--neg); }
.score-3 { background: var(--warn-bg); color: var(--warn); }
.score-4, .score-5 { background: var(--pos-bg); color: var(--pos); }
.bar { height: 8px; border-radius: 99px; background: var(--brand-grad); }
.track { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.track > .bar { border-radius: 0; }
.progress-lg { height: 14px; }
.hint { border-left: 3px solid var(--accent); padding: 8px 12px; background: var(--surface-2); border-radius: 0 10px 10px 0; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .85em; }

/* ---------- Gráficos ---------- */
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 320px; }
.chart-box.donut { height: 220px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .82rem; color: var(--ink-2); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; }
@media (max-width: 600px) { .donut-wrap { grid-template-columns: 1fr; } }
.rank { display: grid; gap: 10px; }
.rank-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: .88rem; }
.rank-row .track { grid-column: 1 / -1; height: 6px; border: 0; }

/* ---------- Entreno ---------- */
.week { display: grid; gap: 8px; }
.day { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.day > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; color: var(--ink); font-weight: 400; font-size: .92rem; }
.day > summary::-webkit-details-marker { display: none; }
.day[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 0; }
.day > .session { padding: 14px 16px; }
.day.today { border-color: var(--wb); box-shadow: 0 0 0 3px var(--wb-bg); }
.day.rest { opacity: .75; }
.day-name { width: 34px; font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: .75rem; }
.day-title { display: flex; flex-direction: column; line-height: 1.3; }
.block { border-left: 3px solid var(--line-strong); padding: 2px 0 2px 12px; margin-bottom: 12px; }
.block-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.block ul { margin: 6px 0 0; padding-left: 18px; }
.block li { margin-bottom: 4px; font-size: .9rem; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.option { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; transition: transform .12s ease, border-color .12s ease; }
.option:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--wb); box-shadow: 0 0 0 3px var(--wb-bg); }
.option:disabled { cursor: wait; opacity: .6; }
.option.loading { opacity: 1; border-color: var(--wb); box-shadow: 0 0 0 3px var(--wb-bg); }
.option .emoji { font-size: 1.9rem; line-height: 1; }
.option small { color: var(--muted); font-size: .72rem; }
.exercises { list-style: none; padding-left: 0 !important; }
.exercises li { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.ex-pics { display: flex; gap: 4px; flex: none; cursor: zoom-in; }
.ex-pics img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.exercises li.zoom { flex-direction: column; }
.exercises li.zoom .ex-pics { cursor: zoom-out; }
.exercises li.zoom .ex-pics img { width: min(260px, 42vw); height: auto; }
.propose { display: flex; flex-wrap: wrap; gap: 8px; }
.propose .tag { cursor: pointer; font: 600 .86rem var(--font); padding: 8px 14px; }
.propose .tag:hover { border-color: var(--accent); color: var(--accent); }
details.card > summary { cursor: pointer; }

/* ---------- Chat ---------- */
.chat { padding: 0; display: flex; flex-direction: column; height: calc(100vh - 260px); min-height: 420px; overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chat-empty { margin: auto; text-align: center; max-width: 560px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.suggest .tag { cursor: pointer; font: inherit; font-size: .84rem; padding: 7px 12px; }
.suggest .tag:hover { border-color: var(--accent); color: var(--accent); }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 85%; }
.msg.user { align-self: flex-end; }
.msg .bubble { padding: 10px 14px; border-radius: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--brand-grad); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.assistant .bubble { background: var(--surface-2); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg.assistant .bubble > :first-child { margin-top: 0; }
.msg.assistant .bubble > :last-child { margin-bottom: 0; }
.msg.assistant .bubble h2 { font-size: 1rem; }
.msg .avatar { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--brand-grad); color: #fff; margin-top: 2px; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-input textarea { resize: none; min-height: 44px; }
.chat-input .btn { padding: 0 16px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Varios ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty .chip { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 10px; }
.pager { display: flex; gap: 16px; justify-content: center; margin-top: 14px; }
.cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, var(--pat-bg), var(--fin-bg)); border: 0; }
.cta h3 { margin-bottom: 4px; }
.cta p { margin: 0; }
.analysis-layout { display: grid; grid-template-columns: 1fr 250px; gap: 18px; align-items: start; }
@media (max-width: 860px) { .analysis-layout { grid-template-columns: 1fr; } }
.report { line-height: 1.7; font-size: .97rem; }
.report h2 { margin-top: 1.6em; font-size: 1.15rem; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.report h2:first-of-type { margin-top: .4em; }
.report li { margin-bottom: 4px; }
.report strong { color: var(--ink); }
.history ul { list-style: none; padding: 0; margin: 0; }
.history li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.history li.active a { font-weight: 700; }
.goal { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.goal .numbers { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin-top: 6px; }
@media (max-width: 600px) { .goal { grid-template-columns: 1fr; } }

/* ================= Revisión de diseño: barra lateral clara y fotos nítidas ================= */
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); color: var(--ink-2); }
.sidebar::before, .sidebar::after { display: none; }
.logo { color: var(--ink); }
.logo img { box-shadow: 0 6px 16px rgba(29, 78, 137, .22); }
.logo small { color: var(--muted); opacity: 1; }
.nav a { color: var(--ink-2); }
.nav a:hover { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(27, 36, 48, .05); }
.nav a.active, a.nav-section.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 36, 48, .08), inset 3px 0 0 var(--accent); }
.nav-section { color: var(--ink); }
.nav-section:hover { background: var(--surface); }
.nav-section .chip.fin { background: var(--fin-bg); color: var(--fin); }
.nav-section .chip.wb { background: var(--wb-bg); color: var(--wb); }
.nav-section .chip.cul { background: var(--cul-bg); color: var(--cul); }
.nav-section .tag, .nav a .tag { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.sidebar-foot { color: var(--muted); border-top: 1px solid var(--line); margin-top: auto; padding-top: 14px; }
.sidebar-foot .link { color: var(--muted) !important; }
.hero { background: var(--brand-grad); box-shadow: 0 12px 34px rgba(29, 78, 137, .2); }
.btn { box-shadow: 0 6px 16px rgba(29, 78, 137, .2); }
.section-tabs a.active { box-shadow: 0 6px 16px rgba(29, 78, 137, .2); }
.tile.active { background: var(--surface); }
.cta { background: linear-gradient(135deg, #eef4fb, #f3efe8); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .cta { background: var(--surface-2); } }

/* Portada: saludo + mosaico de fotos verticales a su tamaño natural (sin ampliar ni recortar en horizontal) */
.mosaic-hero { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.35fr); gap: 18px; margin-bottom: 22px; align-items: stretch; }
.mosaic-hero .welcome { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 34px 32px;
  display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--shadow); }
.mosaic-hero .welcome h1 { font-size: clamp(2rem, 3.4vw, 2.9rem); letter-spacing: -.03em; margin: 6px 0 8px; }
.mosaic-hero .welcome p { margin: 0 0 20px; color: var(--muted); font-size: 1.02rem; }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; height: 440px; }
.mosaic .col { position: relative; overflow: hidden; border-radius: 22px; background: var(--line); box-shadow: var(--shadow); }
.mosaic .col:nth-child(2) { margin-top: 28px; }
.mosaic .col:nth-child(3) { margin-bottom: 28px; }
.mosaic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.mosaic img.on { opacity: 1; }
.mosaic .where { position: absolute; left: 10px; bottom: 10px; font-size: .72rem; color: #fff; background: rgba(15, 20, 30, .38);
  backdrop-filter: blur(6px); padding: 3px 10px; border-radius: 99px; }
.mosaic .where:empty { display: none; }
.mosaic-hero.small .mosaic { height: 250px; }
.mosaic-hero.small .mosaic .col:nth-child(2) { margin-top: 18px; }
.mosaic-hero.small .mosaic .col:nth-child(3) { margin-bottom: 18px; }
@media (max-width: 900px) {
  .mosaic-hero { grid-template-columns: 1fr; }
  .mosaic { height: 300px; }
}

/* ---------- Entreno: tarjetas de ejercicio y modo entreno ---------- */
.session-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.start-btn { font-size: 1rem; padding: 12px 22px; }
.progress-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.progress-line .track { flex: 1; height: 10px; }
.progress-line .bar { height: 100%; border-radius: 0; transition: width .3s ease; }
.goal-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.goal-box p { margin: 8px 0 0; }
.wblock { margin-top: 18px; }
.wblock-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.num-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-grad); color: #fff; font-weight: 700; font-size: .85rem; }
.ex-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.ex-card { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--surface); transition: border-color .15s ease, opacity .2s ease; }
.ex-card:hover { border-color: var(--line-strong); }
.ex-card.done { opacity: .55; }
.ex-card.done .ex-name { text-decoration: line-through; }
.ex-photo { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.ex-photo img { width: 100%; height: 100%; object-fit: cover; }
.ex-name { display: block; line-height: 1.3; }
.ex-reps { display: inline-block; margin-top: 4px; font-weight: 700; color: var(--accent); background: var(--fin-bg); padding: 2px 10px; border-radius: 8px; font-size: .9rem; }
.ex-how { margin-top: 6px; }
.ex-how summary { font-size: .78rem; color: var(--muted); font-weight: 600; }
.ex-how p { margin: 6px 0 0; font-size: .85rem; color: var(--ink-2); }
.ex-check { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); color: transparent;
  cursor: pointer; display: grid; place-items: center; transition: all .15s ease; }
.ex-check:hover { border-color: var(--wb); color: var(--wb); }
.ex-card.done .ex-check { background: var(--wb); border-color: var(--wb); color: #fff; }

.wmode { position: fixed; inset: 0; z-index: 50; background: var(--page); display: flex; flex-direction: column; padding: 18px clamp(16px, 4vw, 48px); gap: 14px; }
.wm-top { display: flex; align-items: center; gap: 14px; }
.wm-title { font-weight: 700; font-size: 1.05rem; }
.wm-count { margin-left: auto; color: var(--muted); font-weight: 600; }
.wm-close { border: 0; background: var(--surface); width: 42px; height: 42px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow); color: var(--ink); }
.wm-track { height: 8px; }
.wm-track .bar { height: 100%; border-radius: 0; transition: width .3s ease; }
.wm-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 4vw, 48px); align-items: center; min-height: 0; }
.wm-photo { height: 100%; max-height: 62vh; border-radius: 24px; overflow: hidden; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow); }
.wm-photo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.wm-nophoto { font-size: 5rem; }
.wm-name { font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: -.02em; margin: 6px 0 12px; }
.wm-reps { display: inline-block; font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 800; color: var(--accent); background: var(--fin-bg); padding: 6px 16px; border-radius: 14px; }
.wm-notes { color: var(--ink-2); font-size: 1.05rem; line-height: 1.6; margin-top: 16px; }
.wm-rest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wm-timer { font-size: 1.8rem; font-weight: 800; min-width: 90px; text-align: center; font-variant-numeric: tabular-nums; }
.wm-timer.ending { color: var(--neg); }
.wm-nav { display: flex; gap: 12px; justify-content: center; }
.wm-nav .btn { font-size: 1.1rem; padding: 14px 28px; }
@media (max-width: 760px) { .wm-main { grid-template-columns: 1fr; } .wm-photo { max-height: 34vh; } .ex-list { grid-template-columns: 1fr; } }

/* ---------- Cultura ---------- */
.stars { color: #f0a500; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: var(--line-strong); }
.stars .half { background: linear-gradient(90deg, #f0a500 50%, var(--line-strong) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rate { display: flex; align-items: center; gap: 2px; }
.rate button { border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--line-strong); cursor: pointer; padding: 0 1px; }
.rate button.on { color: #f0a500; }
.rate button.half { background: linear-gradient(90deg, #f0a500 50%, var(--line-strong) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rate-val { margin-left: 8px; }
.diary-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); list-style: none; cursor: pointer; }
.diary-row::-webkit-details-marker { display: none; }
.diary-row .emoji { font-size: 1.6rem; width: 36px; text-align: center; }
.diary-item[open] .diary-row { border-bottom: 0; }
.tag-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.filters .tag:hover { text-decoration: none; border-color: var(--accent); }
.artists { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.artist { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--ink); font-size: .8rem; }
.artist:hover { text-decoration: none; }
.artist img, .artist > span { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); display: grid; place-items: center; background: var(--surface-2); font-size: 1.6rem; }
.artist b { font-weight: 600; line-height: 1.2; }
.plan-form { display: grid; gap: 16px; }
.plan-q .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: .9rem; transition: all .12s ease; }
.choice span:hover { border-color: var(--accent); }
.choice input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.steps li { margin-bottom: 10px; line-height: 1.6; }
code.copy { font-size: .9rem; padding: 3px 8px; }

/* ---------- Estado del mes ---------- */
.month-hero.over { background: linear-gradient(135deg, #8a3b2e 0%, #c0603f 100%); }
.budget-bar { position: relative; height: 14px; margin-top: 18px; border-radius: 99px; background: rgba(255, 255, 255, .22); overflow: visible; max-width: 520px; }
.budget-bar .forecast { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: rgba(255, 255, 255, .35); }
.budget-bar .spent { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: #fff; z-index: 1; }
.budget-bar .today { position: absolute; top: -5px; bottom: -5px; width: 2px; background: #ffd166; z-index: 2; border-radius: 2px; }

/* ---------- Agenda ---------- */
:root { --age: #c0603f; --age-bg: #fbece4; }
.chip.age, .nav-section .chip.age { background: var(--age-bg); color: var(--age); }
.quick-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.quick-add input[type=text], .quick-add textarea { flex: 1 1 260px; width: auto; }
.quick-add textarea { resize: vertical; min-height: 42px; }
.task { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .ex-check { width: 32px; height: 32px; }
.task.late b { color: var(--neg); }
.event-card { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.event-date { text-align: center; background: var(--age-bg); color: var(--age); border-radius: 12px; padding: 6px 0; line-height: 1.1; }
.event-date b { display: block; font-size: 1.3rem; }
.event-date span { font-size: .72rem; text-transform: uppercase; font-weight: 700; }
.event-cost { text-align: right; display: flex; flex-direction: column; }
.cal { padding: 10px; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head span { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-week { margin-bottom: 6px; }
.cal-day { min-height: 92px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; color: var(--ink); overflow: hidden; }
.cal-day:hover { border-color: var(--accent); text-decoration: none; }
.cal-day.other { opacity: .45; }
.cal-day.today { border: 2px solid var(--accent); background: var(--surface); }
.cal-day .n { font-weight: 700; font-size: .85rem; }
.pill-ev { font-size: .72rem; background: var(--age-bg); color: var(--age); border-radius: 6px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pill-ev.k-viaje { background: var(--fin-bg); color: var(--fin); }
.pill-ev.k-concierto, .pill-ev.k-cine { background: var(--cul-bg); color: var(--cul); }
.pill-ev.k-deporte { background: var(--wb-bg); color: var(--wb); }
.pill-task { font-size: .7rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.shop-item button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); font: inherit; font-size: 1rem; color: var(--ink); cursor: pointer; text-align: left; }
.shop-item button:hover { border-color: var(--wb); }
.shop-item .box { width: 20px; height: 20px; border: 2px solid var(--line-strong); border-radius: 6px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .tag { cursor: pointer; font: inherit; font-size: .82rem; }
.pill-ev.k-boda, .pill-ev.k-cumple { background: var(--k-boda-bg); color: var(--k-boda); }
.pill-ev.k-cena, .pill-ev.k-plan { background: var(--k-cena-bg); color: var(--k-cena); }
.pill-ev.k-medico, .pill-ev.k-trabajo, .pill-ev.k-otro { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.pill-more { font-size: .68rem; color: var(--muted); font-weight: 700; }
.cal-day.sel { border: 2px solid var(--navy); background: color-mix(in srgb, var(--navy) 7%, var(--surface)); }
/* Móvil: en cada día se lee lo que hay (en pequeño), no un puntito */
@media (max-width: 700px) {
  .cal { padding: 8px 6px; }
  .cal-head, .cal-week { gap: 3px; }
  .cal-week { margin-bottom: 3px; }
  .cal-day { min-height: 68px; padding: 4px 3px; border-radius: 9px; gap: 2px; }
  .cal-day .n { font-size: .78rem; padding-left: 2px; }
  .pill-ev, .pill-task { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden;
    overflow-wrap: anywhere; font-size: .6rem; line-height: 1.2; padding: 2px 3px; border-radius: 4px; letter-spacing: -.01em; }
  .pill-ev .em { display: none; }  /* el color ya dice qué es: más sitio para el nombre */
  .pill-task { padding: 0 2px; }
  .pill-more { font-size: .58rem; padding-left: 2px; }
}
.pill-ev.cont { display: block; height: 7px; padding: 0; border-radius: 3px; }
.cal-top { display: grid; grid-template-columns: 40px 1fr 40px auto; align-items: center; gap: 6px; margin: 0 0 4px; }
.cal-title { margin: 0; text-align: center; text-transform: capitalize; font-size: 1.9rem; }
.cal-nav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; color: var(--navy-t);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.cal-sub { text-align: center; margin: 0 0 12px; }
.day-panel-wrap { padding: 14px 16px; margin-top: 12px; scroll-margin-top: 70px; }
.dp-title { margin: 0 0 8px; font-size: 1.05rem; }
.dp-item { border-bottom: 1px solid var(--line); }
.dp-item:last-of-type { border-bottom: 0; }
.dp-ev { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; cursor: pointer; list-style: none; }
.dp-ev::-webkit-details-marker { display: none; }
.dp-edit { color: var(--navy-t); font-weight: 700; }
.dp-item[open] .dp-edit { color: var(--muted); }
.dp-form { padding: 4px 0 14px; }
.dp-emoji { font-size: 1.35rem; line-height: 1.2; text-align: center; }
.dp-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dp-notes { color: var(--ink-2); white-space: pre-wrap; }
.dp-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.dp-task { display: flex; align-items: center; gap: 10px; padding: 8px 0; margin: 0; }
.dp-add { width: 100%; justify-content: center; margin-top: 12px; }
#nuevo, details[id^="ev-"] { scroll-margin-top: 70px; }
.dp-item { scroll-margin-top: 70px; }

/* Inicio: «+» para apuntar algo para hoy */
.sec-actions { display: inline-flex; align-items: center; gap: 12px; }
.sec-plus { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; display: grid; place-items: center;
  cursor: pointer; transition: transform .15s; align-self: center; }
.sec-plus[aria-expanded="true"] { transform: rotate(45deg); }
#addHoy { margin: 0 0 10px; }
.plan-acc { align-items: flex-start; }
.plan-acc .m-row-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.plan-acc-form { margin: 6px 0 2px; }

/* ================= Vista grande del día (estilo Google Calendar) ================= */
.dayview { position: fixed; inset: 0; z-index: 300; background: var(--surface); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.dv-head { display: grid; grid-template-columns: 38px 38px 1fr 38px auto; align-items: center; gap: 4px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
.dv-close, .dv-prev, .dv-next { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--page); font-size: 1.25rem; line-height: 1; color: var(--navy-t); cursor: pointer; }
.dv-prev:disabled, .dv-next:disabled { opacity: .3; cursor: default; }
.dv-title { text-align: center; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.dv-title b { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.dv-title small { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.dv-add { white-space: nowrap; }
.dv-allday { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); max-height: 32vh; overflow: auto; }
.dv-chip { border: 0; border-radius: 8px; padding: 7px 10px; font: 700 .86rem var(--font); cursor: pointer; text-align: left; border-left: 3px solid currentColor; }
.dv-chip small { opacity: .75; font-weight: 600; margin-left: 4px; }
.dv-task { display: flex; align-items: center; gap: 8px; margin: 0; width: 100%; font-size: .9rem; }
.dv-empty { color: var(--muted); font-size: .86rem; }
.dv-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }
.dv-grid { position: relative; height: calc(24 * 52px); margin: 8px 8px 24px 0; }
.dv-hour { position: absolute; left: 0; right: 0; height: 52px; border-top: 1px solid var(--line); }
.dv-hour span { position: absolute; left: 6px; top: -8px; background: var(--surface); padding: 0 4px; font-size: .68rem; color: var(--muted); font-weight: 600; }
.dv-ev { position: absolute; border: 0; border-left: 3px solid currentColor; border-radius: 8px; padding: 4px 8px; text-align: left; overflow: hidden;
  display: flex; flex-direction: column; gap: 1px; font: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); z-index: 1; }
.dv-ev b { font-size: .84rem; line-height: 1.2; }
.dv-ev small { font-size: .74rem; opacity: .85; }
.dv-chip, .dv-ev { background: var(--age-bg); color: var(--age); }
.dv-chip.k-viaje, .dv-ev.k-viaje { background: var(--fin-bg); color: var(--fin); }
.dv-chip.k-concierto, .dv-ev.k-concierto, .dv-chip.k-cine, .dv-ev.k-cine { background: var(--cul-bg); color: var(--cul); }
.dv-chip.k-deporte, .dv-ev.k-deporte { background: var(--wb-bg); color: var(--wb); }
.dv-chip.k-boda, .dv-ev.k-boda, .dv-chip.k-cumple, .dv-ev.k-cumple { background: var(--k-boda-bg); color: var(--k-boda); }
.dv-chip.k-cena, .dv-ev.k-cena, .dv-chip.k-plan, .dv-ev.k-plan { background: var(--k-cena-bg); color: var(--k-cena); }
.dv-now { position: absolute; left: 52px; right: 0; border-top: 2px solid #d93025; z-index: 2; pointer-events: none; }
.dv-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #d93025; }
.dv-detail { position: absolute; left: 10px; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, .22); padding: 14px 16px; max-height: 60vh; overflow: auto; z-index: 5; }
.dv-d-head { display: grid; grid-template-columns: 34px 1fr 30px; gap: 10px; align-items: start; }
.dv-d-head > div { display: flex; flex-direction: column; min-width: 0; }
.dv-d-head small { color: var(--muted); }
.dv-d-em { font-size: 1.6rem; line-height: 1.1; }
.dv-d-close { border: 0; background: none; font-size: 1rem; color: var(--muted); cursor: pointer; }
.dv-detail p { margin: 8px 0 0; }
.dv-d-notes { white-space: pre-wrap; color: var(--ink-2); font-size: .9rem; }
.dv-d-edit { margin-top: 12px; width: 100%; justify-content: center; }
@media (min-width: 901px) { .dayview { inset: 4vh 18vw; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); overflow: hidden; } }

/* ---------- Portada estilo «bienvenida» (foto a todo el ancho, serif) ---------- */
:root { --font-display: Georgia, "Times New Roman", "Times", serif; }
h1, .wh-title, .logo b { font-family: var(--font-display); letter-spacing: -.01em; }
h1 { font-weight: 700; }
.welcome-hero { position: relative; overflow: hidden; border-radius: 26px; min-height: min(68vh, 620px); color: #fff; margin-bottom: 20px;
  display: flex; flex-direction: column; justify-content: space-between; padding: 30px 38px 34px; isolation: isolate; background: #1b2430; box-shadow: var(--shadow-lg); }
.welcome-hero .bg { position: absolute; inset: 0; z-index: -2; background-size: cover; opacity: 0; transition: opacity 2s ease;
  filter: saturate(1.05) contrast(1.03); }
.welcome-hero .bg.on { opacity: 1; }
/* Velo: oscurece y suaviza (además disimula la ampliación de fotos verticales a todo el ancho) */
.welcome-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 22, 34, .82) 0%, rgba(14, 22, 34, .55) 45%, rgba(14, 22, 34, .25) 100%),
              linear-gradient(180deg, rgba(14, 22, 34, .35) 0%, rgba(14, 22, 34, 0) 30%, rgba(14, 22, 34, .5) 100%);
  backdrop-filter: blur(1.5px); }
.wh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.wh-brand { display: flex; align-items: center; gap: 12px; }
.wh-brand img { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.wh-brand b { display: block; font-size: 1.05rem; letter-spacing: .14em; }
.wh-brand span { font-size: .85rem; color: rgba(255, 255, 255, .85); }
.wh-date { font-size: .95rem; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.wh-hello { font-size: 1.25rem; color: rgba(255, 255, 255, .9); }
.wh-title { font-size: clamp(3rem, 7vw, 5.2rem); line-height: 1; margin: 4px 0 18px; color: #fff; text-shadow: 0 3px 24px rgba(0, 0, 0, .35); }
.wh-accent { width: 74px; height: 5px; border-radius: 5px; background: #4fb3e8; margin-bottom: 18px; }
.wh-quote { font-family: var(--font-display); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.45rem); margin: 0 0 24px; color: rgba(255, 255, 255, .95); }
.wh-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.wh-place { position: absolute; right: 22px; bottom: 18px; font-size: .8rem; color: rgba(255, 255, 255, .85); background: rgba(14, 22, 34, .35);
  backdrop-filter: blur(8px); padding: 4px 12px; border-radius: 99px; }
.wh-place:empty { display: none; }
@media (max-width: 700px) { .welcome-hero { padding: 22px; min-height: 480px; } .wh-top { flex-direction: column; } }
.today-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.today-card { margin: 0; color: var(--ink); }
.today-card:hover { text-decoration: none; border-color: var(--line-strong); }
.today-line { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.warn-line { color: var(--age); font-weight: 600; }
.verdict { border-radius: 16px; padding: 16px 20px; margin: -6px 0 18px; font-size: 1.02rem; line-height: 1.6; border: 1px solid transparent; }
.verdict.bad { background: var(--neg-bg); color: #8f2626; border-color: rgba(208, 59, 59, .25); }
.verdict.good { background: var(--pos-bg); color: #0b5e41; border-color: rgba(15, 138, 95, .2); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .verdict.bad { color: var(--neg); } :root:where(:not([data-theme="light"])) .verdict.good { color: var(--pos); } }
/* Cabecera de sección: foto de fondo (no tarjetas de fotos) */
.section-hero { position: relative; overflow: hidden; border-radius: 24px; min-height: 230px; padding: 30px 36px; margin-bottom: 22px;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff; isolation: isolate; background: #1b2430; box-shadow: var(--shadow-lg); }
.section-hero .bg { position: absolute; inset: 0; z-index: -2; background-size: cover; }
.section-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 22, 34, .8) 0%, rgba(14, 22, 34, .45) 55%, rgba(14, 22, 34, .2) 100%); backdrop-filter: blur(1.5px); }
.section-hero h1 { color: #fff; font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin: 4px 0 6px; }
.section-hero p { margin: 0; color: rgba(255, 255, 255, .88); }
.section-hero .eyebrow { color: rgba(255, 255, 255, .8); }
.plan-done { border-top: 1px solid var(--line); padding: 10px 0; }
.plan-done > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.plan-done > summary::-webkit-details-marker { display: none; }
.plan-done form { margin-top: 12px; }
.plan-done.is-done > summary b { color: var(--muted); }
/* Nota 0-10 y Mi biblioteca */
.score { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 999px;
  font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; color: #fff; }
.score.big { min-width: 46px; height: 36px; font-size: 1.15rem; }
.score.s-top { background: #0f8a5f; } .score.s-good { background: #2f7fc1; } .score.s-mid { background: #c98a12; } .score.s-bad { background: #c84a3a; }
.rate10 { display: flex; align-items: center; gap: 10px; }
.rate10 [type=range] { flex: 1; accent-color: var(--accent, #2f7fc1); min-width: 110px; }
.rate10 [type=number] { width: 74px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.lib-h { margin: 26px 0 12px; font-size: 1.25rem; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.lib-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.lib-card > summary { display: flex; flex-direction: column; gap: 4px; cursor: pointer; list-style: none; }
.lib-card > summary::-webkit-details-marker { display: none; }
.lib-done[open] { grid-column: 1 / -1; }
.lib-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.lib-emoji { font-size: 1.8rem; line-height: 1; }
.lib-title { font-size: 1.05rem; line-height: 1.3; }
.lib-note { color: var(--muted); font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-card.now { border-left: 4px solid var(--cul, #8a5cc7); }
.lib-filters { gap: 10px; margin-bottom: 8px; }
.lib-filters [type=search] { flex: 1; min-width: 180px; }
.add-item > summary { cursor: pointer; list-style: none; }
.add-item > summary::-webkit-details-marker { display: none; }
/* ===== Estilo mediterráneo: cal, azul añil, terracota, olivo y arena ===== */
@media (prefers-color-scheme: light) { :root:where(:not([data-theme="dark"])) {
  --page: #f6f1e7; --surface: #fffdf8; --line: #ece3d3; --line-strong: #ddd1bb; --ink: #1d2a3a;
  --sidebar: #fbf7ee;
  --accent: #1d4f91; --brand-grad: linear-gradient(135deg, #17407a 0%, #2a7fb8 100%);
  --fin: #1d4f91; --fin-bg: #e4ecf7;
  --wb: #6b7d3a; --wb-bg: #eef1e1;
  --cul: #c2623a; --cul-bg: #f9e8df;
  --age: #b8862b;
  --pat: #3f6f8f; --pat-bg: #e3eef4;
} }
:root { --azulejo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Crect width='44' height='44' fill='%23fdfaf3'/%3E%3Cg fill='none' stroke='%231d4f91' stroke-width='1.5'%3E%3Ccircle cx='22' cy='22' r='7'/%3E%3Cpath d='M22 2q6 10 0 20q-6-10 0-20zM22 42q6-10 0-20q-6 10 0 20zM2 22q10 6 20 0q-10-6-20 0zM42 22q-10 6-20 0q10-6 20 0z'/%3E%3C/g%3E%3Cg fill='%231d4f91'%3E%3Ccircle cx='0' cy='0' r='5'/%3E%3Ccircle cx='44' cy='0' r='5'/%3E%3Ccircle cx='0' cy='44' r='5'/%3E%3Ccircle cx='44' cy='44' r='5'/%3E%3Ccircle cx='22' cy='22' r='2.5'/%3E%3C/g%3E%3C/svg%3E"); }
.med-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 34px 36px 30px; margin-bottom: 20px;
  box-shadow: var(--shadow); overflow: hidden; }
.med-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--azulejo); background-size: 14px 14px; opacity: .9; }
.med-text { flex: 1 1 320px; min-width: 0; }
.med-hello { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-2, #4b5563); margin-top: 6px; }
.med-title { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1; margin: 2px 0 12px; color: var(--accent); }
.med-wave { width: 150px; height: 12px; margin-bottom: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='12' viewBox='0 0 30 12'%3E%3Cpath d='M0 6q7.5-6 15 0t15 0' fill='none' stroke='%23c2623a' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x; }
.med-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.med-small { padding: 28px 32px 18px; }
.med-small .med-title { font-size: clamp(2rem, 4.5vw, 3rem); }
.med-small .med-wave { margin-bottom: 0; }
/* Postal: la foto entera, con marco blanco, sin recortar */
.postal { margin: 0; flex: 0 0 auto; background: #fff; padding: 10px 10px 8px; border-radius: 6px; box-shadow: 0 10px 28px rgba(40, 30, 10, .18);
  transform: rotate(2deg); cursor: pointer; max-width: 100%; transition: transform .3s; }
.postal:hover { transform: rotate(0deg) scale(1.02); }
.postal img { display: block; height: 260px; width: auto; max-width: min(420px, 80vw); object-fit: contain; border-radius: 3px; }
.postal figcaption { font-family: var(--font-display); font-style: italic; text-align: center; color: #5b5146; font-size: .9rem; padding-top: 6px; }
@media (max-width: 700px) { .med-hero { padding: 26px 20px 20px; } .postal { margin: 0 auto; } .postal img { height: 200px; } }
.section-hero { display: none; }
/* Historia */
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hist-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-top: 4px solid var(--cul); }
.hist-card .era { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cul); font-weight: 700; }
.hist-card h3 { font-family: var(--font-display); margin: 0; font-size: 1.15rem; }
.hist-card form { margin-top: auto; padding-top: 8px; }
.postal img[hidden] { display: none; }
/* Riviera años 60 (Nápoles, Capri, Grecia): sobrio, sin adornos cursis */
.med-hero::before { height: 0; background: none; border-top: 3px solid var(--accent); box-shadow: 0 5px 0 -4px var(--accent); top: 10px; left: 36px; right: 36px; }
.med-hero { border-radius: 6px; box-shadow: none; padding-top: 40px; }
.med-wave { width: 56px; height: 2px; background: var(--cul); margin: 6px 0 20px; }
.med-hero .eyebrow { letter-spacing: .22em; font-size: .72rem; }
.med-hello { font-style: italic; }
.med-title { letter-spacing: .01em; font-weight: 400; }
.postal { transform: none; border-radius: 0; padding: 8px; box-shadow: 0 1px 0 var(--line), 0 18px 40px -18px rgba(20, 30, 50, .35); }
.postal:hover { transform: none; }
.postal figcaption { font-style: normal; font-family: var(--font); text-transform: uppercase; letter-spacing: .18em; font-size: .68rem; color: #6b6458; }
.hist-card { border-top: 2px solid var(--accent); border-radius: 6px; }
.hist-card .era { color: var(--accent); letter-spacing: .16em; font-size: .68rem; }
/* Foto de fondo integrada: fija, lavada con el marfil de la página y algo desenfocada */
.main { position: relative; isolation: isolate; }
.app-bg { position: fixed; inset: 0 0 0 var(--sidebar-w, 0); z-index: -1; background-size: cover; filter: blur(3px) saturate(.9); transform: scale(1.03); pointer-events: none; }
.app-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--page) 62%, transparent) 0%, color-mix(in srgb, var(--page) 86%, transparent) 45%, var(--page) 100%); }
body:has(.app-bg) { background: var(--page); }
body:has(.app-bg) .main { background: transparent; }
.med-hero { background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(6px); }
:root { --sidebar-w: 252px; } @media (max-width: 900px) { :root { --sidebar-w: 0px; } }
/* Historia: lecciones */
.hist-fact h2 { font-family: var(--font-display); font-weight: 400; margin: 6px 0 8px; }
.lesson { margin-top: 18px; max-width: 860px; }
.lesson-title { font-family: var(--font-display); font-weight: 400; font-size: 2rem; margin: 4px 0 10px; }
.lesson-hook { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; }
.lesson h3 { margin: 22px 0 8px; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.lesson-list { padding-left: 18px; } .lesson-list li { margin-bottom: 6px; }
.timeline { list-style: none; padding: 0; border-left: 2px solid var(--line-strong); margin-left: 6px; }
.timeline li { padding: 0 0 10px 16px; position: relative; display: flex; gap: 12px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline b { min-width: 90px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.people > div { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.myth > div { padding: 12px 14px; border-radius: 8px; background: var(--page); }
.quiz { padding: 8px 0; border-top: 1px solid var(--line); }
.tag-ok { background: var(--pos-bg) !important; color: var(--pos) !important; border-color: var(--pos) !important; }
.tag-ko { background: var(--neg-bg) !important; color: var(--neg) !important; border-color: var(--neg) !important; }
/* Portada: una sola barra fina con la fecha y los accesos */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px;
  padding: 10px 14px 10px 18px; border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(6px); }
.topbar-date { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink-2, #4b5563); }
.topbar-date b { color: var(--accent); font-weight: 400; }
.topbar .med-actions { gap: 8px; }
.topbar .btn { padding: 7px 14px; font-size: .88rem; }
.free-note { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 420px; box-shadow: var(--shadow-lg); }
/* Acceso (servidor) */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); text-align: center; padding: 32px 28px; }
.login-card img { border-radius: 18px; margin-bottom: 8px; }
.login-card h1 { font-family: var(--font-display); font-weight: 400; color: var(--accent); margin: 6px 0 16px; }
.login-form { display: grid; gap: 12px; text-align: left; }
.login-form input { width: 100%; }
/* Contraseñas */
.v-lock { max-width: 460px; display: grid; gap: 12px; }
.v-lock input { width: 100%; }
.v-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.v-item { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.v-head { display: flex; flex-direction: column; }
.v-pw { font-size: .95rem; padding: 6px 8px; background: var(--page); border-radius: 6px; word-break: break-all; }
.v-btns { display: flex; flex-wrap: wrap; gap: 6px; }
[hidden] { display: none !important; }
.routine { margin-bottom: 12px; } .routine > summary { cursor: pointer; padding: 4px 0; } .routine[open] > summary { margin-bottom: 12px; }

/* ================= Rediseño 04/11: Riviera años 60, sobrio y fino ================= */
:root {
  --font: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23, 40, 70, .05);
  --shadow-lg: 0 18px 40px -18px rgba(23, 40, 70, .35);
  --navy: #173463; --navy-2: #0f2547; --oro: #b8924a;
}
body { font-family: var(--font); letter-spacing: .005em; }
h1, h2, .page-head h1, .big, .kpi strong, .hero .big, .med-title, .lesson-title, .login-card h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0; }
h1, .page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.05; }
.big { font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; }
.kpi strong { font-size: 2rem; }
.eyebrow { letter-spacing: .2em; font-size: .7rem; font-weight: 600; }

/* Tarjetas y botones: finos, sin degradados */
.card, .kpi, .today-card { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card:hover { box-shadow: var(--shadow); }
.btn { background: var(--navy); background-image: none; border-radius: 10px; box-shadow: none; font-weight: 600; letter-spacing: .01em; }
.btn:hover { background: var(--navy-2); }
.btn.secondary { background: transparent; color: var(--navy-t); border: 1px solid var(--line-strong); }
.btn.secondary:hover { background: var(--surface); border-color: var(--navy); }
.tag, .chips .tag { border-radius: 999px; }
.hero, .month-hero { border-radius: var(--radius); background: var(--navy); background-image: none; box-shadow: var(--shadow-lg); }
.month-hero.over { background: #8c3b26; }
.hero-stat { border-radius: 10px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.section-tabs { border-radius: var(--radius); box-shadow: var(--shadow); }
.section-tabs a.active { background: var(--navy); background-image: none; }
.chip { border-radius: 10px; }
.logo img { border-radius: 12px; box-shadow: none; border: 1px solid var(--line); }
.logo b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }

/* Ningún bloque más ancho que la pantalla */
.card, .kpi, .today-card, .grid2 > *, .grid3 > *, .kpis > * { min-width: 0; }
.main { min-width: 0; overflow-x: clip; }

/* ---- Móvil: cabecera fina y barra de pestañas abajo, como una app ---- */
.tabbar, .m-actions { display: none; }
@media (max-width: 900px) {
  .sidebar { position: sticky; top: 0; z-index: 40; flex-wrap: nowrap; align-items: center; justify-content: space-between;
    padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--sidebar) 92%, transparent); backdrop-filter: blur(10px); }
  .sidebar .nav, .sidebar-foot { display: none !important; }
  .logo { width: auto; padding: 0; }
  .logo img { width: 34px; height: 34px; }
  .m-actions { display: flex; gap: 6px; }
  .m-actions a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--navy-t);
    border: 1px solid var(--line); background: var(--surface); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: .68rem;
    color: var(--muted); text-decoration: none; border-radius: 10px; }
  .tabbar a.on { color: var(--navy-t); font-weight: 700; }
  .tabbar a.on svg { stroke-width: 2.2; }
  .content { padding: 16px 14px 96px; }
  .today-strip, .kpis, .grid2, .grid3, .lib-grid, .hist-grid, .v-list { grid-template-columns: 1fr !important; }
  .topbar { padding: 10px 12px; }
  .topbar .med-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .topbar .btn { justify-content: center; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .section-tabs { margin: 0 -14px 14px; border-radius: 0; border-left: 0; border-right: 0; }
  .private-bar { flex-wrap: wrap; }
}

/* ---- Pantalla de entrada ---- */
.login-page { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; padding: 0; background: var(--page); }
.login-side { background: var(--navy); color: #f3ead8; display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 56px; position: relative; overflow: hidden; }
.login-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(184, 146, 74, .35); box-shadow: 0 0 0 40px rgba(184, 146, 74, .05), 0 0 0 80px rgba(184, 146, 74, .03); }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; }
.login-brand img { width: 40px; height: 40px; border-radius: 10px; }
.login-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(3rem, 7vw, 5.6rem); line-height: .95; margin: 0; color: #fbf6ec; }
.login-rule { width: 64px; height: 1px; background: var(--oro); margin: 22px 0 14px; }
.login-sub { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: #e6dcc6; margin: 0; }
.login-foot { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(243, 234, 216, .6); }
.login-panel { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: min(360px, 100%); text-align: left; padding: 0; background: none; border: 0; box-shadow: none; }
.login-card h2 { font-family: var(--font-display); font-weight: 600; font-size: 2rem; margin: 0 0 6px; color: var(--navy-t); }
.login-form { display: grid; gap: 14px; margin-top: 18px; }
.login-form label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.login-form input { width: 100%; margin-top: 6px; padding: 13px 14px; font-size: 1rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); }
.login-form input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23, 52, 99, .12); }
.login-form .btn { padding: 13px; font-size: 1rem; justify-content: center; }
@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-side { padding: 28px 24px 30px; min-height: 38vh; }
  .login-side::after { width: 260px; height: 260px; right: -90px; bottom: -90px; }
}
body.login-page { margin: 0; place-items: stretch; align-items: stretch; overflow-x: hidden; }
.login-panel { min-width: 0; }
.login-card { width: 100%; max-width: 360px; }
@media (max-width: 760px) { .login-panel { place-items: start center; padding: 32px 22px; } }

/* ================= App móvil (≤ 900 px): una pantalla cada vez, estilo iPhone ================= */
.m-header, .m-only { display: none; }
@media (max-width: 900px) {
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: transparent; background: var(--page); }
  .sidebar, .section-tabs, .d-only, .page-head .eyebrow { display: none !important; }
  .m-only { display: block; }
  .app-bg { opacity: .45; }
  /* Cabecera */
  .m-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 45;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px; min-height: 52px;
    background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); view-transition-name: mheader; }
  .m-back { display: inline-flex; align-items: center; gap: 0; color: var(--navy-t); font-size: 1rem; font-weight: 500; text-decoration: none; justify-self: start; margin-left: -6px; }
  .m-back span { max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-logo img { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); display: block; }
  .m-title { font-size: 1rem; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
  .m-icons { display: flex; gap: 4px; justify-self: end; }
  .m-icons a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--navy-t); }
  .m-icons a:active { background: var(--line); }
  /* Barra inferior: siempre fija durante las transiciones */
  .tabbar { view-transition-name: tabbar; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .content { padding: 10px 16px calc(96px + env(safe-area-inset-bottom)); }
  /* Títulos grandes */
  .page-head { margin: 6px 0 16px; display: block; }
  .page-head h1 { font-size: 2.1rem; }
  .page-head p { font-size: .9rem; }
  .page-head .inline, .page-head > form, .page-head > .btn { margin-top: 12px; }
  /* Toques cómodos y sin zoom del iPhone al escribir */
  input, select, textarea { font-size: 16px !important; }
  .btn { min-height: 44px; }
  a:active, .btn:active, .m-row:active, .hub-card:active { transform: scale(.985); }
  .card { padding: 16px; }
  table { font-size: .9rem; }
  /* Secciones como listas del iPhone */
  .hub { display: flex !important; flex-direction: column; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .hub-card { flex-direction: row !important; align-items: center; gap: 14px !important; padding: 12px 14px !important; margin: 0; border: 0 !important;
    border-radius: 0 !important; box-shadow: none !important; border-bottom: 1px solid var(--line) !important; display: grid !important;
    grid-template-columns: 40px 1fr 18px; grid-template-rows: auto auto; column-gap: 12px; }
  .hub-card:last-child { border-bottom: 0 !important; }
  .hub-card .chip { width: 40px; height: 40px; border-radius: 10px; grid-row: 1 / 3; }
  .hub-card .chip svg { width: 22px; height: 22px; }
  .hub-card b { font-size: 1rem; grid-column: 2; }
  .hub-card .muted { grid-column: 2; font-size: .8rem; }
  .hub-card::after { content: "›"; grid-column: 3; grid-row: 1 / 3; font-size: 1.5rem; color: var(--muted); line-height: 1; }
  .med-hero.med-small { padding: 4px 0 12px; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
  .med-hero.med-small::before, .med-hero .eyebrow, .med-wave { display: none; }
  .med-small .med-title { font-size: 2.1rem; color: var(--ink); }
  /* Inicio */
  .m-date { margin: 4px 0 12px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
  .m-money { display: grid; gap: 4px; padding: 20px; border-radius: 18px; background: var(--navy); color: #f6efe2; text-decoration: none;
    box-shadow: 0 16px 30px -18px rgba(23, 52, 99, .7); }
  .m-money.over { background: #8c3b26; }
  .m-money-wrap { position: relative; }
  .m-money-upload { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22); text-decoration: none; }
  .m-money-upload:active { background: rgba(255, 255, 255, .28); }
  .m-money-label { font-size: .8rem; letter-spacing: .06em; opacity: .85; padding-right: 46px; }
  .m-money-big { font-family: var(--font-display); font-size: 3.3rem; line-height: 1; font-weight: 600; color: #fff; }
  .m-money-sub { font-size: .9rem; opacity: .9; }
  .m-money-state { margin-top: 8px; font-size: .85rem; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .15); }
  .m-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 6px; }
  .m-quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--ink); text-decoration: none; }
  .m-quick a span { display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 68px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line); color: var(--navy-t); }
  .m-quick-sm { grid-template-columns: repeat(2, auto); justify-content: start; gap: 8px; margin: 12px 0 4px; }
  .m-quick-sm a { flex-direction: row; gap: 8px; font-size: .82rem; padding: 6px 14px 6px 6px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); }
  .m-quick-sm a span { width: 30px; height: 30px; max-width: none; aspect-ratio: auto; border-radius: 50%; border: 0;
    background: var(--surface-2, #f3eee4); }
  .m-group-title { margin: 20px 4px 8px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
  .m-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .m-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); font-size: .97rem; }
  .m-row:last-child { border-bottom: 0; }
  .m-row svg:last-child { color: var(--muted); flex: 0 0 auto; }
  .m-row-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-row-date { font-size: .8rem; color: var(--navy-t); min-width: 64px; }
  .m-check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: 0 0 auto; }
  .m-ico { width: 30px; height: 30px; border-radius: 8px; }
  .m-ico svg { width: 17px; height: 17px; }
}
/* Transición suave entre pantallas (Safari 18+ y Chrome) */
@view-transition { navigation: auto; }
@media (max-width: 900px) {
  ::view-transition-old(root) { animation: 160ms ease-out both vt-out; }
  ::view-transition-new(root) { animation: 220ms ease-out both vt-in; }
}
@keyframes vt-out { to { opacity: 0; transform: translateX(-24px); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(28px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
.v-face { width: 100%; padding: 14px; font-size: 1rem; justify-content: center; }
/* Listas tipo iPhone también en escritorio (capturas, etc.) */
.m-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.m-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.m-row:last-child { border-bottom: 0; }
.m-row-text { flex: 1; min-width: 0; }
.m-group-title { margin: 20px 4px 8px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
/* Capturas */
.cap-form { display: grid; gap: 14px; max-width: 520px; }
.cap-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 16px; border: 2px dashed var(--line-strong);
  border-radius: var(--radius); text-align: center; cursor: pointer; background: var(--page); }
.cap-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cap-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--navy); color: #fff; }
.cap-files { color: var(--navy-t); font-weight: 600; }
.cap-review { max-width: 640px; }
.cap-review .card { display: grid; gap: 12px; }
.cap-check { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.cap-check input, .cap-row input { width: 22px; height: 22px; accent-color: var(--navy); flex: 0 0 auto; }
.cap-row { cursor: pointer; }
.cap-row.is-dup { opacity: .6; }
.cap-row .m-row-text { white-space: normal; }
.m-cta { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; padding: 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--navy-t); font-weight: 700; text-decoration: none; }
.install-btn { background: var(--oro, #b8924a); color: #fff; border: 0; } .install-btn:hover { background: #a07c3a; } .sidebar-foot .install-btn { width: 100%; justify-content: center; margin-bottom: 8px; }

/* ================= Rediseño nocturno 05/11 · base móvil ================= */
@media (max-width: 900px) {
  /* La cabecera no se estira en pantallas cortas (era el «hueco vacío») */
  .app { grid-template-rows: auto 1fr; align-content: start; min-height: 100dvh; }
  /* Tablas: se deslizan dentro de su tarjeta en vez de cortarse */
  .content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .content table td, .content table th { white-space: nowrap; }
  .content table td.wrap { white-space: normal; min-width: 180px; }
  /* Formularios a una columna, campos grandes */
  .form-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .form-grid label { font-size: .78rem; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { min-height: 46px; border-radius: 12px; }
  /* Filtros y chips: una fila deslizable */
  .filters, .chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; }
  .filters::-webkit-scrollbar, .chips.scroll::-webkit-scrollbar { display: none; }
  .filters > * { flex: 0 0 auto; }
  /* Nota 0-10 sin salirse */
  .rate10 { gap: 10px; }
  .rate10 [type=range] { min-width: 0; }
  .rate10 [type=number] { width: 64px; flex: 0 0 64px; }
  .upload { flex-direction: column; align-items: stretch; }
  .upload input[type=file] { max-width: 100%; }
  h1 { font-size: 2.1rem; }
  .card-head h3 { font-size: 1rem; }
}

/* ---------- Componentes nuevos (móvil y escritorio) ---------- */
/* Botón flotante de añadir */
.fab { position: fixed; right: 20px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 48; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: #fff; box-shadow: 0 12px 28px -8px rgba(23, 52, 99, .55); text-decoration: none; }
.fab:hover { background: var(--navy-2); text-decoration: none; }
@media (min-width: 901px) { .fab { bottom: 28px; right: 28px; } }
/* Fichas de estadística */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--ink); text-decoration: none; }
a.tile:hover { text-decoration: none; border-color: var(--line-strong); }
.tile-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 6px; }
.tile-val { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; line-height: 1.05; }
.tile-val small { font-family: var(--font); font-size: .8rem; font-weight: 600; color: var(--muted); }
.tile-lab { font-size: .78rem; color: var(--muted); }
.tile-delta { font-size: .74rem; font-weight: 700; }
.tile-delta.up { color: var(--pos); } .tile-delta.down { color: var(--neg); }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } }
/* Carrusel horizontal */
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; flex: 0 0 auto; }
@media (max-width: 900px) { .carousel { margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; } }
/* Control segmentado */
.seg { display: flex; background: var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg label, .seg a { flex: 1; text-align: center; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .seg a { display: block; padding: 9px 6px; border-radius: 9px; font-size: .86rem; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.seg input:checked + span, .seg a.on { background: var(--surface); color: var(--navy-t); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
/* Barras horizontales de ranking */
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; font-size: .9rem; }
.hbar-track { grid-column: 2 / 4; height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: -4px; }
.hbar-track i { display: block; height: 100%; border-radius: 6px; background: var(--navy); }
.hbar-emoji { font-size: 1.2rem; grid-row: 1 / 3; align-self: center; }
/* Sección con título y enlace */
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 22px 2px 10px; }
.sec-title h2 { font-size: 1.35rem; margin: 0; }
.sec-title a { font-size: .85rem; font-weight: 600; }

/* ================= Biblioteca ================= */
/* Colores por tipo (fondo del cartel cuando no hay portada) */
.k-pelicula { --k1: #1d3557; --k2: #2c5282; } .k-serie { --k1: #23395b; --k2: #3d5a80; }
.k-libro { --k1: #7a3e2b; --k2: #a8553a; } .k-restaurante { --k1: #4f5d2f; --k2: #6b7d3a; }
.k-ciudad { --k1: #1f6f8b; --k2: #2a8fb0; } .k-concierto { --k1: #4a2c5e; --k2: #6d4689; }
.k-musica { --k1: #3d2c5e; --k2: #5a4489; } .k-teatro { --k1: #6b2737; --k2: #8f3a4d; }
.k-exposicion { --k1: #5c4a2a; --k2: #8a6d3b; } .k-historia { --k1: #6e5427; --k2: #9a7836; }
.k-plan { --k1: #2f5e4e; --k2: #3f7d68; } .k-otro { --k1: #3b4252; --k2: #59627a; }
.lib-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.lib-head h1 { margin: 0; }
.lib-head p { margin: 2px 0 0; }
.lib-chips .tag { padding: 8px 14px; font-size: .86rem; }
.lib-chips .tag-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.lib-search input { width: 100%; padding-left: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238b8f97' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px 50%; }
.lib-year { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 12px 16px; border-radius: var(--radius);
  background: var(--navy); color: #f3ead8; font-size: .9rem; }
.lib-year-n { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: #fff; line-height: 1; }
/* Cartel */
.poster { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; min-width: 0; }
.poster:hover { text-decoration: none; }
.poster-img { position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; isolation: isolate;
  background: linear-gradient(155deg, var(--k2, #59627a), var(--k1, #3b4252)); box-shadow: 0 8px 18px -10px rgba(20, 30, 50, .45); }
.poster-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.poster-ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; color: #fff; }
.poster-emoji { font-size: 1.8rem; }
.poster-ph-title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.1; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.poster-score { position: absolute; top: 8px; right: 8px; z-index: 2; }
.poster-score .score { box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.poster-times { position: absolute; top: 8px; left: 8px; z-index: 2; background: var(--navy, #173463); color: #fff;
  font-weight: 700; font-size: .78rem; padding: 2px 7px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.item-times { padding: 14px 16px; }
.item-times-big { margin: 0 0 8px; font-size: 1.05rem; }
.item-times-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.item-times-list a { font-size: .82rem; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line, #e7dfcf);
  color: inherit; text-decoration: none; }
.item-times-list a.cur { background: var(--navy, #173463); color: #fff; border-color: transparent; }
.poster-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 8px 6px; font-size: .72rem; font-weight: 700; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster-title { font-size: .86rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 4px; }
.poster-sub { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster.small { width: 118px; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; margin-top: 14px; }
@media (max-width: 900px) { .poster-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; } .poster-ph-title { font-size: .95rem; } .poster-emoji { font-size: 1.4rem; } }
@media (max-width: 380px) { .poster-grid { grid-template-columns: repeat(2, 1fr); } }
.seg-sm { max-width: 360px; margin-top: 4px; }
/* Vacía */
.lib-empty { text-align: center; padding: 18px 4px; }
.lib-empty-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; margin: 6px 0 4px; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
@media (min-width: 901px) { .type-grid { grid-template-columns: repeat(6, 1fr); } }
.type-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px 6px;
  border-radius: 16px; background: linear-gradient(155deg, var(--k2), var(--k1)); color: #fff; font-weight: 600; font-size: .82rem;
  text-decoration: none; cursor: pointer; text-align: center; min-height: 92px; }
.type-tile span { font-size: 1.8rem; line-height: 1; }
.type-tile:hover { text-decoration: none; filter: brightness(1.08); }
.type-pick .type-tile { opacity: .55; transition: opacity .15s, transform .15s; }
.type-pick .type-tile:has(input:checked) { opacity: 1; transform: scale(1.03); box-shadow: 0 0 0 3px var(--page), 0 0 0 5px var(--k2); }
.type-pick input { position: absolute; opacity: 0; pointer-events: none; }
/* Formulario grande */
.lib-form { display: grid; gap: 16px; max-width: 640px; }
.lib-form h1 { margin: 0; }
.lib-form label, .lib-form .field-hecho { display: grid; gap: 6px; }
.lbl { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.big-field input { font-size: 1.35rem !important; font-weight: 600; padding: 14px 16px; }
.lib-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; font: inherit; background: var(--surface); }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg-estado span { padding: 12px 6px; }
.more-opts summary { cursor: pointer; font-weight: 600; color: var(--navy-t); }
.more-opts input[type=url] { width: 100%; margin: 6px 0; }
.form-actions { display: grid; gap: 10px; margin-top: 8px; }
.btn-block { width: 100%; justify-content: center; text-align: center; padding: 14px; font-size: 1rem; }
/* Nota grande */
.rate-big { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.rate-big-top { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.rate-big-top input { width: 140px; border: 0 !important; background: none !important; text-align: center; font-family: var(--font-display);
  font-size: 4rem !important; font-weight: 600; color: var(--navy-t); padding: 0; min-height: 0 !important; }
.rate-big-top span { font-size: 1.1rem; color: var(--muted); }
.rate-big [type=range] { width: 100%; accent-color: var(--navy); height: 28px; }
.rate-quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.rate-quick button { padding: 10px 0; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--page); font-weight: 700; color: var(--navy-t); cursor: pointer; }
/* Ficha */
.item-hero { position: relative; display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: end; padding: 18px; margin: 0 0 16px;
  border-radius: 20px; overflow: hidden; isolation: isolate; background: linear-gradient(155deg, var(--k2), var(--k1)); color: #fff; }
.item-hero-bg { position: absolute; inset: -20px; z-index: -1; background-size: cover; background-position: center; filter: blur(22px) brightness(.55) saturate(1.2); }
.item-cover { width: 132px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6); }
.item-hero-text { display: grid; gap: 6px; min-width: 0; }
.item-hero-text h1 { color: #fff; font-size: clamp(1.7rem, 6vw, 2.6rem); margin: 0; line-height: 1.05; overflow-wrap: anywhere; }
.item-kind { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.item-state { justify-self: start; font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.item-score { position: absolute; top: 14px; right: 14px; }
.item-action { display: grid; gap: 12px; margin-bottom: 16px; }
.done-box > summary { list-style: none; }
.done-box > summary::-webkit-details-marker { display: none; }
.done-box[open] > summary { display: none; }
.done-form { display: grid; gap: 12px; }
.done-form textarea { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line-strong); font: inherit; }
.inline-grow { display: flex; gap: 8px; } .inline-grow input { flex: 1; min-width: 0; }
.fact-k { width: 70px; flex: 0 0 70px; font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.item-notes { margin: 16px 0; padding: 14px 18px; border-left: 3px solid var(--oro, #b8924a); background: var(--surface); border-radius: 0 12px 12px 0;
  font-family: var(--font-display); font-size: 1.15rem; font-style: italic; }
@media (min-width: 901px) { .item-detail { max-width: 720px; } .item-hero { grid-template-columns: 180px 1fr; padding: 26px; } .item-cover { width: 180px; } }
@media (max-width: 900px) { .lib-add-d { display: none; } }
@media (max-width: 900px) { .type-pick { grid-template-columns: repeat(4, 1fr); gap: 8px; } .type-pick .type-tile { min-height: 70px; padding: 8px 2px; font-size: .7rem; gap: 4px; } .type-pick .type-tile span { font-size: 1.45rem; } }

/* ================= Deporte ================= */
.sport-hero { padding: 18px 20px 20px; border-radius: 20px; background: var(--navy); color: #f3ead8; text-align: center; box-shadow: var(--shadow-lg); }
.sport-hero-nav { display: flex; align-items: center; justify-content: space-between; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
.sport-hero-nav a { color: #fff; font-size: 1.6rem; line-height: 1; text-decoration: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.sport-hero-gap { width: 36px; }
.sport-hero-big { font-family: var(--font-display); font-size: clamp(2.8rem, 12vw, 3.8rem); font-weight: 600; color: #fff; line-height: 1.05; margin-top: 8px; }
.sport-hero-sub { opacity: .9; }
.sport-delta { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: rgba(255, 255, 255, .12); }
.sport-delta.up { color: #9fe0c0; } .sport-delta.down { color: #f3b1a4; }
.weeks { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; align-items: end; padding: 14px 12px 10px; }
.week-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.week-val { font-size: .66rem; font-weight: 700; color: var(--muted); }
.week-bar { position: relative; width: 100%; max-width: 30px; height: 96px; border-radius: 6px; background: var(--line); overflow: hidden; }
.week-bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; background: #c9cfd9; }
.week-col.ok .week-bar i { background: var(--navy); }
.week-col.now .week-bar i { background: var(--oro, #b8924a); }
.week-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: var(--goal); border-top: 2px dashed rgba(194, 98, 58, .8); z-index: 1; }
.week-lab { font-size: .64rem; color: var(--muted); white-space: nowrap; }
.week-col.now .week-lab { color: var(--ink); font-weight: 700; }
.month-log { padding: 0; margin-bottom: 10px; overflow: hidden; }
.month-log > summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.month-log > summary::-webkit-details-marker { display: none; }
.month-log-name { font-weight: 700; }
.month-log[open] > summary { border-bottom: 1px solid var(--line); }
.w-row > summary { display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; list-style: none; border-bottom: 1px solid var(--line); }
.w-row > summary::-webkit-details-marker { display: none; }
.w-row:last-child > summary { border-bottom: 0; }
.w-emoji { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: var(--page); }
.w-main { display: flex; flex-direction: column; min-width: 0; }
.w-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-min { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.w-min small { font-family: var(--font); font-size: .66rem; color: var(--muted); margin-left: 2px; }
.w-strain { font-size: .72rem; font-weight: 800; color: #fff; background: #3a7bd5; border-radius: 999px; padding: 3px 8px; min-width: 34px; text-align: center; }
.w-more { padding: 6px 16px 12px 66px; border-bottom: 1px solid var(--line); background: var(--page); }
.w-more p { margin: 0 0 6px; }
/* Nueva actividad */
.sport-pick { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 901px) { .sport-pick { grid-template-columns: repeat(6, 1fr); } }
.sport-tile { --k1: #173463; --k2: #2c5282; min-height: 76px; font-size: .72rem; }
.sport-tile span { font-size: 1.5rem; }
.dur-box { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 6px 0 10px; }
.dur-box input { width: 150px; text-align: center; font-family: var(--font-display); font-size: 3.4rem !important; font-weight: 600; color: var(--navy-t);
  border: 0 !important; background: none !important; padding: 0; min-height: 0 !important; }
.dur-box span { color: var(--muted); font-weight: 600; }
.effort { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.effort input { position: absolute; opacity: 0; pointer-events: none; }
.effort span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: .68rem; color: var(--muted); cursor: pointer; }
.effort b { font-size: 1.2rem; color: var(--ink); }
.effort input:checked + span { background: var(--navy); border-color: var(--navy); color: #dfe6f3; }
.effort input:checked + span b { color: #fff; }
.w-date { margin-top: 8px; width: 100%; }

/* ================= Secciones con resumen ================= */
.hub-title { margin: 4px 0 14px; }
@media (max-width: 900px) { .hub-title { font-size: 2.3rem; } }
.tx-row { gap: 12px; }
.tx-date { font-size: .74rem; font-weight: 700; color: var(--muted); width: 40px; flex: 0 0 40px; }
.tx-row .m-row-text { display: flex; flex-direction: column; min-width: 0; }
.tx-row .m-row-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tx-row .num { white-space: nowrap; }
.rec-g { color: #0f8a5f; } .rec-y { color: #b7791f; } .rec-r { color: #c53030; }
.mini-track { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 4px 0 2px; }
.mini-track i { display: block; height: 100%; background: var(--navy); border-radius: 6px; }
.quick-add { display: flex; gap: 8px; margin-bottom: 4px; }
.quick-add input { flex: 1; min-width: 0; font-size: 1rem; }
.quick-add .btn { width: 50px; padding: 0; justify-content: center; }
.task-quick { margin: 0; }
.m-check-btn { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; border: 2px solid var(--line-strong); background: none; cursor: pointer; padding: 0; }
.m-check-btn:hover, .m-check-btn:active { border-color: var(--pos); background: var(--pos-bg); }
.hub-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.hub-quick .tile b { font-size: 1rem; }
.hub-quick > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }  /* con 3 accesos, el primero ocupa la fila */
.body-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.body-tiles .tile { padding: 12px; align-items: flex-start; }
.body-tiles .tile-val { font-size: 1.7rem; }
.m-home .sec-title { margin-top: 18px; }
/* Movimientos (móvil) */
.tx-day { margin: 16px 4px 6px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.tx-item > summary { list-style: none; cursor: pointer; }
.tx-item > summary::-webkit-details-marker { display: none; }
.tx-item:last-child > summary { border-bottom: 0; }
.tx-item[open] > summary { border-bottom: 1px solid var(--line); }
.tx-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem; background: var(--page); }
.tx-item .m-row-text { display: flex; flex-direction: column; }
.tx-item .m-row-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tx-item .num { white-space: nowrap; font-weight: 700; }
.tx-more { padding: 10px 14px 14px; background: var(--page); border-bottom: 1px solid var(--line); }
.tx-more p { margin: 0 0 8px; word-break: break-word; }
.tx-cat { display: grid; gap: 8px; }
.tx-cat select { width: 100%; }
@media (max-width: 900px) {
  .content > .row.between:first-child { display: grid; gap: 10px; }
}
/* Patrimonio: selector de vista dentro del bloque azul */
.hero .seg { background: rgba(255, 255, 255, .12); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.hero .seg::-webkit-scrollbar { display: none; }
.hero .seg button { flex: 0 0 auto; white-space: nowrap; border: 0; background: none; color: rgba(255, 255, 255, .85); padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: .84rem; cursor: pointer; }
.hero .seg button.active { background: #fff; color: var(--navy); }
.acc-item > summary { list-style: none; cursor: pointer; }
.acc-item > summary::-webkit-details-marker { display: none; }
.acc-item .m-row-text { display: flex; flex-direction: column; min-width: 0; }
.acc-item .m-row-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.acc-item:last-child > summary { border-bottom: 0; }
.acc-item[open] > summary { border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr !important; gap: 10px; } .kpi { padding: 14px; } .kpi strong { font-size: 1.45rem !important; } .kpi .chip { width: 34px; height: 34px; } .kpi .small { font-size: .7rem; } }
/* Tu cuenta y la del piso */
.acct-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.acct { display: flex; flex-direction: column; gap: 1px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.acct:hover { text-decoration: none; border-color: var(--line-strong); }
.acct-lab { font-size: .76rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-val { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.acct small { font-size: .72rem; color: var(--muted); }
/* Pantallas */
.screen-hero-lab { margin-top: 6px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.screen-days { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; padding: 16px 14px 10px; margin-top: 12px; }
.sd-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sd-bar { position: relative; width: 100%; max-width: 34px; height: 120px; display: flex; align-items: flex-end; }
.sd-bar i { width: 100%; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #5b8def, #3b6fd8); }
.sd-lab { font-size: .72rem; font-weight: 700; color: var(--muted); }
.sd-avg { position: absolute; left: 14px; right: 14px; border-top: 2px dashed #22a06b; }
.sd-avg span { position: absolute; right: 0; top: -18px; font-size: .66rem; font-weight: 700; color: #22a06b; background: var(--surface); padding: 0 4px; }
.cat-stack { display: flex; height: 14px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--line); }
.cat-stack i { display: block; height: 100%; }
.cat-legend { display: grid; gap: 8px; margin-top: 14px; }
.cat-item { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; font-size: .92rem; }
.cat-dot { width: 12px; height: 12px; border-radius: 4px; }
.screen-how ol { padding-left: 18px; margin: 0 0 8px; display: grid; gap: 6px; }
.form-grid > *, .form-grid label { min-width: 0; } input[type=file] { max-width: 100%; } @media (max-width: 900px) { input[type=file] { width: 100%; font-size: 14px !important; } }
.due-list .m-row-text { display: flex; flex-direction: column; white-space: normal; } .due-list .m-row-text .small { line-height: 1.35; } .due-list { border-color: rgba(184, 146, 74, .5); box-shadow: 0 0 0 3px rgba(184, 146, 74, .08); }
/* Añadir rápido (secciones) — antes compartía nombre con el de la compra */
.quick-add .btn { width: auto; padding: 0 16px; min-height: 46px; }
.qadd { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.qadd input { flex: 1; min-width: 0; font-size: 1rem; }
.qadd .btn { width: 50px; padding: 0; justify-content: center; }
/* Agenda: añadir tarea */
.task-add { display: grid; gap: 12px; }
.task-add-main { display: flex; gap: 8px; }
.task-add-main input { flex: 1; min-width: 0; font-size: 1rem; }
.task-add-main .btn { width: 52px; padding: 0; justify-content: center; }
.task-lists { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.task-lists::-webkit-scrollbar { display: none; }
.task-lists .choice span { white-space: nowrap; padding: 7px 12px; font-size: .84rem; }
.task-lists .choice input:checked + span { background: var(--navy); border-color: var(--navy); }
.task-add-more summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--navy-t); }
.task-add-more .form-pair { margin-top: 10px; }
.task-add-hint { margin: 8px 0 0; }
.task-add-more label { display: grid; gap: 6px; }
@media (max-width: 900px) {
  /* Mi entreno: el bloque de hoy y «¿Qué quieres hacer hoy?» apilados */
  .hero.wb .hero-grid { grid-template-columns: 1fr !important; }
  .choose .card-head { display: grid; gap: 10px; }
  .choose .card-head .inline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .choose .card-head label.inline { display: grid; grid-template-columns: 1fr; gap: 4px; font-size: .74rem; font-weight: 700; color: var(--muted); }
  .choose .card-head select { width: 100%; min-width: 0; }
}

/* ================= Pasos ================= */
.steps-card { display: block; padding: 14px 16px; color: var(--ink); text-decoration: none; margin: 0; }
.steps-card + .steps-card, .body-tiles + .steps-card { margin-top: 10px; }
.steps-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.steps-card-top .muted { margin-left: auto; }
.steps-ico { width: 30px; height: 30px; border-radius: 9px; }
.steps-card-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.steps-card-cols > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.steps-card .tile-val { font-size: 1.7rem; }
.steps-card .mini-track { margin-top: 10px; }
.mini-days { --goal: 80%; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.mini-days > span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mini-days .bar { position: relative; width: 100%; max-width: 24px; height: 36px; border-radius: 5px; background: var(--line); overflow: hidden; }
.mini-days .bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 5px; background: #c9cfd9; }
.mini-days .bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: var(--goal); border-top: 1.5px dashed rgba(194, 98, 58, .8); }
.mini-days .ok .bar i { background: var(--navy); }
.mini-days .now .bar i { background: var(--oro, #b8924a); }
.mini-days small { font-size: .62rem; color: var(--muted); }
.mini-days .now small { color: var(--ink); font-weight: 700; }
.steps-card-foot { display: block; margin-top: 8px; color: var(--muted); }
.steps-card-foot b { color: var(--ink); }
.steps-empty { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.steps-empty > span:nth-child(2) { display: flex; flex-direction: column; }
.steps-hero-track { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .15); overflow: hidden; margin: 12px auto 0; max-width: 420px; }
.steps-hero-track i { display: block; height: 100%; border-radius: 8px; background: var(--oro, #b8924a); }
.weeks.days7 { grid-template-columns: repeat(7, 1fr); }
.steps-goal { display: flex; align-items: center; gap: 8px; }
.steps-goal input[type=number] { width: 100px; flex: 0 0 100px; font-size: 1.05rem; font-weight: 700; }
.steps-goal:has(input[type=date]) { flex-wrap: wrap; }
.steps-goal input[type=date] { flex: 1 1 100%; min-width: 0; }
.steps-goal .btn { margin-left: auto; flex: none; }
.steps-intro { text-align: center; padding: 26px 20px; }
.sync-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-left: 4px solid var(--pos, #0f8a5f); }
.sync-card.warn { border-left-color: var(--warning, #fab219); background: color-mix(in srgb, var(--warning, #fab219) 8%, var(--surface)); }
.steps-intro-ico { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--wb-bg); color: var(--wb); }
.steps-intro h3 { margin: 12px 0 6px; }
.steps-intro p { margin: 0; }
.howto { padding-left: 20px; margin: 10px 0; display: grid; gap: 10px; line-height: 1.45; }
.howto ul { padding-left: 18px; margin: 6px 0 0; display: grid; gap: 6px; }
.copy-line { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.copy-line code { font-size: .78rem; background: var(--page); padding: 4px 8px; border-radius: 8px; overflow-wrap: anywhere; min-width: 0; }

/* ================= Whoop ================= */
.whoop-hero { background: var(--navy); color: #f3ead8; border-radius: 20px; padding: 18px; box-shadow: var(--shadow-lg); }
.whoop-hero .eyebrow { color: rgba(255, 255, 255, .7); }
.whoop-top { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; }
.ring-box { position: relative; width: 112px; height: 112px; }
.ring-box svg { width: 100%; height: 100%; display: block; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 10; }
.ring-fg { fill: none; stroke-width: 10; stroke-linecap: round; }
.z-good .ring-fg { stroke: #4cd38a; } .z-warning .ring-fg { stroke: #f5c04a; } .z-critical .ring-fg { stroke: #f07a6a; }
.ring-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; color: #fff; }
.ring-val small { font-family: var(--font); font-size: .85rem; margin-left: 1px; opacity: .8; }
.whoop-zone { font-weight: 700; font-size: 1.1rem; color: #fff; margin-top: 4px; }
.whoop-hint { opacity: .85; font-size: .92rem; }
.whoop-hero .hero-stats { margin-top: 16px; }
@media (min-width: 901px) { .whoop-hero { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: center; padding: 24px; } .whoop-hero .hero-stats { margin-top: 0; } }
.whoop-day { gap: 10px; }
.whoop-day .m-row-date { width: 76px; flex: 0 0 76px; font-size: .82rem; }
.rec-pill { font-size: .8rem; font-weight: 800; border-radius: 999px; padding: 3px 9px; min-width: 52px; text-align: center; }
.rec-pill.z-good { background: color-mix(in srgb, var(--good) 16%, transparent); color: #0a7d0a; }
.rec-pill.z-warning { background: color-mix(in srgb, var(--warning) 22%, transparent); color: #9a6a00; }
.rec-pill.z-critical { background: color-mix(in srgb, var(--critical) 16%, transparent); color: var(--critical); }
/* ================= Gimnasio: apuntar series ================= */
.gdot { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: .72rem; font-weight: 800; }
.gym-head { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }
.gym-head input[type=text] { font-weight: 700; font-size: 1.02rem; min-width: 0; }
.gym-head input[type=date] { width: 150px; min-width: 0; }
.gym-list { display: grid; gap: 12px; }
.gym-ex { padding: 14px; margin: 0; }
.gym-ex-head { display: flex; align-items: center; gap: 10px; }
.gym-ex-head b { flex: 1; min-width: 0; line-height: 1.2; }
.gym-x { border: 0; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 6px; }
.gym-last { font-size: .78rem; color: var(--muted); margin: 6px 0 0 44px; }
.gym-sets { display: grid; gap: 6px; margin-top: 10px; }
.gym-set { display: grid; grid-template-columns: 40px 1fr 1fr 34px; gap: 8px; align-items: center; }
.gym-set-h { font-size: .68rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.gym-set-h span { text-align: center; }
.gym-n { text-align: center; font-weight: 800; color: var(--muted); }
.gym-set input { text-align: center; font-size: 1.1rem; font-weight: 700; padding: 10px 6px; min-width: 0; width: 100%; }
.gym-del { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); background: none; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.gym-addset { margin-top: 10px; font-weight: 700; }
.gym-empty { text-align: center; padding: 22px; margin: 0; }
.gym-empty p { margin: 10px 0 0; }
.gym-add { width: 100%; justify-content: center; margin: 12px 0; padding: 14px; font-size: 1rem; }
.gym-save { width: 100%; justify-content: center; margin-top: 12px; padding: 15px; font-size: 1.05rem; }
.gym-draft { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .84rem; padding: 10px 14px; margin: 0 0 12px; }
.sheet { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-panel { background: var(--surface); width: 100%; max-width: 640px; height: 88vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 901px) { .sheet { align-items: center; } .sheet-panel { border-radius: 20px; height: 80vh; } }
.sheet-head { display: flex; gap: 10px; align-items: center; padding: 14px 14px 8px; }
.sheet-head input { flex: 1; min-width: 0; font-size: 1rem; }
.ex-groups { padding: 0 14px 8px; margin: 0 !important; display: flex; gap: 6px; overflow-x: auto; flex: none; scrollbar-width: none; }
.chip-btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 7px 12px; font: 600 .82rem var(--font); color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.chip-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.ex-results { overflow-y: auto; flex: 1; padding: 0 8px 16px; -webkit-overflow-scrolling: touch; }
.ex-res { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 8px; cursor: pointer; font: inherit; color: var(--ink); }
.ex-res:active, .ex-res:hover { background: var(--page); }
.ex-res-text { display: flex; flex-direction: column; min-width: 0; }
.ex-res-text small { color: var(--muted); font-size: .76rem; }
.ex-res-h { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 4px; }
.gym-hist { padding: 0; margin-bottom: 10px; overflow: hidden; }
.gym-hist > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.gym-hist > summary::-webkit-details-marker { display: none; }
.gym-hist[open] > summary { border-bottom: 1px solid var(--line); }
.gym-hist-date { display: flex; flex-direction: column; align-items: center; width: 44px; flex: 0 0 44px; padding: 4px 0; border-radius: 10px; background: var(--wb-bg); color: var(--wb); line-height: 1.05; }
.gym-hist-date b { font-family: var(--font-display); font-size: 1.35rem; }
.gym-hist-date small { font-size: .64rem; font-weight: 800; text-transform: uppercase; }
.gym-hist-body { padding: 10px 14px 14px; display: grid; gap: 8px; }
.gym-hist-ex { display: flex; flex-direction: column; }
.gym-hist-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.gym-hist-actions form { margin-left: auto; }
.session-top .log-btn { white-space: nowrap; }
.m-cta.secondary-cta { margin-top: 8px; }
.routine-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin: 0 0 10px; scrollbar-width: none; }
.routine-tabs .tag { white-space: nowrap; padding: 7px 12px; }
.routine-search { width: 100%; margin: 4px 0 12px; }
.gym-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 16px; color: var(--ink); text-decoration: none; }
.gym-link .m-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }

/* iPhone: los campos de fecha y hora no se salen de su columna (Safari les pone un ancho mínimo propio) */
input[type=date], input[type=time], input[type=datetime-local] { min-width: 0; max-width: 100%; }
.form-pair > *, .form-pair label { min-width: 0; }
@supports (-webkit-touch-callout: none) {
  input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; min-height: 46px; }
  input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; }
}

/* Bienestar con el azul de la casa (sin el degradado verde de antes) */
.hero.wb { background: var(--navy); }

/* Chat: las respuestas largas (tablas) no se salen de la pantalla */
.msg, .msg .bubble { min-width: 0; }
.msg .bubble { max-width: 100%; }
.msg.assistant .bubble table { display: block; overflow-x: auto; max-width: 100%; font-size: .86rem; }
@media (max-width: 900px) {
  .msg { max-width: 100%; }
  .msg.user { max-width: 88%; }
  .msg .avatar { display: none; }
  .chat-log { padding: 14px; }
  .chat { height: calc(100dvh - 250px); min-height: 380px; }
}
@media (max-width: 900px) {
  .learn-form { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
  .learn-form input { grid-column: 1 / -1; width: 100%; }
  .learn-form .btn { justify-content: center; }
}

/* ================= Viajes y tu año ================= */
.trip-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; margin: 0 0 10px; }
.trip-date { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 12px; line-height: 1.05;
  background: color-mix(in srgb, var(--navy) 10%, var(--surface)); color: var(--navy-t); }
.trip-date b { font-family: var(--font-display); font-size: 1.5rem; }
.trip-date small { font-size: .64rem; font-weight: 800; text-transform: uppercase; }
.trip-main { display: flex; flex-direction: column; min-width: 0; }
.trip-when { text-align: right; font-weight: 700; font-size: .84rem; color: var(--navy-t); display: flex; flex-direction: column; white-space: nowrap; }
.trip-when small { color: var(--muted); font-weight: 600; }
.year-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.year-big div { display: flex; flex-direction: column; align-items: center; }
.year-big b { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: #fff; line-height: 1; }
.year-big span { font-size: .76rem; opacity: .85; }
.kind-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 901px) { .kind-tiles { grid-template-columns: repeat(6, 1fr); } }
.kind-tile { align-items: center; text-align: center; padding: 12px 6px; }
.kind-emoji { font-size: 1.6rem; line-height: 1.2; }
.months12 { grid-template-columns: repeat(12, 1fr); gap: 4px; padding: 14px 8px 10px; }
.months12 .week-bar { height: 80px; }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .86rem; }
.best-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.best-row:last-child { border-bottom: 0; }
.score-badge { font-weight: 800; color: #fff; background: var(--navy); border-radius: 8px; padding: 2px 8px; font-size: .84rem; }

/* Movimientos y panel: una cuenta cada vez */
.acc-seg { max-width: 460px; margin: 0 0 12px; }
.panel-tabs { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-start; margin-bottom: 6px; }
.panel-tabs .seg { flex: 1 1 300px; max-width: 460px; margin: 0 0 12px; }
.period-seg a { font-size: .8rem; }
.cat-ia { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 16px 0 0; }
@media (max-width: 900px) {
  .filters { display: grid !important; grid-template-columns: 1fr auto; gap: 8px; }
  .filters input[type=search] { grid-column: 1 / -1; width: 100%; }
  .filters select { width: 100%; min-width: 0; }
  .filters > .muted { grid-column: 1 / -1; font-size: .8rem; }
}
.ex-photo .ex-emoji { font-size: 2.3rem; line-height: 1; }
.ex-photo:not(.has) { background: var(--wb-bg); }
.more-days > summary { cursor: pointer; list-style: none; text-align: center; padding: 10px; font-size: .86rem; font-weight: 700; color: var(--navy-t); }
.more-days > summary::-webkit-details-marker { display: none; }
.more-days[open] > summary { display: none; }
.more-days .m-list { margin-top: 10px; }
.diary-list { display: grid; gap: 12px; margin-bottom: 8px; }
.diary-row { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.diary-row:last-child { border-bottom: 0; }

/* ===== Tu día (Inicio) ===== */
/* Recuperación de Whoop: batería redonda junto a la fecha */
.m-date-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.m-date-row .m-date { margin: 0; }
.rec-ring { position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px;
  text-decoration: none; vertical-align: middle; }
.topbar-date .rec-ring { margin-left: 14px; }
.rec-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rec-ring .rr-bg { fill: var(--surface, #fffdf8); stroke: var(--line); stroke-width: 3.2; }
.rec-ring .rr-fg { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.rec-ring .rr-num { position: relative; font-weight: 700; font-size: .82rem; color: var(--ink); line-height: 1; }
.rec-ring .rr-num small { font-size: .55rem; font-weight: 600; margin-left: 1px; }

/* «¿Tienes billetes y alojamiento?» dos meses antes de un viaje */
.prep-card { padding: 14px 16px; margin-bottom: 14px; display: grid; gap: 8px; }
.prep-head { display: flex; flex-direction: column; gap: 2px; }
.prep-q { margin: 2px 0 0; font-size: .9rem; }
.prep-opts { gap: 8px; }
.prep-car { display: grid; gap: 4px; }
.prep-desk { max-width: 560px; }

/* Planes: guardar / no me interesa, historial y nota de FilmAffinity */
.plan-acts { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.plan-acts form { margin: 0; }
.plan-old { padding: 8px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.plan-saved { margin-bottom: 18px; }
.fa-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px;
  background: #fff4d6; color: #7a5200; border: 1px solid #f0d58a; vertical-align: middle; }

/* Planes en tarjetas: lo importante a la vista, el texto largo plegado */
.plan-req { margin: 0 0 10px; }
.plan-intro { font-size: .88rem; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.plan-intro p { margin: 0 0 6px; }
.plan-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.plan-card { padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.plan-card.is-fav { border-color: #e6b4a6; box-shadow: 0 0 0 2px rgba(196, 92, 62, .12); }
.plan-card.is-done { opacity: .75; }
.pc-top { display: flex; gap: 12px; align-items: flex-start; }
.pc-emoji { flex: 0 0 42px; height: 42px; border-radius: 12px; background: var(--surface-2, #f3eee4); display: grid;
  place-items: center; font-size: 1.35rem; }
.pc-head { min-width: 0; }
.pc-title { font-size: 1rem; line-height: 1.3; }
.pc-fav { font-size: .72rem; font-weight: 700; color: #a2412a; white-space: nowrap; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-top: 3px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-chips span { font-size: .78rem; padding: 3px 9px; border-radius: 999px; background: var(--surface-2, #f3eee4); }
.pc-why { margin: 0; font-size: .86rem; line-height: 1.45; }
.pc-more > summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--navy-t); }
.pc-more .report { font-size: .86rem; line-height: 1.55; margin-top: 6px; }
.pc-notes { margin-top: 12px; padding: 12px 16px; }
.pc-hecho > summary { list-style: none; display: inline-block; }
.pc-hecho > summary::-webkit-details-marker { display: none; }
.pc-hecho form { margin-top: 10px; }
.pc-done { display: flex; gap: 8px; align-items: center; }
.plan-card .plan-acts { margin: 0; }

/* Diario de la agenda */
.diary-form { display: grid; gap: 10px; padding: 14px 16px; margin-bottom: 14px; }
.diary-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.diary-row input[type=date] { max-width: 170px; }
.diary-moods { gap: 4px; }
.diary-moods .choice span { padding: 5px 9px; font-size: 1.05rem; }
.diary-form textarea { min-height: 120px; resize: vertical; font-size: .95rem; line-height: 1.5; }
.diary-search { margin: 0 0 6px; }
.diary-search input { width: 100%; }
.diary-entry { padding: 12px 16px; margin-bottom: 10px; }
.diary-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.diary-mood { font-size: 1.1rem; }
.diary-acts { margin-left: auto; display: inline-flex; gap: 12px; align-items: center; }
.diary-acts form { margin: 0; }
.diary-text { white-space: pre-wrap; line-height: 1.55; font-size: .94rem; }

/* Diario dentro del calendario */
.cal-diary { font-size: .62rem; margin-left: 3px; vertical-align: top; }
.dp-diary { display: flex; gap: 10px; align-items: center; padding: 8px 0; color: inherit; text-decoration: none;
  border-top: 1px solid var(--line); }
.dp-diary .dp-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dp-write { display: inline-block; margin-top: 10px; color: var(--navy-t); font-weight: 600; text-decoration: none; }
.dv-diary { text-decoration: none; background: var(--diary-bg); color: var(--diary-ink); border-left-color: var(--diary-line); }
.dv-write { opacity: .75; }
.pc-hours { font-weight: 700; font-size: .92rem; color: var(--navy-t); }
.pc-detail { font-size: .84rem; line-height: 1.5; color: var(--ink); border-top: 1px dashed var(--line); padding-top: 8px; }
.pc-detail p { margin: 0 0 6px; }

/* ================= Tema rosa (perfil con tema="perfil-rosa"): rosa palo y malva profundo, mismo estilo mediterráneo y fino =================
   Solo cambia colores (clase perfil-rosa en <html>). Contraste comprobado: texto/botones malva #8a4f63 sobre marfil
   rosado 5,7:1; texto blanco sobre malva 6,2:1; tinta #3a2a30 sobre el fondo 12,4:1.
   Tiene también su versión oscura (más abajo, «Tema rosa en oscuro»). */
html.perfil-rosa {
  --navy: #8a4f63; --navy-2: #6f3c4f; --oro: #c49a7a;
  --page: #fbf4f1; --surface: #fffcfa; --surface-2: #fdf7f4; --sidebar: #fcf6f3; --sidebar-2: #f8eeea;
  --line: #f0e1dc; --line-strong: #e4cdc6; --ink: #3a2a30; --ink-2: #5e4a52; --muted: #94838a;
  --accent: #9b5670; --brand-1: #8a4f63; --brand-2: #c0899a; --brand-grad: linear-gradient(135deg, #8a4f63 0%, #c0899a 100%);
  --fin: #9b5670; --fin-bg: #f6e6ea;
  --wb: #6e7a4b; --wb-bg: #eef0e4;
  --cul: #a85d6c; --cul-bg: #f8e7e8;
  --pat: #7f6191; --pat-bg: #efe8f3;
  --age: #b07a4f; --age-bg: #f8ece2;
  --shadow: 0 1px 2px rgba(110, 60, 80, .06);
  --shadow-lg: 0 18px 40px -18px rgba(110, 60, 80, .35);
  --azulejo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Crect width='44' height='44' fill='%23fdf6f3'/%3E%3Cg fill='none' stroke='%23b67b8c' stroke-width='1.5'%3E%3Ccircle cx='22' cy='22' r='7'/%3E%3Cpath d='M22 2q6 10 0 20q-6-10 0-20zM22 42q6-10 0-20q-6 10 0 20zM2 22q10 6 20 0q-10-6-20 0zM42 22q-10 6-20 0q10-6 20 0z'/%3E%3C/g%3E%3Cg fill='%23b67b8c'%3E%3Ccircle cx='0' cy='0' r='5'/%3E%3Ccircle cx='44' cy='0' r='5'/%3E%3Ccircle cx='0' cy='44' r='5'/%3E%3Ccircle cx='44' cy='44' r='5'/%3E%3Ccircle cx='22' cy='22' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
}
html.perfil-rosa .login-form input:focus { box-shadow: 0 0 0 3px rgba(138, 79, 99, .14); }
html.perfil-rosa .m-money { box-shadow: 0 16px 30px -18px rgba(138, 79, 99, .7); }
html.perfil-rosa .fab { box-shadow: 0 12px 28px -8px rgba(138, 79, 99, .55); }
html.perfil-rosa .sport-tile { --k1: #8a4f63; --k2: #b06f84; }
html.perfil-rosa .login-side { color: #fbeee9; }

/* Meditación: el reloj del temporizador */
.med-clock { font-family: var(--font-display); font-size: clamp(3.6rem, 18vw, 5.5rem); line-height: 1; text-align: center;
  margin: 18px 0 16px; color: var(--navy-t); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.med-timer .chips { justify-content: center; }

/* Ciclo: estado de hoy y calendario del mes */
.cyc-now { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.cyc-emoji { font-size: 2.4rem; line-height: 1; }
.cyc-phase { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--navy-t); }
.cyc-note { margin: 12px 0 0; }
.cyc-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cyc-h { font-size: .72rem; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.cyc-d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; font-size: .9rem; max-width: 44px; margin: 0 auto; width: 100%; }
.cyc-d.other { opacity: .35; }
.cyc-d.today { box-shadow: inset 0 0 0 2px var(--navy); font-weight: 700; }
.cyc-d.m-regla, .cyc-legend .m-regla { background: #c25b74; color: #fff; }
.cyc-d.m-prevista, .cyc-legend .m-prevista { background: transparent; box-shadow: inset 0 0 0 2px #c25b74; color: #a3445c; }
.cyc-d.m-fertil, .cyc-legend .m-fertil { background: #f2dde3; color: var(--ink); }
.cyc-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.cyc-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
/* En el calendario de la Agenda, discreto: una rayita de color bajo el número */
.cal-day.cyc-regla .n, .cal-day.cyc-prevista .n, .cal-day.cyc-fertil .n { position: relative; }
.cal-day.cyc-regla .n::after, .cal-day.cyc-prevista .n::after, .cal-day.cyc-fertil .n::after { content: ""; position: absolute;
  left: 0; right: 0; bottom: -3px; height: 3px; border-radius: 2px; background: #c25b74; }
.cal-day.cyc-prevista .n::after { background: repeating-linear-gradient(90deg, #c25b74 0 3px, transparent 3px 5px); }
.cal-day.cyc-fertil .n::after { background: #e9c3cd; }
.cyc-day { font-family: var(--font-display); font-size: 2.3rem; line-height: 1.05; font-weight: 600; }
.cyc-next { font-size: 1.1rem; margin: 4px 0 12px; }
.cyc-strip { display: flex; gap: 2px; height: 16px; }
.cyc-strip i { flex: 1; border-radius: 3px; opacity: .55; }
.cyc-strip i.on { opacity: 1; transform: scaleY(1.6); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink); }
.f-menstrual { background: #c25b74; } .f-folicular { background: #e8b9c4; } .f-ovulacion { background: #9b6fb0; } .f-lutea { background: #d9c3a5; }
.cyc-strip-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.cyc-strip-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.cyc-prob-alta { color: #a3445c; } .cyc-prob-media { color: #b07a4f; }
.cyc-tips p { margin: 0 0 8px; }

/* Frases */
.quote-card blockquote { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.3; margin: 6px 0 4px; font-style: italic; }
.quote-card cite { color: var(--muted); font-style: normal; font-size: .9rem; }
.quote-card .quote-save { margin-top: 8px; }

/* ================= Colores por tema y modo oscuro (06/11) =================
   --navy-t: el azul (o el malva del tema rosa) cuando es TEXTO; en oscuro se aclara para que se lea. En claro es igual
   que --navy, así que nada cambia. Los chips de bodas, cenas y el diario usan variables con su versión oscura. */
:root {
  --navy-t: var(--navy);
  --k-boda-bg: #f6e0e6; --k-boda: #a14a6b; --k-cena-bg: #f7ead6; --k-cena: #8a5a1f;
  --diary-bg: #f6efe0; --diary-ink: var(--ink); --diary-line: currentColor;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --navy-t: #9fbbe8;
    --k-boda-bg: #3d1f2b; --k-boda: #f0a8c1; --k-cena-bg: #3a2b16; --k-cena: #e8c08a;
    --diary-bg: #2f2818; --diary-ink: #f3e6c8;
  }
  :root:where(:not([data-theme="light"])) .fa-badge { background: #3a2f12; color: #f0d58a; border-color: #6b5a20; }
  :root:where(:not([data-theme="light"])) .rec-g { color: #3ccf95; }
  :root:where(:not([data-theme="light"])) .rec-y { color: #f0c96a; }
  :root:where(:not([data-theme="light"])) .rec-r { color: #f07470; }
  :root:where(:not([data-theme="light"])) .rec-pill.z-good { color: #6fdc8c; }
  :root:where(:not([data-theme="light"])) .rec-pill.z-warning { color: #f5c04a; }
  :root:where(:not([data-theme="light"])) .pc-fav { color: #f0a08a; }
}
/* Los campos de hora tenían el aspecto del navegador: igual que los demás */
input[type=time] { font: inherit; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  color: var(--ink); outline: none; }
/* iPhone: un campo de fecha u hora vacío no enseña nada; se pone un texto de ayuda (clase puesta en base.html) */
@supports (-webkit-touch-callout: none) {
  input[type=date].dt-vacio:not(:focus)::before { content: "Elegir día"; color: var(--muted); }
  input[type=time].dt-vacio:not(:focus)::before { content: "Elegir hora"; color: var(--muted); }
}

/* ---- Tema rosa: rosa palo para el diario (claro) ---- */
html.perfil-rosa { --diary-bg: #f8dde5; --diary-ink: #6d2f47; --diary-line: #d993a8; }
html.perfil-rosa .cal-diary { display: inline-block; font-size: .66rem; line-height: 1.2; padding: 0 2px; border-radius: 5px; background: var(--diary-bg);
  box-shadow: 0 0 0 1px var(--diary-line); }
html.perfil-rosa .dp-diary { background: var(--diary-bg); color: var(--diary-ink); border-top: 0; border-left: 3px solid var(--diary-line);
  border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
html.perfil-rosa .dp-diary .muted { color: inherit; opacity: .85; }
html.perfil-rosa .dv-diary small, html.perfil-rosa .dv-write { opacity: 1; }
html.perfil-rosa .dv-write { background: transparent; border: 1px dashed var(--diary-line); border-left: 3px solid var(--diary-line); }
html.perfil-rosa .dp-write { color: var(--diary-ink); background: var(--diary-bg); padding: 8px 12px; border-radius: 10px; }
html.perfil-rosa .diary-entry { border-left: 4px solid var(--diary-line); }
html.perfil-rosa .diary-form { background: color-mix(in srgb, var(--diary-bg) 55%, var(--surface)); border-color: var(--diary-line); }
html.perfil-rosa .diary-form textarea { background: var(--surface); }
html.perfil-rosa .diary-mood { font-size: 1.25rem; }

/* ---- Tema rosa en oscuro ----
   Fondo ciruela muy oscuro y cálido (no negro), tarjetas un punto más claras, texto crema rosado y acentos rosa palo
   luminosos. Botones y tarjetas destacadas (dinero del Inicio, Mi entreno) en malva rosado con texto blanco.
   Contrastes (AA): texto #f8ebef sobre tarjeta 14:1; secundario #e0ccd3 10:1; gris #b9a3ac 6,3:1; rosa #f2b6c8 9:1;
   blanco sobre malva #a85c78 4,7:1. */
@media (prefers-color-scheme: dark) {
  html.perfil-rosa:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #1e1419; --surface: #2a1d24; --surface-2: #33242c; --sidebar: #1a1116; --sidebar-2: #22171d; --sidebar-ink: #d8c3cb;
    --line: #44303a; --line-strong: #5b4350; --ink: #f8ebef; --ink-2: #e0ccd3; --muted: #b9a3ac;
    --navy: #a85c78; --navy-2: #95506a; --navy-t: #f2b6c8; --oro: #e2b993;
    --accent: #f0aec2; --brand-1: #a85c78; --brand-2: #d9899f; --brand-grad: linear-gradient(135deg, #a85c78 0%, #d9899f 100%);
    --fin: #f0aec2; --fin-bg: #432633;
    --wb: #c2cf96; --wb-bg: #2b301f;
    --cul: #f2a7b6; --cul-bg: #45262f;
    --pat: #d3b8e6; --pat-bg: #33283f;
    --age: #f0bf96; --age-bg: #3d2c20;
    --k-boda-bg: #4a2433; --k-boda: #f7bccd; --k-cena-bg: #3f2d1c; --k-cena: #f0cb9a;
    --diary-bg: #55283b; --diary-ink: #ffe6ee; --diary-line: #f0a5bd;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 40px -18px rgba(0, 0, 0, .75);
  }
  /* Elegido: malva rosado con texto blanco (el rosa claro con blanco no se leía) */
  html.perfil-rosa:not([data-theme="light"]) .tag-on,
  html.perfil-rosa:not([data-theme="light"]) .choice input:checked + span,
  html.perfil-rosa:not([data-theme="light"]) .chip-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
  html.perfil-rosa:not([data-theme="light"]) .btn.secondary:hover { border-color: var(--navy-t); background: var(--surface-2); }
  html.perfil-rosa:not([data-theme="light"]) .seg input:checked + span,
  html.perfil-rosa:not([data-theme="light"]) .seg a.on { background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-strong); }
  html.perfil-rosa:not([data-theme="light"]) select:focus, html.perfil-rosa:not([data-theme="light"]) input:focus,
  html.perfil-rosa:not([data-theme="light"]) textarea:focus { border-color: var(--navy-t); box-shadow: 0 0 0 3px rgba(242, 182, 200, .18); }
  /* Tarjetas destacadas: un brillo rosado en vez de la sombra oscura */
  html.perfil-rosa:not([data-theme="light"]) .m-money { box-shadow: 0 14px 30px -16px rgba(216, 120, 155, .45); }
  html.perfil-rosa:not([data-theme="light"]) .fab { box-shadow: 0 12px 28px -8px rgba(216, 120, 155, .5); }
  html.perfil-rosa:not([data-theme="light"]) .sport-tile { --k1: #8f4d66; --k2: #b8708b; }
  /* Ciclo */
  html.perfil-rosa:not([data-theme="light"]) .cyc-d.m-regla, html.perfil-rosa:not([data-theme="light"]) .cyc-legend .m-regla { background: #b9506b; }
  html.perfil-rosa:not([data-theme="light"]) .cyc-d.m-fertil, html.perfil-rosa:not([data-theme="light"]) .cyc-legend .m-fertil { background: #4f2c3a; color: var(--ink); }
  html.perfil-rosa:not([data-theme="light"]) .cyc-d.m-prevista, html.perfil-rosa:not([data-theme="light"]) .cyc-legend .m-prevista { color: #f6a3ba; box-shadow: inset 0 0 0 2px #e27c99; }
  html.perfil-rosa:not([data-theme="light"]) .cyc-d.today { box-shadow: inset 0 0 0 2px var(--navy-t); }
  html.perfil-rosa:not([data-theme="light"]) .cyc-prob-alta { color: #f6a3ba; }
  html.perfil-rosa:not([data-theme="light"]) .cyc-prob-media { color: #f0bf96; }
  html.perfil-rosa:not([data-theme="light"]) .cal-day.cyc-regla .n::after { background: #e27c99; }
  html.perfil-rosa:not([data-theme="light"]) .cal-day.cyc-prevista .n::after { background: repeating-linear-gradient(90deg, #e27c99 0 3px, transparent 3px 5px); }
  html.perfil-rosa:not([data-theme="light"]) .cal-day.cyc-fertil .n::after { background: #9a6176; }
  html.perfil-rosa:not([data-theme="light"]) .f-menstrual { background: #d86a88; }
  html.perfil-rosa:not([data-theme="light"]) .f-folicular { background: #e7a8ba; }
  html.perfil-rosa:not([data-theme="light"]) .f-ovulacion { background: #b88bd0; }
  html.perfil-rosa:not([data-theme="light"]) .f-lutea { background: #c9ab84; }
  /* Barras de la semana (pasos, meditación, deporte): rosa en lo cumplido y ciruela suave en lo demás */
  html.perfil-rosa:not([data-theme="light"]) .week-bar i, html.perfil-rosa:not([data-theme="light"]) .mini-days .bar i { background: #6e5664; }
  html.perfil-rosa:not([data-theme="light"]) .week-col.ok .week-bar i, html.perfil-rosa:not([data-theme="light"]) .mini-days .ok .bar i,
  html.perfil-rosa:not([data-theme="light"]) .mini-track i, html.perfil-rosa:not([data-theme="light"]) .hbar-track i { background: #e08ea8; }
  /* Calendario */
  html.perfil-rosa:not([data-theme="light"]) .cal-day.today { background: var(--surface-2); border-color: var(--navy-t); }
  html.perfil-rosa:not([data-theme="light"]) .cal-day.sel { border-color: var(--navy-t); background: color-mix(in srgb, var(--navy-t) 12%, var(--surface)); }
  html.perfil-rosa:not([data-theme="light"]) .dv-close, html.perfil-rosa:not([data-theme="light"]) .dv-prev,
  html.perfil-rosa:not([data-theme="light"]) .dv-next { background: var(--surface-2); }
  html.perfil-rosa:not([data-theme="light"]) .pill-ev.k-medico, html.perfil-rosa:not([data-theme="light"]) .pill-ev.k-trabajo,
  html.perfil-rosa:not([data-theme="light"]) .pill-ev.k-otro { background: var(--surface-2); }
  /* Varios */
  html.perfil-rosa:not([data-theme="light"]) .m-check-btn, html.perfil-rosa:not([data-theme="light"]) .ex-check { border-color: #8a6f7d; }
  html.perfil-rosa:not([data-theme="light"]) .trip-date { background: color-mix(in srgb, var(--navy-t) 14%, var(--surface)); }
  html.perfil-rosa:not([data-theme="light"]) .hint { background: var(--surface-2); border-left-color: var(--navy-t); }
  html.perfil-rosa:not([data-theme="light"]) .sync-card.warn { background: color-mix(in srgb, var(--warning, #fab219) 10%, var(--surface)); }
  html.perfil-rosa:not([data-theme="light"]) .quote-card { border-left: 3px solid var(--navy-t); }
  html.perfil-rosa:not([data-theme="light"]) .sheet { background: rgba(0, 0, 0, .6); }
  html.perfil-rosa:not([data-theme="light"]) .m-header { border-bottom-color: var(--line); }
  html.perfil-rosa:not([data-theme="light"]) .logo img, html.perfil-rosa:not([data-theme="light"]) .m-logo img { border-color: var(--line-strong); }
  html.perfil-rosa:not([data-theme="light"]) .login-side { background: #3a2230; }
  html.perfil-rosa:not([data-theme="light"]) .login-form input:focus { box-shadow: 0 0 0 3px rgba(242, 182, 200, .18); }
}

/* ================= Guías ================= */
.g-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 900px) { .g-list { grid-template-columns: 1fr; } }
.g-card { display: grid; grid-template-columns: 46px minmax(0, 1fr) 18px; gap: 12px; align-items: center; padding: 12px 14px; margin: 0;
  color: var(--ink); text-decoration: none; }
.g-card:hover { text-decoration: none; border-color: var(--line-strong); }
.g-card > svg { color: var(--muted); }
.g-emoji { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; line-height: 1; background: var(--fin-bg); }
.t-yoga .g-emoji, .t-yoga .g-hero-emoji { background: var(--pat-bg); }
.t-meditacion .g-emoji, .t-meditacion .g-hero-emoji { background: var(--cul-bg); }
.g-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.g-main b { line-height: 1.25; }
.g-meta { font-size: .78rem; color: var(--navy-t); font-weight: 600; }
.g-sum { font-size: .84rem; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-filters { display: grid; gap: 8px; margin: 2px 0 4px; }
.g-frow { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.g-frow::-webkit-scrollbar { display: none; }
.g-frow .chip-btn { text-decoration: none; flex: 0 0 auto; }
@media (max-width: 900px) { .g-frow { margin: 0 -16px; padding: 0 16px 2px; } }
.g-fase { padding: 14px 16px; margin-bottom: 14px; }
.g-fase .card-head { margin-bottom: 2px; }
.g-mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 8px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.g-mini:hover { text-decoration: none; border-color: var(--line-strong); }
.g-mini b { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.25; }
.g-mini small { color: var(--muted); white-space: nowrap; }
.g-fase-links { margin: -4px 0 8px; }
.g-access { margin: 0 0 14px; }
.g-access .g-emoji { width: 40px; height: 40px; font-size: 1.25rem; flex: 0 0 40px; }
/* Ficha */
.g-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px 14px; align-items: center; padding: 18px; margin-bottom: 14px; }
.g-hero-emoji { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 2.1rem; line-height: 1; background: var(--fin-bg); }
.g-hero-text { min-width: 0; }
.g-hero-text h1 { font-size: clamp(1.6rem, 6vw, 2.3rem); margin: 2px 0 8px; line-height: 1.1; overflow-wrap: anywhere; }
.g-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.g-hero-sum, .g-hero .hint { grid-column: 1 / -1; }
.g-hero-sum { margin: 4px 0 0; color: var(--ink-2); line-height: 1.5; }
/* Reproductor con temporizador (yoga y meditación) */
.g-player { text-align: center; padding: 18px 16px; margin-bottom: 14px; }
.g-p-top { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.g-p-top b { color: var(--ink); font-variant-numeric: tabular-nums; }
.g-player .track .bar { height: 100%; transition: width .3s ease; }
.g-p-title { font-size: 1.6rem; margin: 16px 0 6px; line-height: 1.15; }
.g-p-text { font-size: 1.05rem; line-height: 1.6; color: var(--ink-2); margin: 0 auto; max-width: 560px; min-height: 5em; }
.g-p-side { margin-top: 8px; font-weight: 700; color: var(--navy-t); }
.g-p-clock { font-family: var(--font-display); font-size: clamp(3rem, 16vw, 4.6rem); line-height: 1; margin: 14px 0; color: var(--navy-t);
  font-variant-numeric: tabular-nums; }
.g-p-btns { display: flex; justify-content: center; gap: 10px; }
.g-p-main { min-width: 150px; justify-content: center; font-size: 1.05rem; }
.g-p-nav { width: 48px; padding: 0; justify-content: center; font-size: 1.4rem; line-height: 1; }
.g-p-note { margin: 12px 0 0; }
.g-med-steps { padding: 6px 16px 6px 34px; margin: 0 0 14px; }
.g-med-steps li { padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.g-med-steps li:last-child { border-bottom: 0; }
.g-med-steps li::marker { color: var(--muted); font-weight: 700; }
.g-med-steps li p { margin: 4px 0 0; color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.g-med-steps li.on b, .g-med-steps li.on::marker { color: var(--navy-t); }
.g-steps { margin-bottom: 14px; }
.g-steps .ex-card { cursor: pointer; background: var(--surface); }
.g-steps .ex-card.on { border-color: var(--navy-t); box-shadow: 0 0 0 2px color-mix(in srgb, var(--navy-t) 25%, transparent); }
.g-how { margin: 6px 0 0; color: var(--ink-2); line-height: 1.45; }
/* «Hecho» */
.g-done { display: grid; gap: 10px; }
.g-done .card-head { margin-bottom: 0; flex-wrap: wrap; gap: 4px 10px; }
.g-moods { display: grid; gap: 4px; }
.g-done-row { display: flex; gap: 10px; align-items: center; }
.g-done-min { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.g-done-min input { width: 84px; text-align: center; font-weight: 700; }
.g-done-row .btn { flex: 1; justify-content: center; }
.g-free { margin: 14px 0 0; text-align: center; }
.g-free-line { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
@media (max-width: 900px) { .g-list-med { margin-bottom: 14px; } }

/* ---- Agenda: día y hora de los recordatorios, visibles y claros ---- */
.task-when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.task-when label, .task-repeat { display: grid; gap: 6px; min-width: 0; }
.task-when-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 10px; }
.task-repeat select { width: 100%; }
.qadd .qadd-time { flex: 0 0 108px; width: 108px; min-width: 0; }
.task-edit .form-grid label { min-width: 0; }

/* «+» rápido del Inicio: día y hora opcionales (sin día = lo antes posible) */
.qadd .qadd-when { display: flex; gap: 8px; flex: 1 0 100%; }
.qadd .qadd-when label { flex: 1; min-width: 0; display: grid; gap: 3px; font-size: .78rem; color: var(--muted); }
.qadd .qadd-when input { width: 100%; min-width: 0; font-size: .95rem; }
.qadd .qadd-hint { flex: 1 0 100%; margin: 0; }

/* ❗ Tareas importantes: en rojo y fijas arriba en el Inicio */
.m-row.imp .m-row-text, .today-line.imp { color: var(--neg); font-weight: 600; }
.m-row.imp { box-shadow: inset 3px 0 0 var(--neg); }
.task.important b { color: var(--neg); }
.task.important { box-shadow: inset 3px 0 0 var(--neg); }
.imp-toggle { opacity: .35; text-decoration: none; filter: grayscale(1); }
.imp-toggle.on { opacity: 1; filter: none; }
.qadd .qadd-imp, .qadd-imp { flex: 1 0 100%; display: flex; align-items: center; gap: 6px; font-size: .88rem; }
.qadd .qadd-imp input, .qadd-imp input { flex: 0 0 auto; width: auto; }

/* Diario: chips del día */
.diary-chips-card { padding: 14px 16px; margin-bottom: 14px; }
.diary-chips { gap: 6px; }
.diary-chips form { display: contents; }
.dchip { font: inherit; font-size: .88rem; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.dchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.dchip.sug { border-style: dashed; border-color: var(--accent); }
.dchip.hot:not(.on) { border-color: var(--k-boda); box-shadow: 0 0 0 2px var(--k-boda-bg); font-weight: 600; }
.dchip.hot.on { background: var(--k-boda); border-color: var(--k-boda); }
.diary-form .diary-chips .choice span { padding: 6px 11px; font-size: .85rem; }
.diary-tags { gap: 4px; margin-bottom: 6px; }
.dtag { font-size: .78rem; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.dtag.hot { background: var(--k-boda-bg); color: var(--k-boda); border-color: transparent; font-weight: 600; }
.diary-counts { padding: 12px 16px; margin-bottom: 14px; font-size: .9rem; }
.diary-counts p { margin: 0 0 4px; }
.diary-counts p:last-child { margin: 0; }
.diary-remind { margin-top: 16px; }
.cal-chips { display: block; font-size: .5rem; letter-spacing: -1px; line-height: 1.1; max-width: 100%; overflow: hidden; white-space: nowrap; }

/* Cumpleaños */
.bday-today { box-shadow: inset 3px 0 0 var(--k-boda); }
.bday-acts, .map-acts { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.bday-acts form, .map-acts form { margin: 0; }
a.bday-flash { text-decoration: none; color: inherit; }

/* Tu mapa */
.map-card { padding: 8px; }
.map-box { position: relative; z-index: 0; height: 360px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.map-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 6px 2px; color: var(--ink-2); }
.map-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); vertical-align: -1px; }
.map-legend .dot.estado { background: var(--accent); }
.map-legend .dot.quiero { background: #e0a100; }
.map-legend .dot.casa { background: #c0392b; }
.map-wait { margin: 6px 6px 2px; }
.map-add { padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 10px; }
details.map-row { display: block; }
details.map-row > summary { display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
details.map-row > summary::-webkit-details-marker { display: none; }
.map-fix-form { margin-top: 10px; }
details.map-fix.card { padding: 10px 14px; margin-top: 10px; }
@media (max-width: 480px) { .map-box { height: 300px; } }
/* Mapa de restaurantes: ✓ verde = he ido, ★ dorada = quiero ir */
.map-link { display: inline-block; margin: 6px 6px 2px; font-weight: 600; }
.rmap-filters { display: grid; gap: 8px; margin: 0 0 10px; }
.rmap-filters .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rmap-filters .choice span { padding: 6px 12px; font-size: .85rem; }
.rmap-box { height: 420px; }
.rmk { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35); color: #fff; font: 700 15px/1 var(--font); font-style: normal; }
.rmk-ido { background: #1f9d55; }
.rmk-quiero { background: #e0a100; border-radius: 8px; }
.rmk-mini { display: inline-grid; width: 18px; height: 18px; font-size: 10px; vertical-align: -4px; border-width: 1.5px; }
.rmk-quiero.rmk-mini { border-radius: 5px; }
.rpop { display: grid; gap: 6px; font-size: .9rem; }
.rpop-t { font-size: 1rem; }
.rpop-l { color: var(--ink-2); }
.rpop-ido > summary { list-style: none; cursor: pointer; }
.rpop-ido > summary::-webkit-details-marker { display: none; }
.rpop-ido form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.rpop-ido input[type=number] { width: 70px; }
.rpop-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rmap-row-acts { gap: 14px; margin-top: 8px; }
.leaflet-container .leaflet-popup-content-wrapper, .leaflet-container .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-container .leaflet-popup-content { margin: 12px 14px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.item-map { display: grid; gap: 8px; }
@media (max-width: 480px) { .rmap-box { height: 360px; } }

/* 🎂 Cumpleaños de hoy en el Inicio: tarta pequeña junto a la fecha; al tocarla, de quién es */
.cake-chip { display: inline-block; position: relative; margin-left: 8px; vertical-align: middle; letter-spacing: 0;
  text-transform: none; font-weight: 500; }
.cake-chip > summary { list-style: none; cursor: pointer; font-size: 1.05rem; line-height: 1; }
.cake-chip > summary::-webkit-details-marker { display: none; }
.cake-pop { position: absolute; left: 0; top: 130%; z-index: 20; min-width: 200px; max-width: 70vw; padding: 10px 12px;
  border-radius: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .35); font-size: .9rem; display: grid; gap: 6px; }
.cake-pop a { color: inherit; text-decoration: none; }
.m-date-row .m-date-fill { flex: 1; }
.m-date-row .cake-chip { margin-left: -4px; }
.map-cta { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 12px 14px; margin: 0 0 12px; color: inherit; text-decoration: none; }
.map-cta span { grid-column: 2; }
.dg-oscuro .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9); }
/* Novedades en tu app: tarjeta discreta arriba del Inicio */
.news-card { padding: 14px 16px; margin: 4px 0 14px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface)); }
.news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.news-items { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.news-items a { display: grid; grid-template-columns: 26px 1fr; gap: 8px; color: inherit; text-decoration: none; font-size: .9rem; line-height: 1.35; }
.news-emoji { font-size: 1.1rem; line-height: 1.3; text-align: center; }
.news-desk { max-width: 560px; }
.news-list .tag { vertical-align: 1px; }

/* Tu mapa: ✈️ donde has estado, 📍 quiero ir, 🏠 casa */
.mmk { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 17px; line-height: 1;
  background: var(--surface, #fff); border: 2px solid var(--line-strong, #ddd); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }

/* ===== Calendario: Hoy · Semana · Mes y la ventanita «Tu calendario de hoy» ===== */
.cal-views { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 0 0 10px; background: var(--page);
  border: 1px solid var(--line); border-radius: 12px; }
.cal-views a { text-align: center; padding: 8px 4px; border-radius: 9px; font-weight: 700; font-size: .88rem; color: var(--ink-2); text-decoration: none; }
.cal-views a.on { background: var(--surface); color: var(--navy-t); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.mini-cal .cal-views a:first-child { background: var(--surface); color: var(--navy-t); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.mini-cal { padding: 12px 12px 8px; }
.mc-day { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.mc-allday { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.mc-allday .dv-chip { text-decoration: none; font-size: .8rem; padding: 5px 8px; }
.mc-scroll { position: relative; max-height: 280px; overflow-y: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line); }
.mc-grid { position: relative; margin: 10px 0 6px; }
.mc-grid .dv-hour { height: 40px; }
.mc-grid .dv-ev { text-decoration: none; display: flex; flex-direction: column; }
.mc-empty { margin: 6px 0 2px; text-align: center; }
.dv-ev.k-tarea, .wk-chip.k-tarea { background: var(--surface-2, var(--page)); color: var(--ink-2); }
.mc-fold { margin: 10px 0 0; }
.mc-fold > summary { list-style: none; display: grid; grid-template-columns: 26px 1fr auto 18px; align-items: center; gap: 8px; cursor: pointer;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.mc-fold > summary::-webkit-details-marker { display: none; }
.mc-fold > summary svg { transition: transform .2s; color: var(--muted); }
.mc-fold[open] > summary svg { transform: rotate(90deg); }
.mc-fold[open] > summary { border-radius: 14px 14px 0 0; border-bottom: 0; }
.mc-fold > .mini-cal { margin: 0; border-radius: 0 0 14px 14px; border-top: 0; }
/* Semana */
.wk { padding: 6px 6px 0; overflow: hidden; }
.wk-head, .wk-allday { display: grid; grid-template-columns: 30px repeat(7, minmax(0, 1fr)); }
.wk-day { border: 0; background: none; display: flex; flex-direction: column; align-items: center; padding: 4px 0 6px; cursor: pointer; color: var(--ink-2); font: inherit; }
.wk-day small { font-size: .68rem; font-weight: 800; color: var(--muted); }
.wk-day b { font-size: 1.05rem; width: 30px; height: 30px; line-height: 30px; border-radius: 50%; }
.wk-day.today b { background: #d93025; color: #fff; }
.wk-allday { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px 0; }
.wk-lab { font-size: .55rem; color: var(--muted); line-height: 1.1; align-self: center; text-align: center; }
.wk-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 1px; }
.wk-chip { display: block; border: 0; border-radius: 4px; padding: 2px 3px; font: 700 .62rem var(--font); text-align: left; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-decoration: none; cursor: pointer; background: var(--age-bg); color: var(--age); }
.wk-chip.k-viaje { background: var(--fin-bg); color: var(--fin); }
.wk-chip.k-concierto, .wk-chip.k-cine { background: var(--cul-bg); color: var(--cul); }
.wk-chip.k-deporte { background: var(--wb-bg); color: var(--wb); }
.wk-chip.k-boda, .wk-chip.k-cumple { background: var(--k-boda-bg); color: var(--k-boda); }
.wk-chip.k-cena, .wk-chip.k-plan { background: var(--k-cena-bg); color: var(--k-cena); }
.wk-scroll { height: 64vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.wk-grid { position: relative; height: calc(24 * 44px); margin: 8px 0 12px; }
.wk-hour { position: absolute; left: 0; right: 0; height: 44px; border-top: 1px solid var(--line); }
.wk-hour span { position: absolute; left: 2px; top: -7px; background: var(--surface); padding: 0 2px; font-size: .62rem; color: var(--muted); font-weight: 600; }
.wk-vline { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); opacity: .6; }
.wk-ev { padding: 2px 3px; border-radius: 5px; border-left-width: 2px; z-index: 1; box-shadow: 0 0 0 1px var(--surface); }
.wk-ev { align-items: center; text-align: center; padding: 2px 1px; }
.wk-ev i { font-style: normal; font-size: 1rem; line-height: 1.15; display: block; }
.wk-ev small { font-size: .56rem; font-weight: 700; display: block; opacity: .9; }
.wk-chip { text-align: center; font-size: .8rem; padding: 1px 0; }
.wk-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 10px; }
.wk-mode button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 10px; padding: 8px; font: 700 .86rem var(--font); cursor: pointer; }
.wk-mode button.on { border: 2px solid var(--navy-t); color: var(--navy-t); }
.wk-ev b { font-size: .62rem; line-height: 1.12; display: block; overflow-wrap: normal; word-break: normal; -webkit-hyphens: auto; hyphens: auto; }
/* La semana en lista */
.wk-agenda { padding: 12px 14px 6px; }
.wka-title { margin: 0 0 6px; font-size: 1rem; }
.wka-day { border-top: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.wka-day.past { opacity: .6; }
.wka-dh { border: 0; background: none; padding: 0; text-align: left; font: 800 .78rem var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); cursor: pointer; }
.wka-day.today .wka-dh { color: #d93025; }
.wka-row { display: grid; grid-template-columns: 68px 22px 1fr; gap: 6px; align-items: baseline; border: 0; background: none; padding: 3px 0; text-align: left;
  font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; width: 100%; }
.wka-h { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.wka-t { min-width: 0; font-size: .92rem; line-height: 1.3; }
.wka-t b { font-weight: 600; } .wka-t small { color: var(--muted); }
.wka-none { font-size: .82rem; color: var(--muted); padding-left: 74px; }
.wk-now { right: auto; }
.wk-now::before { left: -4px; top: -5px; width: 8px; height: 8px; }

/* Ajustes → Colores de la app */
.tema-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tema-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: center; }
.tema-opt b { font-size: .84rem; } .tema-opt small { font-size: .68rem; color: var(--muted); line-height: 1.2; }
.tema-opt.on { border: 2px solid var(--navy-t); }
.tema-muestra { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); }
.t-claro .tema-muestra { background: linear-gradient(135deg, #fbf3f5 50%, #e8a3b8 50%); }
.t-noche .tema-muestra { background: linear-gradient(135deg, #1e1419 50%, #f2b6c8 50%); }
.t-auto .tema-muestra { background: linear-gradient(90deg, #fbf3f5 50%, #1e1419 50%); }

/* «Tu dinero de verdad» en el Inicio */
.dr .m-money { display: flex; }
.dr-cuenta { font-size: .74rem; opacity: .85; margin-top: 6px; line-height: 1.3; }
.dr-card { padding: 14px 14px 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.dr-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dr-line { font-size: .92rem; border-top: 1px solid var(--line); padding-top: 8px; }
.dr-acc > summary { list-style: none; display: grid; grid-template-columns: 1fr auto auto 22px; gap: 8px; align-items: center; cursor: pointer;
  padding: 6px 0; border-top: 1px solid var(--line); }
.dr-acc > summary::-webkit-details-marker, .dr-pay > summary::-webkit-details-marker { display: none; }
.dr-edit { font-size: .8rem; opacity: .7; }
.dr-form { margin: 4px 0 8px; }
.dr-pay { border-top: 1px solid var(--line); padding-top: 8px; }
.dr-pay > summary { list-style: none; cursor: pointer; }
.dr-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin: 6px 0 0; font-size: .9rem; }
.dr-ok { border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-2); border-radius: 999px; padding: 3px 9px; font: 700 .72rem var(--font); cursor: pointer; }
.dr-done { opacity: .6; }
.dr-note { margin: 0; }
.dr-save { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.dr-save.neg b { color: var(--neg); }
.dr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dr-help > summary { display: none; }
.dr-help ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.news-det > summary { list-style: none; display: grid; grid-template-columns: 26px 1fr; gap: 8px; cursor: pointer; font-size: .9rem; line-height: 1.35; }
.news-det > summary::-webkit-details-marker { display: none; }
.news-more { color: var(--navy-t); font-weight: 700; font-size: .8rem; white-space: nowrap; }
.news-det[open] .news-more { display: none; }
.news-steps { margin: 8px 0 4px 34px; padding-left: 16px; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; line-height: 1.4; }
.news-go { display: inline-block; margin-left: 34px; font-weight: 700; }
/* Lo hecho hoy: se queda tachado hasta mañana (tocar el ✓ lo desmarca) */
.task-done .m-row-text { color: var(--muted); }
.task-done s { text-decoration-thickness: 1.5px; }
.m-check-btn.on { border-color: var(--pos); background: var(--pos); color: #fff; font: 800 .8rem/20px var(--font); text-align: center; }
.task-done-list { margin-top: 6px; }
.task-done form { margin: 0; display: flex; }
.task-del { border: 0; background: none; color: var(--muted); font-size: 1rem; padding: 4px 6px; cursor: pointer; margin-left: auto; }
.task-del:hover, .task-del:active { color: var(--neg); }
.mc-fold-sec { margin: 18px 0 0; }
/* 📊 Tu semana */
.wk-nav { display: flex; gap: 8px; margin: 0 0 12px; }
.wks-card { padding: 14px 16px; margin-bottom: 10px; }
.wks-title { margin: 0 0 6px; font-size: 1rem; }
.wks-lines { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.wks-toggle { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 8px 0 20px; }
/* Fondo sin fotos: difuminado de cielo, arena y mar (como una foto muy lavada, pero sin foto) */
:root { --soft-cielo: rgba(140, 175, 200, .55); --soft-arena: rgba(222, 196, 160, .55); --soft-mar: rgba(120, 165, 160, .38); --soft-luz: rgba(255, 244, 225, .7); }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --soft-cielo: rgba(60, 90, 130, .45); --soft-arena: rgba(110, 85, 60, .35); --soft-mar: rgba(40, 95, 95, .35); --soft-luz: rgba(80, 70, 110, .25); }
}
.app-bg-soft { filter: none; transform: none;
  background: radial-gradient(60% 50% at 85% 8%, var(--soft-cielo), transparent 70%),
              radial-gradient(55% 45% at 12% 30%, var(--soft-luz), transparent 70%),
              radial-gradient(70% 45% at 75% 95%, var(--soft-mar), transparent 70%),
              radial-gradient(60% 50% at 8% 92%, var(--soft-arena), transparent 70%), var(--page); }
.app-bg-soft::after { background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--page) 35%, transparent) 60%, color-mix(in srgb, var(--page) 55%, transparent) 100%); }
.fotos-borrar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.danger-btn { color: var(--neg); border-color: var(--neg); }
/* 📸 Hace un año… */
.memory-card { margin-top: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.memory-row { display: grid; grid-template-columns: 24px 1fr; gap: 8px; color: inherit; text-decoration: none; font-size: .92rem; line-height: 1.35; }
/* 🔎 Buscador */
.search-box { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px 6px 6px 12px; margin: 4px 0 12px; color: var(--muted); }
.search-box input { border: 0; background: none; box-shadow: none; padding: 8px 0; min-width: 0; font-size: 1rem; }
.search-box input:focus { box-shadow: none; outline: none; }
.search-sum { margin: -4px 0 6px; }
/* Al escribir (teclado abierto en el móvil), la barra de abajo se esconde para dejar sitio */
@media (max-width: 900px) {
  body:has(textarea:focus, [contenteditable="true"]:focus,
    input:focus:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="file"]):not([type="date"]):not([type="time"])) .tabbar { display: none; }
}
.search-answer { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 14px 16px; margin: 0 0 12px;
  color: inherit; text-decoration: none; border: 2px solid var(--navy-t); font-size: 1rem; line-height: 1.35; }
.search-answer-ico { font-size: 1.6rem; text-align: center; }
.search-list .m-row-text b, .search-list .m-row-text > span { white-space: normal; overflow: visible; text-overflow: clip; }
.search-list .m-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-more { justify-content: center; font-weight: 700; color: var(--navy-t); }
.search-answer-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.search-answer-txt span { font-size: .9rem; color: var(--ink-2); }
.search-ej { margin: 4px 0 10px; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
/* ✈️ Modo viaje */
.trip-now { padding: 14px 16px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--fin); }
.trip-now-head { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.trip-now-em { font-size: 1.7rem; text-align: center; }
.trip-now-head b { font-family: var(--font-display); font-size: 1.25rem; display: block; line-height: 1.15; }
.trip-now-head small { color: var(--muted); font-size: .84rem; }
.trip-now-money { display: flex; flex-direction: column; gap: 5px; font-size: .92rem; border-top: 1px solid var(--line); padding-top: 9px; }
.trip-now-plans { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 9px; }
.trip-now-plans a { display: grid; grid-template-columns: 26px 1fr; gap: 8px; color: inherit; text-decoration: none; font-size: .92rem; line-height: 1.3; }
.trip-now-plans a small { display: block; color: var(--muted); font-size: .8rem; }
.trip-now-plans a.hoy b { color: var(--fin); }
/* 🎧 Tu música (Spotify) */
.mu-hero { position: relative; overflow: hidden; border-radius: 20px; margin: 0 0 14px; background: #121212; color: #fff; min-height: 210px; }
.mu-hero-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(22px) saturate(1.3) brightness(.55); }
.mu-hero-in { position: relative; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.mu-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #1ed760; }
.mu-hero-artist, .mu-hero-song { display: grid; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.mu-hero-artist { grid-template-columns: 96px 1fr; }
.mu-hero-artist img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.mu-hero-artist b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.05; display: block; }
.mu-hero-song { grid-template-columns: 56px 1fr; background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 8px; }
.mu-hero-song img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; }
.mu-hero small { display: block; font-size: .72rem; opacity: .75; text-transform: uppercase; letter-spacing: .06em; }
.mu-hero-song b { display: block; font-size: 1rem; } .mu-hero-song em { font-style: normal; font-size: .84rem; opacity: .8; }
.mu-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.mu-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; }
.mu-stat b { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.mu-stat small { font-size: .68rem; color: var(--muted); line-height: 1.2; display: block; }
.mu-card { padding: 14px 16px; }
.mu-h { font-size: 1rem; margin: 14px 0 8px; } .mu-card .mu-h:first-child { margin-top: 0; }
.mu-line { margin: 8px 0 0; }
.mu-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 110px; align-items: end; }
.mu-wd { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; }
.mu-bar { width: 70%; min-height: 3px; background: #1db954; border-radius: 6px 6px 2px 2px; }
.mu-wd small { font-size: .7rem; color: var(--muted); font-weight: 700; } .mu-wd em { font-style: normal; font-size: .62rem; color: var(--muted); }
.mu-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 56px; align-items: end; }
.mu-hours span { background: color-mix(in srgb, #1db954 70%, var(--surface)); border-radius: 3px 3px 1px 1px; }
.mu-hours-lab { display: flex; justify-content: space-between; font-size: .62rem; color: var(--muted); margin-top: 3px; }
.mu-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; margin: 6px 0 4px; background: var(--page); border: 1px solid var(--line); border-radius: 12px; }
.mu-tabs button { border: 0; background: none; padding: 8px 4px; border-radius: 9px; font: 700 .86rem var(--font); color: var(--ink-2); cursor: pointer; }
.mu-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.mu-artists { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.mu-artist { flex: 0 0 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: inherit; text-decoration: none; scroll-snap-align: start; text-align: center; }
.mu-ph { position: relative; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 1.6rem; }
.mu-ph img { width: 100%; height: 100%; object-fit: cover; }
.mu-ph i { position: absolute; left: 4px; bottom: 2px; font: italic 800 1.3rem var(--font-display); color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.mu-artist b { font-size: .76rem; line-height: 1.2; }
.mu-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; overflow: hidden; margin: 8px 0 4px; max-width: 420px; }
.mu-mosaic img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.mu-tracks .m-row { gap: 10px; }
.mu-tracks img, .mu-noimg { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: 0 0 44px; display: grid; place-items: center; background: var(--surface-2); }
.mu-n { width: 18px; text-align: right; font-weight: 800; color: var(--muted); font-size: .84rem; flex: 0 0 18px; }
.mu-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 8px; }
/* 🧠 Trivial */
.tv-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin: 0 0 6px; }
.tv-score { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.tv-score small { font-size: 1.1rem; color: var(--muted); }
.tv-prog { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 0 0 12px; }
.tv-prog i { display: block; height: 100%; background: var(--navy); border-radius: 6px; transition: width .3s; }
.tv-card { padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.tv-tema { font-size: .76rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tv-q { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.25; margin: 0; text-wrap: balance; }
.tv-ops { display: flex; flex-direction: column; gap: 8px; }
.tv-op { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); font: 600 1rem var(--font); cursor: pointer; }
.tv-op i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: var(--muted); }
.tv-op:active { transform: scale(.98); border-color: var(--navy-t); }
span.tv-op { display: block; cursor: default; }
.tv-op.right { border-color: var(--pos); background: var(--pos-bg); color: var(--pos); font-weight: 800; }
.tv-op.wrong { border-color: var(--neg); background: var(--neg-bg); color: var(--neg); }
.tv-op.off { opacity: .5; }
.tv-verdict { font-size: 1.15rem; font-weight: 800; margin: 0; }
.tv-ok { border: 2px solid var(--pos); } .tv-ko { border: 2px solid var(--neg); }
.tv-x { margin: 0; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: .92rem; line-height: 1.4; }
.tv-next { justify-content: center; }
.tv-done { align-items: center; text-align: center; } .tv-big { font-size: 3rem; }
.tv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 10px; }
.tv-temas { padding: 14px 16px; }
.tv-tm { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 40px; gap: 8px; align-items: center; font-size: .86rem; margin: 6px 0; }
.tv-tm b { text-align: right; }
.tv-fallos { padding: 14px 16px; } .tv-fallos summary { cursor: pointer; }
.tv-fl { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.tv-foot { text-align: center; margin: 14px 0; }
.tv-total { margin-top: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tv-total-row { display: flex; align-items: baseline; justify-content: space-between; }
.tv-total-big { font-family: var(--font-display); font-size: 2.3rem; line-height: 1; }
.tv-total-big small { font-size: 1.2rem; color: var(--muted); }
.tv-total-pct { font-size: 1.5rem; font-weight: 800; }
.tv-split { height: 10px; border-radius: 6px; background: var(--neg-bg); overflow: hidden; }
.tv-split i { display: block; height: 100%; background: var(--pos); }
.tv-rondas summary { cursor: pointer; margin-top: 4px; }
.tv-rd { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 44px; gap: 8px; align-items: center; font-size: .86rem; margin: 6px 0; }
.tv-rd b { text-align: right; }
/* 📈 Subidas de precio */
.rise-row { gap: 10px; } .rise-row .m-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rise-row .btn { flex: 0 0 auto; }
/* 🎯 Retos del año */
.retos-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.reto { display: flex; flex-direction: column; gap: 5px; }
.reto-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .95rem; }
.reto-top b { font-family: var(--font-display); font-size: 1.25rem; }
.reto-bar { position: relative; height: 10px; border-radius: 6px; background: var(--line); }
.reto-bar i { display: block; height: 100%; border-radius: 6px; background: var(--pos); }
.reto-bar i.ko { background: #e0a030; }
.reto-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }
.reto-ok { color: var(--pos); } .reto-ko { color: #b7791f; }
.reto-add summary { cursor: pointer; color: var(--navy-t); font-weight: 700; }
.reto-form { display: grid; grid-template-columns: 1fr 80px auto; gap: 8px; margin-top: 8px; }
/* 🌙 Hora de acostarte (junto a la fecha) */
.bed-chip { position: relative; }
.bed-chip > summary { list-style: none; cursor: pointer; font-size: .82rem; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--navy-t); white-space: nowrap; }
.bed-chip > summary::-webkit-details-marker { display: none; }
.bed-pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: -40px; width: min(290px, 80vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; font-size: .9rem; line-height: 1.35; }
.steps-chip { font-size: .82rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.m-date-row { gap: 8px; }
.wx-chip .bed-pop { left: -110px; }
.m-quick .streak { margin-left: 6px; font-size: .82rem; font-weight: 800; color: #d9480f; }
/* 🍽️ Tu plato */
.fd-hero { border-radius: 20px; padding: 16px; margin: 0 0 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.fd-hero.fd-g { background: color-mix(in srgb, var(--pos) 12%, var(--surface)); border-color: color-mix(in srgb, var(--pos) 35%, var(--line)); }
.fd-hero.fd-y { background: color-mix(in srgb, #e0a030 14%, var(--surface)); }
.fd-hero.fd-r { background: color-mix(in srgb, var(--neg) 12%, var(--surface)); }
.fd-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fd-big { display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; margin: 4px 0; }
.fd-big small { font-size: 1.1rem; color: var(--muted); }
.fd-streak { display: flex; flex-direction: column; align-items: center; font-size: 1.4rem; font-weight: 800; }
.fd-streak small { font-size: .62rem; color: var(--muted); font-weight: 700; }
.fd-day { display: flex; gap: 8px; overflow-x: auto; }
.fd-slot { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; border: 1.5px dashed var(--line-strong); opacity: .55; }
.fd-slot.on { border-style: solid; opacity: 1; background: var(--surface); }
.fd-slot-em { font-size: 1.5rem; line-height: 1.2; } .fd-slot small { font-size: .66rem; color: var(--muted); font-weight: 700; }
.fd-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 0 4px; }
.fd-wd { display: flex; flex-direction: column; align-items: center; gap: 3px; } .fd-wd small { font-size: .7rem; color: var(--muted); font-weight: 700; }
.fd-wd.hoy small { color: var(--ink); }
.fd-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; background: var(--line); }
.fd-dot.mini { width: 10px; height: 10px; display: inline-block; vertical-align: middle; margin: 0 2px 0 6px; }
.fd-dot.c-g { background: #2f9e62; } .fd-dot.c-y { background: #e0a030; } .fd-dot.c-r { background: #d9534f; } .fd-dot.c-none { color: var(--muted); }
.fd-legend { margin: 2px 0 12px; text-align: center; }
.fd-add { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.fd-slots { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.fd-chip input { position: absolute; opacity: 0; pointer-events: none; }
.fd-chip span { display: inline-block; white-space: nowrap; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: .84rem; font-weight: 700; cursor: pointer; }
.fd-chip input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.fd-out { font-size: .88rem; display: flex; gap: 6px; align-items: center; }
.fd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fd-form { margin: 0; }
.fd-tile { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 7px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.fd-tile span { font-size: 1.7rem; line-height: 1.1; } .fd-tile small { font-size: .66rem; font-weight: 700; line-height: 1.15; text-align: center; color: var(--ink-2); }
.fd-tile:active { transform: scale(.95); }
.fd-tile.n5, .fd-tile.n4 { box-shadow: inset 0 -3px 0 #2f9e62; } .fd-tile.n3 { box-shadow: inset 0 -3px 0 #e0a030; } .fd-tile.n2, .fd-tile.n1 { box-shadow: inset 0 -3px 0 #d9534f; }
.fd-free { margin-top: 6px; }
.fd-row { gap: 10px; } .fd-row-em { font-size: 1.5rem; } .fd-row form { margin: 0; }
.fd-api { text-align: center; margin: 12px 0; }
.fd-home { margin: 10px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; gap: 10px; }
.fd-home-em { font-size: 1.3rem; letter-spacing: 2px; white-space: nowrap; }
.fd-count { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 6px 0 4px; }
.fd-cnt { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 1.5rem; line-height: 1.1; }
.fd-cnt b { font-size: .95rem; } .fd-cnt small { font-size: .62rem; color: var(--muted); text-align: center; line-height: 1.15; font-weight: 700; }
.fd-opts { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.fd-skip { border: 1px dashed var(--line-strong); background: none; border-radius: 999px; padding: 6px 12px; font: 700 .84rem var(--font); color: var(--ink-2); cursor: pointer; }
.fd-skipped { text-align: center; margin: 8px 0 0; }
/* 🍻 Contador de copas */
.cp-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.cp-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cp-big { display: inline-block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; margin: 4px 8px 0 0; }
.cp-tipos { font-size: 1.2rem; letter-spacing: 2px; }
.cp-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: .84rem; color: var(--ink-2); text-align: right; }
.cp-btns { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.cp-btns form { margin: 0; }
.cp-btn { width: 100%; display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font: inherit; }
.cp-btn span { font-size: 1.6rem; line-height: 1.1; } .cp-btn small { font-size: .7rem; font-weight: 800; color: var(--muted); }
.cp-btn:active { transform: scale(.94); }
.cp-week { height: 80px; } .cp-bar { background: #b8860b; }
.cp-mes { margin: 0; }
.cf-btn small { font-size: .62rem; text-align: center; line-height: 1.1; }
.cf-bar { background: #6f4e37; }
/* 🍽️ Lo que comiste, en el calendario */
.dp-food .dp-main { display: flex; flex-direction: column; gap: 2px; }
.dv-food { width: 100%; background: var(--surface-2, var(--page)); color: var(--ink); border-left-color: #2f9e62; }
.dv-food summary { list-style: none; cursor: pointer; font-weight: 700; } .dv-food summary::-webkit-details-marker { display: none; }
.dv-food span { display: block; font-weight: 500; font-size: .86rem; margin-top: 4px; } .dv-food small { color: var(--muted); }
.fd-where-line { text-align: center; margin: 4px 0 12px; line-height: 1.6; }
/* Mapa de restaurantes: 🍽️ donde comes, 🛵 donde pides */
.rmk-ido, .rmk-pedido { background: #fff; font-size: 15px; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.rmk-ido { border-color: #1f9d55; } .rmk-pedido { border-color: #e8590c; }
.rmk-mini.rmk-ido, .rmk-mini.rmk-pedido { font-size: 10px; }
.rmk { position: relative; }
.rmk-n { position: absolute; top: -8px; right: -12px; background: #1f9d55; color: #fff; font: 800 10px/1 var(--font); padding: 2px 4px; border-radius: 8px; border: 1.5px solid #fff; }
.rmk-pedido .rmk-n { background: #e8590c; }
.rpop-big { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 2px; }
.rpop-big .score { font-size: 1.3rem; padding: 4px 10px; }
.rpop-veces { font-size: 1.2rem; font-weight: 800; display: flex; align-items: baseline; gap: 4px; }
.rpop-veces small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.rpop-op { margin: 6px 0 2px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2, #f5f1ea); font-size: .86rem; font-style: italic; }
.diary-sleep { font-size: .84rem; color: var(--ink-2); margin: 2px 0 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.diary-sleep-end { margin: 8px 0 0; padding-top: 6px; border-top: 1px dashed var(--line); }
.rmk-casa { background: #fff; border-color: var(--navy, #1d3557); font-size: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.rmk-mini.rmk-casa { font-size: 10px; }
/* ☀️ 🛏️ 🌙 Sueño en el calendario */
.dv-sleep { background: color-mix(in srgb, #7c6fd6 14%, var(--surface)); color: var(--ink); border-left-color: #7c6fd6; cursor: default; }
.dv-nap { background: color-mix(in srgb, #7c6fd6 18%, var(--surface)); color: #5a4fb3; border-left-color: #7c6fd6; z-index: 0; opacity: .9; }
.dv-wake { position: absolute; left: 52px; right: 0; border-top: 2px dashed #e0a100; z-index: 1; pointer-events: none; }
.dv-wake span { position: absolute; right: 8px; top: -11px; background: var(--surface); font-size: .72rem; font-weight: 800; color: #b7791f; padding: 0 4px; }
.dp-sleep .dp-main { display: flex; flex-direction: column; }
/* ▶︎ Ahora mismo, plegado */
.now-fold { margin: 14px 0 0; }
.now-sum { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-body { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 10px 12px; }
.now-lib { display: inline-block; margin-top: 6px; }
.fold-list { border-top: 0; border-radius: 0 0 14px 14px; margin: 0; }
.now-fold[open] > summary { border-radius: 14px 14px 0 0; }
.tv-home { margin: 10px 0 0; background: var(--surface); border: 1.5px solid var(--navy-t); border-radius: 16px; padding: 12px 14px; gap: 10px; }
.tv-home-em { font-size: 1.4rem; }
.steps-fold-body > * { margin-top: 0 !important; border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.wb-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.wb-quick .m-cta { margin: 0; justify-content: center; font-size: .92rem; padding-left: 8px; padding-right: 8px; }
.cf-btns { grid-template-columns: repeat(5, minmax(0, 1fr)); }
label.cf-btn { cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cf-otro-form { display: flex; gap: 8px; margin: 10px 0 0; }
.cf-otro-form input { flex: 1; min-width: 0; }
.cp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.cp-foot form { margin: 0; flex: none; }
.cp-menos { font: inherit; font-weight: 800; font-size: .85rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.cp-menos:active { transform: scale(.94); }
a.fd-wd { text-decoration: none; color: inherit; }
.fd-wd.sel .fd-dot { box-shadow: 0 0 0 2px var(--page), 0 0 0 4px var(--ink); }
.fd-dia { margin: 10px 0 0; padding: 12px 14px; }
.fd-dia-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.fd-dia-top a { text-decoration: none; }
.fd-dia-list { display: flex; flex-direction: column; gap: 8px; }
.fd-dia-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.fd-dia-em { font-size: 1.3rem; text-align: center; }
.fd-dot.mini-n { width: 24px; height: 24px; font-size: .75rem; }
.fd-chat { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 0; padding: 12px 14px; }
details#apuntar > .fd-add { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.whoop-fold { margin: 0 0 12px; }
.whoop-fold-body { margin: 0; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; }
/* Fila de la fecha: misma distancia entre todos (fecha, 😴, tiempo, pasos y batería) */
.m-date-row { justify-content: space-between; }
.m-date-row .m-date-fill { display: none; }
/* Inicio · Tu cuerpo: desplegado; tocando el título se pliega y queda un resumen */
.body-fold > summary { list-style: none; cursor: pointer; align-items: center; justify-content: flex-start; }
.body-fold > summary::-webkit-details-marker { display: none; }
.body-fold > summary h2 { margin: 0; }
.body-fold > summary .body-sum { margin-left: auto; display: none; }
.body-fold:not([open]) > summary .body-sum { display: inline; }
.body-fold > summary svg { margin-left: auto; color: var(--muted); transition: transform .2s; transform: rotate(90deg); }
.body-fold:not([open]) > summary svg { margin-left: 0; transform: none; }
.news-intro { margin: 4px 0 6px; font-weight: 700; }
.news-sum { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.news-sum li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 6px; }
.news-all > summary { list-style: none; cursor: pointer; font-weight: 800; font-size: .88rem; color: var(--accent, var(--ink)); padding: 6px 0; }
.news-all > summary::-webkit-details-marker { display: none; }
.news-ok-txt { margin: 10px 0 8px; }
.news-ok { font-weight: 800; }
/* 🏟️ Deportes que he visto */
.sp-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.sp-big { display: block; font-family: var(--serif, inherit); font-size: 2.4rem; line-height: 1; }
.sp-big small { font-size: .9rem; color: var(--muted); font-family: inherit; }
.sp-por { display: flex; gap: 10px; flex-wrap: wrap; font-size: .9rem; }
.sp-pend { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; padding: 12px 14px; }
.sp-form { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.sp-grid { display: flex; flex-direction: column; gap: 10px; }
.sp-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-f > span { font-size: .78rem; font-weight: 700; color: var(--muted); }
.sp-f input { width: 100%; min-width: 0; }
.sp-match { display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); gap: 8px; align-items: end; }
.sp-res input { text-align: center; font-weight: 800; }
.sp-podio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.sp-f1, .sp-f1box, .sp-otro { display: none; }
.sp-form:has(input[name="deporte"][value="f1"]:checked) .sp-f1box { display: block; }
.sp-form:has(input[name="deporte"][value="f1"]:checked) .sp-f1 { display: inline; }
.sp-form:has(input[name="deporte"][value="f1"]:checked) .sp-no-f1,
.sp-form:has(input[name="deporte"][value="f1"]:checked) .sp-match { display: none; }
.sp-form:has(input[name="deporte"][value="otro"]:checked) .sp-otro { display: flex; }
.sp-row { align-items: flex-start; gap: 10px; }
.sp-row .m-row-text { display: flex; flex-direction: column; gap: 2px; }
.sp-em { font-size: 1.4rem; line-height: 1.2; }
.sp-row form { margin: 0; }
.sp-podium { font-weight: 700; }
.hub-quick .hub-wide { grid-column: 1 / -1; }
.mapas-pick { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.mapas-opt { display: grid; grid-template-columns: 52px minmax(0, 1fr) 18px; gap: 12px; align-items: center; padding: 18px 16px; text-decoration: none; color: inherit; }
.mapas-opt b { display: block; font-size: 1.1rem; margin-bottom: 2px; }
.mapas-em { font-size: 2.2rem; text-align: center; }
/* 🎟️ Ocio en el mapa: conciertos, musicales, teatro, cine… (morado para distinguirlo de la comida) */
.rmk-ocio { background: #fff; font-size: 15px; box-shadow: 0 0 0 2px #7b4bb7, 0 1px 4px rgba(0,0,0,.35); }
.rmk-ocio.rmk-prox { box-shadow: 0 0 0 2px #7b4bb7, 0 0 0 5px rgba(123, 75, 183, .3); }
.map-spain { height: 460px; }
/* ✏️ Cambiar o borrar una tarea desde el Inicio / Día a día */
.task-line { flex-wrap: wrap; }
.task-line > form { margin: 0; }
.task-more { margin-left: auto; }
.task-more > summary { list-style: none; cursor: pointer; color: var(--muted); padding: 4px 6px; display: grid; place-items: center; }
.task-more > summary::-webkit-details-marker { display: none; }
.task-more[open] { flex-basis: 100%; margin-left: 0; }
.task-more[open] > summary { justify-content: end; justify-items: end; }
.task-more-body { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 2px; }
.task-more-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.task-more-form input { width: 100%; min-width: 0; }
.task-more-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.task-more-body > form:last-child { margin: 0; text-align: right; }
/* ✓ Lo que hiciste cada día, abajo en el calendario */
.cal-done { font-size: .62rem; margin-left: 3px; vertical-align: top; color: var(--pos); font-weight: 900; }
.dp-done .dp-main span { display: block; color: var(--ink); }
.dv-done { width: 100%; background: var(--surface-2, var(--page)); color: var(--ink); border-left-color: var(--pos); }
.dv-done summary { list-style: none; cursor: pointer; font-weight: 700; } .dv-done summary::-webkit-details-marker { display: none; }
.dv-done span { display: block; font-weight: 500; font-size: .86rem; margin-top: 4px; }
.cul-aviso { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; padding: 12px 14px; }
/* 📍 Próximamente cerca de ti (ventana principal de Ocio) */
.prox-card { margin: 0 0 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.prox-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; }
.prox-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 18px; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.prox-row svg { color: var(--muted); }
.prox-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 52px; border-radius: 12px;
  background: var(--surface-2, var(--page)); border: 1px solid var(--line); line-height: 1; }
.prox-date b { font-size: 1.25rem; font-family: var(--serif, inherit); } .prox-date small { font-size: .68rem; text-transform: uppercase; color: var(--muted); margin-top: 3px; font-weight: 700; }
.prox-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prox-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prox-fuera, .prox-aviso { margin: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.prox-fuera a { color: inherit; }
.mc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.mc-act { display: flex; align-items: center; justify-content: center; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 700; font-size: .88rem; text-decoration: none; color: var(--ink); text-align: center; }
.mc-act:active { transform: scale(.97); }
/* Inicio del ordenador: los mismos chips que en el móvil (dormir, tiempo, pasos) junto a la fecha */
.topbar-date { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-chips { display: inline-flex; gap: 8px; align-items: center; }
.topbar-chips .bed-chip, .topbar-chips .steps-chip { font-family: var(--font); }
.topbar .streak { color: #e8590c; }
.desk-extra { margin: 0 0 18px; align-items: start; }
.desk-extra .mini-cal { margin: 0; }
/* Tarjetas plegables (plegadas por defecto): el título hace de botón */
.fold-card > summary { list-style: none; cursor: pointer; margin: 0; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card > summary svg { color: var(--muted); transition: transform .2s; }
.fold-card[open] > summary svg { transform: rotate(90deg); }
.fold-card[open] > summary { margin-bottom: 10px; }
.fold-card > summary h3 { margin: 0; }
.prox-card > summary.prox-head { display: grid; grid-template-columns: auto minmax(0, 1fr) 18px; gap: 10px; align-items: center; }
.prox-sum { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prox-card:not([open]) { gap: 0; }
.item-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.item-links .btn { justify-content: center; text-align: center; }
.prox-item > summary { list-style: none; cursor: pointer; }
.prox-item > summary::-webkit-details-marker { display: none; }
.prox-item[open] > summary svg { transform: rotate(90deg); }
.prox-more { padding: 8px 0 4px 60px; display: flex; flex-direction: column; gap: 8px; }
.prox-more p { margin: 0; }
.prox-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prox-btns form { margin: 0; }
/* 🎟️ ¿Fuiste? */
.went-card { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; padding: 12px 14px; }
.went-head { font-size: 1rem; }
.went-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.went-row form { margin: 0; }
.went-row .m-row-text { display: flex; flex-direction: column; min-width: 0; }
/* Retos: el botón «Guardar» ya no se sale en el móvil (reto y número arriba, Guardar debajo a lo ancho) */
.reto-form { grid-template-columns: minmax(0, 1fr) 76px; }
.reto-form select, .reto-form input { min-width: 0; width: 100%; }
.reto-form .btn { grid-column: 1 / -1; justify-content: center; }
/* ⌚ Whoop de hoy en el ordenador */
.whoop-today .wt-grid { display: grid; grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)); gap: 12px; }
.wt-main, .wt-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--surface-2, var(--page)); border: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0; }
.wt-big { font-size: 2.4rem; line-height: 1; font-family: var(--serif, inherit); }
.wt-tile b { font-size: 1.25rem; }
@media (max-width: 1100px) { .whoop-today .wt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* ⏳ Mientras Claude prepara el entreno */
.gen-wait { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: color-mix(in srgb, var(--page) 88%, transparent); }
.gen-wait > div { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 24px; max-width: 320px; }
.gen-wait b { font-size: 1.1rem; } .gen-wait small { color: var(--muted); }
.gen-spin { font-size: 2.6rem; animation: genpulse 1.2s ease-in-out infinite; }
@keyframes genpulse { 50% { transform: scale(1.15); } }
/* 🧪 Alcohol (UBE) en el contador de copas */
.cp-ube { display: block; font-size: .8rem; font-weight: 800; margin-top: 2px; }
.ube-g { color: var(--pos); } .ube-y { color: #b7791f; } .ube-r { color: var(--neg); }
.cp-bar.ube-bg-g { background: #2f9e62; } .cp-bar.ube-bg-y { background: #d69e2e; } .cp-bar.ube-bg-r { background: #d9534f; }
a.mu-wd { text-decoration: none; color: inherit; }
.mu-wd.sel small { color: var(--ink); font-weight: 900; }
.cp-detalle { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, var(--page)); }
.cp-ube-nota { margin: 6px 0 0; }
/* 🍽️ Comidas en el Bienestar */
.wb-food > summary .now-sum .fd-dot.mini { margin: 0 1px; }
.wb-food[open] > summary .now-sum .fd-dot.mini { display: none; }
.wb-food-hero { display: block; text-decoration: none; color: inherit; margin: 0; border-radius: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.wb-food-week { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 10px 8px; margin: 0; }
/* Tocar Desayuno / Comida / Cena: lo que comiste */
button.fd-slot { font: inherit; color: inherit; cursor: pointer; }
button.fd-slot:disabled { cursor: default; }
.fd-slot.sel { outline: 2px solid var(--navy); outline-offset: -2px; }
.fd-slot-info { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.fd-ver { display: inline-block; margin-top: 8px; }
button.fd-slot:not(.on) { background: transparent; }
/* 📊 Tus últimos 7 días */
.siete-dots { display: inline-flex; gap: 3px; justify-content: end; }
.siete-dots .sd { font-style: normal; font-size: .8rem; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.sd-g { background: #2f9e6233; box-shadow: inset 0 0 0 2px #2f9e62; }
.sd-y { background: #d69e2e33; box-shadow: inset 0 0 0 2px #d69e2e; }
.sd-r { background: #d9534f33; box-shadow: inset 0 0 0 2px #d9534f; }
.siete-row { align-items: center; gap: 12px; }
.sd-big { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; }
.siete-row .m-row-text { display: flex; flex-direction: column; gap: 2px; }
.desk-siete { margin: 0 0 14px; }
.siete-fold .now-sum { max-width: none; }

/* 🎯 Tu reto del día (Inicio) */
.reto-card { margin: 10px 0 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent, #c0703f);
  border-radius: 14px; display: flex; flex-direction: column; gap: 4px; }
.reto-card.hecho { border-left-color: #2f9e62; }
.reto-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.reto-ey { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.reto-txt { font-size: 1rem; line-height: 1.3; }
.reto-btns { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.reto-item { display: flex; flex-direction: column; gap: 3px; padding: 8px 0 2px; }
.reto-item + .reto-item { border-top: 1px dashed var(--line); }
.reto-item.ok .reto-txt { color: var(--muted); }
.reto-item .reto-btns { margin-top: 4px; }
.reto-fold > .reto-card { margin: 0; border-radius: 0 0 14px 14px; border-top: 0; border-left-width: 1px; }
/* 🎂 al lado de «Hoy» en la barra de arriba (en la fila de la fecha no cabía) */
.m-title:has(.cake-chip) { overflow: visible; }
.m-title .cake-chip { margin-left: 6px; }
.m-title .cake-pop { left: 50%; transform: translateX(-50%); text-align: left; font-weight: 500; }
/* 📈 Inversión */
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inv-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); min-width: 0; }
.inv-grid input, .inv-grid select { width: 100%; min-width: 0; }
.inv-check { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); margin: 10px 0; }
.inv-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 12px; }
.inv-trio > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border-radius: 12px; background: var(--surface-2, var(--surface)); border: 1px solid var(--line); text-align: center; min-width: 0; }
.inv-trio small { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.inv-trio b { font-size: 1.05rem; }
.inv-trio span { font-size: .75rem; color: var(--muted); }
.inv-normal { border-color: #1f6fb2 !important; }
.inv-chart { position: relative; height: 230px; margin: 4px 0 10px; }
.inv-facts { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: .88rem; }
.inv-why { margin: 10px 0 0; }
.inv-lesson { border-top: 1px dashed var(--line); padding: 8px 0; }
.inv-lesson > summary { list-style: none; display: flex; gap: 8px; cursor: pointer; }
.inv-lesson > summary::-webkit-details-marker { display: none; }
.inv-lesson p { margin: 6px 0 0 26px; }
@media (max-width: 380px) { .inv-trio b { font-size: .95rem; } }
/* 🧪 Laboratorio */
.lab-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 8px 0; }
.lab-row label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); flex: 1 1 140px; min-width: 0; }
.lab-row label.wide { flex-basis: 100%; }
.lab-duo { grid-template-columns: 1fr 1fr; }
.lab-pos > summary { list-style: none; cursor: pointer; }
.lab-pos > summary::-webkit-details-marker { display: none; }
.lab-val { display: flex; flex-direction: column; align-items: flex-end; }
.lab-buy { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.lab-link { margin: 0 0 12px; }
.lab-link .m-row-text { display: flex; flex-direction: column; gap: 2px; white-space: normal; }
/* ⚖️ Comparador y 📜 Reglamento */
.cmp-row { border-top: 1px dashed var(--line); padding: 9px 0; }
.cmp-row > summary { list-style: none; display: flex; gap: 10px; align-items: center; justify-content: space-between; cursor: pointer; }
.cmp-row > summary::-webkit-details-marker { display: none; }
.cmp-name, .cmp-cost { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cmp-cost { align-items: flex-end; flex: 0 0 auto; text-align: right; }
.cmp-row[open] > summary { margin-bottom: 8px; }
.cmp-best .cmp-cost b { color: #2f9e62; }
.cmp-now { background: rgba(217, 83, 79, .06); margin: 0 -8px; padding: 9px 8px; border-radius: 10px; }
.cmp-now .cmp-cost b { color: var(--neg, #d9534f); }
.cmp-fund { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; }
.cmp-fund > div { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; }
.cmp-fund > div b:last-child { flex: 0 0 auto; }
.cmp-fund.on { border-color: #2f9e62; }
.reg-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 2px 0 12px; }
.reg-bar i { display: block; }
.b1 { background: #1f6fb2; } .b2 { background: #5aa9e0; } .b3 { background: #b8924a; }
.reg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.reg-steps { margin: 0; padding-left: 20px; display: grid; gap: 9px; }
.inv-lesson p + p { margin-top: 6px; }
/* 📈 Cartel grande de Inversiones en Finanzas */
.inv-banner { display: flex; align-items: center; gap: 14px; margin: 12px 0; padding: 18px 16px; border-radius: 18px; text-decoration: none;
  color: #fff; background: linear-gradient(135deg, #17507f, #1f6fb2 60%, #2f9e62); box-shadow: 0 14px 28px -18px rgba(23, 80, 127, .8); }
.inv-banner:hover { text-decoration: none; }
.inv-banner-ico { font-size: 2rem; line-height: 1; }
.inv-banner-txt { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.inv-banner-txt small { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.inv-banner-txt b { font-size: 1.15rem; line-height: 1.25; }
.inv-banner svg { flex: 0 0 auto; opacity: .9; }
/* 📈 Portada de Inversión: ahora toca, mercado, cartera y camino */
.inv-now { border-color: #1f6fb2; box-shadow: 0 0 0 3px rgba(31, 111, 178, .08); }
.inv-now-t { font-size: 1.08rem; margin: 2px 0 6px; }
.inv-prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 0 0 12px; }
.inv-prog i { display: block; height: 100%; background: #1f6fb2; }
.inv-tools { padding-top: 4px; padding-bottom: 4px; }
.inv-tools .m-row { padding-left: 0; padding-right: 0; }
.inv-tools .m-row-text { display: flex; flex-direction: column; gap: 2px; white-space: normal; }
.inv-step.done > summary b { color: var(--muted); font-weight: 500; }
.inv-step.next > summary b { color: #1f6fb2; }
.inv-step-foot { margin: 6px 0 0 26px; }
.inv-word { margin: 0; padding: 7px 0; border-top: 1px dashed var(--line); }
.inv-piece { margin: 10px 0; }
.inv-piece > span { display: block; margin-top: 4px; }
.inv-piece > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; margin-bottom: 4px; }
.inv-meter { position: relative; height: 10px; border-radius: 5px; background: var(--line); }
.inv-meter i { display: block; height: 100%; border-radius: 5px; }
.inv-meter u { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--ink); border-radius: 1px; }
.mk-read { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2, var(--surface)); }
.mk-read b { font-size: 1.02rem; }
.mk-bajista, .mk-crisis { border-color: rgba(217, 83, 79, .5); }
.mk-maximos, .mk-bache { border-color: rgba(47, 158, 98, .45); }
.mk-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px 12px; align-items: center; font-size: .86rem; }
.mk-grid small { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: right; }
.mk-grid b { text-align: right; font-weight: 600; white-space: nowrap; }
.mk-grid .pos { color: var(--pos, #2f9e62); } .mk-grid .neg { color: var(--neg, #d9534f); }
.mk-when { display: block; margin-top: 4px; }
.inv-checks { display: grid; gap: 6px; margin: 4px 0 10px; }
.inv-checks form { margin: 0; }
.inv-check-btn { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2, var(--surface)); color: var(--ink); font: inherit; font-size: .88rem; line-height: 1.35; cursor: pointer; }
.inv-check-btn > span:first-child { font-size: 1.15rem; line-height: 1.1; flex: 0 0 auto; color: #1f6fb2; }
.inv-check-btn.on { color: var(--muted); border-style: dashed; }
.inv-check-btn.on > span:first-child { color: #2f9e62; }
.inv-copy { padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line); }
.inv-copy p { margin: 0 0 6px; font-style: italic; }
.inv-due { margin: 0 0 8px; font-weight: 600; }
.inv-due.soon { color: #b8924a; } .inv-due.late { color: var(--neg, #d9534f); }
.inv-bank { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, var(--surface)); border: 1px solid var(--line); }
.inv-doubt { border-color: rgba(217, 83, 79, .5); margin-bottom: 12px; }
.inv-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: .88rem; font-weight: 600; text-decoration: none; }
.inv-back:hover { text-decoration: none; border-color: #1f6fb2; color: #1f6fb2; }
.ord { display: grid; gap: 6px; padding: 14px; border-radius: 14px; margin: 0 0 14px; border: 1px solid var(--line); background: var(--surface-2, var(--surface)); }
.ord-t { font-size: 1.25rem; line-height: 1.25; }
.ord-bien { border-color: rgba(47, 158, 98, .5); background: rgba(47, 158, 98, .07); }
.ord-accion { border-color: #1f6fb2; background: rgba(31, 111, 178, .08); }
.ord-alerta { border-color: rgba(217, 83, 79, .6); background: rgba(217, 83, 79, .07); }
.ord-m { color: var(--muted); }
.ord-d > summary { cursor: pointer; color: #1f6fb2; margin-top: 4px; }
.ord-d[open] > summary { margin-bottom: 8px; }
.emp-row { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline; padding: 7px 0; border-top: 1px dashed var(--line); font-size: .9rem; }
.emp-row > span:first-child { color: var(--muted); font-size: .8rem; }
.emp-row a { color: var(--ink); text-decoration: none; font-weight: 600; }
.emp-row small { grid-column: 2 / 4; color: var(--muted); font-size: .78rem; }
.emp-idx { background: rgba(31, 111, 178, .08); border-radius: 10px; padding: 8px 10px; margin: 8px 0; font-size: .88rem; }
.inv-lesson-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); border-color: rgba(184, 146, 74, .55); }
.inv-lesson-card:hover { text-decoration: none; }
.inv-lesson-card .inv-banner-txt small { color: var(--muted); opacity: 1; }
.inv-lesson-ico { font-size: 2rem; line-height: 1; }
.lec-idea { font-size: 1rem; line-height: 1.55; margin: 0 0 12px; }
.lec-ej { padding: 12px 14px; border-radius: 12px; background: var(--surface-2, var(--surface)); border: 1px solid var(--line); margin: 0 0 12px; font-size: .92rem; line-height: 1.5; }
.lec-q { display: grid; gap: 8px; margin-top: 8px; }
.lec-q form { margin: 0; }
.lec-opt { width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; cursor: pointer; }
.lec-opt.ok { border-color: #2f9e62; background: rgba(47, 158, 98, .10); font-weight: 600; }
.lec-opt.mal { border-color: rgba(217, 83, 79, .6); background: rgba(217, 83, 79, .07); }
.lec-list a { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px dashed var(--line); color: var(--ink); text-decoration: none; font-size: .92rem; }
.lec-list a.hecha { color: var(--muted); }
.lec-list a span:last-child { margin-left: auto; }
.sim-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; -webkit-overflow-scrolling: touch; }
.sim-chips a { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .84rem; text-decoration: none; white-space: nowrap; }
.sim-chips a.on { background: #1f6fb2; border-color: #1f6fb2; color: #fff; }

/* ======================================================================================================================
   REDISEÑO 12/11 «Pro»: misma app, aspecto nuevo. Lienzo neutro, tarjetas blancas con borde fino y sombra suave,
   títulos en palo seco apretado (DM Sans), un solo color de marca (cobalto, o frambuesa con el tema rosa), botones en
   píldora, barra inferior flotante de cristal y cifras grandes con números alineados.
   Solo cambia el aspecto: va al final para mandar sobre lo anterior. Para volver atrás, basta con quitar este bloque
   (y volver a generar tema-noche.css con tools/tema_noche.py).
   Contrastes (AA): blanco sobre cobalto #2b50f0 6,0:1; blanco sobre frambuesa #b03a68 5,8:1 (claro) y #bf4577 4,9:1 (oscuro).
   ====================================================================================================================== */
:root {
  --page: #f3f4f7; --surface: #ffffff; --surface-2: #f6f7f9; --sidebar: #f3f4f7; --sidebar-2: #e9ebf0; --sidebar-ink: #3d4657;
  --ink: #0d1321; --ink-2: #3d4657; --muted: #7c8698; --line: #e7e9ef; --line-strong: #d5d9e2;
  --navy: #2b50f0; --navy-2: #2242d6; --navy-t: #2b50f0; --oro: #c8963e;
  --accent: #2b50f0; --brand-1: #2b50f0; --brand-2: #6a5cff; --brand-grad: linear-gradient(135deg, #2b50f0 0%, #6a5cff 100%);
  --fin: #2b50f0; --fin-bg: #e9edff;
  --wb: #0e9f6e;  --wb-bg: #e2f6ee;
  --cul: #e0457b; --cul-bg: #fde8f0;
  --pat: #6d4aff; --pat-bg: #eeeaff;
  --age: #d97706; --age-bg: #fdf0d9;
  --pos: #0b9a67; --pos-bg: #e2f6ee; --neg: #e5484d; --neg-bg: #fdecec; --warn: #a16207; --warn-bg: #fef6dc;
  --radius: 22px; --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(13, 19, 33, .04), 0 10px 28px -16px rgba(13, 19, 33, .14);
  --shadow-lg: 0 24px 50px -24px rgba(43, 80, 240, .45);
  --font-display: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hero: radial-gradient(120% 140% at 100% 0%, #7a6bff 0%, rgba(122, 107, 255, 0) 55%), linear-gradient(135deg, #1f3fdc 0%, #2b50f0 45%, #3f7bff 100%);
  --glass: color-mix(in srgb, var(--surface) 78%, transparent);
  --ring: color-mix(in srgb, var(--navy) 22%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --page: #0b0c10; --surface: #15171d; --surface-2: #1c1f27; --sidebar: #0b0c10; --sidebar-2: #15171d; --sidebar-ink: #b6bccb;
    --ink: #f2f4f8; --ink-2: #b6bccb; --muted: #7f8798; --line: #262a34; --line-strong: #363b49;
    --navy: #3d5cff; --navy-2: #2f4be6; --navy-t: #a5b4ff; --oro: #e0b46a;
    --accent: #a5b4ff; --brand-1: #3d5cff; --brand-2: #7d70ff;
    --fin: #8ea2ff; --fin-bg: #171f40; --wb: #3ccf95; --wb-bg: #0f2a20; --cul: #ff86ad; --cul-bg: #3a1626;
    --pat: #a797ff; --pat-bg: #221b46; --age: #f0b35a; --age-bg: #33240e;
    --pos: #3ccf95; --pos-bg: #0f2a20; --neg: #ff7b7f; --neg-bg: #3a171a; --warn: #f0c96a; --warn-bg: #33290f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -16px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 50px -24px rgba(61, 92, 255, .55);
    --hero: radial-gradient(120% 140% at 100% 0%, #6f60ff 0%, rgba(111, 96, 255, 0) 55%), linear-gradient(135deg, #1a2fb0 0%, #2a48e0 45%, #3566ee 100%);
  }
}
html.perfil-rosa {
  --page: #f7f3f5; --surface: #ffffff; --surface-2: #fbf6f8; --sidebar: #f7f3f5; --sidebar-2: #f0e8ec; --sidebar-ink: #5a4650;
  --ink: #2a1a22; --ink-2: #5a4650; --muted: #92808a; --line: #efe4e9; --line-strong: #e2cfd7;
  --navy: #b03a68; --navy-2: #972f58; --navy-t: #b03a68; --oro: #c49a7a;
  --accent: #b03a68; --brand-1: #b03a68; --brand-2: #e889ad; --brand-grad: linear-gradient(135deg, #b03a68 0%, #e889ad 100%);
  --fin: #b03a68; --fin-bg: #fbe6ee; --wb: #5f8a4e; --wb-bg: #e9f3e4; --cul: #c2548b; --cul-bg: #fbe6f1;
  --pat: #7c5cc4; --pat-bg: #eee8fb; --age: #c07a3e; --age-bg: #fbeedd;
  --shadow: 0 1px 2px rgba(60, 20, 40, .05), 0 10px 28px -16px rgba(90, 30, 60, .18);
  --shadow-lg: 0 24px 50px -24px rgba(176, 58, 104, .5);
  --hero: radial-gradient(120% 140% at 100% 0%, #f29ac0 0%, rgba(242, 154, 192, 0) 55%), linear-gradient(135deg, #8f2c55 0%, #b03a68 50%, #d0608c 100%);
}
@media (prefers-color-scheme: dark) {
  html.perfil-rosa:not([data-theme="light"]) {
    --page: #141014; --surface: #1f181e; --surface-2: #292028; --sidebar: #141014; --sidebar-2: #1f181e; --sidebar-ink: #dcc8d2;
    --ink: #fbeef3; --ink-2: #dcc8d2; --muted: #a892a0; --line: #382b36; --line-strong: #4e3c4b;
    --navy: #bf4577; --navy-2: #a93b68; --navy-t: #ff9fc4; --oro: #e2b993;
    --accent: #ff9fc4; --brand-1: #bf4577; --brand-2: #f29ac0;
    --fin: #ff9fc4; --fin-bg: #3a1c2a; --wb: #a9cf96; --wb-bg: #1f2b1a; --cul: #f5a3cb; --cul-bg: #3a1a2e;
    --pat: #c3adf5; --pat-bg: #2a2140; --age: #e8b98a; --age-bg: #33261a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -16px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 50px -24px rgba(191, 69, 119, .6);
    --hero: radial-gradient(120% 140% at 100% 0%, #e07aa6 0%, rgba(224, 122, 166, 0) 55%), linear-gradient(135deg, #7a2748 0%, #a93b68 50%, #c2507f 100%);
  }
}

/* ---- Letra: títulos y cifras en palo seco apretado ---- */
body { font-family: var(--font); letter-spacing: 0; font-feature-settings: "ss01", "cv11"; }
h1, h2, h3, .page-head h1, .hub-title, .big, .kpi strong, .hero .big, .med-title, .lesson-title, .login-card h1, .login-card h2,
.tile-val, .m-money-big, .sport-hero-big, .w-min, .lib-year-n, .lib-empty-title, .poster-ph-title, .dv-title b, .logo b, .hist-card h3,
.hist-fact h2, .topbar-date { font-family: var(--font-display); letter-spacing: -.018em; }
h1, .page-head h1 { font-weight: 700; font-size: clamp(1.75rem, 3.4vw, 2.3rem); line-height: 1.08; }
h2 { font-weight: 700; letter-spacing: -.02em; }
h3 { letter-spacing: -.012em; }
.big, .m-money-big, .sport-hero-big, .tile-val, .kpi strong, .inv-trio b, .cmp-cost b { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.02em; }
.big { font-size: clamp(2.2rem, 5vw, 3rem); }
.kpi strong { font-size: 1.7rem; }
.tile-val { font-size: 1.6rem; }
.eyebrow, .m-date, .m-group-title { letter-spacing: .09em; font-size: .7rem; font-weight: 700; color: var(--muted); }
.eyebrow a { color: inherit; }
/* Las frases en cursiva conservan la letra con remate: es el único guiño editorial */
.wh-quote, .lesson-hook, .login-sub, .hist-quote, blockquote { font-family: "Cormorant Garamond", Georgia, serif; letter-spacing: 0; }
.page-head p { color: var(--ink-2); font-size: .95rem; max-width: 62ch; }
a { color: var(--navy-t); }

/* ---- Tarjetas ---- */
.card, .kpi, .today-card, .tile, .section-tabs { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.card { padding: 20px; }
.card:hover { box-shadow: var(--shadow); }
.card-head h3 { font-size: 1.02rem; font-weight: 700; }
.fold-card > summary h3 { font-weight: 700; }
details > summary { color: var(--navy-t); }

/* ---- Botones: píldora, un solo color, con respuesta al toque ---- */
.btn { background: var(--navy); background-image: none; color: #fff; border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 600; letter-spacing: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 8px 18px -10px var(--navy); transition: transform .12s ease, background .15s ease, box-shadow .15s ease; }
.btn:hover { background: var(--navy-2); filter: none; transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: 0 1px 2px rgba(13, 19, 33, .04); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn.small { padding: 7px 14px; }
.btn.white { color: var(--navy); border-radius: 999px; }
.btn-block { border-radius: 16px; }
.link { color: var(--navy-t); font-weight: 600; }
.m-cta { border-radius: 16px; }

/* ---- Campos ---- */
select, input[type=search], input[type=file], input[type=text], input[type=number], input[type=date], input[type=time], input[type=password],
input[type=email], input[type=tel], textarea { border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); padding: 11px 14px;
  transition: border-color .15s ease, box-shadow .15s ease; }
select:focus, input:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 4px var(--ring); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.form-grid label, .mapping label, .inv-grid label, .lab-row label { font-weight: 600; color: var(--ink-2); }

/* ---- Etiquetas, avisos, barras ---- */
.tag, .chips .tag { border-radius: 999px; font-weight: 600; }
.chip { border-radius: 14px; }
.flash { border-radius: 16px; }
.hero, .month-hero, .m-money, .whoop-hero, .sport-hero { background: var(--hero); background-color: var(--navy); border-radius: 26px; box-shadow: var(--shadow-lg); border: 0; }
.month-hero.over, .m-money.over { background: radial-gradient(120% 140% at 100% 0%, #ff9a6b 0%, rgba(255, 154, 107, 0) 55%), linear-gradient(135deg, #b3261e 0%, #d9482f 100%); }
.hero-stat { border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.m-money { color: #fff; }
.m-money-label { letter-spacing: .02em; opacity: .9; font-weight: 600; }
.m-money-big { font-size: 3rem; }
table { border-collapse: separate; border-spacing: 0; }
th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* ---- Escritorio: barra lateral limpia ---- */
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); }
.sidebar::before, .sidebar::after { display: none !important; }
.nav a { border-radius: 12px; font-weight: 500; }
.nav a.active { background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-weight: 700; border-left: 0; }
.logo b { font-weight: 700; font-size: 1.15rem; }
.logo img { border-radius: 12px; }
.section-tabs a.active { background: var(--navy); color: #fff; border-radius: 12px; }

/* ---- Móvil: cabecera y barra de pestañas de cristal, listas agrupadas ---- */
@media (max-width: 900px) {
  .m-header { background: color-mix(in srgb, var(--page) 72%, transparent); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); border-bottom: 0; }
  .m-title { font-weight: 700; letter-spacing: -.01em; }
  .m-icons a { background: var(--glass); border: 1px solid var(--line); width: 36px; height: 36px; }
  .m-logo img { border-radius: 10px; }
  .tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 26px; border: 1px solid var(--line);
    background: var(--glass); backdrop-filter: saturate(1.8) blur(22px); -webkit-backdrop-filter: saturate(1.8) blur(22px);
    box-shadow: 0 18px 40px -18px rgba(13, 19, 33, .35), 0 1px 0 rgba(255, 255, 255, .5) inset; }
  .tabbar a { border-radius: 20px; padding: 7px 0 6px; font-size: .66rem; font-weight: 600; transition: background .18s ease, color .18s ease; }
  .tabbar a.on { color: var(--navy-t); background: color-mix(in srgb, var(--navy) 12%, transparent); font-weight: 700; }
  .content { padding: 8px 16px calc(112px + env(safe-area-inset-bottom)); }
  .page-head h1, .hub-title { font-size: 1.95rem; letter-spacing: -.022em; font-weight: 700; }
  .card { padding: 18px; }
  .hub, .m-list { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .hub-card { padding: 14px 16px !important; grid-template-columns: 42px 1fr 18px; }
  .hub-card .chip { width: 42px; height: 42px; border-radius: 13px; }
  .hub-card b { font-weight: 700; letter-spacing: -.01em; }
  .m-row { min-height: 54px; padding: 12px 16px; }
  .m-quick a span { border-radius: 20px; box-shadow: var(--shadow); }
  .m-quick-sm a { box-shadow: var(--shadow); font-weight: 600; }
  .m-money { padding: 22px; border-radius: 26px; box-shadow: var(--shadow-lg); }
  .m-money-big { font-size: 3rem; }
  .btn { min-height: 46px; }
  .sec-title h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
  .fab { box-shadow: 0 16px 30px -12px var(--navy); }
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .tabbar { box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .06) inset; }
  :root:where(:not([data-theme="light"])) .btn.secondary { box-shadow: none; }
}

/* ---- Inversiones, con el aspecto nuevo ---- */
.inv-banner { border-radius: 26px; padding: 20px 18px; background: var(--hero); background-color: var(--navy); box-shadow: var(--shadow-lg); }
.inv-banner-txt b { font-weight: 700; letter-spacing: -.02em; }
.inv-now { border-color: var(--line); box-shadow: var(--shadow); }
.inv-prog i, .reg-bar .b1, .b1 { background: var(--navy); }
.inv-normal { border-color: var(--navy) !important; }
.inv-trio > div, .ord, .mk-read, .lec-ej, .inv-bank, .cmp-fund, .inv-check-btn, .lec-opt, .inv-copy { border-radius: 16px; }
.ord-t { letter-spacing: -.03em; font-weight: 700; }
.inv-back { box-shadow: var(--shadow); }
.inv-back:hover, .inv-step.next > summary b { color: var(--navy-t); border-color: var(--navy); }
.sim-chips a.on { background: var(--navy); border-color: var(--navy); }
.inv-check-btn > span:first-child, .ord-d > summary { color: var(--navy-t); }
.inv-lesson-card { border-color: var(--line); }
.card-head { gap: 10px; }
.card-head > .muted.small { text-align: right; flex: 0 1 auto; }

/* Filas plegables del Inicio y de las secciones: título en tinta (el azul se queda para lo que se toca de verdad) */
.mc-fold > summary, .now-fold > summary { box-shadow: var(--shadow); }
.mc-fold > summary b, .now-fold > summary b { color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
.due-list { border-color: color-mix(in srgb, var(--oro) 45%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--oro) 12%, transparent), var(--shadow); }
.tile small, .tile-val small, .kpi small { letter-spacing: 0; }
.sec-title h2 { font-weight: 700; }
.sec-title a { font-weight: 600; }
@media (max-width: 900px) { .hub-card { row-gap: 1px; } .hub-card .muted { line-height: 1.35; } }
@media (max-width: 900px) { .hub-card { row-gap: 2px !important; } }
.quote-card blockquote, .item-notes, .postal figcaption { font-family: "Cormorant Garamond", Georgia, serif; letter-spacing: 0; }
.quote-card blockquote { font-size: 1.6rem; line-height: 1.22; }
@media (max-width: 900px) { .cal-title { font-size: 1.5rem !important; white-space: nowrap; } }
/* Los títulos que se despliegan van en tinta; el color de marca queda para enlaces y botones */
.fold-card > summary, .fold-card > summary h3, .cmp-row > summary, .cmp-row > summary b, .inv-lesson > summary, .lec-list a { color: var(--ink); }
.cmp-best .cmp-cost b { color: var(--pos); } .cmp-now .cmp-cost b { color: var(--neg); }
.card-head h3 { min-width: 0; }

/* ---- 📊 Panel visual de la cartera (Inversiones): cifras, gráfico, reparto y cada fondo con lo que gana o pierde ---- */
.pf { display: grid; gap: 12px; margin: 0 0 14px; }
.pf-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pf-kpis > div { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.pf-kpis small, .pf-prod-data small { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pf-kpis b { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-kpis span { font-size: .72rem; color: var(--muted); line-height: 1.3; }
.pf-kpis span.pos { color: var(--pos); } .pf-kpis span.neg { color: var(--neg); }
.pf-box { padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.pf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pf-chart { position: relative; height: 210px; }
.pf-modo { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.pf-modo button { border: 0; background: none; color: var(--ink-2); font: 600 .76rem var(--font); padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.pf-modo button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.pf-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; margin-bottom: 4px; }
.pf-bar i { display: block; min-width: 3px; }
.pf-c1 { background: var(--s1); } .pf-c2 { background: var(--s2); } .pf-c3 { background: var(--s3); }
.pf-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; margin-top: 5px; }
.pf-prod { display: grid; gap: 8px; padding: 12px 0; border-top: 1px dashed var(--line); }
.pf-prod-top { display: flex; gap: 10px; align-items: flex-start; }
.pf-prod-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pf-prod-name b { font-size: .92rem; line-height: 1.25; }
.pf-prod-name small, .pf-prod-val small { font-size: .74rem; color: var(--muted); }
.pf-prod-val { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; text-align: right; }
.pf-prod-val b { font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.pf-prod-data { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pf-prod-data span { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.pf-prod-data b { font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-prod-data b span { display: inline; padding: 0; background: none; }
.pf-real { margin-top: 14px; }
@media (max-width: 420px) { .pf-kpis b { font-size: 1.08rem; } .pf-kpis > div { padding: 10px 9px; } .pf-prod-data b { font-size: .76rem; } .pf-prod-data span { padding: 7px 6px; } }
@media (min-width: 901px) { .pf-chart { height: 260px; } }
.pf, .pf > *, .pf-box { min-width: 0; }
.pf-kpis small { font-size: .6rem; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .pf-box { padding: 12px; } .card > .pf, #simulada > .pf { margin-left: -4px; margin-right: -4px; } }

/* ---- 🧭 Cómo voy: foco de la semana, evolución por semanas y revisión ---- */
.pg-t { font-size: 1.25rem; margin: 2px 0 8px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pg-pill { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.pg-pill.n { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-strong); }
.pg-pill.g { background: var(--pos-bg); color: var(--pos); } .pg-pill.y { background: var(--warn-bg); color: var(--warn); } .pg-pill.r { background: var(--neg-bg); color: var(--neg); }
.pg-row { border-top: 1px dashed var(--line); padding: 11px 0; }
.pg-row > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; color: var(--ink); }
.pg-row > summary::-webkit-details-marker { display: none; }
.pg-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pg-tend { font-size: .74rem; color: var(--muted); font-weight: 600; }
.pg-tend.mejor { color: var(--pos); } .pg-tend.peor { color: var(--neg); }
.pg-dots { display: inline-flex; gap: 4px; flex: 0 0 auto; align-items: center; }
.pg-dots i, .pg-ley { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); }
.pg-dots i.g, .pg-ley.g { background: var(--good, #0ca30c); } .pg-dots i.y, .pg-ley.y { background: var(--warning, #fab219); } .pg-dots i.r, .pg-ley.r { background: var(--critical, #d03b3b); }
.pg-dots i.n, .pg-ley.n { background: none; border: 1.5px dashed var(--line-strong); }
.pg-dots i.hoy { width: 16px; height: 16px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink-2); margin-left: 3px; }
.pg-ley { width: 9px; height: 9px; vertical-align: -1px; }
.pg-pq { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.pg-pq label { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.pg-rev { display: grid; gap: 12px; }
.pg-rev label { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.pg-rev textarea { width: 100%; resize: vertical; }
.pg-old { border-top: 1px dashed var(--line); padding: 8px 0; margin-left: 26px; } .pg-old p { margin: 4px 0 0; }
.pg-home { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 10px 0 0; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.pg-home:hover { text-decoration: none; }
.pg-home > span:first-child { font-size: 1.4rem; }
.pg-home-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-home-txt small { font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.pg-home-txt b { font-size: .95rem; line-height: 1.3; font-weight: 600; }
.pg-home svg { color: var(--muted); flex: 0 0 auto; }
.pg-rev { grid-template-columns: minmax(0, 1fr); }
.pg-rev label { min-width: 0; }
.pg-rev textarea, .pg-rev select { width: 100%; max-width: 100%; min-width: 0; }
/* ⚡ «＋ Apuntar»: botón flotante y hoja de abajo */
.ap-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 2rem; line-height: 1;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45); cursor: pointer; }
@media (min-width: 900px) { .ap-fab { bottom: 28px; right: 28px; } }
.ap-sheet { width: 100%; max-width: 520px; margin: auto auto 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
  border: 0; border-radius: 20px 20px 0 0; background: var(--surface); color: var(--ink); max-height: 88vh; overflow-y: auto; }
.ap-sheet::backdrop { background: rgba(0, 0, 0, .35); }
@media (min-width: 900px) { .ap-sheet { margin: auto; border-radius: 20px; } }
.ap-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 1.05rem; }
.ap-x { border: 0; background: none; font-size: 1.2rem; color: var(--muted); padding: 6px; cursor: pointer; }
.ap-panel { display: grid; gap: 10px; }
.ap-panel[hidden] { display: none; }
.ap-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ap-tiles-sm { grid-template-columns: repeat(3, 1fr); }
.ap-tiles > button, .ap-tiles > a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2, var(--surface)); color: var(--ink);
  font: inherit; font-size: .8rem; text-decoration: none; cursor: pointer; }
.ap-tiles span { font-size: 1.6rem; line-height: 1; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-chips label { position: relative; }
.ap-chips input { position: absolute; opacity: 0; pointer-events: none; }
.ap-chips span { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; }
.ap-chips input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.ap-big { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); }
.ap-big input { font-size: 1.6rem; padding: 10px 12px; }
.ap-panel input[type=text], .ap-panel textarea { font-size: 16px; }
.ap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ap-row label { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); }
.ap-skip { justify-self: center; }
.ap-back { margin-top: 10px; }
.reto-item.gran { background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 12px; padding: 10px 12px; margin: 4px 0 6px; }
.reto-item.gran .reto-txt { font-size: 1.02rem; }
.reto-sec { margin: 8px 0 0; text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; }
/* 🧭 Inicio: «Cómo voy» junto a Diario y Calendario (si no caben, bajan de línea) */
.m-quick.m-quick-sm { display: flex; flex-wrap: wrap; }
.reto-hoy { display: block; margin-top: 4px; font-size: .88rem; }
/* 🏆 Retos: el principal en grande y «Hoy» para marcar */
.rt-main { display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, transparent); }
.rt-eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rt-big { font-size: 1.15rem; line-height: 1.3; }
.rt-track { height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; }
.rt-track i { display: block; height: 100%; background: var(--accent); border-radius: 10px; }
.rt-hoy { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.rt-hoy li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; line-height: 1.35; }
.rt-hoy li.main span:last-child { font-weight: 600; }
.rt-hoy li.ok span:last-child { color: var(--muted); text-decoration: line-through; }
.rt-hoy form { margin: 0; }
.rt-chk { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; border: 2px solid var(--line-strong, var(--line)); background: none;
  display: grid; place-items: center; font-size: .9rem; color: #fff; cursor: pointer; padding: 0; }
.rt-chk.on { background: #2f9e62; border-color: #2f9e62; }
.rt-sec { display: grid; gap: 2px; padding: 8px 0; border-top: 1px dashed var(--line); }
.rt-sec:first-of-type { border-top: 0; }
.rt-sec-t { font-size: .88rem; font-weight: 600; }
.rt-sec form { margin: 0; }
.rt-chk.off { background: #d9534f; border-color: #d9534f; }
.reto-fold > .reto-card { border-left-color: var(--line); }   /* sin la raya azul de la izquierda */
.siete-row .m-row-text, .siete-row .m-row-text span { white-space: normal; }   /* los textos largos de «Tus últimos 7 días», enteros */
/* 🧹 Casa recogida */
.rc-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 0;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.rc-t { font-weight: 600; font-size: .92rem; }
.rc-btns { display: flex; gap: 6px; }
.rc-btns form { margin: 0; }
.rc-btn { border: 1px solid var(--line); background: none; color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit;
  font-size: .82rem; cursor: pointer; }
.rc-btn.on { background: #2f9e62; border-color: #2f9e62; color: #fff; }
.rc-fold > .rc-card { margin: 0; border-radius: 0 0 14px 14px; border-top: 0; }
.rc-card { flex-direction: column; align-items: stretch; }
.rc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rc-row form { display: flex; gap: 6px; margin: 0; }
.rc-lab { font-size: .88rem; }
.rc-btn.off { background: #d9534f; border-color: #d9534f; color: #fff; }
.sec-h { font-size: 1.05rem; margin: 18px 2px 8px; }
/* 🏠 Lo común */
.cm-big { font-size: 2rem; font-weight: 700; line-height: 1.1; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.cm-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.cm-spark { display: block; width: 100%; height: 64px; margin: 8px 0 2px; overflow: visible; }
.cm-spark-line { fill: none; stroke: var(--pos); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cm-spark-line.neg { stroke: var(--neg); }
.cm-spark-ref { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; opacity: .7; }
.cm-spark-leg { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.cm-two > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--fin-bg); }
.cm-two b { font-variant-numeric: tabular-nums; }
.cm-h { font-size: .92rem; margin: 14px 0 6px; }
.cm-apo { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; font-size: .9rem; margin: 4px 0; }
.cm-track { grid-column: auto; margin: 0; }
.cm-track i { background: var(--fin); }
.cm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cm-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .9rem; }
.cm-list li > span { min-width: 0; }
.cm-list b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cm-mini { margin-top: 10px; }
.cm-mini > summary { cursor: pointer; list-style: none; }
.cm-mini > summary::-webkit-details-marker { display: none; }
.cm-mini[open] > summary { margin-bottom: 6px; }
.cm-prox { border-left: 4px solid var(--fin); }
.cm-prox-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cm-prox-list li { display: flex; flex-direction: column; gap: 1px; font-size: .95rem; }
.cm-when { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cm-when.hoy { color: var(--neg); }
.cm-when.man { color: var(--fin); }
.cm-add { display: grid; gap: 8px; }
.cm-add input[type=text] { font-size: 1rem; }
.cm-add .cm-mini { margin: 0; }
.cm-grupo { margin-top: 14px; }
.cm-gh { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.cm-gh.warn { color: var(--warn); }
.cm-hechas > summary { cursor: pointer; list-style: none; }
.cm-hechas > summary::-webkit-details-marker { display: none; }
.cm-tareas { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cm-tareas li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cm-tareas li:last-child { border-bottom: 0; }
.cm-tareas form { margin: 0; }
.cm-em { font-size: 1.15rem; flex: 0 0 auto; }
.cm-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.3; }
.cm-tt { overflow-wrap: anywhere; }
.cm-tareas li.ok .cm-tt { color: var(--muted); text-decoration: line-through; }
.cm-del button { color: var(--muted); padding: 4px 6px; }
.cm-inv { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cm-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-col .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 🎯 Topes del ciclo (comer fuera, súper) */
.bl-card { display: grid; gap: 12px; }
.bl-row { display: grid; gap: 5px; }
.bl-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: .95rem; }
.bl-top b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-track { position: relative; height: 9px; border-radius: 6px; background: var(--line); }
.bl-track i { display: block; height: 100%; border-radius: 6px; background: var(--pos); }
.bl-ojo .bl-track i { background: var(--warn); }
.bl-pasado .bl-track i { background: var(--neg); }
.bl-toca { position: absolute; top: -3px; width: 2px; height: 15px; background: var(--ink-2, var(--muted)); border-radius: 1px; transform: translateX(-1px); }
.bl-frase { margin: 0; }
.bl-ojo .bl-frase { color: var(--warn); }
.bl-pasado .bl-frase { color: var(--neg); }
.bl-cambiar > summary { cursor: pointer; list-style: none; }
.bl-cambiar > summary::-webkit-details-marker { display: none; }
.bl-mini { display: grid; gap: 6px; margin-top: 8px; }
.bl-mini-row { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; padding: 7px 10px; border-radius: 10px; background: var(--pos-bg); color: var(--ink); text-decoration: none; }
.bl-mini-row b { color: var(--pos); white-space: nowrap; }
.bl-mini-row.bl-ojo { background: var(--warn-bg); } .bl-mini-row.bl-ojo b { color: var(--warn); }
.bl-mini-row.bl-pasado { background: var(--neg-bg); } .bl-mini-row.bl-pasado b { color: var(--neg); }
@media (max-width: 900px) { .content table td.wrap { min-width: 0; width: 100%; } .content table td.num { white-space: nowrap; } }
.bl-big { font-size: 1.5rem; font-weight: 700; }
.bl-tabla { margin: 6px 0 8px; }
.bl-tabla td { padding: 6px 0; }
.cm-mes { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 6px; color: var(--ink-2); }
.cm-mes span { white-space: nowrap; }
.cm-prev { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--fin-bg); }

/* ======================================================================================================================
   Tema Bruma (perfil con tema="perfil-bruma"), elegido el 14/11: gris perla de base y turquesa de acento, todo suave.
   Letra: Marcellus en títulos y cifras (solo tiene un grosor: 400) y Mulish en los textos; las dos, en el servidor.
   Contrastes (AA): blanco sobre el turquesa de botones #2f7880 5,1:1; tinta #2b3742 sobre el fondo 11:1; enlaces
   turquesa sobre el fondo 4,7:1. Los pasteles van de fondo; el texto, siempre en el tono más hondo.
   ====================================================================================================================== */
html.perfil-bruma {
  --font: "Mulish", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Marcellus", Georgia, "Times New Roman", serif;
  --page: #eef1f4; --surface: #ffffff; --surface-2: #f6f8fa; --sidebar: #eef1f4; --sidebar-2: #e3e9ee; --sidebar-ink: #4b5866;
  --ink: #2b3742; --ink-2: #4b5866; --muted: #7d8b95; --line: #dde3e9; --line-strong: #cbd4dc;
  --navy: #2f7880; --navy-2: #276870; --navy-t: #2f7880; --oro: #9cc9d6;
  --accent: #2f7880; --brand-1: #2f7880; --brand-2: #8fd3cf; --brand-grad: linear-gradient(135deg, #6d8499 0%, #4f8590 100%);
  --fin: #3f6688; --fin-bg: #e2eaf2;
  --wb: #2a7570;  --wb-bg: #dcf0ee;
  --age: #4b6176; --age-bg: #e6ebf0;
  --cul: #4c6f96; --cul-bg: #e3ebf5;
  --pat: #56708c; --pat-bg: #e5ebf1;
  --pos: #23795f; --pos-bg: #e0f3ec; --neg: #c2474e; --neg-bg: #fbeaea;
  --shadow: 0 1px 2px rgba(43, 55, 66, .04), 0 10px 28px -16px rgba(43, 55, 66, .14);
  --shadow-lg: 0 24px 50px -24px rgba(79, 133, 144, .45);
  --hero: radial-gradient(120% 140% at 100% 0%, #a9ddd9 0%, rgba(169, 221, 217, 0) 50%), linear-gradient(140deg, #6d8499 0%, #4f8590 100%);
  --azulejo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Crect width='44' height='44' fill='%23f4f7f9'/%3E%3Cg fill='none' stroke='%239fb4c7' stroke-width='1.5'%3E%3Ccircle cx='22' cy='22' r='7'/%3E%3Cpath d='M22 2q6 10 0 20q-6-10 0-20zM22 42q6-10 0-20q-6 10 0 20zM2 22q10 6 20 0q-10-6-20 0zM42 22q-10 6-20 0q10-6 20 0z'/%3E%3C/g%3E%3Cg fill='%238fd3cf'%3E%3Ccircle cx='0' cy='0' r='5'/%3E%3Ccircle cx='44' cy='0' r='5'/%3E%3Ccircle cx='0' cy='44' r='5'/%3E%3Ccircle cx='44' cy='44' r='5'/%3E%3Ccircle cx='22' cy='22' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
}
html.perfil-bruma body { font-feature-settings: normal; }
/* Marcellus no tiene negrita: sin esto, el navegador la «inventa» y queda borrosa */
html.perfil-bruma :is(h1, h2, h3, .page-head h1, .hub-title, .big, .kpi strong, .hero .big, .med-title, .lesson-title, .login-card h1,
  .login-card h2, .tile-val, .m-money-big, .sport-hero-big, .w-min, .lib-year-n, .lib-empty-title, .poster-ph-title, .dv-title b, .logo b,
  .hist-card h3, .hist-fact h2, .topbar-date, .wh-title, .inv-trio b, .cmp-cost b) { font-weight: 400; letter-spacing: 0; }
html.perfil-bruma .sim-chips a.on { background: var(--navy); border-color: var(--navy); }
html.perfil-bruma .t-claro .tema-muestra { background: linear-gradient(135deg, #eef1f4 50%, #8fd3cf 50%); }
html.perfil-bruma .t-noche .tema-muestra { background: linear-gradient(135deg, #151c22 50%, #8fd3cf 50%); }
html.perfil-bruma .t-auto .tema-muestra { background: linear-gradient(90deg, #eef1f4 50%, #151c22 50%); }
@media (prefers-color-scheme: dark) {
  html.perfil-bruma:not([data-theme="light"]) {
    --page: #151c22; --surface: #1d262e; --surface-2: #242f38; --sidebar: #151c22; --sidebar-2: #1d262e; --sidebar-ink: #b9c7cf;
    --ink: #eef3f6; --ink-2: #b9c7cf; --muted: #84939e; --line: #2a3640; --line-strong: #37454f;
    --navy: #2a7a82; --navy-2: #246c73; --navy-t: #8fd3cf; --oro: #9cc9d6;
    --accent: #8fd3cf; --brand-1: #2a7a82; --brand-2: #9fb4c7;
    --fin: #a9c4e2; --fin-bg: #1e2c3a; --wb: #8fd3cc; --wb-bg: #16302e; --age: #c3d0dc; --age-bg: #252f38;
    --cul: #a9bfe0; --cul-bg: #1f2a3b; --pat: #b3c3d6; --pat-bg: #222c36;
    --pos: #6fd3b0; --pos-bg: #133027; --neg: #f08a8e; --neg-bg: #3a1b1d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -16px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 50px -24px rgba(42, 122, 130, .55);
    --hero: radial-gradient(120% 140% at 100% 0%, #4fa3a6 0%, rgba(79, 163, 166, 0) 55%), linear-gradient(140deg, #34495c 0%, #2a6a70 100%);
  }
}
/* Sin emojis: los semáforos 🔴🟡🟢 se enseñan como puntos de color (los pone app/core/sin_emojis.py) */
.sem { display: inline-block; width: .6em; height: .6em; border-radius: 50%; vertical-align: .05em; background: var(--muted); }
.sem-g { background: #3fa37f; } .sem-y { background: #e0b44c; } .sem-r { background: #d0646a; }
/* Lo que antes era solo un emoji: fuera (adornos); en los mapas y en «Tus últimos 7 días» queda el círculo de color,
   y en el calendario, un puntito («hay diario», «comiste») */
.sin-emoji:not(.rmk):not(.sd):not(.sd-big):not(.cal-diary) { display: none !important; }
.cal-diary.sin-emoji { display: inline-block; width: 5px; height: 5px; padding: 0; border-radius: 50%; background: var(--muted); vertical-align: top; margin-top: 3px; }
/* Conciertos en Barcelona (Ticketmaster) */
.conc-pasos { padding-left: 20px; margin: 8px 0 14px; display: grid; gap: 6px; }
.conc-form { display: flex; gap: 8px; flex-wrap: wrap; }
.conc-form input { flex: 1 1 220px; min-width: 0; }
.conc-filtros { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.conc-filtros .tag { text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 5px 11px; }
.conc-filtros .tag.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.conc-filtros .tag b { font-weight: 600; opacity: .7; margin-left: 2px; }
.conc-mes { margin: 20px 0 8px; font-size: 1.15rem; }
.conc-lista { padding: 4px 16px; }
.conc-fila { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.conc-fila:first-child { border-top: 0; }
.conc-fecha { flex: 0 0 42px; display: grid; justify-items: center; align-content: start; line-height: 1.1; }
.conc-fecha b { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.conc-fecha small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.conc-info { display: grid; gap: 2px; min-width: 0; }
.conc-info > b { font-weight: 600; overflow-wrap: anywhere; }
.conc-badge { display: inline-block; font-size: .68rem; font-weight: 700; color: var(--navy-t); background: color-mix(in srgb, var(--navy) 12%, var(--surface));
  border-radius: 999px; padding: 1px 8px; vertical-align: .1em; }
.conc-acc { display: flex; gap: 16px; margin-top: 4px; }
.conc-acc form { margin: 0; }
.conc-tuyo .conc-fecha b { color: var(--navy-t); }

/* ======================= Menú de las tres líneas (móvil) e Inicio sencillo (B + C), 14/11 ======================= */
.m-left { display: flex; align-items: center; gap: 2px; justify-self: start; min-width: 0; }
.m-menu, .drawer, .drawer-fondo { display: none; }
@media (max-width: 900px) {
  .m-menu { display: grid; gap: 4px; align-content: center; width: 38px; height: 38px; padding: 0 9px; margin-left: -6px; border: 0;
    background: none; border-radius: 50%; cursor: pointer; }
  .m-menu i { display: block; height: 2px; border-radius: 2px; background: var(--ink); }
  .m-menu i:nth-child(2) { width: 70%; }
  .m-menu:active { background: var(--line); }
  .m-left .m-back { margin-left: 0; }
  .drawer-fondo:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(25, 35, 45, .35); }
  .drawer:not([hidden]) { display: flex; flex-direction: column; gap: 2px; position: fixed; inset: 0 auto 0 0; z-index: 91;
    width: min(82vw, 330px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface);
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    box-shadow: 10px 0 34px rgba(20, 30, 40, .22); animation: drawer-in .2s ease-out; }
  @keyframes drawer-in { from { transform: translateX(-100%); } }
  @media (prefers-reduced-motion: reduce) { .drawer:not([hidden]) { animation: none; } }
  body.menu-on { overflow: hidden; }
}
.drawer-cab { display: flex; align-items: center; gap: 10px; padding: 2px 4px 14px; }
.drawer-cab img { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); }
.drawer-cab b { flex: 1; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; }
.drawer-x { border: 0; background: none; color: var(--muted); font-size: 1rem; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.d-link { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px; border-radius: 12px; font-weight: 600;
  font-size: .98rem; color: var(--ink); text-decoration: none; list-style: none; cursor: pointer; background: none; border: 0; width: 100%; text-align: left; font-family: inherit; }
.d-link::-webkit-details-marker { display: none; }
.d-link.on { background: color-mix(in srgb, var(--navy) 10%, var(--surface)); color: var(--navy-t); }
.d-sec > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s; }
.d-sec[open] > summary::after { transform: rotate(45deg); }
.d-sub { display: grid; margin: 0 0 6px 14px; padding-left: 8px; border-left: 2px solid color-mix(in srgb, var(--navy) 14%, var(--surface)); }
.d-sub a { padding: 7px 8px; border-radius: 8px; font-size: .9rem; color: var(--ink-2); text-decoration: none; }
.d-sub a.on { color: var(--navy-t); font-weight: 700; }
.drawer hr { border: 0; border-top: 1px solid var(--line); margin: 8px 4px; width: auto; }
.d-peq { font-weight: 400; font-size: .92rem; color: var(--ink-2); padding: 8px 10px; }
.drawer form { margin: 0; }

/* Inicio sencillo */
.is-saludo { padding: 4px 2px 12px; }
.is-saludo small { display: block; color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.is-saludo h1 { margin: 2px 0 0; font-size: clamp(1.7rem, 7vw, 2.3rem); }
.is-dinero { display: grid; gap: 2px; padding: 16px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; margin-bottom: 14px; }
.is-dinero:hover { text-decoration: none; }
.is-label { font-size: .82rem; color: var(--muted); }
.is-cifra { font-family: var(--font-display); font-weight: 400; font-size: 2.3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.is-cifra.is-vacio { font-size: 1.35rem; }
.is-mal .is-cifra { color: var(--neg); }
.is-barra { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--line) 80%, var(--surface)); margin-top: 8px; overflow: hidden; }
.is-barra i { display: block; height: 100%; border-radius: 3px; background: var(--brand-2, #8fd3cf); }
.is-mal .is-barra i { background: var(--neg); }
.is-pie { font-size: .8rem; color: var(--ink-2); margin-top: 4px; }
.is-barras { display: grid; gap: 12px; }
@media (min-width: 901px) { .is-barras { grid-template-columns: 1fr 1fr; } }
.is-b { position: relative; display: block; height: 128px; border-radius: 22px; overflow: hidden; background: var(--line); text-decoration: none; isolation: isolate; }
.is-b:hover { text-decoration: none; }
.is-b img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .3s; }
.is-b:active img { transform: scale(1.02); }
.is-b span { position: absolute; inset: auto 0 0; padding: 28px 16px 12px; display: grid; color: #fff;
  background: linear-gradient(transparent, rgba(22, 33, 43, .66)); }
.is-b b { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1.1; }
.is-b em { font-style: normal; font-size: .84rem; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Apartados (14/11): primero las barras de cada pantalla, en pastel; la información del día va debajo */
.sec-barras { display: grid; gap: 8px; margin: 4px 0 24px; --sb1: var(--fin-bg); --sb2: var(--surface); --sbc: var(--fin); }
@media (min-width: 901px) { .sec-barras { grid-template-columns: 1fr 1fr; } }
.sb-wb { --sb1: var(--wb-bg); --sbc: var(--wb); } .sb-age { --sb1: var(--age-bg); --sbc: var(--age); } .sb-cul { --sb1: var(--cul-bg); --sbc: var(--cul); }
.sb { position: relative; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px; border-radius: 20px; overflow: hidden;
  color: var(--ink); text-decoration: none; background: linear-gradient(110deg, var(--sb1) 0%, var(--sb2) 85%); border: 1px solid var(--line); isolation: isolate; }
.sb::after { content: ""; position: absolute; right: -30px; top: -40px; width: 120px; height: 120px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, color-mix(in srgb, var(--sb1) 90%, transparent) 0 60%, transparent 61%); opacity: .8; }
.sb:hover { text-decoration: none; border-color: var(--line-strong); }
.sb:active { transform: scale(.99); }
.sb-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--sbc);
  box-shadow: 0 1px 2px rgba(43, 55, 66, .06); }
.sb-txt { display: grid; min-width: 0; flex: 1; }
.sb-txt b { font-family: var(--font-display); font-weight: 400; font-size: 1.12rem; line-height: 1.2; }
.sb-txt small { color: var(--ink-2); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb > svg:last-child { flex: none; color: var(--muted); }
.sec-resumen { border-top: 1px solid var(--line); padding-top: 18px; }
.conc-artistas { margin-top: 22px; }
.conc-artistas form { display: grid; gap: 8px; }
.conc-artistas textarea { width: 100%; font: inherit; }
.conc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.conc-chips span { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--navy) 10%, var(--surface)); color: var(--navy-t); }
