/* Mi Agenda de Pensamientos · Fase C.
 * Se carga después de app.css y tema.css en las pantallas distintas de Inicio.
 * Solo presentación: no cambia campos, formularios, almacenamiento o permisos.
 * Las variables oscuras anteriores no se redeclaran. Los colores nuevos son alias.
 */

.agenda-theme.pages-theme {
    --pages-gap: 22px;
    --pages-backdrop: var(--blue-sky);
    --pages-paper: var(--bg-page);
    --pages-story-start: var(--bg-card);
    --pages-story-end: var(--blue-mist);
    --pages-story-ink: var(--blue);
    --pages-story-muted: var(--muted);
    --pages-story-detail: var(--brown);
    --pages-story-wave: var(--blue-sky);
    --pages-story-halo: var(--peach);
    --pages-filter: var(--blue-mist);
    --pages-pdf: var(--blue-mist);
    --pages-selected: var(--blue-mist);
    --pages-mood: var(--lavender);
    --pages-tags: var(--blue-mist);
    --pages-sharing: var(--peach);
    --pages-context: var(--peach);
    --pages-profile-start: var(--blue-mist);
    --pages-profile-end: var(--bg-card);
    --pages-lines: var(--blue-mist);
    --pages-emoji-font: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
    isolation: isolate;
    position: relative;
    min-height: 100vh;
}

/* Valores nuevos en oscuro: únicamente colores que ya existen en el tema. */
:root[data-tema="oscuro"] .agenda-theme.pages-theme {
    --pages-backdrop: var(--bg);
    --pages-paper: var(--bg);
    --pages-story-start: var(--story);
    --pages-story-end: var(--story);
    --pages-story-ink: var(--story-ink);
    --pages-story-muted: var(--story-muted);
    --pages-story-detail: var(--story-detail);
    --pages-story-wave: var(--blue-soft);
    --pages-story-halo: var(--surface-soft);
    --pages-filter: var(--surface);
    --pages-pdf: var(--blue-soft);
    --pages-selected: var(--blue-soft);
    --pages-mood: var(--surface);
    --pages-tags: var(--surface);
    --pages-sharing: var(--surface);
    --pages-context: var(--surface-soft);
    --pages-profile-start: var(--surface);
    --pages-profile-end: var(--surface);
    --pages-lines: var(--border);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-tema]) .agenda-theme.pages-theme {
        --pages-backdrop: var(--bg); --pages-paper: var(--bg);
        --pages-story-start: var(--story); --pages-story-end: var(--story);
        --pages-story-ink: var(--story-ink); --pages-story-muted: var(--story-muted);
        --pages-story-detail: var(--story-detail); --pages-story-wave: var(--blue-soft);
        --pages-story-halo: var(--surface-soft); --pages-filter: var(--surface);
        --pages-pdf: var(--blue-soft); --pages-selected: var(--blue-soft);
        --pages-mood: var(--surface); --pages-tags: var(--surface);
        --pages-sharing: var(--surface); --pages-context: var(--surface-soft);
        --pages-profile-start: var(--surface); --pages-profile-end: var(--surface);
        --pages-lines: var(--border);
    }
}

/* El mismo marco cálido del panel, sin aplicar estilos a Inicio. */
:root body.agenda-theme.pages-theme {
    background-color: var(--bg);
    background-image: linear-gradient(180deg, var(--pages-backdrop), var(--pages-paper) 75%);
    font-size: 14px;
}
:root .agenda-theme.pages-theme::before {
    content: ''; position: absolute; z-index: -1; top: 12px; bottom: 12px;
    left: 50%; transform: translateX(-50%); width: min(1320px, calc(100% - 24px));
    background: var(--pages-paper); border: 1px solid var(--border);
    border-radius: 28px; box-shadow: var(--shadow); pointer-events: none;
}
:root .agenda-theme.pages-theme .site-header,
:root .agenda-theme.pages-theme .site-main,
:root .agenda-theme.pages-theme .site-footer { width: min(1240px, calc(100% - 80px)); }
:root .agenda-theme.pages-theme .site-header { min-height: 104px; padding-top: 26px; padding-bottom: 12px; }
:root .agenda-theme.pages-theme .site-main { margin-top: 20px; margin-bottom: 22px; }
:root .agenda-theme.pages-theme .site-footer { margin-top: 18px; padding: 16px 0 28px; font-size: 11px; gap: 12px; }
:root .agenda-theme.pages-theme .page-heading { margin-bottom: 26px; gap: 22px; align-items: center; }
:root .agenda-theme.pages-theme .page-heading h1 { font-size: 48px; line-height: 1.12; margin: 10px 0 8px; }
:root .agenda-theme.pages-theme .page-heading p { font-size: 13px; line-height: 1.85; margin: 0; color: var(--muted); max-width: 660px; }
:root .agenda-theme.pages-theme .eyebrow { font-size: 9px; letter-spacing: 1.8px; }
:root .agenda-theme.pages-theme .field { min-width: 0; }
:root .agenda-theme.pages-theme .field > label { font-size: 13px; margin-bottom: 8px; }
:root .agenda-theme.pages-theme :is(.field-help, .filter-intro, .form-intro) { font-size: 13px; line-height: 1.85; }
:root .agenda-theme.pages-theme :is(.button, .back-link, .text-danger) { min-height: 44px; }
:root .agenda-theme.pages-theme .back-link { font-size: 12px; }

