  :root {
    /* WHITE PREMIUM is the canonical Bless Habit base theme. */
    --bg: #ffffff; --panel: #ffffff; --panel-2: #f8f8fc; --panel-3: #f1f0fa;
    --border: #e8e7f0; --text: #172033; --text-dim: #7b8192;
    --accent: #7c62f5; --accent-2: #43d6a1; --accent-3: #ffc857;
    --user-bubble: #7c62f5; --agent-bubble: #f7f6fc;
    --warn-bg: #fff5d7; --warn-text: #8a5a10; --done-color: #43d6a1;
    --diag-bg: linear-gradient(135deg, #f4f0ff 0%, #ffffff 58%, #effff8 100%); --diag-text: #172033; --radius: 18px;
    /* --on-accent: color de texto sobre superficies con var(--accent)/--accent-2/--accent-3)
       de fondo (botones, chips seleccionados, insignias). En el tema oscuro y el dorado el
       acento es claro, así que el texto va oscuro; en el tema claro (ver más abajo) el acento
       lavanda es más saturado, así que el texto va blanco — por eso es una variable de tema
       y no un color fijo. --shadow/--shadow-sm son sombras suaves para tarjetas; el tema
       oscuro no las necesita (fondo ya oscuro), así que quedan "none" acá y se activan en
       el tema claro. */
    --on-accent: #ffffff; --shadow: 0 12px 35px rgba(46,39,90,.09); --shadow-sm: 0 5px 18px rgba(46,39,90,.07);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--text); }
  #app { max-width: 480px; margin: 0 auto; height: 100vh; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--border); border-right: 1px solid var(--border); position: relative; overflow: hidden; }
  header { padding: 14px 18px 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--panel); position: sticky; top: 0; z-index: 5; box-shadow: var(--shadow-sm); }
  header .brand { display: flex; align-items: center; gap: 10px; }
  .avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    animation: pulseAvatar 2.4s infinite; transition: transform .2s;
  }
  .avatar.bounce { animation: pulseAvatar 2.4s infinite, avatarBounce .5s ease; }
  @keyframes pulseAvatar { 0%{box-shadow:0 0 0 0 rgba(124,158,255,.35);} 70%{box-shadow:0 0 0 8px rgba(124,158,255,0);} 100%{box-shadow:0 0 0 0 rgba(124,158,255,0);} }
  @keyframes avatarBounce { 0%{transform:scale(1);} 30%{transform:scale(1.25) rotate(-8deg);} 60%{transform:scale(.95) rotate(4deg);} 100%{transform:scale(1) rotate(0);} }
  header h1 { font-size: 15px; margin: 0; font-weight: 700; }
  header .sub { font-size: 11px; color: var(--text-dim); margin: 0; }
  .demo-badge { font-size: 10px; padding: 3px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-text); border: 1px solid #5a4a24; white-space: nowrap; }
  .demo-badge.live { background: rgba(12,163,12,.15); color: var(--status-good); border-color: rgba(12,163,12,.4); }

  .progress-ring { position: relative; width: 40px; height: 40px; }
  .progress-ring svg { transform: rotate(-90deg); }
  .progress-ring circle { fill: none; stroke-width: 4; }
  .progress-ring .bg { stroke: var(--panel-2); }
  .progress-ring .fg { stroke: var(--accent-2); stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
  .progress-ring .label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--accent-2); }

  #onboarding-progress { height: 3px; background: var(--panel-2); position: relative; overflow: hidden; }
  #onboarding-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0%; transition: width .4s ease; }

  #view-onboarding, #view-chat, #view-profile { flex: 1; display: none; flex-direction: column; min-height: 0; }
  #view-onboarding.active, #view-chat.active, #view-profile.active { display: flex; }
  #view-profile.active { overflow-y: auto; }

  #onboarding-scroll { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 12px; }
  .bubble { position: relative; max-width: 86%; padding: 11px 14px; border-radius: var(--radius); line-height: 1.42; font-size: 14.5px; animation: bubbleIn .3s cubic-bezier(.2,.8,.2,1); white-space: pre-wrap; }
  @keyframes bubbleIn { from { opacity:0; transform: translateY(8px) scale(.98);} to {opacity:1; transform:none;} }
  .agent { background: var(--agent-bubble); align-self: flex-start; border-bottom-left-radius: 4px; }
  .user { background: var(--user-bubble); align-self: flex-end; border-bottom-right-radius: 4px; color: #fff; }
  /* Reacción animada en la esquina de una burbuja puntual (logro guardado, hábito
     nuevo confirmado) — más sutil que la "explosión" de pantalla completa, que
     sigue reservada para marcar tareas de la agenda. */
  .bubble-reaction { position: absolute; top: -10px; right: -8px; font-size: 18px; animation: popIn .5s cubic-bezier(.34,1.56,.64,1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
  .agenda-note { align-self: center; font-size: 12px; color: var(--text-dim); background: var(--panel-2); padding: 6px 12px; border-radius: 999px; animation: bubbleIn .3s; }
  .agenda-note.tappable { cursor: pointer; border: 1px solid var(--accent-2); color: var(--text); transition: .15s; }
  .agenda-note.tappable:hover { background: var(--panel-3); transform: translateY(-1px); }
  .logro-chip .logro-share-btn { cursor: pointer; opacity: .75; flex-shrink: 0; }
  .logro-chip .logro-share-btn:hover { opacity: 1; }
  .logro-chip .logro-delete-btn { cursor: pointer; opacity: .6; flex-shrink: 0; }
  .logro-chip .logro-delete-btn:hover { opacity: 1; }
  .celebrate-note { align-self: center; font-size: 13px; color: var(--on-accent); background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); padding: 10px 18px; border-radius: 999px; font-weight: 700; text-align: center; max-width: 90%; }
  @keyframes popIn { 0%{opacity:0; transform: scale(.6);} 70%{transform: scale(1.08);} 100%{opacity:1; transform: scale(1);} }
  .celebrate-sparkle { animation: popIn .45s cubic-bezier(.34,1.56,.64,1), sparkleWiggle 1.2s ease .45s 1; }
  @keyframes sparkleWiggle { 0%,100%{transform:rotate(0);} 25%{transform:rotate(-2deg) scale(1.02);} 75%{transform:rotate(2deg) scale(1.02);} }
  .celebrate-pop { animation: popIn .5s cubic-bezier(.34,1.76,.64,1); box-shadow: 0 0 0 0 rgba(255,184,108,.5); }
  .celebrate-confetti { animation: popIn .5s cubic-bezier(.34,1.56,.64,1), confettiShift 1.6s ease .5s 1; background: linear-gradient(120deg, var(--accent-3), var(--accent-2), var(--accent)); background-size: 220% 220%; }
  @keyframes confettiShift { 0%{background-position:0% 50%;} 50%{background-position:100% 50%;} 100%{background-position:0% 50%;} }
  .celebrate-trophy { animation: popIn .6s cubic-bezier(.34,1.9,.64,1), trophyGlow 1.8s ease .6s 1; background: linear-gradient(135deg, #ffd76c, var(--accent-3), var(--accent-2)); font-size: 14.5px; padding: 12px 20px; }
  @keyframes trophyGlow { 0%,100%{box-shadow:0 0 0 0 rgba(255,215,108,0);} 40%{box-shadow:0 0 22px 6px rgba(255,215,108,.55);} }

  /* Celebración flotante — "explosión" que aparece encima de CUALQUIER pestaña al
     marcar una actividad (ya no se inserta como mensaje dentro del chat de Bless). */
  .celebrate-float { position: absolute; inset: 0; pointer-events: none; z-index: 90; display: flex; align-items: center; justify-content: center; }
  .celebrate-float .celebrate-note { box-shadow: 0 10px 34px rgba(0,0,0,.4); pointer-events: auto; position: relative; padding-right: 34px; }
  .celebrate-close-btn { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(16,19,26,.22); color: #10131a; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: 800; transition: background .15s, transform .1s; }
  .celebrate-close-btn:hover { background: rgba(16,19,26,.38); }
  .celebrate-close-btn:active { transform: scale(.9); }
  .celebrate-particle { position: absolute; left: 50%; top: 50%; font-size: 20px; pointer-events: none; animation: particleBurst .9s cubic-bezier(.15,.8,.3,1) forwards; }
  @keyframes particleBurst { 0% { transform: translate(-50%,-50%) scale(.4); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); opacity: 0; } }
  .diag-card { align-self: stretch; background: var(--diag-bg); border: 1px solid var(--border); border-radius: 20px; padding: 18px; animation: popIn .5s cubic-bezier(.34,1.56,.64,1); box-shadow: var(--shadow); }
  .diag-card .diag-label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); margin-bottom: 6px; }
  .diag-card .diag-title { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
  .diag-card .diag-body { font-size: 13.5px; color: var(--diag-text); line-height: 1.5; }
  .reengage-note { align-self: center; font-size: 13px; background: var(--panel-3); border: 1px solid var(--border); padding: 10px 16px; border-radius: 14px; animation: popIn .45s; text-align: center; }

  .typing-bubble { align-self: flex-start; background: var(--agent-bubble); padding: 12px 16px; border-radius: var(--radius); border-bottom-left-radius: 4px; display: flex; align-items: center; gap: 4px; animation: bubbleIn .2s; }
  .typing-bubble .typing-label { margin-left: 8px; font-size: 12.5px; color: var(--text-dim); }
  .typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); animation: typingBounce 1.1s infinite; }
  .typing-dot:nth-child(2) { animation-delay: .15s; }
  .typing-dot:nth-child(3) { animation-delay: .3s; }
  @keyframes typingBounce { 0%,60%,100%{ transform: translateY(0); opacity:.5;} 30%{ transform: translateY(-5px); opacity:1;} }

  .onboarding-input { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); animation: slideUp .3s ease; max-height: 52vh; overflow-y: auto; }
  @keyframes slideUp { from { opacity:0; transform: translateY(10px);} to {opacity:1; transform:none;} }
  .quick-replies { display: flex; flex-wrap: wrap; gap: 8px; }
  .qr-btn { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); padding: 9px 14px; border-radius: 999px; font-size: 13.5px; cursor: pointer; transition: .15s; }
  .qr-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
  .qr-btn:active { transform: scale(.95); }
  .qr-btn.selected { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
  .row-input { display: flex; gap: 8px; }
  input[type=text], input[type=number], input[type=time] { flex: 1; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); padding: 11px 14px; border-radius: 12px; font-size: 14.5px; outline: none; transition: border-color .15s; }
  input:focus { border-color: var(--accent); }
  .send-btn { background: var(--accent); border: none; color: var(--on-accent); font-weight: 700; padding: 0 18px; border-radius: 12px; cursor: pointer; font-size: 14px; transition: transform .1s; }
  .send-btn:active { transform: scale(.95); }
  .send-btn:disabled { opacity: .5; cursor: default; }
  .skip-link { font-size: 12px; color: var(--text-dim); text-align: center; cursor: pointer; text-decoration: underline; }
  .step-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: -4px; }

  #chat-scroll { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
  /* La lista de tareas ya NO se muestra dentro del chat de Bless — se sentía como
     una tabla/formulario pegada debajo de la conversación ("parece que hablo con
     un robot"). Sigue viva en el DOM (renderAgenda() la sigue actualizando, la
     usan ~15 sitios del código) pero oculta acá; el progreso del día se ve en el
     anillo del encabezado, y la lista completa y editable sigue en Calendario→Día. */
  #agenda-panel { display: none; }
  /* Reemplazo compacto: una sola línea tocable, no una lista — solo un recordatorio
     rápido de cuánto llevas hoy, con un salto directo a Calendario→Día si quieres
     ver/editar la lista completa. */
  .chat-agenda-pill { margin: 0 14px 8px; padding: 8px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; color: var(--text-dim); display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; transition: .15s; }
  .chat-agenda-pill:hover { border-color: var(--accent-2); color: var(--text); }
  .chat-agenda-pill .arrow { color: var(--accent-2); font-weight: 700; }
  #agenda-panel h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); margin: 4px 0 8px; display:flex; justify-content:space-between; }
  .agenda-item { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 7px 10px; margin-bottom: 6px; font-size: 13px; animation: itemIn .3s cubic-bezier(.2,.8,.2,1); transition: opacity .3s, transform .3s; }
  @keyframes itemIn { from { opacity:0; transform: translateX(-6px);} to {opacity:1; transform:none;} }
  .agenda-item.done { opacity: .55; }
  .agenda-item.done .task { text-decoration: line-through; }
  .agenda-item .check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink:0; font-size: 11px; transition: .15s; }
  .agenda-item .check:hover { border-color: var(--accent-2); }
  .agenda-item.done .check { background: var(--done-color); border-color: var(--done-color); color: var(--on-accent); }
  .agenda-item .icon { font-size: 15px; flex-shrink: 0; }
  .agenda-item .time { color: var(--accent-2); font-weight: 700; min-width: 42px; }
  .agenda-item .task { flex: 1; margin: 0 4px; }
  .agenda-item .rm { color: var(--text-dim); cursor: pointer; font-size: 12px; flex-shrink:0; }
  #chat-input { border-top: 1px solid var(--border); padding: 8px 12px 6px; display: flex; gap: 8px; background: var(--panel); }
  #chat-text { flex: 1; }
  footer.tabbar { display: flex; border-top: 1px solid var(--border); background: var(--panel); }
  .tab { flex: 1; text-align: center; padding: 10px 0 8px; font-size: 11px; color: var(--text-dim); cursor: pointer; }
  .tab.active-tab { color: var(--accent); }
  .tab .ic { font-size: 18px; display: block; margin-bottom: 2px; }

  #view-profile { padding: 20px 18px; overflow-y: auto; }
  .profile-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin-bottom: 14px; animation: bubbleIn .3s; box-shadow: var(--shadow-sm); }
  .profile-card h4 { margin: 0 0 10px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
  .profile-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--border); gap: 12px; }
  .profile-row:last-child { border-bottom: none; }
  .profile-row span:first-child { color: var(--text-dim); flex-shrink: 0; }
  .profile-row span:last-child { text-align: right; }
  .stats-row { display: flex; gap: 10px; }
  .stat-box { flex: 1; background: var(--panel-3); border: 1px solid var(--border); border-radius: 16px; padding: 12px; text-align: center; }
  .stat-box .num { font-size: 22px; font-weight: 800; color: var(--accent-2); }
  .stat-box .lbl { font-size: 10.5px; color: var(--text-dim); margin-top: 2px; }
  .habit-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-3); border-radius: 999px; padding: 6px 12px; font-size: 13px; margin: 3px 4px 3px 0; }
  .habit-chip .streak { background: var(--accent-3); color: var(--on-accent); border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 800; margin-left: 4px; }
  .chip-edit-btn { cursor: pointer; margin-left: 6px; opacity: 0.75; font-size: 12px; }
  .chip-edit-btn:hover { opacity: 1; }
  .agenda-item .edit { cursor: pointer; opacity: 0.6; padding: 0 4px; }
  .agenda-item .edit:hover { opacity: 1; }
  .tag-chip { display: inline-block; background: var(--panel-3); border-radius: 999px; padding: 5px 11px; font-size: 12px; margin: 3px 4px 3px 0; }
  .logros-card { border-color: #7a5f1e; background: linear-gradient(135deg, #2a2311, #1c1810); }
  .logros-card h4 { color: #f0d78c; }
  .logro-thumb { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
  .logro-custom-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin: 12px 0 6px; }
  .logro-custom-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
  .logro-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
  .logro-swatch.selected { border-color: var(--text); transform: scale(1.12); }
  .logro-icon-opt { width: 38px; height: 38px; border-radius: 12px; border: 2px solid transparent; background: var(--card-2, rgba(127,127,127,.12)); font-size: 20px; cursor: pointer; padding: 0; }
  .logro-icon-opt.selected { border-color: var(--accent, #7C6CF0); }
  .logro-chip { display: flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #caa23a, #f0d78c); color: #3b2e08; border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
  .logro-chip .logro-date { font-size: 10px; font-weight: 700; opacity: .75; margin-left: auto; white-space: nowrap; }

  /* ============================================================
     NIVELES Y XP — agregado 2 sept 2026 junto con el rediseño visual claro/
     lavanda que mandó Tania. Reutiliza var(--diag-bg)/var(--accent)/etc, así
     que hereda el degradé y los colores de cada tema automáticamente en vez
     de tener sus propios colores fijos.
     ============================================================ */
  #level-hero { flex-shrink: 0; }
  .level-hero-card { margin: 14px 16px 4px; border-radius: 20px; padding: 16px 18px; background: var(--diag-bg); border: 1px solid var(--border); box-shadow: var(--shadow); }
  .level-hero-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
  .level-hero-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 8px; max-width: 230px; line-height: 1.4; }
  .level-badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); color: var(--accent); font-size: 10.5px; font-weight: 800; white-space: nowrap; }
  .level-orb { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-weight: 900; font-size: 18px; box-shadow: var(--shadow-sm); }
  .level-orb small { display: block; font-size: 7px; font-weight: 700; opacity: .85; text-align: center; margin-top: -2px; }
  .xp-line { display: flex; justify-content: space-between; margin: 12px 0 6px; font-size: 11px; color: var(--text-dim); }
  .xp-line b { color: var(--text); }
  .xp-progress { height: 8px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
  .xp-progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
  .level-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; }
  .level-row:last-child { margin-bottom: 0; }
  .level-row.locked { opacity: .48; }
  .level-dot { width: 33px; height: 33px; border-radius: 11px; flex-shrink: 0; background: var(--panel-3); display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 900; font-size: 12px; }

  #view-diary { flex: 1; display: none; padding: 20px 18px; overflow-y: auto; min-height: 0; }
  #view-diary.active { display: block; }
  .diary-new-card { border: 2px dashed var(--border); border-radius: 16px; padding: 26px 16px; text-align: center; cursor: pointer; transition: .15s; margin-bottom: 16px; background: var(--panel-2); }
  .diary-new-card:hover { border-color: var(--accent); }
  .diary-new-card .plus { font-size: 30px; color: var(--accent); line-height: 1; margin-bottom: 6px; }
  .diary-new-card .lbl { font-size: 14px; font-weight: 700; color: var(--text); }
  .diary-new-card .desc { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }
  .diary-entry-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 18px; padding: 14px; margin-bottom: 12px; animation: bubbleIn .3s; box-shadow: var(--shadow-sm); }
  .diary-entry-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
  .diary-entry-mood { font-size: 20px; flex-shrink: 0; }
  .diary-entry-date { font-weight: 700; font-size: 13.5px; flex: 1; }
  .diary-entry-actions { display: flex; gap: 10px; opacity: .75; }
  .diary-entry-actions span { cursor: pointer; font-size: 13px; }
  .diary-entry-actions span:hover { opacity: 1; }
  .diary-entry-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; color: var(--text); }
  .diary-entry-text.empty { color: var(--text-dim); font-style: italic; }
  .diary-entry-photo { width: 100%; max-height: 240px; object-fit: cover; border-radius: 10px; display: block; }
  .diary-entry-card.themed .diary-entry-date,
  .diary-entry-card.themed .diary-entry-text,
  .diary-entry-card.themed .diary-entry-text.empty { color: inherit; opacity: 1; }
  .diary-entry-card.themed .diary-entry-actions span { opacity: .7; }
  /* Separadores decorativos y marcos de foto (Fase 3, 24 ago 2026) */
  .diary-separator { text-align: center; margin: 10px 0; color: var(--text-dim); }
  .diary-entry-card.themed .diary-separator { color: inherit; opacity: .75; }
  .diary-separator-glyph { font-size: 13px; letter-spacing: 2px; }
  .diary-separator-line { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
  .diary-entry-card.themed .diary-separator-line { background: linear-gradient(90deg, transparent, currentColor, transparent); opacity: .35; }
  .diary-entry-photo-wrap { margin-top: 10px; position: relative; }
  .diary-entry-photo-wrap.no-photo { min-height: 150px; border-radius: 10px; overflow: hidden; }
  .diary-frame-polaroid { background: #fff; padding: 10px 10px 26px; border-radius: 4px; box-shadow: 0 3px 10px rgba(0,0,0,.28); }
  .diary-frame-polaroid .diary-entry-photo { border-radius: 2px; }
  .diary-frame-washi { position: relative; padding: 4px; }
  .diary-frame-washi::before, .diary-frame-washi::after { content: ''; position: absolute; width: 46px; height: 18px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 4px, rgba(255,196,120,.6) 4px 8px); opacity: .9; z-index: 2; }
  .diary-frame-washi::before { top: -8px; left: 14px; transform: rotate(-8deg); }
  .diary-frame-washi::after { bottom: -8px; right: 14px; transform: rotate(6deg); }
  .diary-frame-gold { padding: 4px; border: 2px solid #d4af6a; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
  .diary-frame-gold .diary-entry-photo { border-radius: 6px; }
  .diary-frame-dashed { padding: 5px; border: 2px dashed var(--border); border-radius: 10px; }
  .diary-looks-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .diary-look-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--border); font-size: 12px; font-weight: 700; cursor: pointer; transition: .15s; }
  .diary-look-chip:hover { border-color: var(--accent); }
  .diary-look-chip .look-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
  .diary-look-chip .look-remove { opacity: .5; margin-left: 2px; font-size: 11px; }
  .diary-look-chip .look-remove:hover { opacity: 1; color: #e0455f; }
  .diary-look-add-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: none; border: 1.5px dashed var(--border); font-size: 12px; font-weight: 700; color: var(--text-dim); cursor: pointer; transition: .15s; }
  .diary-look-add-btn:hover { border-color: var(--accent); color: var(--accent); }
  /* Fase 4 del diario — experiencia (24 ago 2026): pregunta del día, notita de
     Bless, favoritas/etiquetas y filtro de la lista por ellas. */
  .pin-overlay { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 16px; }
  .pin-box { width: 100%; max-width: 320px; text-align: center; }
  .pin-logo { font-size: 40px; }
  .pin-title { font-size: 19px; font-weight: 800; margin-top: 8px; }
  .pin-sub { font-size: 13px; color: var(--text-dim); margin-top: 4px; min-height: 18px; }
  .pin-dots { display: flex; justify-content: center; gap: 16px; margin: 22px 0 8px; }
  .pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); transition: background .12s; }
  .pin-dots span.on { background: var(--accent); }
  .pin-dots.shake { animation: pinShake .35s; }
  @keyframes pinShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
  .pin-error { color: #d9534f; font-size: 13px; min-height: 18px; margin-bottom: 10px; }
  .pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; justify-items: center; }
  .pin-key { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 26px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); }
  .pin-key:active { transform: scale(.94); background: var(--panel-2); }
  .pin-key.blank { visibility: hidden; }
  .pin-key.del { font-size: 20px; border: none; background: none; box-shadow: none; }
  .bio-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 12px; cursor: pointer; }
  .bio-toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
  .pin-bio { margin-top: 16px; background: var(--panel); border: 1px solid var(--border); color: var(--accent); border-radius: 14px; padding: 12px 18px; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 48px; }
  .pin-links { display: flex; justify-content: space-between; margin-top: 18px; }
  .pin-link { background: none; border: none; color: var(--accent); font-size: 14px; font-weight: 600; padding: 10px; cursor: pointer; }
  .pin-link:empty { visibility: hidden; }
  .premium-tag { font-size: 10px; font-weight: 800; color: var(--on-accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); padding: 2px 7px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
  .delete-account-link { background: none; border: none; color: #d9534f; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 8px; }
  .ad-reward-btn { margin-top: 10px; border-style: dashed; }
  .ui-choice-list { display: flex; flex-direction: column; gap: 8px; }
  .ui-choice-list button { width: 100%; min-height: 46px; }
  body.ad-banner-on #view-calendar, body.ad-banner-on #view-metrics, body.ad-banner-on #view-pomodoro { padding-bottom: calc(var(--ad-banner-h, 60px) + 8px); }
  body.ad-banner-on .day-add-fab { bottom: calc(84px + var(--ad-banner-h, 60px) + env(safe-area-inset-bottom, 0px)); }
  .terms-gate { position: fixed; inset: 0; z-index: 120; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 20px 16px; overflow-y: auto; }
  .terms-card { width: 100%; max-width: 420px; background: var(--panel); border-radius: 22px; padding: 26px 22px; box-shadow: 0 12px 40px rgba(0,0,0,.12); text-align: left; margin: auto; }
  .terms-emoji { font-size: 40px; text-align: center; }
  .terms-card h2 { text-align: center; margin: 8px 0 10px; font-size: 22px; }
  .terms-card p { font-size: 14.5px; line-height: 1.55; color: var(--text-dim); margin: 0 0 10px; }
  .terms-points { margin: 0 0 14px; padding-left: 18px; font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }
  .terms-points li { margin-bottom: 6px; }
  .terms-links { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
  .terms-links button { flex: 1; min-width: 140px; border: 1px solid var(--border, rgba(127,127,127,.3)); background: transparent; color: var(--text); border-radius: 12px; padding: 10px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
  .terms-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text); cursor: pointer; margin-bottom: 14px; }
  .terms-check input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--accent, #7C6CF0); }
  .terms-error { color: #d9534f; font-size: 13px; min-height: 0; margin-bottom: 6px; }
  #terms-accept-btn { width: 100%; min-height: 50px; }
  #terms-accept-btn:disabled { opacity: .5; }
  .terms-logout { display: block; text-align: center; margin-top: 14px; font-size: 13px; color: var(--text-dim); }
  .login-legal { margin-top: 22px; font-size: 12.5px; color: var(--text-dim); }
  .login-legal a { color: var(--text-dim); }
  .weekly-card { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); }
  .weekly-range { font-weight: 600; color: var(--text-dim); font-size: 11.5px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
  .weekly-headline { font-size: 16px; font-weight: 800; line-height: 1.35; margin: 4px 0 10px; }
  .weekly-block { margin-top: 10px; }
  .weekly-label { font-size: 11.5px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
  .weekly-item { font-size: 13.5px; line-height: 1.45; margin: 4px 0; }
  .weekly-next { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13.5px; font-weight: 700; }
  .weekly-empty { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
  .mood-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 4px; margin: 6px 0 12px; }
  .mood-day { display: flex; flex-direction: column; align-items: center; font-size: 19px; line-height: 1.2; }
  .mood-day small { font-size: 9.5px; color: var(--text-dim); }
  .mood-day.empty span { color: var(--text-dim); opacity: .5; }
  .mood-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
  .mood-stats div { background: var(--panel-2); border-radius: 12px; padding: 8px; text-align: center; }
  .mood-stats b { display: block; font-size: 20px; }
  .mood-stats span { font-size: 11px; color: var(--text-dim); }
  .locked-preview { filter: blur(3px); opacity: .7; pointer-events: none; user-select: none; margin: 10px 0 12px; }
  .diary-theme-swatch.locked, .diary-sticker-cat-tab.locked { position: relative; opacity: .6; }
  .diary-theme-swatch.locked::after, .diary-sticker-cat-tab.locked::after { content: '🔒'; position: absolute; top: -6px; right: -6px; font-size: 11px; }
  .diary-export-btn { background: var(--panel); border: 1px solid var(--border); color: var(--accent); border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
  .premium-sheet { max-width: 400px; max-height: 90vh; overflow-y: auto; }
  .premium-sheet-title { font-size: 19px; font-weight: 850; margin-bottom: 12px; }
  .plan-options { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
  .plan-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; text-align: left; font-size: 15px; }
  .plan-option.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
  .plan-name { font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .plan-save { font-size: 11px; font-weight: 800; color: #fff; background: #2fb37b; padding: 2px 8px; border-radius: 999px; }
  .plan-price { font-weight: 800; white-space: nowrap; }
  .premium-benefits { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.4; }
  .bubble.agent { position: relative; }
  .bubble-flag { position: absolute; top: 4px; right: -26px; background: none; border: none; color: var(--text-dim); opacity: .35; font-size: 13px; cursor: pointer; padding: 4px; }
  .bubble-flag:hover, .bubble-flag:focus { opacity: .9; }
  .memory-list { display: flex; flex-direction: column; gap: 6px; }
  .memory-item { display: flex; align-items: flex-start; gap: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 9px 10px; font-size: 13.5px; line-height: 1.4; }
  .memory-text { flex: 1; }
  .memory-del { background: none; border: none; color: var(--text-dim); font-size: 14px; cursor: pointer; padding: 2px 6px; min-width: 32px; min-height: 32px; }
  .memory-empty { font-size: 13px; color: var(--text-dim); background: var(--panel-2); border: 1px dashed var(--border); border-radius: 12px; padding: 12px; text-align: center; }
  .he-minutes .qr-btn { min-width: 58px; }
  .he-remind .qr-btn.locked { position: relative; opacity: .6; }
  .he-remind .qr-btn.locked::after { content: '🔒'; position: absolute; top: -6px; right: -6px; font-size: 11px; }
  .he-remind-premium { font-size: 10.5px; font-weight: 800; color: var(--accent); background: rgba(124,98,245,.10); border-radius: 999px; padding: 2px 8px; margin-left: 4px; }
  .time .mins { font-weight: 600; opacity: .75; }
  /* ---- Compositor del diario (rediseño) ---- */
  .dc-overlay { position: fixed; inset: 0; z-index: 86; background: rgba(20,16,40,.45); display: flex; justify-content: center; }
  .dc-sheet { width: 100%; max-width: 480px; height: 100%; background: var(--bg); display: flex; flex-direction: column; box-shadow: 0 0 40px rgba(20,16,40,.2); }
  .dc-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--panel); border-bottom: 1px solid var(--border); flex-shrink: 0; }
  .dc-head-title { flex: 1; text-align: center; min-width: 0; }
  #diary-composer-title { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dc-head-date { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
  .dc-head-btn { background: none; border: none; color: var(--text-dim); font-size: 15px; font-weight: 600; padding: 10px 8px; cursor: pointer; min-width: 76px; text-align: left; }
  .dc-head-save { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); border: none; border-radius: 12px; font-size: 15px; font-weight: 800; padding: 10px 16px; min-width: 76px; cursor: pointer; }
  .dc-head-save:disabled { opacity: .6; }
  .dc-body { flex: 1; overflow-y: auto; padding: 14px 16px 32px; -webkit-overflow-scrolling: touch; }
  .dc-label { font-size: 12.5px; font-weight: 700; color: var(--text-dim); margin: 14px 0 8px; }
  .dc-body > .dc-label:first-child { margin-top: 2px; }
  .dc-mood-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .dc-mood-row::-webkit-scrollbar { display: none; }
  .dc-mood-row .qr-btn { flex-shrink: 0; font-size: 24px; width: 48px; height: 48px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 14px; }
  .dc-mood-row .qr-btn.selected { transform: scale(1.08); box-shadow: 0 0 0 2px var(--accent); }
  .dc-page { margin-top: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 14px; box-shadow: var(--shadow-sm); transition: background .2s, color .2s; }
  .dc-page .diary-prompt-card { background: rgba(255,255,255,.45); color: inherit; }
  .dc-textarea, html[data-theme] .dc-textarea { width: 100%; box-sizing: border-box; min-height: 150px; background: transparent !important; border: none !important; box-shadow: none !important; outline: none; color: inherit; font-family: inherit; font-size: 16px; line-height: 1.6; resize: none; padding: 4px 2px; }
  .dc-textarea::placeholder { color: inherit; opacity: .55; }
  .dc-page .diary-preview-canvas { margin-top: 8px; background: transparent; }
  .dc-page .diary-preview-canvas.hidden { display: none; }
  .dc-stage-hint { font-size: 11px; opacity: .7; text-align: center; margin-top: 6px; display: none; }
  .dc-stage-hint.show { display: block; }
  .dc-page .diary-tags-row:not(:empty) { margin-top: 10px; }
  .dc-photo-action { position: absolute; top: 8px; background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; width: 30px; height: 30px; display: none; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; z-index: 5; }
  .dc-tools { display: flex; gap: 6px; margin-top: 14px; padding: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; position: sticky; top: -14px; z-index: 6; }
  .dc-tool { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: none; border-radius: 12px; padding: 8px 2px; font-size: 11.5px; font-weight: 700; color: var(--text-dim); cursor: pointer; min-height: 52px; }
  .dc-tool .dc-tool-ic { font-size: 20px; line-height: 1; }
  .dc-tool.active { background: var(--panel-2); color: var(--accent); }
  .dc-tool.fav-on { color: #d9a400; }
  .dc-panel { display: none; margin-top: 10px; padding: 4px 2px; animation: uiFade .15s ease-out; }
  .dc-panel.open { display: block; }
  .dc-panel > .dc-label:first-child { margin-top: 4px; }
  .dc-wide-btn { width: 100%; background: linear-gradient(135deg, var(--panel-3), var(--panel-2)) !important; color: var(--text) !important; }
  .dc-scroll-row { flex-wrap: nowrap !important; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .dc-scroll-row::-webkit-scrollbar { display: none; }
  .dc-scroll-row .diary-theme-swatch { flex-shrink: 0; }
  .dc-more { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 6px; }
  .dc-more summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--accent); padding: 8px 0; list-style: none; }
  .dc-more summary::-webkit-details-marker { display: none; }
  .dc-more summary::after { content: ' ▾'; }
  .dc-more[open] summary::after { content: ' ▴'; }
  .dc-note { font-size: 11.5px; color: var(--text-dim); margin-top: 6px; }
  .dc-note:empty { display: none; }
  .diary-favorite-toggle { cursor: pointer; font-size: 20px; line-height: 1; flex-shrink: 0; transition: .15s; }
  .diary-favorite-toggle.active { filter: drop-shadow(0 0 3px rgba(255,196,60,.65)); }
  .diary-bless-note { display: flex; align-items: flex-start; gap: 8px; background: linear-gradient(135deg, var(--panel-3), var(--panel-2)); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 10px 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--text-dim); }
  .diary-bless-note-icon { font-size: 14px; flex-shrink: 0; }
  .diary-prompt-card { display: flex; align-items: center; gap: 8px; background: var(--panel-3); border: 1px dashed var(--border); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; font-size: 12.5px; }
  .diary-prompt-icon { flex-shrink: 0; }
  .diary-prompt-text { flex: 1; cursor: pointer; font-style: italic; color: var(--text); }
  .diary-prompt-text:hover { color: var(--accent); }
  .diary-prompt-shuffle { cursor: pointer; opacity: .6; flex-shrink: 0; transition: .15s; }
  .diary-prompt-shuffle:hover { opacity: 1; transform: rotate(45deg); }
  .diary-tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .diary-tags-row:empty { margin-bottom: 0; }
  .diary-tag-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--border); font-size: 11.5px; font-weight: 700; color: var(--text-dim); }
  .diary-tag-chip .tag-remove { opacity: .5; cursor: pointer; font-size: 10px; }
  .diary-tag-chip .tag-remove:hover { opacity: 1; color: #e0455f; }
  .diary-tag-input { width: 100%; background: var(--panel-3); border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 8px 10px; font-size: 12.5px; margin-bottom: 12px; font-family: inherit; }
  .diary-entry-fav { font-size: 14px; flex-shrink: 0; }
  .diary-entry-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
  .diary-entry-tag { font-size: 11px; font-weight: 700; color: var(--text-dim); background: var(--panel-3); border-radius: 999px; padding: 3px 8px; }
  .diary-entry-card.themed .diary-entry-tag { background: rgba(255,255,255,.25); color: inherit; }
  .diary-filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
  .diary-filter-chip { padding: 5px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-size: 11.5px; font-weight: 700; cursor: pointer; color: var(--text-dim); transition: .15s; }
  .diary-filter-chip:hover { border-color: var(--accent); }
  .diary-filter-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .diary-filter-clear { font-size: 11px; color: var(--text-dim); cursor: pointer; text-decoration: underline; }
  /* Fase 5 del diario — calendario, estadísticas, "en este día" y resúmenes
     (24 ago 2026). */
  .diary-view-toggle { display: flex; gap: 6px; margin-bottom: 14px; }
  .diary-view-toggle-btn { flex: 1; text-align: center; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 700; color: var(--text-dim); cursor: pointer; transition: .15s; }
  .diary-view-toggle-btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .diary-stats-grid { margin-bottom: 4px; }
  .diary-month-summary { font-size: 12px; color: var(--text-dim); margin: 0 0 14px; }
  .diary-onthisday-row { margin-bottom: 14px; }
  .diary-onthisday-title { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; font-weight: 700; }
  .diary-onthisday-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
  .diary-onthisday-card { flex-shrink: 0; width: 140px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; cursor: pointer; transition: .15s; }
  .diary-onthisday-card:hover { border-color: var(--accent); }
  .diary-onthisday-years { font-size: 10.5px; color: var(--accent-2); font-weight: 800; margin-bottom: 4px; }
  .diary-onthisday-mood { font-size: 18px; margin-bottom: 4px; }
  .diary-onthisday-snippet { font-size: 11.5px; color: var(--text-dim); line-height: 1.35; }
  .diary-month-cell { cursor: pointer; }
  .diary-month-cell.future { opacity: .4; pointer-events: none; }
  .diary-month-cell.empty { cursor: default; }
  .diary-month-cell .dfav { position: absolute; bottom: 2px; left: 4px; font-size: 8px; }
  .diary-stickers { display: flex; flex-wrap: wrap; gap: 2px 6px; margin-top: 10px; font-size: 20px; line-height: 1; }
  .diary-stickers .diary-sticker { display: inline-block; }
  .diary-stickers .diary-sticker:nth-child(3n) { transform: rotate(-8deg); }
  .diary-stickers .diary-sticker:nth-child(3n+1) { transform: rotate(6deg); }
  .diary-stickers .diary-sticker:nth-child(3n+2) { transform: rotate(-3deg); }
  .diary-theme-picker { display: flex; flex-wrap: wrap; gap: 10px; }
  .diary-theme-swatch { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: .15s; flex-shrink: 0; }
  .diary-theme-swatch:hover { transform: scale(1.08); }
  .diary-theme-swatch.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--panel-2), 0 0 0 4px var(--accent); }
  .diary-theme-swatch.none { background: var(--panel-3); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--text-dim); }
  .diary-theme-swatch.named { width: auto; height: auto; border-radius: 999px; padding: 5px 12px 5px 5px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
  .diary-theme-swatch.named .swatch-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
  .diary-theme-swatch.named.selected { box-shadow: 0 0 0 2px var(--panel-2), 0 0 0 4px var(--accent); }
  .diary-sticker-cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .diary-sticker-cat-tab { width: 32px; height: 32px; border-radius: 10px; background: var(--panel-3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; transition: .15s; flex-shrink: 0; }
  .diary-sticker-cat-tab:hover { border-color: var(--accent); }
  .diary-sticker-cat-tab.active { background: var(--accent); border-color: var(--accent); }
  .diary-sticker-picker { display: flex; flex-wrap: wrap; gap: 6px; }
  .diary-sticker-btn { width: 34px; height: 34px; border-radius: 10px; background: var(--panel-3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 17px; cursor: pointer; transition: .15s; }
  .diary-sticker-btn:hover { border-color: var(--accent); }
  .diary-sticker-btn.selected { background: var(--accent); border-color: var(--accent); }
  /* Corrección 24 ago 2026: los stickers ya no viven en un cuadro aparte y
     vacío debajo de la foto — se superponen directo sobre la foto (o sobre
     el fondo de página si la entrada no tiene foto), tanto en el compositor
     como en la tarjeta ya guardada, para que sea un solo "lienzo" sin
     separación visual entre la foto y los stickers. */
  .diary-preview-canvas { position: relative; width: 100%; border-radius: 14px; overflow: hidden; margin-top: 4px; }
  .diary-preview-canvas.empty-page { min-height: 160px; }
  #diary-sticker-stage { position: absolute; inset: 0; touch-action: none; }
  .diary-sticker-stage-empty-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-dim); text-align: center; padding: 20px; pointer-events: none; }
  .stage-sticker { position: absolute; line-height: 1; user-select: none; -webkit-user-select: none; }
  #diary-sticker-stage .stage-sticker { cursor: grab; touch-action: none; }
  #diary-sticker-stage .stage-sticker:active { cursor: grabbing; }
  #diary-sticker-stage .stage-sticker.selected::after { content: ''; position: absolute; inset: -6px; border: 2px dashed var(--accent); border-radius: 10px; pointer-events: none; }
  .stage-sticker-handle { position: absolute; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3); z-index: 999; }
  .stage-sticker-handle.delete { top: -11px; right: -11px; background: #e0455f; }
  .stage-sticker-handle.resize { bottom: -11px; right: -11px; background: var(--accent); cursor: nwse-resize; }
  .photo-editor-canvas-wrap { display: flex; justify-content: center; margin-top: 6px; }
  #photo-editor-canvas { width: 260px; height: 260px; border-radius: 12px; background: #111; touch-action: none; cursor: grab; display: block; }
  #photo-editor-canvas:active { cursor: grabbing; }
  .photo-editor-controls { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
  .photo-editor-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--panel-3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; flex-shrink: 0; transition: .15s; }
  .photo-editor-btn:hover { border-color: var(--accent); color: var(--accent); }

  /* ---- sequential ramp (dataviz skill, dark surface) para % de cumplimiento ---- */
  :root {
    --seq-0: #171a21;   /* sin datos / 0% */
    --seq-1: #184f95;   /* 1-24% */
    --seq-2: #1c5cab;   /* 25-49% */
    --seq-3: #256abf;   /* 50-74% */
    --seq-4: #2a78d6;   /* 75-99% */
    --seq-5: #3987e5;   /* 100% */
    --status-good: #0ca30c;
    --status-warning: #fab219;
    --status-critical: #d03b3b;
  }

  /* ---- Temas — claro / oscuro (por defecto) / dorado Premium ----
     El tema claro es el que usan las cuentas nuevas (ver applyTheme() / bootstrapApp()).
     2 sept 2026: Tania mandó un archivo de referencia ("Bless Habit — Premium White UI +
     Niveles") con una línea gráfica nueva para ese tema claro — fondo blanco, tarjetas
     blancas con borde #ECECF4, sombras suaves, lavanda #7C62F5 como acento principal,
     menta #43D6A1, amarillo #FFC857 y coral #FF8E8E como acentos secundarios, texto
     #172033, radios más generosos (16–22px) y mucho espacio en blanco. Como casi todos
     los estilos de la app ya estaban armados sobre estas variables de tema (en vez de
     colores sueltos), actualizar estos valores basta para que la mayor parte de las
     pantallas adopten la nueva línea gráfica sin tocar cada componente uno por uno. El
     tema oscuro y el dorado Premium quedan igual que antes — Tania no mandó una versión
     oscura de este estilo. */
  html[data-theme="dark"] {
    --bg:#0f1115; --panel:#171a21; --panel-2:#1e222b; --panel-3:#262c38;
    --border:#2a2f3a; --text:#eef0f3; --text-dim:#9aa1ad;
    --accent:#7c9eff; --accent-2:#6ee7b7; --accent-3:#ffb86c;
    --user-bubble:#2d3546; --agent-bubble:#1f2530;
    --warn-bg:#3a2f1a; --warn-text:#f0c975; --done-color:#6ee7b7;
    --diag-bg:linear-gradient(135deg,#2a2f5c,#1e2a4a); --diag-text:#d3d8f5;
    --seq-0:#171a21; --seq-1:#184f95; --seq-2:#1c5cab; --seq-3:#256abf; --seq-4:#2a78d6; --seq-5:#3987e5;
    --on-accent:#10131a; --shadow:none; --shadow-sm:none;
  }
  html[data-theme="light"] {
    --bg: #F5F5F8; --panel: #ffffff; --panel-2: #F8F8FC; --panel-3: #F1F0FA;
    --border: #E8E7F0; --text: #172033; --text-dim: #7B8192;
    --accent: #7C62F5; --accent-2: #43D6A1; --accent-3: #FFC857;
    --user-bubble: #7C62F5; --agent-bubble: #F7F6FC;
    --warn-bg: #FFF5D7; --warn-text: #8a5a10; --done-color: #43D6A1;
    --diag-bg: linear-gradient(135deg, #F4F0FF 0%, #FFFFFF 58%, #EFFFF8 100%); --diag-text: #172033;
    --seq-0: #F1F0FA; --seq-1: #D7CEFF; --seq-2: #BCA9FF; --seq-3: #A084FF; --seq-4: #8B6BFF; --seq-5: #7C62F5;
    --on-accent: #ffffff;
    --shadow: 0 12px 35px rgba(46,39,90,.09); --shadow-sm: 0 5px 18px rgba(46,39,90,.07);
  }
  html[data-theme="premium"] {
    --bg: #131107; --panel: #1c1810; --panel-2: #241f14; --panel-3: #302819;
    --border: #4a3c22; --text: #f5ecd8; --text-dim: #b9a877;
    --accent: #e0b84c; --accent-2: #f0d78c; --accent-3: #caa23a;
    --user-bubble: #3a2f16; --agent-bubble: #241f14;
    --warn-bg: #3a2f1a; --warn-text: #f0c975; --done-color: #e0b84c;
    --diag-bg: linear-gradient(135deg, #3a2f16, #241f14); --diag-text: #f0e6c8;
    --seq-0: #241f14; --seq-1: #6b551f; --seq-2: #8a6d26; --seq-3: #ab862c; --seq-4: #cca233; --seq-5: #f0c33d;
    --on-accent: #10131a; --shadow: none; --shadow-sm: none;
  }

  #view-calendar, #view-metrics { flex: 1; display: none; flex-direction: column; min-height: 0; overflow-y: auto; }
  /* Pomodoro */
  #view-pomodoro { flex: 1; display: none; flex-direction: column; min-height: 0; overflow-y: auto; padding: 16px 18px 24px; position: relative; }
  #view-pomodoro.active { display: flex; }
  .pomo-info { background: var(--panel-2); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.45; color: var(--text-dim); margin-bottom: 14px; }
  .pomo-info b { color: var(--text); }
  .pomo-ring-wrap { position: relative; width: 240px; height: 240px; margin: 4px auto 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
  .pomo-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .pomo-ring-bg { fill: none; stroke: var(--border); stroke-width: 12; }
  .pomo-ring-fg { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
  .pomo-ring-wrap.rest .pomo-ring-fg { stroke: var(--accent-2); }
  .pomo-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
  .pomo-phase { font-size: 14px; font-weight: 800; color: var(--text-dim); }
  .pomo-time { font-size: 52px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px; color: var(--text); }
  .pomo-round { font-size: 13px; color: var(--text-dim); }
  .pomo-hint { text-align: center; font-size: 12px; color: var(--text-dim); margin-bottom: 12px; min-height: 16px; }
  .pomo-btns { display: flex; gap: 12px; justify-content: center; margin-bottom: 18px; }
  .pomo-btn { flex: 1; max-width: 180px; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 16px; font-size: 16px; font-weight: 800; cursor: pointer; transition: transform .1s; -webkit-tap-highlight-color: transparent; }
  .pomo-btn:active { transform: scale(.96); }
  .pomo-btn .pi { font-size: 18px; line-height: 1; }
  .pomo-btn.main { background: linear-gradient(135deg, var(--accent), #9b87ff); color: #fff; box-shadow: 0 8px 20px rgba(124,98,245,.35); }
  .pomo-btn.alt { background: transparent; color: var(--text); border: 2px solid var(--border); }
  .pomo-btn.solo { max-width: 260px; }
  .pomo-cfg { background: var(--panel-2); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; }
  .pomo-cfg.locked { opacity: .5; pointer-events: none; }
  .pomo-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
  .pomo-presets button { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
  .pomo-presets button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
  .pomo-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 14px; }
  .pomo-step { display: flex; align-items: center; gap: 8px; }
  .pomo-step button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 18px; font-weight: 800; cursor: pointer; }
  .pomo-step span { min-width: 54px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
  .pomo-today { text-align: center; font-size: 13px; color: var(--text-dim); margin-top: 12px; }
  .pomo-countdown { position: fixed; inset: 0; z-index: 90; display: none; flex-direction: column; align-items: center; justify-content: center; background: rgba(20,16,48,.94) !important; backdrop-filter: none; color: #fff; text-align: center; padding: 24px; cursor: pointer; }
  .pomo-countdown.show { display: flex; }
  .pomo-countdown .po-text { font-size: 20px; font-weight: 800; max-width: 320px; line-height: 1.3; }
  .pomo-countdown .po-num { font-size: 120px; font-weight: 900; line-height: 1.1; margin-top: 8px; animation: pomoPop .9s ease-out; font-variant-numeric: tabular-nums; }
  .pomo-countdown .po-sub { font-size: 13px; opacity: .75; margin-top: 10px; }
  @keyframes pomoPop { 0% { transform: scale(1.4); opacity: .3; } 30% { transform: scale(1); opacity: 1; } }
  #view-calendar.active, #view-metrics.active { display: flex; }
  .cal-subtabs { display: flex; gap: 6px; padding: 12px 16px 0; }
  .cal-subtab { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border); }
  .cal-subtab.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
  .cal-body { padding: 14px 16px 96px; }

  /* Día */
  .day-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .day-nav button { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 15px; }
  .day-nav button:disabled { opacity: .3; cursor: default; }
  .day-nav .day-title { font-size: 14px; font-weight: 700; text-align: center; }
  .day-section-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; font-size: 12.5px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
  .day-section-head:first-of-type { margin-top: 4px; }
  .day-sec-add { background: rgba(124,98,245,.10); color: var(--accent); border: none; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 800; cursor: pointer; text-transform: none; letter-spacing: 0; }
  .day-empty { font-size: 12px; color: var(--text-dim); padding: 2px 2px 4px; }
  .task-item .task-bell { font-size: 12px; opacity: .7; }
  html[data-theme="dark"] .day-note, html[data-theme="premium"] .day-note { background: #3a3320 !important; border-color: #5a4c25 !important; color: #f3e7c4 !important; }
  .day-note { background: #FFF8E1; border: 1px solid #F5E6B8; color: #3a3355; border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; cursor: pointer; }
  .task-sheet input[type=text], .task-sheet textarea { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 15px; font-family: inherit; margin-top: 8px; }
  .task-sheet textarea { resize: vertical; min-height: 110px; }
  .task-sheet { padding: 22px 20px 18px !important; width: min(420px, calc(100vw - 32px)); max-width: none; box-sizing: border-box; }
  .task-sheet .premium-sheet-title { margin-bottom: 6px; }
  .task-sheet input[type=text] { min-height: 50px; }
  .task-sheet .tk-row { display: flex; gap: 12px; margin-top: 16px; }
  .task-sheet .he-remind { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .task-sheet .he-remind .qr-btn { min-width: 0; padding: 9px 4px; font-size: 12.5px; text-align: center; }
  .task-sheet .tk-free-remind { font-size: 12.5px; color: var(--text-dim); background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; line-height: 1.45; }
  .task-sheet .tk-free-remind button { background: none; border: none; color: var(--accent); font-weight: 800; padding: 0; cursor: pointer; font-size: 12.5px; }
  .task-sheet .ui-dialog-actions { margin-top: 20px; }
  .task-sheet .tk-row label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-dim); }
  .task-sheet .tk-row input { padding: 9px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 14px; min-height: 40px; }
  .task-sheet .tk-sub { font-size: 12px; color: var(--text-dim); margin: 18px 0 8px; }
  .day-habit-count { font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text-dim); margin-left: 6px; }
  .day-off-habits { font-size: 12px; color: var(--text-dim); margin: 8px 2px 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .day-off-chip { border: 1px dashed var(--border, rgba(127,127,127,.35)); background: transparent; color: var(--text-dim); border-radius: 999px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
  .day-off-chip em { font-style: normal; opacity: .8; }
  .task-sheet .tk-hint { font-size: 11.5px; color: var(--text-dim); margin-top: 6px; }
  .alarm-toggle { display: none; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text); cursor: pointer; }
  .alarm-toggle input { width: 18px; height: 18px; accent-color: var(--accent, #7C6CF0); }
  /* Interruptor (on/off) */
  .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--border); text-align: left; cursor: pointer; }
  .switch-row .switch-text { font-size: 14px; font-weight: 600; color: var(--text); }
  .switch-row .switch-hint { font-size: 12px; font-weight: 400; color: var(--text-dim); margin-top: 3px; }
  .bless-switch { position: relative; flex: 0 0 auto; width: 46px; height: 28px; }
  .bless-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
  .bless-switch .knob { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background .2s; pointer-events: none; }
  .bless-switch .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
  .bless-switch input:checked + .knob { background: var(--accent); }
  .bless-switch input:checked + .knob::after { transform: translateX(18px); }
  .bless-switch input:focus-visible + .knob { outline: 2px solid var(--accent); outline-offset: 2px; }
  /* Sesión ya abierta: mientras carga, solo el logo y "Cargando…" (sin botón de Google). */
  #view-login.resuming > p, #view-login.resuming .google-btn, #view-login.resuming .login-legal { display: none !important; }
  #view-login.resuming .login-loading { display: block !important; }
  .day-add-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
  .day-add-choices .qr-btn { width: 100%; text-align: left; padding: 12px 14px; font-size: 15px; }
  .day-nav .day-pct { font-size: 11px; color: var(--accent-2); text-align: center; }

  /* Semana */
  .week-scroll { overflow-x: auto; }
  .week-grid { display: grid; grid-template-columns: 46px repeat(7, 54px); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; min-width: 424px; }
  .week-grid .cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 10px; display: flex; align-items: center; justify-content: center; min-height: 28px; padding: 2px; }
  .week-grid .hour-lbl { background: var(--panel-2); color: var(--text-dim); font-size: 9.5px; }
  .week-grid .day-head { background: var(--panel-2); flex-direction: column; padding: 6px 2px; font-weight: 700; gap: 2px; }
  .week-grid .day-head .pct { font-size: 9px; font-weight: 800; }
  .week-grid .slot { background: var(--panel); }
  .week-grid .slot.has-item { font-size: 13px; }
  .week-grid .slot.today-col { background: rgba(124, 98, 245, .09); }
  .week-grid .day-head.today-col { background: rgba(124, 98, 245, .16); color: var(--accent); }
  .week-summary { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: var(--text-dim); }

  /* Mes */
  .month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .month-nav button { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; }
  .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .month-grid .month-cell { min-width: 0; }
  .month-grid .wd { font-size: 10px; color: var(--text-dim); text-align: center; padding-bottom: 4px; }
  .month-cell { position: relative; aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 10px; border: 1px solid transparent; }
  .month-cell .dnum { position: absolute; top: 3px; left: 5px; font-size: 8.5px; opacity: .8; color: var(--text-dim); }
  .month-cell.has-pct .dnum { color: rgba(36,31,58,.7); }
  .month-cell .dicon { position: absolute; top: 2px; right: 4px; font-size: 10px; }
  .month-cell .dpct { font-size: 12px; font-weight: 800; color: #3a3355; margin-top: 8px; }
  .month-cell.empty { background: transparent; }
  .month-cell.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
  .month-legend { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 10.5px; color: var(--text-dim); }
  .month-legend .grad-bar { flex: 1; max-width: 140px; height: 10px; border-radius: 999px; background: linear-gradient(90deg, hsl(0,78%,87%), hsl(45,85%,82%), hsl(150,55%,80%)); }

  /* Métricas */
  .kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .kpi-tile { background: var(--panel-2); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
  .kpi-tile .kpi-num { font-size: 24px; font-weight: 800; color: var(--accent-2); }
  .kpi-tile .kpi-lbl { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
  .kpi-tile .kpi-sub { font-size: 10.5px; margin-top: 4px; font-weight: 700; }
  .metrics-section { background: var(--panel-2); border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
  .metrics-section h4 { margin: 0 0 12px; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
  .bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; }
  .bar-row .bar-lbl { width: 118px; flex-shrink: 0; color: var(--text); line-height: 1.25; overflow-wrap: anywhere; }
  .bar-row .bar-sub { font-size: 10.5px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; }
  .bar-row.former { flex-wrap: wrap; row-gap: 2px; }
  .bar-row.former .bar-sub-full { flex-basis: 100%; font-size: 10.5px; color: var(--text-dim); }
  /* ---- Hábitos por cantidad / por tiempo ---- */
  .prog-pill { font-size: 11.5px; font-weight: 700; color: var(--accent); background: rgba(124,98,245,.10); border-radius: 999px; padding: 3px 9px; white-space: nowrap; margin-left: 6px; }
  .prog-pill.live { color: #fff; background: var(--accent); font-variant-numeric: tabular-nums; }
  .prog-btn { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--panel); color: var(--accent); font-size: 15px; font-weight: 700; margin-left: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
  .day-filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
  .day-filter-chip { border: 1px solid var(--border); background: var(--panel); color: var(--text-dim); border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
  .day-filter-chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
  .postpone-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; margin-bottom: 8px; }
  .postpone-lbl { font-size: 13px; color: var(--text-dim); width: 100%; }
  .tm-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(23,32,51,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
  .tm-sheet { position: relative; width: 100%; max-width: 380px; background: var(--panel); color: var(--text); border-radius: 26px; padding: 26px 20px 20px; text-align: center; box-shadow: 0 20px 60px rgba(46,39,90,.25); }
  .tm-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--panel-3); color: var(--text-dim); cursor: pointer; }
  .tm-title { font-size: 19px; font-weight: 800; padding: 0 30px; }
  .tm-goal { font-size: 13.5px; color: var(--text-dim); margin-top: 2px; }
  .tm-ring { position: relative; width: 240px; height: 240px; margin: 14px auto 10px; }
  .tm-ring circle:last-of-type { transition: stroke-dashoffset .5s linear; }
  .tm-clock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .tm-time { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
  .tm-state { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
  .tm-actions { display: flex; flex-direction: column; gap: 8px; }
  .tm-soft { background: linear-gradient(135deg, var(--panel-3), var(--panel-2)) !important; color: var(--text) !important; }
  .tm-finish { background: none !important; border: 1.5px solid var(--border) !important; color: var(--text) !important; box-shadow: none !important; }
  .tm-hint { font-size: 11.5px; color: var(--text-dim); margin-top: 12px; }
  .tip-card { margin: 8px 0 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2, rgba(124,108,240,0.08)); border: 1px solid var(--border); font-size: 13px; line-height: 1.4; }
  .tip-card .tip-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 12px; margin-bottom: 4px; }
  .tip-card .tip-actions { display: flex; gap: 10px; margin-top: 6px; }
  .tip-card .tip-actions button { background: none; border: none; padding: 0; font-size: 12px; font-weight: 700; color: var(--accent, #7C6CF0); cursor: pointer; }
  .notif-prefs { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; text-align: left; }
  .np-title { font-size: 13px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
  .np-quiet { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--border); }
  .np-quiet-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
  .np-quiet-row input { margin-left: 4px; }
  .pm-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .pm-row:last-of-type { border-bottom: none; }
  .pm-head { font-size: 14px; }
  .pm-goal { font-size: 11.5px; color: var(--text-dim); margin-left: 4px; }
  .pm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; text-align: center; }
  .pm-stats span { display: block; font-weight: 800; font-size: 14px; color: var(--accent); }
  .pm-stats small { font-size: 10.5px; color: var(--text-dim); }
  /* ---- Personalizar widget ("Tu widget, a tu estilo") ---- */
  .wz-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(23,32,51,.35); display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 16px 12px 40px; }
  .wz-sheet { position: relative; width: 100%; max-width: 480px; background: var(--panel); color: var(--text); border-radius: 26px; padding: 22px 18px 18px; box-shadow: 0 20px 60px rgba(46,39,90,.25); }
  .wz-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--panel-3); color: var(--text-dim); font-size: 14px; cursor: pointer; }
  .wz-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; padding-right: 36px; }
  .wz-logo { font-size: 30px; color: var(--accent); line-height: 1; }
  .wz-top h3 { margin: 0; font-size: 21px; font-weight: 800; color: var(--text); }
  .wz-top p { margin: 2px 0 0; font-size: 14px; color: var(--text-dim); }
  .wz-wall { border-radius: 20px; padding: 26px 22px; display: flex; justify-content: center;
    background:
      radial-gradient(60% 80% at 95% 15%, rgba(90,90,80,.28), transparent 60%),
      radial-gradient(35% 55% at 88% 70%, rgba(90,90,80,.22), transparent 70%),
      radial-gradient(40% 50% at 5% 10%, rgba(255,255,255,.55), transparent 70%),
      linear-gradient(135deg, #ECE6E2 0%, #DCD3CE 55%, #CFC6C2 100%); }
  .wz-cap { text-align: center; font-size: 12.5px; color: var(--text-dim); margin: 8px 0 12px; }
  .wv { position: relative; width: 100%; max-width: 330px; box-shadow: 0 10px 28px rgba(40,30,60,.14); }
  .wv-bg { position: absolute; inset: 0; }
  .wv-in { position: relative; padding: 16px 18px; }
  .wv-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
  .wv-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wv-row { display: flex; align-items: center; gap: 11px; margin-top: 9px; }
  .wv-ring, .wv-dot { flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
  .wv-ring { border: 2px solid; }
  .wv-prog { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
  .wv-track { flex: 1; height: 7px; border-radius: 7px; overflow: hidden; }
  .wv-track > div { height: 100%; border-radius: 7px; }
  .wv-single { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
  .wv-bubble { flex: none; width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
  .wz-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .wz-layout { background: none; border: none; color: var(--text-dim); font-size: 13.5px; cursor: pointer; padding: 0; }
  .wz-layout.on { color: var(--accent); font-weight: 600; }
  .wz-mini { height: 74px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--panel-2); margin-bottom: 6px; display: flex; align-items: center; justify-content: center; padding: 8px; }
  .wz-layout.on .wz-mini { border: 2px solid var(--accent); background: rgba(124,98,245,.06); }
  .mini-sum, .mini-list, .mini-single { width: 100%; height: 100%; border-radius: 9px; background: var(--panel); box-shadow: 0 2px 8px rgba(46,39,90,.08); position: relative; padding: 7px 9px; box-sizing: border-box; }
  .mini-sum span { font-size: 13px; } .mini-sum i { position: absolute; right: 9px; top: 8px; font-size: 10px; font-style: normal; color: var(--text-dim); }
  .mini-sum b { position: absolute; left: 9px; right: 9px; bottom: 10px; height: 5px; border-radius: 5px; background: linear-gradient(90deg, #8B6CF6 45%, var(--panel-3) 45%); }
  .mini-list p { margin: 0 0 5px; display: flex; align-items: center; gap: 6px; }
  .mini-list u { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--text-dim); text-decoration: none; }
  .mini-list u.on { background: #8B6CF6; border-color: #8B6CF6; }
  .mini-list s, .mini-single s { flex: 1; height: 4px; border-radius: 4px; background: var(--panel-3); display: block; text-decoration: none; }
  .mini-single { display: flex; align-items: center; gap: 8px; }
  .mini-single span { width: 26px; height: 26px; border-radius: 50%; background: rgba(139,108,246,.15); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
  .mini-single div { flex: 1; display: flex; flex-direction: column; gap: 5px; }
  .wz-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0 6px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--panel-2); }
  .wz-tabs button { border: none; background: none; padding: 11px 4px; font-size: 14px; color: var(--text); cursor: pointer; }
  .wz-tabs button.on { background: rgba(124,98,245,.14); color: var(--accent); font-weight: 600; }
  .wz-body { padding: 6px 0 4px; }
  .wz-line { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
  .wz-line.top { align-items: flex-start; }
  .wz-line > b { width: 58px; flex: none; font-size: 15px; }
  .wz-sws { display: flex; flex-wrap: wrap; gap: 10px; }
  .wz-sws.small { gap: 7px; }
  .wz-sw { width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; position: relative; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
  .wz-sws.small .wz-sw { width: 28px; height: 28px; }
  .wz-sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
  .wz-sw.on::after { content: '✓'; color: #fff; font-weight: 700; text-shadow: 0 0 3px rgba(0,0,0,.45); font-size: 14px; }
  .wz-custom { background: conic-gradient(#ff6b6b, #ffd93d, #6bcb77, #4d96ff, #b06bff, #ff6b6b); color: #fff; font-size: 20px; font-weight: 700; overflow: hidden; }
  .wz-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
  .wz-icons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .wz-icard { border: 1.5px solid var(--border); background: var(--panel); border-radius: 16px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); cursor: pointer; }
  .wz-icard span { font-size: 22px; display: inline-flex; gap: 6px; align-items: center; }
  .wz-icard.on { border: 2px solid var(--accent); background: rgba(124,98,245,.06); }
  .wz-crow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 14px; font-size: 13px; color: var(--text-dim); flex-wrap: wrap; }
  .wz-opacity { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; }
  .wz-opacity > div { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
  .wz-opacity input { width: 100%; accent-color: var(--accent); }
  .wz-opacity.off { opacity: .45; }
  .wz-lbl { font-size: 13.5px; font-weight: 600; margin: 14px 0 6px; }
  .wz-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
  .wz-seg button { border: none; background: var(--panel); padding: 10px 4px; font-size: 13.5px; color: var(--text); cursor: pointer; }
  .wz-seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
  .wz-input { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 15px; }
  .wz-save { margin-top: 16px; }
  .wz-hint { text-align: center; font-size: 12.5px; color: var(--text-dim); margin-top: 10px; }
  /* Perfil → Widget: vista previa del widget sobre un "fondo de pantalla" */
  .widget-preview-wrap { border-radius: 18px; padding: 14px; background: linear-gradient(135deg, #3b2f7a 0%, #2a8a7a 55%, #e9b872 100%); }
  .widget-preview { position: relative; border-radius: 16px; padding: 12px 14px; font-size: 13px; overflow: hidden; }
  .widget-preview .wp-bg { position: absolute; inset: 0; border-radius: 16px; }
  .widget-preview .wp-row { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
  .widget-preview .wp-track { flex: 1; height: 7px; border-radius: 7px; background: rgba(127,127,127,.25); overflow: hidden; }
  .widget-preview .wp-fill { height: 100%; border-radius: 7px; background: linear-gradient(90deg, #7860F4, #43D6A1); }
  .widget-style-chip.selected { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
  .former-habits { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
  .former-habits summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-dim); list-style-position: inside; }
  .former-habits .bar-row.former .bar-lbl { color: var(--text-dim); }
  .bar-track { flex: 1; background: var(--panel-3); border-radius: 999px; height: 10px; overflow: hidden; }
  .bar-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }
  .bar-pct { width: 36px; text-align: right; font-weight: 700; font-size: 12px; flex-shrink: 0; }
  .weekday-row { display: flex; gap: 4px; align-items: flex-end; height: 90px; margin-bottom: 6px; }
  .weekday-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
  .weekday-col .wbar { width: 60%; border-radius: 4px 4px 0 0; min-height: 3px; }
  .weekday-col .wlbl { font-size: 9.5px; color: var(--text-dim); }
  .status-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }

  /* Bless flotante — visible en Calendario / Métricas / Perfil, invita a volver al chat */
  .bless-fab { position: absolute; right: 16px; bottom: 74px; width: 54px; height: 54px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: none; align-items: center; justify-content: center;
    font-size: 24px; box-shadow: 0 6px 18px rgba(0,0,0,.4); cursor: pointer; z-index: 30; transition: transform .15s;
    animation: pulseAvatar 2.4s infinite; }
  .bless-fab.show { display: flex; }
  .bless-fab.bounce { animation: pulseAvatar 2.4s infinite, avatarBounce .5s ease; }
  .bless-fab:active { transform: scale(.88); }

  /* Botón flotante "+" para agregar hábito desde Calendario Día — mismos colores y
     estilo que el flotante de Bless, al lado izquierdo. */
  .day-add-fab { position: absolute; right: 18px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: none; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; color: var(--on-accent); box-shadow: 0 6px 18px rgba(0,0,0,.4); cursor: pointer; z-index: 30; transition: transform .15s; }
  .day-add-fab.show { display: flex; }
  .day-add-fab:active { transform: scale(.88); }

  /* Horarios de hábitos en el onboarding */
  .habit-sched-list { display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; padding-right: 2px; }
  .habit-sched-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
  .habit-sched-row .hs-label { flex: 1 0 100%; font-size: 14px; font-weight: 700; }
  .habit-sched-row .hs-field { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; color: var(--text-dim); }
  .habit-sched-row select { padding: 8px; font-size: 12.5px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); min-height: 38px; }
  .habit-sched-row .hs-repeat { margin-left: auto; align-self: flex-end; padding-bottom: 8px; }
  .habit-sched-row input[type=time] { flex: 0 0 auto; width: 118px; padding: 8px; font-size: 12.5px; }
  .habit-sched-row .hs-days { flex: 1 0 100%; display: flex; gap: 6px; justify-content: space-between; }
  .habit-sched-row .hs-day { flex: 1; min-height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text-dim); font-weight: 700; font-size: 13px; cursor: pointer; }
  .habit-sched-row .hs-day.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
  .habit-sched-row .hs-repeat { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-dim); white-space: nowrap; }

  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

  /* Login */
  #view-login { flex: 1; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; gap: 12px; }
  #view-login.active { display: flex; }
  #view-login .login-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; font-size: 30px; margin-bottom: 4px; animation: pulseAvatar 2.4s infinite; }
  #view-login h2 { margin: 0; font-size: 20px; }
  #view-login p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.5; max-width: 300px; }
  .google-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #3c4043; font-weight: 700; padding: 12px 22px; border-radius: 12px; text-decoration: none; font-size: 14px; margin-top: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.3); transition: transform .1s; }
  .google-btn:active { transform: scale(.96); }
  #view-login .login-loading { font-size: 12.5px; color: var(--text-dim); }
  .logout-link { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--text-dim); text-decoration: underline; cursor: pointer; }

  /* Ventanas propias (reemplazan alert/confirm/prompt del navegador, que en la
     app de Android se ven como un cuadro gris del sistema). Ver uiDialog(). */
  .ui-dialog-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(20,16,40,.55); display: flex; align-items: center; justify-content: center; padding: 16px; animation: uiFade .15s ease-out; }
  .ui-dialog { width: 100%; max-width: 360px; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 20px; padding: 22px 20px 18px; box-shadow: 0 18px 50px rgba(20,16,40,.28); animation: uiPop .18s ease-out; }
  .ui-dialog-msg { font-size: 15px; line-height: 1.5; white-space: pre-line; margin-bottom: 16px; }
  .ui-dialog-field { margin-bottom: 12px; }
  .ui-dialog-field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-dim); margin-bottom: 6px; }
  .ui-dialog-field input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; font-size: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); }
  .ui-dialog-actions { display: flex; gap: 10px; margin-top: 6px; }
  .ui-dialog-actions button { flex: 1; min-height: 46px; border-radius: 14px; border: none; font-size: 15px; font-weight: 800; cursor: pointer; }
  .ui-dialog-cancel { background: var(--panel-2); color: var(--text); border: 1px solid var(--border) !important; }
  .ui-dialog-ok { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
  .ui-dialog-ok.danger { background: #e25c6a; color: #fff; }
  @keyframes uiFade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes uiPop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

  /* Plan Premium (Paddle Billing) + banda de anuncios (plan gratis) */
  .premium-lock { border-color: #3d4a8a; background: var(--diag-bg); }
  .premium-lock h4 { color: var(--accent-2); }
  .premium-btn { width: 100%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; color: var(--on-accent); font-weight: 800; padding: 12px 16px; border-radius: 12px; cursor: pointer; font-size: 14px; margin-top: 4px; transition: transform .1s; }
  .premium-btn:active { transform: scale(.97); }
  /* Perfil: datos plegables, grupos y funciones bloqueadas con marca de agua */
  .profile-details > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; position: relative; padding-right: 26px; }
  .profile-details > summary::-webkit-details-marker { display: none; }
  .profile-details > summary::after { content: '⌄'; position: absolute; right: 2px; top: 0; font-size: 20px; color: var(--text-dim); transition: transform .2s; }
  .profile-details[open] > summary::after { transform: rotate(180deg); }
  .profile-details > summary h4 { margin: 0; }
  .profile-details-hint { font-size: 12px; color: var(--text-dim); }
  .profile-subsection { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
  .profile-group-title { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin: 22px 4px 10px; }
  .locked-feature { position: relative; overflow: hidden; cursor: pointer; flex-shrink: 0; }
  .locked-feature > * { position: relative; z-index: 1; }
  .locked-feature::after { content: 'PREMIUM'; position: absolute; left: 50%; top: 58%; z-index: 2; font-size: 36px; font-weight: 900; letter-spacing: 3px; color: var(--accent); opacity: .2; transform: translate(-50%, -50%) rotate(-12deg); pointer-events: none; white-space: nowrap; }
  .premium-hero { position: relative; overflow: hidden; flex-shrink: 0; border-radius: 22px; padding: 22px 18px 18px; margin: 22px 0 14px; color: #fff;
    background: linear-gradient(140deg, #3b2a8f 0%, #7C6CF0 55%, #3fcf9f 120%); box-shadow: 0 14px 34px rgba(124,108,240,.35); }
  .premium-hero-glow { position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.35), rgba(255,255,255,0) 70%); }
  .premium-hero-badge { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: .12em; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35); }
  .premium-hero-title { font-size: 22px; font-weight: 900; margin: 10px 0 4px; }
  .premium-hero-sub { font-size: 13px; opacity: .9; margin-bottom: 12px; }
  .premium-hero .premium-benefits { color: #fff; }
  .premium-hero .premium-note, .premium-hero .logout-link { color: rgba(255,255,255,.85); }
  .premium-hero-btn { background: #fff !important; color: #3b2a8f !important; font-size: 15px; padding: 14px 16px; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
  .premium-note { font-size: 11.5px; color: var(--text-dim); margin-top: 8px; line-height: 1.4; }
  .premium-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(124,158,255,.18); color: var(--accent); border: 1px solid rgba(124,158,255,.4); margin-top: 6px; }
  .ad-slot { margin-top: 16px; padding: 8px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; min-height: 60px; display: flex; align-items: center; justify-content: center; }
  .ad-slot .ad-fallback-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }

  /* ============================================================
     BLESS WHITE PREMIUM — FINAL VISUAL NORMALIZATION
     All new screens/components must follow this design system.
     If a requested screen does not exist, recreate it using these
     exact visual rules instead of inventing a different style.
     ============================================================ */
  html[data-theme="light"] body { background:#fff; color:var(--text); }
  html[data-theme="light"] #app { background:#fff; border-color:#ececf4; box-shadow:0 20px 60px rgba(46,39,90,.08); }
  html[data-theme="light"] header { background:rgba(255,255,255,.96); border-color:#ececf4; box-shadow:0 5px 20px rgba(46,39,90,.05); }
  html[data-theme="light"] .profile-card,
  html[data-theme="light"] .stat-box,
  html[data-theme="light"] .habit-row,
  html[data-theme="light"] .metric-card,
  html[data-theme="light"] .calendar-card,
  html[data-theme="light"] .diary-card,
  html[data-theme="light"] .chat-bubble,
  html[data-theme="light"] .onboarding-card,
  html[data-theme="light"] .modal-content,
  html[data-theme="light"] .settings-card {
    background:#fff; border-color:#e8e7f0; box-shadow:0 7px 24px rgba(46,39,90,.06);
  }
  html[data-theme="light"] .profile-card:hover,
  html[data-theme="light"] .habit-row:hover,
  html[data-theme="light"] .diary-card:hover { box-shadow:0 12px 30px rgba(46,39,90,.09); }
  html[data-theme="light"] input, html[data-theme="light"] textarea, html[data-theme="light"] select {
    background:#fafafd; color:#172033; border-color:#e6e4ee;
  }
  html[data-theme="light"] input:focus, html[data-theme="light"] textarea:focus, html[data-theme="light"] select:focus {
    border-color:#b8aaff; box-shadow:0 0 0 4px #f0ecff; outline:none;
  }
  html[data-theme="light"] .bottom-nav { background:rgba(255,255,255,.98); border-color:#e8e7f0; box-shadow:0 -7px 24px rgba(46,39,90,.06); }
  html[data-theme="light"] .bottom-nav .nav-item.active { color:#7c62f5; }
  html[data-theme="light"] .primary-btn, html[data-theme="light"] .send-btn, html[data-theme="light"] .save-btn {
    background:#7c62f5; border-color:#7c62f5; color:#fff; box-shadow:0 8px 18px rgba(124,98,245,.20);
  }
  html[data-theme="light"] .primary-btn:hover, html[data-theme="light"] .send-btn:hover, html[data-theme="light"] .save-btn:hover { transform:translateY(-1px); }
  html[data-theme="light"] .user-bubble { background:#7c62f5; color:#fff; border-color:#7c62f5; }
  html[data-theme="light"] .agent-bubble { background:#f7f6fc; color:#172033; border-color:#e8e7f0; }
  html[data-theme="light"] .level-card, html[data-theme="light"] .xp-card {
    background:linear-gradient(135deg,#f4f0ff 0%,#fff 58%,#effff8 100%); border:1px solid #e2dcff; box-shadow:0 12px 32px rgba(88,69,170,.09);
  }
  html[data-theme="light"] .level-badge, html[data-theme="light"] .xp-badge { background:#eee9ff; color:#5d49d5; border-color:#ddd5ff; }
  html[data-theme="light"] .progress-bar, html[data-theme="light"] .xp-progress { background:#eceaf5; }
  html[data-theme="light"] .progress-bar > *, html[data-theme="light"] .xp-progress > * { background:linear-gradient(90deg,#7c62f5,#a890ff); }
  html[data-theme="light"] .completed, html[data-theme="light"] .done { color:#168a65; }
  html[data-theme="light"] .achievement-card, html[data-theme="light"] .achievement { background:linear-gradient(135deg,#fff9e7,#fff); border-color:#f0e0aa; }
  html[data-theme="light"] .fab { background:#7c62f5; color:#fff; box-shadow:0 12px 25px rgba(124,98,245,.25); }
  html[data-theme="light"] .overlay, html[data-theme="light"] [id$="-overlay"] { background:rgba(23,32,51,.24); backdrop-filter:blur(6px); }
  html[data-theme="light"] .modal-content, html[data-theme="light"] [id$="-overlay"] > div { border-radius:22px; }
  /* Calendar: readable white base + semantic status colors. */
  html[data-theme="light"] .month-cell.has-pct .dnum { color:#172033; text-shadow:none; }
  html[data-theme="light"] .month-cell .dpct { color:#172033; text-shadow:none; }
  html[data-theme="light"] .month-cell { border-color:#ecebf2; background:#f8f8fc; }
  html[data-theme="light"] .month-cell.good { background:#dff9ef; }
  html[data-theme="light"] .month-cell.warning { background:#fff2c9; }
  html[data-theme="light"] .month-cell.critical { background:#ffe1e1; }
  /* Hard-coded legacy dark surfaces: neutralize them in White Premium. */
  html[data-theme="light"] #photo-editor-canvas { background:#f3f3f8; }
  html[data-theme="light"] .stage-sticker-handle { color:#fff; }

  /* ============================================================
     BLESS WHITE PREMIUM 2.0 — visual hierarchy inspired by Diary
     The Diary is the reference module: calm, editorial, personal.
     Other screens inherit the same visual language.
     ============================================================ */
  html[data-theme="light"] body { background:#f7f7fb; }
  html[data-theme="light"] #app { background:#fff; box-shadow:0 24px 70px rgba(43,38,80,.10); }
  html[data-theme="light"] header { padding:16px 18px 13px; background:rgba(255,255,255,.98); box-shadow:0 1px 0 #eeeef5; }
  html[data-theme="light"] header h1 { font-size:16px; letter-spacing:-.02em; }
  html[data-theme="light"] .sub { color:#8a8fa0; }

  html[data-theme="light"] #view-calendar,
  html[data-theme="light"] #view-metrics,
  html[data-theme="light"] #view-diary,
  html[data-theme="light"] #view-profile { background:#fff; }
  html[data-theme="light"] .cal-body,
  html[data-theme="light"] #view-metrics,
  html[data-theme="light"] #view-diary,
  html[data-theme="light"] #view-profile { padding:18px 16px 88px; }

  /* Section titles: fewer dashboard boxes, more editorial hierarchy. */
  html[data-theme="light"] .section-title,
  html[data-theme="light"] .diary-title { font-size:22px; font-weight:800; letter-spacing:-.03em; color:#1b2438; }
  html[data-theme="light"] .card,
  html[data-theme="light"] .profile-card,
  html[data-theme="light"] .metric-card,
  html[data-theme="light"] .calendar-card,
  html[data-theme="light"] .stat-box { border-radius:20px; }

  /* Calendar */
  html[data-theme="light"] .cal-subtabs { padding:10px 16px 2px; gap:8px; background:#fff; }
  html[data-theme="light"] .cal-subtab { border:1px solid #ecebf2; background:#fafafd; color:#7e8496; border-radius:14px; font-weight:700; padding:10px 12px; }
  html[data-theme="light"] .cal-subtab.active { background:#7c62f5; border-color:#7c62f5; color:#fff; box-shadow:0 7px 16px rgba(124,98,245,.18); }
  html[data-theme="light"] .month-cell { border:1px solid #ecebf3; background:#fafafd; border-radius:14px; min-height:0; aspect-ratio:1 / 1.15; }
  html[data-theme="light"] .month-cell.good { background:#e7faf2; border-color:#c9f1df; }
  html[data-theme="light"] .month-cell.warning { background:#fff5d9; border-color:#f4e4ad; }
  html[data-theme="light"] .month-cell.critical { background:#fff0f0; border-color:#f4cccc; }
  html[data-theme="light"] .month-cell.today { outline:2px solid #7c62f5; outline-offset:1px; }

  /* Metrics: one hero insight, then supporting facts. */
  html[data-theme="light"] #view-metrics .kpi-grid { gap:10px; }
  html[data-theme="light"] #view-metrics .kpi-tile { background:#fff; border:1px solid #ecebf2; border-radius:20px; box-shadow:0 8px 24px rgba(48,42,90,.055); }
  html[data-theme="light"] #view-metrics .kpi-num { font-size:25px; letter-spacing:-.04em; }
  html[data-theme="light"] #view-metrics .metric-card { background:#fff; border:1px solid #ecebf2; box-shadow:0 8px 24px rgba(48,42,90,.055); }
  html[data-theme="light"] #view-metrics .metric-card h3 { font-size:14px; color:#70778a; text-transform:none; letter-spacing:0; }

  /* Profile: progress identity first, personal data second. */
  html[data-theme="light"] #view-profile .profile-card { border:1px solid #ecebf2; background:#fff; box-shadow:0 8px 24px rgba(48,42,90,.055); }
  html[data-theme="light"] #view-profile .level-card { border-radius:22px; padding:18px; }
  html[data-theme="light"] #view-profile .achievement { border-radius:16px; }

  /* Chat: softer conversation, less “dashboard”. */
  html[data-theme="light"] #chat-scroll { padding:18px 16px 8px; }
  html[data-theme="light"] .agent { background:#f7f6fc; border:1px solid #eceaf5; color:#263047; box-shadow:0 4px 14px rgba(48,42,90,.035); }
  html[data-theme="light"] .user { background:#7c62f5; box-shadow:0 6px 15px rgba(124,98,245,.18); }
  html[data-theme="light"] #chat-input { padding:10px 12px 12px; background:#fff; border-top:1px solid #eeeef4; }
  html[data-theme="light"] #chat-text { border-radius:16px; background:#fafafd; }
  html[data-theme="light"] .send-btn { border-radius:14px; }

  /* Diary remains the visual north star. */
  html[data-theme="light"] .diary-entry-card,
  html[data-theme="light"] .diary-new-card,
  html[data-theme="light"] .diary-onthisday-card { border-radius:22px; box-shadow:0 8px 24px rgba(48,42,90,.055); }
  html[data-theme="light"] .diary-entry-card { border:1px solid #ecebf2; }
  html[data-theme="light"] .diary-new-card { border:1px dashed #d9d3f7; background:linear-gradient(135deg,#faf8ff,#fff); }

  /* All overlays share one modal language. */
  html[data-theme="light"] [id$="-overlay"] { background:rgba(31,35,52,.34) !important; backdrop-filter:blur(8px); }
  html[data-theme="light"] [id$="-overlay"] > div { background:#fff !important; border:1px solid #eeeef4; box-shadow:0 24px 70px rgba(31,35,52,.18); border-radius:24px !important; }
  html[data-theme="light"] [id$="-overlay"] input,
  html[data-theme="light"] [id$="-overlay"] textarea,
  html[data-theme="light"] [id$="-overlay"] select { background:#fafafd; border-color:#e7e5ef; }
  html[data-theme="light"] [id$="-overlay"] .send-btn { box-shadow:0 8px 18px rgba(124,98,245,.18); }

  /* Floating Bless button: friendly, not intrusive. */
  html[data-theme="light"] .bless-fab { background:linear-gradient(135deg,#7c62f5,#43d6a1); border:4px solid #fff; box-shadow:0 12px 28px rgba(75,66,150,.22); }
  html[data-theme="light"] .day-add-fab { background:#7c62f5; box-shadow:0 10px 22px rgba(124,98,245,.22); }

  /* Never let a future screen fall back to the old dark visual language. */
  html[data-theme="light"] .legacy-dark,
  html[data-theme="light"] .dark-panel { background:#fff !important; color:#172033 !important; border-color:#ecebf2 !important; }

  /* ==========================================================
     BLESS WHITE PREMIUM — CONSISTENCIA VISUAL FINAL
     El Diario es la referencia: cálido, editorial, ligero y colorido.
     Ninguna pantalla nueva debe volver a parecer un dashboard oscuro.
     ========================================================== */
  html[data-theme="light"] body { background:#F7F7FB; }
  html[data-theme="light"] #app { background:#fff; box-shadow:0 0 55px rgba(71,61,130,.08); }
  html[data-theme="light"] header { padding:14px 18px 12px; box-shadow:0 3px 18px rgba(71,61,130,.045); }
  html[data-theme="light"] .avatar { width:42px;height:42px;background:transparent;box-shadow:none; }
  .bless-logo-svg { width:100%;height:100%;display:block; }
  html[data-theme="light"] .login-avatar { background:transparent !important; box-shadow:none !important; width:86px !important;height:86px !important; }
  html[data-theme="light"] .login-avatar .bless-logo-svg { width:86px;height:86px; }

  /* Chat: menos chatbot genérico, más conversación personal. */
  html[data-theme="light"] #chat-scroll { padding:18px 16px 12px; gap:10px; }
  html[data-theme="light"] .agent { background:#F7F5FC; border:1px solid #ECE9F6; box-shadow:0 5px 18px rgba(74,63,133,.045); border-radius:18px 18px 18px 5px; }
  html[data-theme="light"] .user { background:linear-gradient(135deg,#7860F4,#8C72FF); border-radius:18px 18px 5px 18px; }
  html[data-theme="light"] .chat-agenda-pill { background:#F7FFFB; border-color:#D8F4E9; color:#526171; }
  html[data-theme="light"] #chat-input { background:#fff; }
  html[data-theme="light"] #chat-text { border:1px solid #E8E6F0; background:#FBFAFE; }
  html[data-theme="light"] .send-btn { background:linear-gradient(135deg,#785FF4,#8C71FF); box-shadow:0 8px 20px rgba(124,98,245,.20); }

  /* Niveles: protagonista, pero sin aspecto de videojuego pesado. */
  html[data-theme="light"] .level-hero-card { background:linear-gradient(135deg,#F6F1FF 0%,#FFFFFF 52%,#ECFFF8 100%); border-color:#E8E2FA; border-radius:24px; padding:18px; box-shadow:0 10px 28px rgba(72,61,132,.08); }
  html[data-theme="light"] .level-orb { background:linear-gradient(145deg,#7069F7 0%,#55BFEA 48%,#43D6A1 100%); box-shadow:0 10px 24px rgba(83,100,205,.20); }
  html[data-theme="light"] .xp-progress { height:9px; background:#ECEAF5; }
  html[data-theme="light"] .xp-progress > i { background:linear-gradient(90deg,#7860F4,#B28CFF 48%,#43D6A1); }

  /* Calendario: más editorial y menos cuadrícula técnica. */
  html[data-theme="light"] .cal-subtabs { padding:12px 16px 4px; background:#fff; }
  html[data-theme="light"] .cal-subtab { background:#FAFAFD; border-color:#ECEAF2; color:#858A9B; border-radius:14px; padding:10px; }
  html[data-theme="light"] .cal-subtab.active { background:#7860F4; color:#fff; border-color:#7860F4; }
  html[data-theme="light"] .cal-body { padding-top:16px; }
  html[data-theme="light"] .month-nav { margin-bottom:12px; }
  html[data-theme="light"] .month-nav button, html[data-theme="light"] .day-nav button { background:#FAFAFD; border-color:#EAE8F1; color:#596175; }
  html[data-theme="light"] .month-cell { min-height:0; aspect-ratio:1 / 1.15; border-radius:12px; background:#FAFAFD; border-color:#ECEAF2; transition:transform .15s,box-shadow .15s; }
  html[data-theme="light"] .month-cell:hover { transform:translateY(-1px); box-shadow:0 5px 14px rgba(60,53,110,.07); }
  html[data-theme="light"] .month-cell.good { background:linear-gradient(145deg,#E7FAF2,#F3FFF9); border-color:#C9F0DF; }
  html[data-theme="light"] .month-cell.warning { background:linear-gradient(145deg,#FFF4CF,#FFF9E9); border-color:#F1DFA4; }
  html[data-theme="light"] .month-cell.critical { background:linear-gradient(145deg,#FFEAEA,#FFF4F4); border-color:#F3CECE; }

  /* Métricas: primero interpretación, luego datos. */
  html[data-theme="light"] .kpi-grid { gap:10px; }
  html[data-theme="light"] .kpi-tile { background:#fff; border-color:#ECEAF2; border-radius:18px; box-shadow:0 6px 20px rgba(57,49,104,.045); }
  html[data-theme="light"] .metrics-section { background:#fff; border-color:#ECEAF2; border-radius:20px; box-shadow:0 7px 22px rgba(57,49,104,.045); }
  html[data-theme="light"] .bar-track { background:#F0EFF6; }
  html[data-theme="light"] .bar-fill { background:linear-gradient(90deg,#7860F4,#A58AFF) !important; }
  html[data-theme="light"] .bar-row.former .bar-fill, .bar-row.former .bar-fill { background:#C9C6D6 !important; }

  /* Perfil: evolución primero; datos personales después. */
  html[data-theme="light"] #view-profile { padding:18px 16px 28px; }
  html[data-theme="light"] #view-profile .profile-card { background:#fff; border-color:#ECEAF2; border-radius:20px; box-shadow:0 7px 22px rgba(57,49,104,.045); }
  html[data-theme="light"] #view-profile .profile-card:first-child { background:linear-gradient(135deg,#F7F2FF,#FFFFFF 60%,#F0FFF9); }
  html[data-theme="light"] .habit-chip { background:#F8F7FC; border:1px solid #ECEAF2; }
  html[data-theme="light"] .tag-chip { background:#F7F6FB; }

  /* Logros: dorado cálido, no tarjeta oscura. */
  html[data-theme="light"] .logros-card { background:linear-gradient(135deg,#FFF9E7,#FFFFFF) !important; border-color:#F2D88B !important; }
  html[data-theme="light"] .logros-card h4 { color:#B47B09; }
  html[data-theme="light"] .logro-chip { background:linear-gradient(135deg,#FFF0B8,#FFE08A); color:#62480A; border:1px solid #F1D37A; }

  /* Bottom nav: limpia y reconocible. */
  html[data-theme="light"] footer.tabbar { background:rgba(255,255,255,.98); border-top:1px solid #EEEFF5; box-shadow:0 -5px 18px rgba(56,49,100,.045); }
  html[data-theme="light"] .tab { padding:9px 0 8px; }
  html[data-theme="light"] .tab .ic { filter:saturate(1.15); }
  html[data-theme="light"] .tab.active-tab { color:#765CF2; font-weight:700; }

  /* FAB de Bless con el mismo logo, no un emoji genérico. */
  html[data-theme="light"] .bless-fab { background:linear-gradient(145deg,#6F7BFF,#61CBEF 48%,#43D6A1) !important; border:4px solid #fff; padding:7px; box-shadow:0 12px 28px rgba(71,75,170,.22); }
  html[data-theme="light"] .day-add-fab { background:linear-gradient(135deg,#7860F4,#8D72FF); }

  /* Modales: blancos, suaves y consistentes. */
  html[data-theme="light"] [id$="-overlay"] { background:rgba(31,35,52,.28) !important; backdrop-filter:blur(10px); }
  html[data-theme="light"] [id$="-overlay"] > div { border-radius:26px !important; box-shadow:0 28px 80px rgba(35,30,70,.20) !important; }

  /* El Diario sigue siendo la referencia visual y recibe solo refinamientos. */
  html[data-theme="light"] #view-diary { padding:18px 16px 28px; }
  html[data-theme="light"] .diary-new-card { background:linear-gradient(135deg,#FBF9FF,#FFFFFF); border-color:#DCD5F8; border-radius:22px; box-shadow:0 7px 22px rgba(57,49,104,.04); }
  html[data-theme="light"] .diary-entry-card { background:#fff; border-color:#ECEAF2; }

  /* Regla de continuidad: toda vista futura debe heredar este sistema. */
  html[data-theme="light"] .screen, html[data-theme="light"] .view, html[data-theme="light"] .new-screen { background:#fff; color:#172033; }

  /* ============================================================
     BLESS 4 — CLEAN MODULE ARCHITECTURE
     Chat is intentionally the only conversational surface. Agenda,
     levels, metrics and configuration belong to their own modules.
     ============================================================ */
  .profile-top-card {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:16px; margin:0 0 12px; border:1px solid var(--border); border-radius:22px;
    background:var(--panel);
  }
  html[data-theme="light"] .profile-top-card {
    border-color:#E9E6F2;
    background:linear-gradient(135deg,#F8F5FF 0%,#FFFFFF 62%,#F1FFF9 100%);
    box-shadow:0 8px 24px rgba(57,49,104,.055);
  }
  .profile-top-main { display:flex; align-items:center; gap:11px; min-width:0; }
  .profile-mini-avatar { width:46px; height:46px; border-radius:50%; flex:0 0 46px; overflow:hidden; box-shadow:0 5px 14px rgba(82,91,190,.18); }
  .profile-mini-avatar .bless-logo-svg { width:100%; height:100%; display:block; }
  .profile-greeting { font-size:15px; font-weight:800; color:var(--text); line-height:1.2; }
  .profile-greeting-sub { font-size:11.5px; color:var(--text-dim); margin-top:4px; line-height:1.35; }
  .settings-icon-btn { width:42px; height:42px; border-radius:14px; border:1px solid var(--border); background:var(--panel-2); color:var(--accent); display:flex; align-items:center; justify-content:center; font-size:19px; cursor:pointer; box-shadow:0 4px 12px rgba(57,49,104,.06); transition:.15s; flex:0 0 42px; }
  .settings-icon-btn:hover { transform:translateY(-1px); border-color:var(--accent); }
  .settings-icon-btn:active { transform:scale(.95); }

  /* Botones de acción: una sola jerarquía visual en toda la app. */
  html[data-theme="light"] .send-btn, html[data-theme="light"] .premium-btn { min-height:44px; border-radius:14px; font-weight:800; box-shadow:0 7px 16px rgba(104,82,221,.13); }
  html[data-theme="light"] .send-btn { background:linear-gradient(135deg,#7C62F5,#6953E8); }
  html[data-theme="light"] .send-btn:hover, html[data-theme="light"] .premium-btn:hover { transform:translateY(-1px); }
  html[data-theme="light"] .qr-btn { min-height:40px; border-radius:13px; background:#FAF9FD; border-color:#E7E4EF; }
  html[data-theme="light"] .qr-btn.selected { background:#7C62F5; border-color:#7C62F5; color:#fff; box-shadow:0 5px 14px rgba(124,98,245,.18); }

  /* Chat: solo conversación. Sin nivel, agenda, accesos flotantes ni mini-dashboard. */
  html[data-theme="light"] #view-chat { background:#fff; }
  html[data-theme="light"] #chat-scroll { padding:20px 16px 14px; gap:13px; }
  html[data-theme="light"] #chat-input { padding:10px 12px 12px; gap:8px; }
  html[data-theme="light"] #chat-text { min-height:44px; border-radius:15px; }
  html[data-theme="light"] #chat-send { min-width:76px; }
  #level-hero, #chat-agenda-pill, #agenda-panel, #bless-fab { display:none !important; }

  /* Encabezados de módulos: menos sensación de formulario, más producto. */
  .module-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin:2px 0 14px; }
  .module-heading h2 { margin:0; font-size:20px; line-height:1.15; font-weight:850; color:var(--text); }
  .module-heading p { margin:4px 0 0; font-size:11.5px; color:var(--text-dim); }
  .module-heading .module-icon { width:40px; height:40px; border-radius:13px; display:flex; align-items:center; justify-content:center; background:var(--panel-3); border:1px solid var(--border); font-size:19px; }

  /* Configuración: una hoja de preferencias, no una tarjeta genérica perdida. */
  html[data-theme="light"] .settings-overlay { background:rgba(27,31,48,.30) !important; backdrop-filter:blur(12px); }
  html[data-theme="light"] .settings-modal { background:#fff !important; border:1px solid #E7E4EF; border-radius:26px !important; padding:20px !important; box-shadow:0 28px 80px rgba(35,30,70,.20) !important; }
  .modal-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px; }
  .modal-heading h4 { margin:0 0 3px !important; font-size:16px !important; color:var(--text) !important; text-transform:none !important; letter-spacing:0 !important; }
  .modal-kicker { font-size:11px; color:var(--text-dim); }
  .modal-close-btn { width:34px; height:34px; border:1px solid var(--border); background:var(--panel-2); color:var(--text-dim); border-radius:11px; font-size:22px; line-height:1; cursor:pointer; }
  .modal-close-btn:hover { background:#F1EEFF; color:#6657D9; }

  /* El calendario contiene agenda y edición: no duplicarla en Bless. */
  html[data-theme="light"] .cal-body { padding:4px 16px 96px; }
  html[data-theme="light"] #day-items .agenda-item, html[data-theme="light"] #day-tasks .agenda-item { min-height:58px; border-radius:16px; background:#fff; box-shadow:0 5px 16px rgba(57,49,104,.045); }
  #day-tasks .agenda-item .edit { width:32px; height:32px; border-radius:10px; background:var(--panel-3); display:flex; align-items:center; justify-content:center; }
  html[data-theme="light"] #day-items .agenda-item .edit { width:32px; height:32px; border-radius:10px; background:#F6F3FF; display:flex; align-items:center; justify-content:center; }

  /* Métricas: encabezado propio para que el contenido no empiece abruptamente. */
  html[data-theme="light"] #view-metrics { background:#fff; }
  html[data-theme="light"] #view-metrics > div { padding-top:16px !important; }

  /* Ocultar el FAB de Bless definitivamente: no hay chat fuera de Bless. */
  .bless-fab { display:none !important; }

  .calendar-module-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 16px 8px; }
  html[data-theme="light"] .calendar-module-heading { background:#fff; }
  .calendar-module-title { font-size:20px; font-weight:850; color:var(--text); line-height:1.15; }
  .calendar-module-sub { margin-top:4px; font-size:11.5px; color:var(--text-dim); }
  .calendar-module-icon { flex:0 0 40px; width:40px; height:40px; border-radius:13px; background:var(--panel-3); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:19px; }

  /* Botones de ánimo en la vista previa del widget */
  .wv-moods { display: flex; justify-content: space-between; gap: 4px; margin-top: 10px; }
  .wv-moods span { flex: 1; text-align: center; font-size: 20px; line-height: 1.6; border-radius: 999px; }

  /* Perfil por pantallas (nov 2026): menú en la portada; cada sección se abre sola. */
  .pf-menu { background: var(--panel-2); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
  html[data-theme="light"] #view-profile .pf-menu { background: #fff; border-color: #ECEAF2; border-radius: 20px; box-shadow: 0 7px 22px rgba(57,49,104,.045); }
  .pf-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; background: none; border: none; border-top: 1px solid var(--border); text-align: left; color: var(--text); font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .pf-row:first-child { border-top: none; }
  .pf-row:active { background: var(--panel-3); }
  .pf-row-ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; background: var(--panel-3); display: flex; align-items: center; justify-content: center; font-size: 19px; }
  .pf-row-premium .pf-row-ic { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
  .pf-row-premium .pf-row-txt b { color: var(--accent); }
  .pf-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .pf-row-txt b { font-size: 15px; font-weight: 800; }
  .pf-row-txt small { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pf-row-chev { font-size: 24px; line-height: 1; color: var(--text-dim); }
  .pf-page { display: none; }
  #view-profile.pf-open .pf-home { display: none; }
  #view-profile .pf-page.on { display: block; animation: pfIn .22s ease-out; }
  @keyframes pfIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
  .pf-page-head { margin: 0 0 16px; }
  .pf-back { border: none; background: var(--panel-3); color: var(--text); border-radius: 999px; padding: 8px 14px 8px 11px; font-size: 14px; font-weight: 800; font-family: inherit; cursor: pointer; }
  .pf-page-title { font-size: 24px; font-weight: 900; letter-spacing: -.02em; margin-top: 14px; }
  /* El título ya está arriba: no repetirlo dentro de la tarjeta. */
  .pf-page > .profile-card > h4:first-child { display: none; }
  .pf-page .profile-card > .profile-subsection:first-child { border-top: none; margin-top: 0; padding-top: 0; }

  /* Pantalla "Hay una versión nueva" */
  .app-update-screen { position: fixed; inset: 0; z-index: 140; background: var(--bg); color: var(--text); display: flex; flex-direction: column; padding: max(24px, env(safe-area-inset-top)) 22px max(20px, env(safe-area-inset-bottom)); overflow-y: auto; animation: pfIn .2s ease-out; }
  .aus-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; max-width: 420px; width: 100%; margin: 0 auto; }
  .aus-logo { width: 84px; height: 84px; }
  .aus-logo svg { width: 100%; height: 100%; }
  .aus-title { font-size: 26px; font-weight: 900; letter-spacing: -.02em; line-height: 1.2; margin-top: 18px; }
  .aus-sub { font-size: 15px; color: var(--text-dim); line-height: 1.5; margin-top: 10px; }
  .aus-card { width: 100%; box-sizing: border-box; text-align: left; background: var(--panel-2); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; margin-top: 22px; }
  .aus-card-title { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
  .aus-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; line-height: 1.4; }
  .aus-actions { max-width: 420px; width: 100%; margin: 18px auto 0; display: flex; flex-direction: column; gap: 6px; }
  .aus-go { width: 100%; min-height: 52px; font-size: 16px; }
  .aus-later { background: none; border: none; color: var(--text-dim); font-size: 14.5px; font-weight: 700; padding: 12px; font-family: inherit; cursor: pointer; }
