/* Dianfy · app — tema "papel" (claro) por defecto, con modo oscuro */
:root {
  --bg: #F4EEE2; --dots: rgba(27,26,23,.09);
  --surface: #FFFDF8; --surface2: #EFE8D8;
  --ink: #1B1A17; --ink2: #5E594E;
  --line: #1B1A17; --bw: 2px; --soft: rgba(27,26,23,.14);
  --shadow: 4px 4px 0 #1B1A17; --shadow-sm: 3px 3px 0 #1B1A17;
  --accent: #00D9C0; --on-accent: #04231f;
  --coral: #FF5252; --amber: #FFD60A; --blue: #2D8CFF; --green: #7EE03A;
  /* Amarillo = solo "seleccionado". Avisos y destacados usan --note (azul suave); advertencias, naranjo */
  --note: color-mix(in srgb, var(--blue) 14%, var(--surface)); --warn: #FF8A1F;
  --ease: cubic-bezier(.22,1,.36,1);
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}
[data-theme="dark"] {
  --bg: #121316; --dots: rgba(255,255,255,.055);
  --surface: #1C1D21; --surface2: #26272C;
  --ink: #F5F1E8; --ink2: #A9A59A;
  --line: rgba(255,255,255,.7); --bw: 2px; --soft: rgba(255,255,255,.12);
  --shadow: 4px 4px 0 rgba(0,217,192,.9); --shadow-sm: 3px 3px 0 rgba(0,217,192,.9);
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; } [data-theme="dark"] { color-scheme: dark; }
body { margin: 0; background: var(--bg); background-image: radial-gradient(var(--dots) 1.2px, transparent 1.4px); background-size: 22px 22px; color: var(--ink); font-family: "Plus Jakarta Sans", system-ui, sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol { margin: 0; padding: 0; } ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 30px 20px 90px; }
.muted { color: var(--ink2); } .small { font-size: .94rem; }   /* texto base de tarjetas ≈15 px (antes ≈13,6) */
.loading { padding: 90px 0; text-align: center; color: var(--ink2); }
.cap::first-letter { text-transform: uppercase; }