/* Acceso, recuperación y nueva contraseña comparten el mismo cuaderno. */
:root .agenda-theme.pages-theme.layout-acceso .site-main { max-width: 1060px; margin-top: 24px; }
:root .agenda-theme.pages-theme .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); min-height: 620px; border-radius: 24px; }
:root .agenda-theme.pages-theme .auth-story {
    background-color: var(--pages-story-start); background-image: linear-gradient(150deg, var(--pages-story-start), var(--pages-story-end));
    color: var(--pages-story-ink); padding: 46px 42px 30px; min-width: 0;
}
:root .agenda-theme.pages-theme .auth-story > :not(.pages-story-decoration) { position: relative; z-index: 1; }
:root .agenda-theme.pages-theme .auth-story .eyebrow { color: var(--pages-story-detail); font-size: 9px; }
:root .agenda-theme.pages-theme .auth-story h2 { font-size: 53px; color: var(--pages-story-ink); line-height: 1.08; margin: 22px 0 18px; }
:root .agenda-theme.pages-theme .auth-story p { color: var(--pages-story-muted); font-size: 14px; line-height: 1.9; }
:root .agenda-theme.pages-theme .pages-story-decoration { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
:root .agenda-theme.pages-theme .pages-story-wave { fill: var(--pages-story-wave); opacity: .45; }
:root .agenda-theme.pages-theme .pages-story-wave-soft { fill: var(--pages-story-wave); opacity: .25; }
:root .agenda-theme.pages-theme .pages-story-halo { fill: var(--pages-story-halo); opacity: .35; }
:root .agenda-theme.pages-theme .journal-art { min-height: 230px; margin-top: 18px; }
:root .agenda-theme.pages-theme .journal-cover { top: 8px; width: 166px; height: 220px; }
:root .agenda-theme.pages-theme .story-footnote { color: var(--pages-story-muted); font-size: 11px; margin-top: 22px; }
:root .agenda-theme.pages-theme .story-line { background: var(--pages-story-detail); }
:root .agenda-theme.pages-theme .auth-card { padding: 46px 46px 40px; background: var(--surface); min-width: 0; }
:root .agenda-theme.pages-theme .auth-card h1 { font-size: 44px; line-height: 1.12; margin: 12px 0 15px; }
:root .agenda-theme.pages-theme .auth-card .form-intro { font-size: 14px; margin-bottom: 25px; }
:root .agenda-theme.pages-theme .auth-card .form-stack { gap: 18px; }
:root .agenda-theme.pages-theme .auth-card .quiet-note { margin-top: 28px; padding-top: 20px; font-size: 12px; line-height: 1.85; }
:root .agenda-theme.pages-theme .auth-card .recovery-note { margin: 20px 0 10px; }
:root .agenda-theme.pages-theme .auth-card .back-link { margin-top: 12px; }
:root .agenda-theme.pages-theme .auth-card .form-link-row a { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; }

/* Solo en claro, el cuaderno decorativo adopta los tonos tierra solicitados. */
:root[data-tema="claro"] .agenda-theme.pages-theme .journal-cover { background: linear-gradient(135deg, var(--brown-mid), var(--brown-deep)); border-color: var(--brown-mid); box-shadow: var(--shadow); color: var(--bg-card); }
:root[data-tema="claro"] .agenda-theme.pages-theme .journal-cover::after { border-color: var(--sand); }
@media (prefers-color-scheme: light) {
    :root:not([data-tema]) .agenda-theme.pages-theme .journal-cover { background: linear-gradient(135deg, var(--brown-mid), var(--brown-deep)); border-color: var(--brown-mid); box-shadow: var(--shadow); color: var(--bg-card); }
    :root:not([data-tema]) .agenda-theme.pages-theme .journal-cover::after { border-color: var(--sand); }
}

/* Calendario y filtros, con controles de la misma altura que los formularios. */
:root .agenda-theme.pages-theme .journal-browse { grid-template-columns: minmax(330px, 4fr) minmax(0, 8fr); gap: var(--pages-gap); align-items: stretch; margin-bottom: 30px; }
:root .agenda-theme.pages-theme :is(.calendar-card, .date-filter-card) { padding: 24px 26px; border-radius: var(--ui-radius-card); }
:root .agenda-theme.pages-theme .calendar-card > .eyebrow { display: block; margin-bottom: 13px; }
:root .agenda-theme.pages-theme .calendar-heading { gap: 8px; margin-bottom: 16px; }
:root .agenda-theme.pages-theme .calendar-heading h2 { font-size: 29px; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; margin: 0; }
:root .agenda-theme.pages-theme .calendar-nav { width: 44px; min-width: 44px; height: 44px; border: 0; background: transparent; color: var(--blue); border-radius: 12px; font-size: 29px; }
:root .agenda-theme.pages-theme .calendar-nav:hover { background: var(--blue-soft); }
:root .agenda-theme.pages-theme .calendar-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; margin: 0; }
:root .agenda-theme.pages-theme .calendar-table th { padding: 0 0 9px; height: 32px; font-size: 11px; font-weight: 400; }
:root .agenda-theme.pages-theme .calendar-table td { height: 47px; padding: 0; }
:root .agenda-theme.pages-theme .calendar-day { display: flex; align-items: center; justify-content: center; position: relative; width: 100%; min-height: 46px; padding: 0; border: 1px solid transparent; border-radius: 12px; font-size: 13px; background: transparent; color: var(--text); }
:root .agenda-theme.pages-theme .calendar-number { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
:root .agenda-theme.pages-theme .calendar-day:hover { background: var(--blue-soft); }
:root .agenda-theme.pages-theme .calendar-day.is-today { border-color: transparent; background: transparent; color: var(--text); }
:root .agenda-theme.pages-theme .calendar-day.is-today .calendar-number { background: var(--blue); color: var(--surface); }
:root .agenda-theme.pages-theme .calendar-day.is-filtered { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
:root .agenda-theme.pages-theme .calendar-dot { width: 5px; height: 5px; background: var(--brown); }
:root .agenda-theme.pages-theme .calendar-day .calendar-dot { position: absolute; left: calc(50% - 2.5px); bottom: 3px; }
:root .agenda-theme.pages-theme .calendar-footer { flex-wrap: wrap; gap: 10px 13px; justify-content: flex-start; margin-top: 16px; border-top: 0; padding-top: 0; font-size: 11px; }
:root .agenda-theme.pages-theme .calendar-legend { font-size: 10px; gap: 6px; color: var(--text); }
:root .agenda-theme.pages-theme .calendar-legend .calendar-dot { width: 7px; height: 7px; }
:root .agenda-theme.pages-theme .calendar-today-key { width: 14px; height: 14px; display: inline-block; border-radius: 50%; background: var(--blue); }
:root .agenda-theme.pages-theme .calendar-footer > a { margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; }
:root .agenda-theme.pages-theme .calendar-help { font-size: 11px; margin: 2px 0 0; }
:root .agenda-theme.pages-theme .date-filter-card { background: var(--pages-filter); display: flex; flex-direction: column; }
:root .agenda-theme.pages-theme .date-filter-card h2 { font-size: 38px; margin: 12px 0 14px; }
:root .agenda-theme.pages-theme .filter-intro { max-width: 510px; margin: 0 0 24px; }
:root .agenda-theme.pages-theme .date-filter-form .date-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
:root .agenda-theme.pages-theme .filter-actions { gap: 16px; }
:root .agenda-theme.pages-theme .filter-actions > a { min-height: 44px; display: inline-flex; align-items: center; }
:root .agenda-theme.pages-theme .filter-footnote { color: var(--muted); font-size: 12px; margin-top: auto; padding-top: 26px; margin-bottom: 0; }
:root .agenda-theme.pages-theme .filtered-heading { margin-bottom: 8px; gap: 16px; }
:root .agenda-theme.pages-theme .filtered-heading h2 { font-size: 36px; line-height: 1.2; }
:root .agenda-theme.pages-theme .filtered-heading > a { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; }
:root .agenda-theme.pages-theme .list-caption { font-size: 12px; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }

/* PDF: se conserva el formulario existente y su selección por página. */
:root .agenda-theme.pages-theme .pdf-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, .72fr); align-items: center; gap: 24px; padding: 23px 27px; background: var(--pages-pdf); border-left: 3px solid var(--blue); margin-bottom: 22px; }
:root .agenda-theme.pages-theme .pdf-toolbar-copy h2 { font-size: 33px; margin: 7px 0 6px; line-height: 1.15; }
:root .agenda-theme.pages-theme .pdf-toolbar-copy p { font-size: 12px; line-height: 1.85; }
:root .agenda-theme.pages-theme .pdf-toolbar-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 15px; align-items: center; }
:root .agenda-theme.pages-theme .pdf-select-all { font-size: 11px; min-height: 44px; gap: 9px; }
:root .agenda-theme.pages-theme .pdf-selection-count { font-size: 11px; color: var(--blue); white-space: nowrap; }
:root .agenda-theme.pages-theme .pdf-toolbar-actions .button { grid-column: 1 / -1; width: 100%; font-size: 12px; }
:root .agenda-theme.pages-theme .thought-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
:root .agenda-theme.pages-theme .thought-card { padding: 21px 23px 15px; border-radius: 20px; background: var(--surface); min-width: 0; display: flex; flex-direction: column; }
:root .agenda-theme.pages-theme .thought-card::before { top: 18px; bottom: 18px; width: 3px; background: var(--brown); opacity: 1; }
:root .agenda-theme.pages-theme .thought-card[data-privacidad="compartido"]::before { background: var(--blue); }
:root .agenda-theme.pages-theme .thought-card.is-selected { background: var(--pages-selected); border-color: var(--blue); box-shadow: var(--shadow); }
:root .agenda-theme.pages-theme .pdf-entry-selection { margin: 0 0 12px; padding: 0 0 9px; border-bottom: 1px solid var(--border); gap: 10px; font-size: 11px; }
:root .agenda-theme.pages-theme .thought-card-top { gap: 10px; flex-wrap: wrap; }
:root .agenda-theme.pages-theme .thought-card-top time { font-size: 11px; line-height: 1.8; }
:root .agenda-theme.pages-theme .privacy-badge { font-size: 10px; padding: 4px 8px; background: var(--surface-soft); color: var(--brown); border-left: 2px solid var(--brown); border-radius: 8px; }
:root .agenda-theme.pages-theme .privacy-badge.is-shared { background: var(--blue-soft); color: var(--blue); border-left-color: var(--blue); }
:root .agenda-theme.pages-theme .thought-card-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; margin: 13px 0 8px; align-items: start; }
:root .agenda-theme.pages-theme .thought-copy h2 { font-size: 34px; line-height: 1.15; margin: 0 0 10px; overflow-wrap: anywhere; }
:root .agenda-theme.pages-theme .thought-preview { font-size: 14px; line-height: 1.85; margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
:root .agenda-theme.pages-theme .thought-mood { width: 62px; padding: 10px 5px; font-size: 13px; border-radius: 14px; color: var(--blue); background: var(--surface-soft); }
:root .agenda-theme.pages-theme .thought-mood[data-animo="1"],
:root .agenda-theme.pages-theme .thought-mood[data-animo="2"],
:root .agenda-theme.pages-theme .thought-mood[data-animo="3"] { background: var(--lavender); }
:root .agenda-theme.pages-theme .thought-mood[data-animo="4"],
:root .agenda-theme.pages-theme .thought-mood[data-animo="5"],
:root .agenda-theme.pages-theme .thought-mood[data-animo="6"] { background: var(--sand); }
:root .agenda-theme.pages-theme .thought-mood[data-animo="7"],
:root .agenda-theme.pages-theme .thought-mood[data-animo="8"],
:root .agenda-theme.pages-theme .thought-mood[data-animo="9"],
:root .agenda-theme.pages-theme .thought-mood[data-animo="10"] { background: var(--sage); }
:root .agenda-theme.pages-theme :is(.mood-face, .mood-emoji) { font-family: var(--pages-emoji-font); }
:root .agenda-theme.pages-theme .mood-face { font-size: 27px; }
:root .agenda-theme.pages-theme .mood-scale { color: var(--muted); font-size: 9px; }
:root .agenda-theme.pages-theme .thought-card-bottom { margin-top: auto; gap: 12px; padding-top: 5px; align-items: end; }
:root .agenda-theme.pages-theme .tag-list { flex-wrap: wrap; gap: 6px; min-width: 0; }
:root .agenda-theme.pages-theme .tag-chip { font-size: 10px; padding: 4px 8px; }
:root .agenda-theme.pages-theme .read-thought { flex: 0 0 auto; min-height: 44px; font-size: 12px; }
:root .agenda-theme.pages-theme .pagination { margin-top: 26px; font-size: 12px; flex-wrap: wrap; gap: 16px; }
:root .agenda-theme.pages-theme .empty-journal { padding: 44px 32px; min-height: 280px; background: var(--surface); }
:root .agenda-theme.pages-theme .empty-journal h2 { font-size: 39px; }
:root .agenda-theme.pages-theme .empty-journal p { font-size: 14px; line-height: 1.85; }

/* Escritura: hoja amplia y tres tarjetas laterales de contexto personal. */
:root .agenda-theme.pages-theme .writing-context { border-radius: 20px; background: var(--pages-context); border-left: 3px solid var(--brown); padding: 23px 27px; margin-bottom: 22px; }
:root .agenda-theme.pages-theme .writing-context p { font-size: 29px; line-height: 1.3; margin: 10px 0; }
:root .agenda-theme.pages-theme .writing-layout { grid-template-columns: minmax(0, 1fr) minmax(310px, 360px); gap: var(--pages-gap); }
:root .agenda-theme.pages-theme .writing-card { padding: 30px 32px; border-radius: 22px; }
:root .agenda-theme.pages-theme .writing-card-heading { margin-bottom: 22px; }
:root .agenda-theme.pages-theme .field.title-field input:not([type="checkbox"]):not([type="radio"]) { font-size: 32px; min-height: 60px; }
:root .agenda-theme.pages-theme .date-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
:root .agenda-theme.pages-theme .thought-field textarea { min-height: 460px; font-size: 16px; line-height: 1.95; padding: 18px 20px; background-image: repeating-linear-gradient(180deg, transparent 0, transparent calc(1.95em - 1px), var(--pages-lines) calc(1.95em - 1px), var(--pages-lines) 1.95em); }
:root .agenda-theme.pages-theme .writing-footnote { gap: 14px; font-size: 11px; line-height: 1.8; align-items: start; }
:root .agenda-theme.pages-theme .writing-footnote > span:first-child { min-width: 0; }
:root .agenda-theme.pages-theme .writing-sidebar { gap: 18px; }
:root .agenda-theme.pages-theme .writing-sidebar > .card { padding: 24px; border-radius: 20px; overflow: visible; }
:root .agenda-theme.pages-theme .writing-sidebar .mood-card { background: var(--pages-mood); }
:root .agenda-theme.pages-theme .writing-sidebar .tags-card { background: var(--pages-tags); }
:root .agenda-theme.pages-theme .writing-sidebar .sharing-card { background: var(--pages-sharing); }
:root .agenda-theme.pages-theme .mood-card legend { font-family: var(--ui-font-title); font-size: 31px; color: var(--blue); font-weight: 700; line-height: 1.2; }
:root .agenda-theme.pages-theme .mood-options { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
:root .agenda-theme.pages-theme .mood-option label { min-height: 67px; background: var(--surface); border-color: var(--border); color: var(--text); padding: 8px 3px; border-radius: 12px; }
:root .agenda-theme.pages-theme .mood-option input:checked + label { background: var(--blue); color: var(--surface); border-color: var(--blue); }
:root .agenda-theme.pages-theme .mood-option input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; box-shadow: 0 0 0 4px var(--ui-focus-ring); }
:root .agenda-theme.pages-theme .mood-emoji { font-size: 22px; }
:root .agenda-theme.pages-theme .mood-summary { font-size: 12px; margin-top: 15px; line-height: 1.7; }
:root .agenda-theme.pages-theme .tag-suggestions { border-color: var(--border); background: var(--surface); box-shadow: var(--shadow); z-index: 12; }
:root .agenda-theme.pages-theme .tag-suggestions li { min-height: 44px; font-size: 13px; }
:root .agenda-theme.pages-theme .sharing-symbol { color: var(--brown); }
:root .agenda-theme.pages-theme .sharing-card h2 { font-size: 31px; margin: 13px 0; }
:root .agenda-theme.pages-theme .sharing-option { align-items: center; font-size: 13px; line-height: 1.75; gap: 11px; }
:root .agenda-theme.pages-theme .entry-form-actions { margin-top: 22px; padding: 18px 23px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); gap: 20px; }
:root .agenda-theme.pages-theme .save-hint { font-size: 12px; line-height: 1.8; min-width: 0; }
:root .agenda-theme.pages-theme .entry-form-actions .action-buttons { gap: 12px; }