/* Barra superior (siempre oscura: el logo es blanco) */
.appbar { position: sticky; top: 0; z-index: 20; background: #1B1A17; color: #fff; border-bottom: 3px solid var(--accent); }
.bar-inner { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand img { height: 30px; width: auto; }
.tabs { display: flex; gap: 4px; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; order: 3; }
@media (min-width: 900px) { .tabs { order: 0; flex: 1; } }
.tabs a { padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .88rem; color: rgba(255,255,255,.7); white-space: nowrap; transition: color .2s, background .2s; }
.tabs a:hover { color: #fff; } .tabs a.on { background: var(--accent); color: var(--on-accent); }
.who { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.who span { font-size: .8rem; color: rgba(255,255,255,.65); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
@media (min-width: 700px) { .who span { display: inline; } }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; transition: border-color .2s, background .2s; }
.iconbtn:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.iconbtn svg { width: 18px; height: 18px; }

/* Botones táctiles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 999px; border: var(--bw) solid var(--line); background: var(--surface); color: var(--ink); font-weight: 800; font-size: .92rem; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .2s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--line); }
.btn.pri { background: var(--accent); color: var(--on-accent); border-color: #1B1A17; }
[data-theme="dark"] .btn.pri { border-color: #1B1A17; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: #fff; padding: 8px 14px; } .btn.ghost:hover { color: var(--accent); transform: none; box-shadow: none; }
.btn.danger { color: var(--coral); border-color: var(--coral); box-shadow: 3px 3px 0 var(--coral); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }

input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], textarea, select { width: 100%; background: var(--surface); color: var(--ink); border: var(--bw) solid var(--line); border-radius: 14px; padding: 11px 14px; font-size: .95rem; outline: none; transition: box-shadow .2s; }
input:focus, textarea:focus, select:focus { box-shadow: var(--shadow-sm); }
textarea { resize: vertical; min-height: 110px; }
label.f, div.f { display: grid; gap: 7px; font-weight: 700; font-size: .86rem; } label.f small, div.f small { color: var(--ink2); font-weight: 500; }

.h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; }
.sub { margin-top: 6px; color: var(--ink2); }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; }
.datebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .datebar input { width: auto; }
.card { background: var(--surface); border: var(--bw) solid var(--line); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 14px; letter-spacing: -.02em; }
.grid2 { display: grid; gap: 22px; } @media (min-width: 900px) { .grid2 { grid-template-columns: 1.6fr 1fr; } .grid2.eq { grid-template-columns: 1fr 1fr; } }
.stack { display: grid; gap: 22px; }
.empty { color: var(--ink2); font-size: .9rem; padding: 4px 0; }

.demo-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; padding: 14px 18px; background: var(--amber); color: #1B1A17; border: 2px solid #1B1A17; border-radius: 16px; box-shadow: 4px 4px 0 #1B1A17; font-weight: 700; font-size: .92rem; }
.demo-banner b { background: #1B1A17; color: var(--amber); padding: 3px 10px; border-radius: 999px; font-size: .72rem; letter-spacing: .1em; }
.demo-banner a { margin-left: auto; text-decoration: underline; }

/* ===== Registrar ===== */
.reg { display: grid; gap: 22px; align-items: start; }
@media (min-width: 960px) { .reg { grid-template-columns: 1fr 340px; } .sumcard { position: sticky; top: 96px; } }
.form-card { padding: 4px 28px; }
.step { padding: 28px 0; border-top: 2px dashed var(--soft); } .step:first-child { border-top: 0; }
.step-h { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.step-h > span { width: 32px; height: 32px; flex: none; display: grid; place-items: center; background: var(--amber); color: #1B1A17; border: 2px solid #1B1A17; border-radius: 10px; font-weight: 800; font-size: .9rem; transform: rotate(-5deg); }
.step-h h3 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -.03em; }
.step-h em { margin-left: auto; font-style: normal; font-size: .8rem; color: var(--ink2); }

.mts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.mt { display: grid; justify-items: center; gap: 8px; padding: 16px 4px 12px; border-radius: 20px; border: var(--bw) solid var(--soft); background: var(--surface2); cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--ink2); transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.mt svg { width: clamp(44px, 9vw, 74px); height: auto; filter: saturate(.55) opacity(.75); transition: filter .2s, transform .35s var(--ease); }
.mt:hover { border-color: var(--line); } .mt:hover svg { filter: none; transform: scale(1.08) rotate(-5deg); }
.mt.on { background: var(--c); border-color: #1B1A17; box-shadow: var(--shadow); color: #1B1A17; transform: translate(-2px, -3px); }
.mt.on svg { filter: none; animation: wiggle .6s var(--ease); }
.mt b { font-weight: 800; }
@keyframes wiggle { 0% { transform: scale(.8) rotate(-12deg); } 60% { transform: scale(1.18) rotate(6deg); } 100% { transform: scale(1.1) rotate(0); } }
.mood-msg { margin-top: 18px; color: var(--ink2); font-size: .95rem; min-height: 1.4em; font-weight: 500; }
.care { margin-top: 14px; padding: 14px 16px; border: 2px solid var(--blue); background: color-mix(in srgb, var(--blue) 12%, var(--surface)); border-radius: 14px; font-size: .88rem; }

.etool { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.etool input { flex: 1 1 200px; width: auto; }
.sugg { margin-bottom: 22px; }
.fam { margin-bottom: 20px; } .fam:last-child { margin-bottom: 0; }
.fam-l { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--ink2); }
.fam-l i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #1B1A17; }
.ecs { display: flex; flex-wrap: wrap; gap: 10px; }
.ec { --rot: 0deg; position: relative; padding: 9px 16px; border: var(--bw) solid var(--line); border-radius: 18px 12px 20px 14px; background: color-mix(in srgb, var(--c) 30%, var(--surface)); color: var(--ink); font-weight: 700; font-size: .92rem; cursor: pointer; transform: rotate(var(--rot)); transition: transform .2s var(--ease), background .2s, box-shadow .2s, padding .2s; }
.ec:nth-child(3n) { --rot: -1.2deg; border-radius: 14px 20px 12px 18px; }
.ec:nth-child(3n+1) { --rot: .9deg; border-radius: 20px 14px 18px 12px; }
.ec:hover { transform: translateY(-2px) rotate(0); background: color-mix(in srgb, var(--c) 55%, var(--surface)); }
.ec.on { background: var(--c); color: #1B1A17; border-color: #1B1A17; box-shadow: var(--shadow-sm); padding-left: 38px; transform: rotate(0) translate(-1px, -1px); }
.ec.on::before { content: ""; position: absolute; left: 11px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3.5 9.5l3.6 3.6 7.4-8' fill='none' stroke='%231B1A17' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.ec.neutral { --c: #CFC8B6; }
.more { margin-top: 6px; background: none; border: 2px dashed var(--soft); border-radius: 999px; color: var(--ink2); padding: 9px 18px; font-size: .85rem; font-weight: 800; cursor: pointer; } .more:hover { color: var(--ink); border-color: var(--line); }
.fam-more { margin-top: 20px; padding-top: 20px; border-top: 2px dashed var(--soft); }
.noresult { color: var(--ink2); font-size: .92rem; }

.tray { margin-top: 24px; padding: 16px 18px; border: 2px dashed var(--soft); border-radius: 16px; }
.tray-h { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--ink2); margin-bottom: 12px; }
.tr-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; } .tr-row + .tr-row { border-top: 1px solid var(--soft); }
.tr-name { flex: 1; font-weight: 800; display: flex; align-items: center; gap: 8px; } .tr-name i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #1B1A17; background: var(--c); }
.lvl { display: inline-flex; gap: 6px; align-items: center; } .lvl small { font-size: .72rem; color: var(--ink2); min-width: 40px; text-align: right; }
.lvl button { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: transparent; padding: 0; cursor: pointer; transition: transform .15s; } .lvl button:hover { transform: scale(1.2); }
.lvl button.on { background: var(--c); }

.sleep { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; background: var(--surface); border: var(--bw) solid var(--line); border-radius: 999px; padding: 4px; }
.stepper button { display: inline-grid; place-items: center; padding: 0; line-height: 1; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface2); font-size: 1.3rem; font-weight: 800; cursor: pointer; transition: background .15s; } .stepper button:hover { background: var(--accent); color: var(--on-accent); }
.stepper output { min-width: 82px; text-align: center; font-weight: 800; font-size: 1.05rem; }
.linkbtn { background: none; border: 0; color: var(--ink2); font-size: .8rem; text-decoration: underline; cursor: pointer; }

.sumcard { background: var(--surface); border: var(--bw) solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; z-index: 6; }
.sum-top { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--mc, var(--surface2)); color: #1B1A17; border-bottom: var(--bw) solid var(--line); transition: background .3s; }
.sum-face { width: 62px; height: 62px; flex: none; } .sum-face svg { width: 100%; height: auto; display: block; } .sum-face .ph { display: block; width: 100%; height: 100%; border-radius: 50%; border: 3px dashed rgba(27,26,23,.5); }
.sum-top b { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; } .sum-top small { font-size: .8rem; font-weight: 600; opacity: .8; }
.sum-body { padding: 18px 20px 20px; }
.sumchips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; }
.sumchips button { border: 2px solid #1B1A17; border-radius: 999px; background: var(--c); color: #1B1A17; padding: 3px 11px; font-size: .78rem; font-weight: 800; cursor: pointer; }
.sum-meta { color: var(--ink2); font-size: .82rem; min-height: 1.3em; margin-top: 10px; }
.sum-actions { display: grid; gap: 10px; margin-top: 14px; } .sum-actions .btn { width: 100%; }
@media (max-width: 959px) { .sumcard { position: sticky; bottom: 10px; } .sum-top { padding: 10px 16px; } .sum-face { width: 40px; height: 40px; } .sum-top b { font-size: 1.05rem; } .sum-body { padding: 10px 16px 14px; } .sumchips { display: none; } .sum-actions { grid-template-columns: 1fr auto; margin-top: 8px; } .sum-meta { margin-top: 0; } }
@media (max-width: 520px) { .form-card { padding: 4px 16px; } .mts { gap: 6px; } .mt { padding: 12px 2px 8px; border-radius: 14px; font-size: .68rem; } .card { padding: 18px; } }

.stat-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-mini div { background: var(--surface2); border-radius: 14px; padding: 14px; } .stat-mini strong { display: block; font-size: 1.8rem; line-height: 1.1; font-weight: 800; letter-spacing: -.04em; } .stat-mini span { font-size: .76rem; color: var(--ink2); }
.recent li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--soft); cursor: pointer; } .recent li:first-child { border-top: 0; }
.recent li:hover b { text-decoration: underline; }
.recent .dot { width: 38px; height: 38px; flex: none; } .recent .dot svg { width: 100%; height: auto; } .recent b { display: block; font-size: .92rem; } .recent small { color: var(--ink2); }

/* ===== Calendario ===== */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; } .cal-head h3 { margin: 0; font-size: 1.3rem; }
.cal-nav { display: flex; gap: 8px; } .cal-nav button { width: 40px; height: 40px; border-radius: 50%; border: var(--bw) solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.2rem; font-weight: 800; box-shadow: 2px 2px 0 var(--line); } .cal-nav button:active { transform: translate(2px,2px); box-shadow: none; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal .dow { text-align: center; font-size: .7rem; font-weight: 800; color: var(--ink2); text-transform: uppercase; letter-spacing: .08em; padding-bottom: 4px; }
.cell { aspect-ratio: 1; border-radius: 14px; border: 2px dashed var(--soft); background: transparent; color: var(--ink2); font-size: .88rem; font-weight: 800; cursor: pointer; display: grid; place-items: center; transition: transform .2s var(--ease); }
.cell:hover { transform: scale(1.08) rotate(-2deg); border-color: var(--line); }
.cell.has { border: 2px solid #1B1A17; background: var(--c); color: #1B1A17; position: relative; }
.cell .mn { position: absolute; right: 5px; bottom: 3px; font-size: .62rem; font-weight: 800; line-height: 1; opacity: .8; }
/* año en colores: forma además del color (rayas en días bajos, punto en "muy bien") */
.year i[data-m="1"], .year i[data-m="2"] { background-image: repeating-linear-gradient(45deg, rgba(27,26,23,.45) 0 1.5px, transparent 1.5px 4px); }
.year i[data-m="5"] { background-image: radial-gradient(circle, rgba(27,26,23,.6) 0 1.6px, transparent 2px); }
/* botón de apariencia con texto visible */
.iconbtn.withlbl { width: auto; padding: 0 12px 0 10px; border-radius: 19px; display: inline-flex; gap: 6px; align-items: center; font: inherit; font-weight: 800; font-size: .8rem; }
@media (max-width: 420px) { .iconbtn.withlbl .lb { display: none; } .iconbtn.withlbl { width: 38px; padding: 0; justify-content: center; } }
.stylepick { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 400; width: min(92vw, 380px); padding: 16px; border: 2px solid #1B1A17; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.stylepick p { margin: 0 0 10px; font-weight: 800; } .stylepick .lm-seg { margin-bottom: 8px; } .stylepick small { color: var(--ink2); }
.cell.today { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.cell.void { visibility: hidden; } .cell.future { opacity: .3; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; font-size: .78rem; color: var(--ink2); font-weight: 600; } .legend i { display: inline-block; width: 13px; height: 13px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; border: 2px solid #1B1A17; }
.year { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 4px; min-width: 640px; }
.year i { aspect-ratio: 1; border-radius: 3px; background: var(--surface2); display: block; } .year i.has { background: var(--c); }
.scrollx { overflow-x: auto; padding-bottom: 6px; }

/* ===== Estadísticas ===== */
.seg { display: inline-flex; background: var(--surface); border: var(--bw) solid var(--line); border-radius: 999px; padding: 4px; box-shadow: 2px 2px 0 var(--line); }
.seg button { border: 0; background: transparent; color: var(--ink2); padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: .82rem; cursor: pointer; } .seg button.on { background: var(--ink); color: var(--bg); }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin-bottom: 22px; } @media (min-width: 800px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); border: var(--bw) solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-sm); position: relative; }
.kpi::before { content: ""; position: absolute; left: 18px; top: -2px; width: 34px; height: 6px; border-radius: 0 0 6px 6px; background: var(--accent); }
.kpi:nth-child(2)::before { background: var(--amber); } .kpi:nth-child(3)::before { background: var(--blue); } .kpi:nth-child(4)::before { background: var(--coral); }
.kpi small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink2); } .kpi strong { display: block; font-size: 2.2rem; line-height: 1.15; font-weight: 800; letter-spacing: -.05em; } .kpi span { font-size: .78rem; color: var(--ink2); }
.bars { display: grid; gap: 11px; } .bar { display: grid; grid-template-columns: 100px 1fr 34px; gap: 12px; align-items: center; font-size: .85rem; font-weight: 600; }
.bar > div { height: 14px; border-radius: 7px; background: var(--surface2); border: 2px solid var(--soft); overflow: hidden; } .bar > div > i { display: block; height: 100%; background: var(--c, var(--accent)); } .bar b { text-align: right; }
.dowbars { display: flex; align-items: flex-end; gap: 10px; height: 160px; } .dowbars div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; font-size: .75rem; color: var(--ink2); font-weight: 700; } .dowbars i { width: 100%; border-radius: 8px 8px 0 0; background: var(--c); min-height: 4px; border: 2px solid #1B1A17; border-bottom: 0; }
.insights li { padding: 12px 0; border-top: 1px solid var(--soft); font-size: .92rem; } .insights li:first-child { border-top: 0; padding-top: 0; }
.up { color: #0a9d8b; font-weight: 800; } .down { color: #e0453f; font-weight: 800; }
[data-theme="dark"] .up { color: var(--accent); } [data-theme="dark"] .down { color: var(--coral); }
svg.chart { width: 100%; height: auto; display: block; color: var(--ink); } svg.chart text { fill: var(--ink2); font-size: 11px; font-family: inherit; font-weight: 600; }

/* ===== Informe (siempre sobre papel blanco) ===== */
.report { background: #fff; color: #17181c; border: 2px solid #1B1A17; border-radius: 18px; padding: 38px; box-shadow: var(--shadow); } .report .muted { color: #5b6270; }
.report h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.04em; } .report h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #5b6270; margin: 28px 0 10px; }
.report .kpis { margin: 18px 0; } .report .kpi { background: #f4f1ea; border-color: #1B1A17; box-shadow: none; } .report .kpi small, .report .kpi span { color: #5b6270; }
.report svg.chart { color: #17181c; } .report svg.chart text { fill: #5b6270; } .report .bar > div { background: #eee9de; } .report .dowbars div { color: #5b6270; }
.report .notes li { padding: 10px 0; border-top: 1px solid #e6e1d6; font-size: .9rem; } .report .notes b { display: inline-block; min-width: 130px; }
.report .insights li { border-color: #e6e1d6; } .report .up { color: #0a9d8b; } .report .down { color: #e0453f; }
.report .disc { margin-top: 28px; padding-top: 14px; border-top: 1px solid #e6e1d6; font-size: .78rem; color: #5b6270; }

/* ===== Cuenta ===== */
.narrow { max-width: 580px; } .form { display: grid; gap: 14px; } .zone { border-color: var(--coral); box-shadow: 4px 4px 0 var(--coral); }
.msg { font-size: .88rem; min-height: 1.2em; font-weight: 600; } .msg.err { color: var(--coral); } .msg.ok { color: #0a9d8b; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); background: #1B1A17; color: #fff; padding: 13px 24px; border-radius: 999px; border: 2px solid var(--accent); font-weight: 800; font-size: .9rem; box-shadow: 4px 4px 0 var(--accent); opacity: 0; pointer-events: none; transition: all .35s var(--ease); z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.err { border-color: var(--coral); box-shadow: 4px 4px 0 var(--coral); }
.fade-in { animation: fadeIn .45s var(--ease); } @keyframes fadeIn { from { opacity: 0; transform: translateY(14px); } }

@media print {
  body { background: #fff; } .appbar, .toast, .noprint, .bottombar, .sosfab, header { display: none !important; } .wrap { padding: 0; max-width: none; }
  .report { border: 0; border-radius: 0; padding: 0; box-shadow: none; } .report .kpi { break-inside: avoid; } svg.chart { max-height: 260px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 959px) { .sum-meta { display: none; } .sum-top small { display: none; } }

/* Gráfico de evolución */
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; } .chart-head h3 { margin: 0; }
.chartwrap { position: relative; }
.chartwrap svg.evo { overflow: visible; touch-action: pan-y; } .chartwrap svg.evo .ov { cursor: crosshair; }
svg.evo .endlbl { fill: var(--bg); font-weight: 800; font-size: 12px; }
.report svg.evo .endlbl { fill: #fff; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 13px; border-radius: 12px; font-size: .78rem; font-weight: 700; white-space: nowrap; transform: translate(-50%, -135%); box-shadow: 3px 3px 0 var(--accent); opacity: 0; transition: opacity .15s; z-index: 3; }
.tip.on { opacity: 1; }
.report .tip { background: #17181c; color: #fff; }
.chart-note { margin-top: 14px; color: var(--ink2); font-size: .88rem; max-width: 70ch; } .chart-note b { color: var(--ink); }
.report .chart-note { color: #5b6270; } .report .chart-note b { color: #17181c; }
.seg button { white-space: nowrap; }

/* Intensidad en estadísticas e informe */
.bars4 .bar { grid-template-columns: 100px 1fr 30px 44px; }
.dots3 { display: inline-flex; gap: 3px; justify-content: flex-end; } .dots3 i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink2); opacity: .55; } .dots3 i.on { background: var(--ink); border-color: var(--ink); opacity: 1; }
.report .dots3 i { border-color: #8a8f99; } .report .dots3 i.on { background: #17181c; border-color: #17181c; }
.stack-bar { display: flex; height: 22px; border-radius: 11px; overflow: hidden; border: 2px solid #1B1A17; background: var(--surface2); } .stack-bar i { display: block; min-width: 4px; }
.mini-note { margin-top: 12px; font-size: .88rem; color: var(--ink2); } .mini-note b { color: var(--ink); }
.report .mini-note { color: #5b6270; } .report .mini-note b { color: #17181c; }
.report .stack-bar { background: #eee9de; }

/* ===== Informe para la consulta ===== */
.rep-ctl { display: grid; gap: 18px; margin-bottom: 26px; }
.rc { display: grid; gap: 10px; } .rc.two { gap: 14px; } @media (min-width: 800px) { .rc.two { grid-template-columns: 1fr 1fr; } }
.rc .label { margin: 0; }
.wrapseg { flex-wrap: wrap; border-radius: 22px; } .seg button:disabled { opacity: .4; cursor: not-allowed; }
.notelist { display: grid; gap: 8px; max-height: 260px; overflow: auto; padding: 4px; }
.nrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 2px solid var(--soft); border-radius: 12px; font-size: .86rem; cursor: pointer; } .nrow input { width: auto; margin-top: 3px; } .nrow:hover { border-color: var(--line); }
.share { margin-top: 6px; padding: 16px 18px; border: 2px dashed var(--soft); border-radius: 16px; display: grid; gap: 12px; }
.sharelink b { font-size: .85rem; } .copyrow { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; } .copyrow input { flex: 1 1 260px; width: auto; font-size: .82rem; }
.shlist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--soft); font-size: .85rem; } .shlist li:first-child { border-top: 0; }

.report { padding: 34px; } @media (max-width: 600px) { .report { padding: 20px; } }
.rhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.badge { display: inline-block; padding: 7px 14px; border: 2px solid #1B1A17; border-radius: 999px; background: var(--note); color: var(--ink); font-size: .78rem; font-weight: 800; }
.rsec { margin-top: 34px; padding-top: 22px; border-top: 2px dashed #d9d2c2; } .rsec:first-of-type { border-top: 0; }
.rsec h3 { margin: 0 0 14px; } .rsec h4 { margin: 22px 0 10px; font-size: .95rem; font-weight: 800; letter-spacing: -.01em; color: #17181c; }
.obs { list-style: none; padding: 0; margin: 0; } .obs li { position: relative; padding: 8px 0 8px 22px; font-size: 1rem; border-top: 1px solid #e6e1d6; } .obs li:first-child { border-top: 0; }
.obs li::before { content: ""; position: absolute; left: 4px; top: 1.05em; width: 8px; height: 8px; background: #00D9C0; border: 2px solid #1B1A17; border-radius: 50%; }
.rtable { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 8px; } .rtable th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #5b6270; padding: 8px 10px; border-bottom: 2px solid #1B1A17; } .rtable td { padding: 9px 10px; border-bottom: 1px solid #e6e1d6; vertical-align: top; }
.qbox { padding: 16px 18px; border: 2px solid #1B1A17; border-radius: 14px; background: var(--note); font-size: .95rem; }
.two { display: grid; gap: 22px; } @media (min-width: 800px) { .two { grid-template-columns: 1fr 1fr; } }
.mlist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: .82rem; } .mlist li { display: flex; gap: 10px; align-items: center; }
.mlist b, .mk { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border: 2px solid #1B1A17; border-radius: 50%; font-size: .68rem; font-weight: 800; color: #1B1A17; }
.mk { width: 22px; height: 22px; display: inline-block; vertical-align: middle; }
.report .legend { margin-top: 10px; } .report .legend span { margin-right: 4px; }
.report .empty { color: #5b6270; }

/* ===== Tratamiento ===== */
.tline li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--soft); } .tline li:first-child { border-top: 0; padding-top: 0; }
.tline .mk { margin-top: 3px; } .tline small { display: block; color: var(--ink2); font-size: .76rem; font-weight: 700; } .tline strong { display: block; font-size: .98rem; } .tline span { display: block; color: var(--ink2); font-size: .85rem; } .tline li > div { flex: 1; }

/* ===== Cuestionarios ===== */
.qs { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; } .qs p { margin: 0 0 8px; font-weight: 700; font-size: .93rem; }
.opts { display: grid; gap: 8px; } @media (min-width: 700px) { .opts { grid-template-columns: repeat(4, 1fr); } }
.opts button { padding: 10px 12px; border: 2px solid var(--soft); background: var(--surface); border-radius: 12px; font-weight: 700; font-size: .82rem; cursor: pointer; text-align: left; transition: all .15s; } .opts button:hover { border-color: var(--line); } .opts button.on { background: var(--accent); color: var(--on-accent); border-color: #1B1A17; box-shadow: var(--shadow-sm); }

/* ===== Cuerpo (registro) ===== */
.body-row { display: grid; gap: 6px; padding: 10px 0; } @media (min-width: 700px) { .body-row { grid-template-columns: 150px auto 1fr; align-items: center; gap: 16px; } }
.bl { font-weight: 800; font-size: .9rem; }
.scale5 { display: inline-flex; gap: 6px; } .scale5 button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--soft); background: var(--surface); font-weight: 800; cursor: pointer; transition: all .15s var(--ease); } .scale5 button:hover { border-color: var(--line); transform: translateY(-2px); } .scale5 button.on { background: var(--accent); color: var(--on-accent); border-color: #1B1A17; box-shadow: var(--shadow-sm); }
@media print {
  /* Las secciones largas pueden partirse (evita páginas casi vacías); lo que no se parte: tarjetas, gráficos con su leyenda, filas de tabla y títulos con su contenido */
  .rsec { break-inside: auto; } .rsec > h3, .rsec h4 { break-after: avoid; break-inside: avoid; }
  .rtable tr, .kpis, .chartwrap, svg.chart, .chart-legend, .two > div, .bars, .watchbox { break-inside: avoid; }
  .report, .report * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }   /* sin esto el navegador omite fondos: barras y leyendas salen vacías */
  .rtable thead { display: table-header-group; } .mini-note { font-size: .8rem; } .obs li { font-size: .92rem; } .small { font-size: .85rem; } p.mini-note { orphans: 3; widows: 3; }
}
[hidden] { display: none !important; }

/* detalle estadístico del informe */
.dtwrap { overflow-x: auto; margin: 4px 0 6px; }
.rtable.dt { font-size: .8rem; } .rtable.dt th, .rtable.dt td { padding: 6px 9px; } .rtable.dt td:not(:first-child), .rtable.dt th:not(:first-child) { text-align: center; }
.rtable.dt tbody tr:nth-child(even) { background: rgba(27,26,23,.04); }
.rtable td b.mk { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 1px 0 0; line-height: 1; font-size: .72rem; text-align: center; vertical-align: middle; }
@media print { .rtable.dt { font-size: .7rem; } .rtable.dt th, .rtable.dt td { padding: 3px 6px; } .dtwrap { overflow: visible; } }

.concl li { margin-bottom: 6px; } .watchbox { margin-top: 12px; padding: 12px 16px; border: 2px solid #1B1A17; border-radius: 14px; background: var(--note); font-size: .92rem; }

/* ----- apariencia: menú y estilo ordenado ----- */
.lookmenu { position: absolute; z-index: 300; width: 250px; padding: 14px; border: 2px solid #1B1A17; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.lookmenu .lm-t { margin: 0 0 6px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); } .lookmenu .lm-t:not(:first-child) { margin-top: 14px; }
.lm-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lm-seg button { padding: 9px 8px; border: 2px solid #1B1A17; border-radius: 12px; background: var(--surface2); color: var(--ink); font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.lm-seg button.on { background: #FFD60A; color: #1B1A17; }
.lookmenu .lm-n { margin: 12px 0 0; font-size: .78rem; color: var(--ink2); line-height: 1.4; }
/* Ordenado: formas simétricas, sin inclinaciones, sin movimientos */
[data-style="tidy"] .ec, [data-style="tidy"] .ec:nth-child(3n), [data-style="tidy"] .ec:nth-child(3n+1) { border-radius: 12px; transform: none; --rot: 0deg; }
[data-style="tidy"] .ec:hover, [data-style="tidy"] .ec.on { transform: none; }
[data-style="tidy"] .mt:hover svg, [data-style="tidy"] .cell:hover { transform: none; }
[data-style="tidy"] .mt.on svg { animation: none; }
[data-style="tidy"] *, [data-style="tidy"] *::before, [data-style="tidy"] *::after { animation: none !important; }
[data-style="tidy"] .fade-in { opacity: 1; }

/* ----- accesibilidad ----- */
:focus-visible { outline: 3px solid #2D8CFF; outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 400; padding: 10px 16px; background: #FFD60A; color: #1B1A17; border: 2px solid #1B1A17; border-radius: 12px; font-weight: 800; }
.skip:focus { top: 8px; }
html[data-size="large"] { font-size: 112.5%; } html[data-size="xl"] { font-size: 125%; }
[data-contrast="high"] { --ink: #000; --ink2: #1A1A1A; --line: #000; --bw: 3px; --soft: rgba(0,0,0,.55); --bg: #FFFFFF; --surface: #FFFFFF; --surface2: #EDEDED; --dots: transparent; }
[data-contrast="high"][data-theme="dark"] { --ink: #FFFFFF; --ink2: #F2F2F2; --line: #FFFFFF; --bg: #000000; --surface: #000000; --surface2: #1C1C1C; --soft: rgba(255,255,255,.65); }
[data-contrast="high"] .muted, [data-contrast="high"] small, [data-contrast="high"] .sub { color: var(--ink) !important; opacity: 1 !important; }
[data-font="plain"], [data-font="plain"] * { font-family: Verdana, Arial, system-ui, sans-serif !important; letter-spacing: .01em; }
[data-font="plain"] body { line-height: 1.75; }
[data-motion="calm"] *, [data-motion="calm"] *::before, [data-motion="calm"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
.lm-seg.c3 { grid-template-columns: repeat(3, 1fr); }
.lm-togs { display: grid; gap: 6px; }
.lm-tog { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 2px solid #1B1A17; border-radius: 12px; background: var(--surface2); color: var(--ink); font: inherit; font-weight: 700; font-size: .84rem; text-align: left; cursor: pointer; }
.lm-tog i { flex: none; width: 34px; height: 18px; border: 2px solid #1B1A17; border-radius: 999px; background: var(--surface); position: relative; } .lm-tog i::after { content: ""; position: absolute; top: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%; background: #1B1A17; transition: left .15s; }
.lm-tog.on { background: #FFD60A; color: #1B1A17; } .lm-tog.on i { background: #7EE03A; } .lm-tog.on i::after { left: 17px; }
.lookmenu { max-height: calc(100vh - 80px); overflow-y: auto; }
/* en pantallas angostas los selectores de rango bajan de línea en vez de ensanchar la página */
.seg { max-width: 100%; flex-wrap: wrap; row-gap: 4px; }

/* Horas de sueño: nada se mueve al tocar − o + (el botón Quitar reserva su lugar) */
.sleep > .small { flex-basis: 100%; }
.sleep { flex-wrap: nowrap; row-gap: 6px; flex-wrap: wrap; min-height: 84px; align-content: flex-start; }
.stepper output { min-width: 96px; font-variant-numeric: tabular-nums; }
.stepper button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
#sClear[hidden] { display: inline-block !important; visibility: hidden; }
.sum-top b, #sumMood { min-height: 1.1em; }

/* Hábitos: agregar y editar a la vista */
.hbw { display: inline-flex; align-items: center; gap: 2px; }
.hped { width: 28px; height: 28px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: transparent; color: var(--ink2); font-size: .95rem; line-height: 1; cursor: pointer; }
.hped:hover, .hped.on { border-color: #1B1A17; background: #FFD60A; color: #1B1A17; }
.hab-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.habadd, .habedit, .habman { margin-top: 12px; padding: 12px 14px; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface2); }
.habedit { border-style: solid; border-color: #1B1A17; }
.hform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hform input[type=text] { flex: 1 1 150px; min-width: 0; }

/* Notas: tipo, agregar varias */
.ntype { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
.nadd { display: flex; gap: 8px; align-items: flex-end; }
.nadd textarea { flex: 1; min-height: 52px; resize: vertical; }
.nadd textarea:disabled, .nadd .mbtn:disabled { opacity: .55; cursor: not-allowed; }
.nitems { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.ni { --nc: #7EE03A; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border: 2px solid #1B1A17; border-left-width: 8px; border-left-color: var(--nc); border-radius: 16px; background: var(--surface); box-shadow: 2px 2px 0 #1B1A17; }
.ni.good { --nc: #7EE03A; background: #F1FBE3; } .ni.bad { --nc: #FF8F7A; background: #FFEDE8; } .ni.plain { --nc: #2D8CFF; background: var(--note); }
.ni.empty { border: 2px dashed var(--line); box-shadow: none; background: transparent; color: var(--ink2); font-size: .88rem; justify-content: center; text-align: center; }
.ni .nk { flex: none; align-self: center; font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 4px 9px; border: 2px solid #1B1A17; border-radius: 999px; background: var(--nc); color: #1B1A17; }
.ni .nt { flex: 1; min-width: 0; font-size: .95rem; line-height: 1.4; overflow-wrap: anywhere; color: #1B1A17; }
.nrm { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 2px solid #1B1A17; border-radius: 50%; background: #fff; color: #1B1A17; font-size: 1.1rem; line-height: 0; cursor: pointer; transition: background .12s, transform .12s; }
.nrm:hover { background: #FFE0D8; transform: scale(1.08); }

/* Guardar al final del registro, edición de 10 min, días que faltaron */
.reg[hidden] { display: none !important; }
.saveend { position: sticky; bottom: 0; z-index: 5; margin: 26px -4px -4px; padding: 12px 4px 8px; background: linear-gradient(to bottom, transparent, var(--surface) 28%); display: grid; gap: 10px; }
.saveend .btn { width: 100%; justify-content: center; }
.regnote { margin: 0 0 18px; padding: 12px 16px; border: 2px solid #1B1A17; border-radius: 16px; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); font-size: .9rem; box-shadow: var(--shadow-sm); }
.regnote b { display: block; margin-bottom: 2px; }
.misscard { margin-bottom: 16px; padding: 10px 14px; border: 2px solid #1B1A17; border-radius: 18px; background: color-mix(in srgb, var(--amber) 30%, var(--surface)); box-shadow: var(--shadow-sm); }
.misscard b { display: block; font-size: .95rem; } .misscard > span { display: block; font-size: .8rem; color: var(--ink2); }
.misschips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mchip { padding: 5px 11px; border: 2px solid #1B1A17; border-radius: 999px; background: var(--surface); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; text-transform: capitalize; }
.mchip:hover, .mchip.on { background: var(--accent); }
[data-size="xl"] .lm-seg.c3, [data-size="large"] .lm-seg.c3 { grid-template-columns: 1fr; }
.lm-seg button { min-width: 0; overflow-wrap: anywhere; }

/* Registro de crisis: buscador, días a un toque */
#sq { width: 100%; }
.dayother { margin-top: 10px; max-width: 220px; }
.ctime .chart { width: 100%; height: auto; display: block; }

/* Cuestionario en ventana */
.qmodal { position: fixed; inset: 0; z-index: 120; background: rgba(27,26,23,.55); display: flex; align-items: flex-start; justify-content: center; padding: 16px; overflow-y: auto; }
.qmodal-in { width: min(720px, 100%); margin: auto; }
.qmodal-in .card { box-shadow: 8px 8px 0 #1B1A17; }
body.qopen { overflow: hidden; }

/* Alertas: seleccionar varias y eliminar */
.abar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; padding: 10px 14px; border: 2px solid #1B1A17; border-radius: 14px; background: var(--surface); }
.abar .btn[disabled] { opacity: .45; cursor: not-allowed; }
.alert { position: relative; }
.asel { display: flex; align-items: center; padding-right: 4px; cursor: pointer; }
.asel input { width: 20px; height: 20px; accent-color: #00A896; }
/* Alertas por correo: interruptores */
.alsw { display: grid; gap: 8px; }
.swrow { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 11px 14px; border: 2px solid #1B1A17; border-radius: 14px; background: var(--surface2); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.swrow b { display: block; font-size: .92rem; } .swrow small { display: block; margin-top: 2px; color: var(--ink2); font-size: .78rem; font-weight: 500; }
.swrow .sw { flex: none; width: 44px; height: 24px; margin-top: 2px; border: 2px solid #1B1A17; border-radius: 999px; background: var(--surface); position: relative; transition: background .2s; }
.swrow .sw i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #1B1A17; transition: transform .2s; }
.swrow.on { background: #E5F7CF; } .swrow.on .sw { background: #7EE03A; } .swrow.on .sw i { transform: translateX(20px); }
.swrow:focus-visible { outline: 3px solid #2D8CFF; outline-offset: 2px; }
/* Cómo te identifica tu profesional */
.aliasbox { margin: 10px 0 0; padding: 12px 14px; border: 2px dashed var(--line); border-radius: 14px; }
.aliasrow { display: flex; gap: 8px; margin-top: 6px; } .aliasrow input { flex: 1; min-width: 0; }

/* Selector "¿Qué momento del día registras?": aire antes del primer paso */
.regpick { margin: 0 0 26px; padding-bottom: 8px; }
.regpick .label { display: block; margin-bottom: 10px; }

/* Informe: preguntas para la consulta, una a una */
.qadd { display: flex; gap: 8px; align-items: center; } .qadd input { flex: 1; min-width: 0; }
.qitems { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .qitems:empty { display: none; }
.qi { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border: 2px solid #1B1A17; border-radius: 14px; background: var(--note); color: var(--ink); font-size: .92rem; }
.qi span { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Tratamiento: eliminar discreto y sugerencias de título */
.tline li > .nrm { align-self: center; }
.tlsug { margin: -4px 0 12px; }

/* Tratamiento: fecha con el estilo del sitio, detalle plegado, × centrada */
.tldate { width: 100%; max-width: 240px; padding: 10px 14px; border: 2px solid #1B1A17; border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; box-shadow: 2px 2px 0 #1B1A17; color-scheme: light; cursor: pointer; }
.tldate:focus-visible { outline: 3px solid #2D8CFF; outline-offset: 2px; }
.tldate::-webkit-calendar-picker-indicator { cursor: pointer; padding: 4px; border-radius: 8px; }
.tldet { margin: 4px 0 12px; } .tldet summary { cursor: pointer; font-weight: 800; font-size: .88rem; } .tldet summary em { font-style: normal; font-weight: 500; color: var(--ink2); } .tldet textarea { width: 100%; margin-top: 8px; }
#tlForm { display: grid; gap: 10px; }
.nrm svg { display: block; margin: 0; }

/* Recordatorio del calendario: días de la semana */
.wdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.wdays button { min-width: 0; padding: 9px 0; border: 2px solid #1B1A17; border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.wdays button.on { background: #2D8CFF; color: #fff; box-shadow: 2px 2px 0 #1B1A17; }

/* Fases de los pensamientos de hacerse daño: botón con explicación breve */
.ide button b { display: block; font-size: .92rem; } .ide button small { display: block; margin-top: 3px; font-weight: 500; font-size: .78rem; line-height: 1.35; color: inherit; opacity: .85; }
.support-urgent { margin: 0 0 16px; padding: 14px 16px; border: 2px solid #1B1A17; border-radius: 16px; background: #FFE0D8; color: #1B1A17; box-shadow: 2px 2px 0 #1B1A17; }
.support-urgent b { display: block; font-size: 1.02rem; } .support-urgent p { margin: 4px 0 10px; font-size: .9rem; }

/* Ventana de apoyo: cierre centrado, bloque urgente con márgenes, fases en filas compactas */
.support .support-x { display: grid; place-items: center; padding: 0; line-height: 0; }
.support-urgent { margin: 16px 26px 0; } @media (max-width: 480px) { .support-urgent { margin: 14px 20px 0; } }
.ide[hidden] { display: none; }
.ideph { grid-template-columns: 1fr !important; gap: 8px; }
.ideph button { padding: 11px 14px; }

/* Pensamientos de hacerse daño: No / Sí y "Prefiero no responder" */
.ideyn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.ideyn button { padding: 11px 14px; border: 2px solid #1B1A17; border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.ideyn button.on { background: #FFD60A; color: #1B1A17; box-shadow: 2px 2px 0 #1B1A17; }
.ideyn .ideskip { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; border-style: dashed; background: var(--surface2); color: var(--ink2); font-weight: 700; font-size: .88rem; }
.ideyn .ideskip.on { border-style: solid; background: #E6DEFF; color: #1B1A17; }

/* Pulido: aire en No / Sí, selector de momento, resumen del ánimo en tonos acuarela */
.ideyn { margin-bottom: 22px; }
.ideph { margin-bottom: 20px; }
.ideskipwrap { margin-top: 4px; }
.ideskip { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border: 2px dashed #1B1A17; border-radius: 14px; background: var(--surface2); color: var(--ink2); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; }
.ideskip.on { border-style: solid; background: #E6DEFF; color: #1B1A17; box-shadow: 2px 2px 0 #1B1A17; }
.regpick { margin: 16px 0 28px; }
.sum-top { background: color-mix(in srgb, var(--mc, #D9D3C4) 26%, #FFFBF2); }
.sum-face { display: grid; place-items: center; padding: 9px 8px 7px; border-radius: 50%; background: #FFFDF8; border: 2px solid #1B1A17; box-shadow: 2px 2px 0 rgba(27,26,23,.85); }
.sum-face svg { width: 100%; height: 100%; }
.sum-face .ph { border-width: 2px; }
@media (max-width: 959px) { .sum-face { padding: 6px 5px 4px; } }

/* Cambiar de mes: flechas centradas */
.cal-nav button { display: grid; place-items: center; padding: 0; line-height: 0; }
.cal-nav button svg { display: block; }

/* Informe: elegir entre dos fechas */
.daterange { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 12px; padding: 14px 16px; border: 2px solid #1B1A17; border-radius: 18px; background: var(--surface2); box-shadow: 2px 2px 0 #1B1A17; }
.daterange[hidden] { display: none; }
.daterange label { display: grid; gap: 4px; flex: 1 1 140px; min-width: 0; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
.daterange input[type=date] { width: 100%; padding: 10px 12px; border: 2px solid #1B1A17; border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem; font-weight: 700; text-transform: none; letter-spacing: 0; color-scheme: light; cursor: pointer; }
.daterange input[type=date]:focus-visible { outline: 3px solid #2D8CFF; outline-offset: 2px; }
.daterange .dr-sep { align-self: center; padding-top: 18px; font-weight: 800; color: var(--ink2); }
.daterange small { flex: 1 0 100%; font-weight: 700; }
@media (max-width: 420px) { .daterange .dr-sep { display: none; } }

/* La barra de desplazamiento siempre reserva su lugar: al pasar entre pantallas largas y cortas (p. ej. Resumen) el contenido ya no se corre hacia un lado */
html { scrollbar-gutter: stable; overflow-y: scroll; }

.ide-ask{margin:16px 0 10px;font-size:1.05rem;font-weight:800;color:#1B1A17;line-height:1.35}

/* Cabecera de la cuenta (usuario y profesional): mismo aspecto que la del inicio */
.appbar { background: rgba(18,19,22,.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.bar-inner { padding: 0 20px; min-height: 72px; gap: 14px; }
.brand img { height: 34px; }
.tabs { gap: 6px; }
.tabs a { padding: 8px 16px; border: 2px solid transparent; border-radius: 999px; font-weight: 800; font-size: .84rem; color: rgba(255,255,255,.86); transition: transform .15s, box-shadow .15s, background .2s, color .2s, border-color .2s; }
.tabs a:hover { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
.tabs a.on { background: #00D9C0; color: #04231f; border-color: #1B1A17; box-shadow: 3px 3px 0 #FFFDF8; transform: translate(-1px, -1px); }
.appbar .btn:not(.ghost) { padding: 9px 20px; background: #00D9C0; color: #04231f; border: 2px solid #1B1A17; box-shadow: 3px 3px 0 rgba(255,255,255,.18); font-size: .88rem; }
.appbar .btn:not(.ghost):hover { transform: translateY(-2px); box-shadow: 3px 5px 0 rgba(255,255,255,.18); }
.appbar .btn.ghost { padding: 9px 18px; font-size: .88rem; }
@media (max-width: 899px) { .bar-inner { padding-top: 8px; padding-bottom: 8px; } }

/* Menú centrado entre el logo y los botones, como en el inicio */
.tabs a { display: inline-flex; align-items: center; justify-content: center; }
@media (min-width: 900px) { .tabs { justify-content: center; flex: 1; } }

/* Cabecera de la cuenta idéntica a la del inicio: mismo fondo, alto, ancho, letra y botones */
.appbar { background: #1B1A17; border-bottom: 3px solid var(--accent); backdrop-filter: none; -webkit-backdrop-filter: none; }
.bar-inner { max-width: 1240px; min-height: 60px; padding-left: 20px; padding-right: 20px; }
.brand img { height: 34px; }
.tabs a { font-size: .88rem; }
.appbar .btn, .appbar .btn.ghost { font-size: .92rem; }

/* La cabecera no cambia con el tamaño de letra que elija la persona (usa px, igual que el inicio) y no recorta sombras ni detalles */
.appbar .tabs a { font-size: 14.08px; }
.appbar .btn, .appbar .btn.ghost { font-size: 14.72px; }
.appbar .who span, .appbar .whochip { font-size: 12.8px; }
.appbar .tabs .dotn { font-size: 11.2px; }
.appbar .tabs .navit svg { width: 17px; height: 17px; }
@media (min-width: 900px) { .appbar .tabs { overflow: visible; } }
@media (max-width: 899px) { .appbar .tabs { padding: 4px 6px 7px 2px; } }