/* Lectura completa: el texto conserva espacios, saltos y contenido escapado. */
:root .agenda-theme.pages-theme .reading-toolbar { max-width: 1020px; margin: 0 auto 18px; gap: 20px; align-items: center; }
:root .agenda-theme.pages-theme .reading-toolbar .text-danger { display: inline-flex; align-items: center; font-size: 12px; }
:root .agenda-theme.pages-theme .reading-card { max-width: 1020px; padding: 40px 52px 35px; background: var(--surface); border-radius: 24px; }
:root .agenda-theme.pages-theme .reading-card::before { background: var(--brown); width: 3px; opacity: 1; top: 28px; bottom: 28px; }
:root .agenda-theme.pages-theme .reading-heading { gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
:root .agenda-theme.pages-theme .reading-card h1 { font-size: 52px; line-height: 1.15; margin: 0 0 21px; }
:root .agenda-theme.pages-theme .reading-meta { font-size: 12px; gap: 12px 24px; margin-bottom: 20px; align-items: center; }
:root .agenda-theme.pages-theme .reading-mood { background: var(--blue-soft); color: var(--blue); border-radius: 12px; padding: 9px 13px; font-size: 12px; }
:root .agenda-theme.pages-theme .reading-mood > span { font-family: var(--pages-emoji-font); }
:root .agenda-theme.pages-theme .thought-body { font-size: 16px; line-height: 2; padding-top: 27px; margin-top: 25px; border-top-color: var(--border); }
:root .agenda-theme.pages-theme .reading-footer { margin-top: 34px; color: var(--brown); font-size: 13px; }

/* Mi cuenta y confirmación de borrado: tarjetas coherentes con el cuaderno. */
:root .agenda-theme.pages-theme .account-grid { max-width: 1120px; margin: 0 auto; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: var(--pages-gap); }
:root .agenda-theme.pages-theme .profile-card { padding: 31px; background-color: var(--pages-profile-start); background-image: linear-gradient(150deg, var(--pages-profile-start), var(--pages-profile-end)); border-radius: 22px; }
:root .agenda-theme.pages-theme .profile-card h2 { font-size: 35px; line-height: 1.2; margin: 18px 0 16px; }
:root .agenda-theme.pages-theme .profile-symbol { color: var(--blue); background: var(--blue-soft); border-radius: 50%; width: 58px; height: 58px; }
:root .agenda-theme.pages-theme .profile-card dl { margin: 27px 0 24px; padding-top: 22px; }
:root .agenda-theme.pages-theme .profile-card dt { font-size: 11px; }
:root .agenda-theme.pages-theme .profile-card dd { font-size: 14px; line-height: 1.8; }
:root .agenda-theme.pages-theme .profile-card .muted { font-size: 13px; line-height: 1.85; }
:root .agenda-theme.pages-theme .password-card { padding: 32px 36px; border-radius: 22px; }
:root .agenda-theme.pages-theme .password-card h2 { font-size: 36px; margin: 0 0 12px; }
:root .agenda-theme.pages-theme .password-card .form-intro { max-width: 560px; margin-bottom: 23px; }
:root .agenda-theme.pages-theme .password-card .form-stack { gap: 18px; }
:root .agenda-theme.pages-theme .delete-card { max-width: 730px; padding: 35px 38px; border-radius: 24px; }
:root .agenda-theme.pages-theme .delete-card h1 { font-size: 45px; line-height: 1.15; margin: 14px 0; }
:root .agenda-theme.pages-theme .delete-card > p { font-size: 14px; line-height: 1.85; }
:root .agenda-theme.pages-theme .delete-preview { background: var(--surface-soft); border-left: 3px solid var(--brown); border-radius: 12px; padding: 19px 22px; margin: 23px 0; }
:root .agenda-theme.pages-theme .delete-preview h2 { font-size: 31px; margin: 8px 0 0; line-height: 1.2; overflow-wrap: anywhere; }
:root .agenda-theme.pages-theme .delete-preview time { font-size: 11px; }
:root .agenda-theme.pages-theme .delete-card .form-stack { gap: 18px; }
:root .agenda-theme.pages-theme .error-card { max-width: 730px; padding: 36px; border-radius: 24px; }
:root .agenda-theme.pages-theme .error-card h1 { font-size: 43px; }

/* Tablet: columnas equilibradas, sin comprimir los campos de escritura. */
@media (max-width: 1100px) {
    :root .agenda-theme.pages-theme .site-header,
    :root .agenda-theme.pages-theme .site-main,
    :root .agenda-theme.pages-theme .site-footer { width: calc(100% - 72px); }
    :root .agenda-theme.pages-theme .auth-story { padding: 36px 29px 28px; }
    :root .agenda-theme.pages-theme .auth-story h2 { font-size: 46px; }
    :root .agenda-theme.pages-theme .auth-card { padding: 36px 31px; }
    :root .agenda-theme.pages-theme .auth-card h1 { font-size: 40px; }
    :root .agenda-theme.pages-theme .journal-browse { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    :root .agenda-theme.pages-theme :is(.calendar-card, .date-filter-card) { padding: 22px; }
    :root .agenda-theme.pages-theme .date-filter-form .date-fields { grid-template-columns: 1fr; gap: 14px; }
    :root .agenda-theme.pages-theme .calendar-heading h2 { font-size: 26px; }
    :root .agenda-theme.pages-theme .pdf-toolbar { grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); padding: 22px; gap: 18px; }
    :root .agenda-theme.pages-theme .pdf-toolbar-copy h2 { font-size: 29px; }
    :root .agenda-theme.pages-theme .thought-card { padding: 19px 18px 12px; }
    :root .agenda-theme.pages-theme .thought-card-content { gap: 12px; }
    :root .agenda-theme.pages-theme .thought-copy h2 { font-size: 30px; }
    :root .agenda-theme.pages-theme .thought-preview { font-size: 13px; }
    :root .agenda-theme.pages-theme .writing-layout { grid-template-columns: 1fr; }
    :root .agenda-theme.pages-theme .writing-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    :root .agenda-theme.pages-theme .writing-sidebar .sharing-card { grid-column: 2; }
    :root .agenda-theme.pages-theme .writing-sidebar .mood-card { grid-column: 1; grid-row: 1 / span 2; }
    :root .agenda-theme.pages-theme .account-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
    :root .agenda-theme.pages-theme .password-card { padding: 27px; }
}

/* Móvil: controles cómodos, una columna y los mismos formularios. */
@media (max-width: 760px) {
    :root .agenda-theme.pages-theme { --pages-gap: 16px; }
    :root .agenda-theme.pages-theme::before { top: 10px; bottom: 10px; width: calc(100% - 20px); border-radius: 24px; }
    :root .agenda-theme.pages-theme .site-header,
    :root .agenda-theme.pages-theme .site-main,
    :root .agenda-theme.pages-theme .site-footer { width: calc(100% - 48px); }
    :root .agenda-theme.pages-theme .site-header { min-height: 82px; padding-top: 24px; padding-bottom: 10px; }
    :root .agenda-theme.pages-theme .site-main { margin-top: 16px; }
    :root .agenda-theme.pages-theme .site-footer { font-size: 10px; padding: 8px 0 24px; gap: 5px 13px; }
    :root .agenda-theme.pages-theme .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 23px; }
    :root .agenda-theme.pages-theme .page-heading h1 { font-size: 39px; margin: 10px 0 8px; }
    :root .agenda-theme.pages-theme .page-heading p { font-size: 12px; }
    :root .agenda-theme.pages-theme .page-heading > .button { width: 100%; }
    :root .agenda-theme.pages-theme.layout-acceso .site-main { margin-top: 14px; }
    :root .agenda-theme.pages-theme .auth-layout { grid-template-columns: 1fr; min-height: 0; border-radius: 21px; }
    :root .agenda-theme.pages-theme .auth-story { padding: 27px 23px 24px; }
    :root .agenda-theme.pages-theme .auth-story h2 { font-size: 39px; margin: 14px 0 12px; }
    :root .agenda-theme.pages-theme .auth-story p { font-size: 12px; padding-right: 18px; max-width: 290px; margin: 0; }
    :root .agenda-theme.pages-theme .auth-story .journal-art { position: absolute; right: -33px; top: 42px; width: 120px; height: 150px; min-height: 0; margin: 0; opacity: .16; z-index: 0; }
    :root .agenda-theme.pages-theme .journal-cover { width: 110px; height: 150px; left: 0; padding-top: 15px; }
    :root .agenda-theme.pages-theme .auth-story .story-footnote { display: none; }
    :root .agenda-theme.pages-theme .auth-card { padding: 29px 23px 28px; }
    :root .agenda-theme.pages-theme .auth-card h1 { font-size: 38px; }
    :root .agenda-theme.pages-theme .auth-card .form-intro { font-size: 13px; margin-bottom: 22px; }
    :root .agenda-theme.pages-theme .auth-card .quiet-note { font-size: 11px; margin-top: 24px; }
    :root .agenda-theme.pages-theme .journal-browse { grid-template-columns: 1fr; gap: 16px; }
    :root .agenda-theme.pages-theme :is(.calendar-card, .date-filter-card) { padding: 21px 17px; }
    :root .agenda-theme.pages-theme .calendar-heading h2 { font-size: 27px; }
    :root .agenda-theme.pages-theme .calendar-footer { gap: 8px 10px; }
    :root .agenda-theme.pages-theme .calendar-help { font-size: 10px; }
    :root .agenda-theme.pages-theme .date-filter-card h2 { font-size: 34px; }
    :root .agenda-theme.pages-theme .filter-intro { font-size: 12px; margin-bottom: 20px; }
    :root .agenda-theme.pages-theme .filter-actions { align-items: stretch; flex-direction: column; gap: 10px; }
    :root .agenda-theme.pages-theme .filter-actions .button { width: 100%; font-size: 12px; }
    :root .agenda-theme.pages-theme .filter-footnote { font-size: 11px; padding-top: 19px; }
    :root .agenda-theme.pages-theme .filtered-heading h2 { font-size: 32px; }
    :root .agenda-theme.pages-theme .list-caption { font-size: 11px; }
    :root .agenda-theme.pages-theme .pdf-toolbar { grid-template-columns: 1fr; gap: 17px; padding: 20px 18px; }
    :root .agenda-theme.pages-theme .pdf-toolbar-copy h2 { font-size: 29px; }
    :root .agenda-theme.pages-theme .pdf-toolbar-actions { gap: 8px 10px; }
    :root .agenda-theme.pages-theme .pdf-select-all { font-size: 10px; }
    :root .agenda-theme.pages-theme .pdf-selection-count { font-size: 10px; }
    :root .agenda-theme.pages-theme .pdf-toolbar-actions .button { font-size: 11px; padding: 12px 11px; gap: 8px; }
    :root .agenda-theme.pages-theme .thought-list { grid-template-columns: 1fr; gap: 16px; }
    :root .agenda-theme.pages-theme .thought-card { padding: 17px 18px 11px; }
    :root .agenda-theme.pages-theme .thought-card-top time { font-size: 10px; }
    :root .agenda-theme.pages-theme .privacy-badge { font-size: 9px; }
    :root .agenda-theme.pages-theme .thought-copy h2 { font-size: 31px; }
    :root .agenda-theme.pages-theme .thought-preview { font-size: 13px; -webkit-line-clamp: 3; }
    :root .agenda-theme.pages-theme .thought-mood { width: 52px; padding: 8px 4px; font-size: 12px; }
    :root .agenda-theme.pages-theme .mood-face { font-size: 24px; }
    :root .agenda-theme.pages-theme .tag-chip { font-size: 9px; }
    :root .agenda-theme.pages-theme .empty-journal { padding: 31px 23px; }
    :root .agenda-theme.pages-theme .empty-journal h2 { font-size: 34px; }
    :root .agenda-theme.pages-theme .empty-journal p { font-size: 13px; }
    :root .agenda-theme.pages-theme .writing-context { padding: 20px; }
    :root .agenda-theme.pages-theme .writing-context p { font-size: 26px; }
    :root .agenda-theme.pages-theme .writing-card { padding: 24px 19px; }
    :root .agenda-theme.pages-theme .field.title-field input:not([type="checkbox"]):not([type="radio"]) { font-size: 29px; min-height: 58px; }
    :root .agenda-theme.pages-theme .date-fields { gap: 12px; }
    :root .agenda-theme.pages-theme .thought-field textarea { min-height: 350px; padding: 16px 15px; font-size: 16px; }
    :root .agenda-theme.pages-theme .writing-sidebar { grid-template-columns: 1fr; gap: 16px; }
    :root .agenda-theme.pages-theme .writing-sidebar :is(.mood-card, .sharing-card) { grid-column: 1; grid-row: auto; }
    :root .agenda-theme.pages-theme .writing-sidebar > .card { padding: 22px; }
    :root .agenda-theme.pages-theme .writing-footnote { font-size: 10px; }
    :root .agenda-theme.pages-theme .entry-form-actions { flex-direction: column; align-items: stretch; padding: 18px; gap: 14px; }
    :root .agenda-theme.pages-theme .save-hint { font-size: 11px; }
    :root .agenda-theme.pages-theme .entry-form-actions .action-buttons { width: 100%; justify-content: stretch; }
    :root .agenda-theme.pages-theme .entry-form-actions .button { flex: 1; font-size: 11px; padding: 12px 10px; }
    :root .agenda-theme.pages-theme .reading-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
    :root .agenda-theme.pages-theme .reading-toolbar .action-buttons { justify-content: flex-end; }
    :root .agenda-theme.pages-theme .reading-card { padding: 27px 22px; border-radius: 22px; }
    :root .agenda-theme.pages-theme .reading-heading { margin-bottom: 21px; }
    :root .agenda-theme.pages-theme .reading-card h1 { font-size: 40px; }
    :root .agenda-theme.pages-theme .reading-meta { align-items: flex-start; flex-direction: column; font-size: 11px; }
    :root .agenda-theme.pages-theme .reading-mood { font-size: 11px; }
    :root .agenda-theme.pages-theme .thought-body { font-size: 15px; line-height: 2; padding-top: 23px; margin-top: 21px; }
    :root .agenda-theme.pages-theme .account-grid { grid-template-columns: 1fr; }
    :root .agenda-theme.pages-theme .profile-card { padding: 25px; }
    :root .agenda-theme.pages-theme .profile-card .profile-symbol { float: none; margin: 0; }
    :root .agenda-theme.pages-theme .profile-card h2 { font-size: 33px; margin-top: 17px; }
    :root .agenda-theme.pages-theme .password-card { padding: 26px 22px; }
    :root .agenda-theme.pages-theme .password-card h2 { font-size: 33px; }
    :root .agenda-theme.pages-theme .password-card .button { width: 100%; }
    :root .agenda-theme.pages-theme .delete-card { padding: 28px 22px; }
    :root .agenda-theme.pages-theme .delete-card h1 { font-size: 38px; }
    :root .agenda-theme.pages-theme .delete-card > p { font-size: 13px; }
    :root .agenda-theme.pages-theme .delete-card .action-buttons { gap: 10px; }
    :root .agenda-theme.pages-theme .delete-card .button { font-size: 11px; padding: 12px 10px; }
}
@media (max-width: 370px) {
    :root .agenda-theme.pages-theme .site-header,
    :root .agenda-theme.pages-theme .site-main,
    :root .agenda-theme.pages-theme .site-footer { width: calc(100% - 40px); }
    :root .agenda-theme.pages-theme .auth-card { padding: 28px 20px; }
    :root .agenda-theme.pages-theme .auth-card h1 { font-size: 35px; }
    :root .agenda-theme.pages-theme .calendar-heading h2 { font-size: 25px; }
    :root .agenda-theme.pages-theme .pdf-toolbar-actions { grid-template-columns: 1fr; }
    :root .agenda-theme.pages-theme .pdf-selection-count { min-height: 24px; }
    :root .agenda-theme.pages-theme .mood-options { gap: 6px; }
    :root .agenda-theme.pages-theme .mood-emoji { font-size: 21px; }
}
@media print {
    :root .agenda-theme.pages-theme::before { display: none; }
    :root .agenda-theme.pages-theme .site-main { width: 100%; margin: 0; }
    :root .agenda-theme.pages-theme :is(.reading-card, .thought-card) { box-shadow: none; }
    :root .agenda-theme.pages-theme .thought-list { display: block; }
    :root .agenda-theme.pages-theme .thought-card { break-inside: avoid; margin-bottom: 18px; }
    :root .agenda-theme.pages-theme .thought-body { color: var(--text); }
}
