/* DASHBOARD MEJORADO */
.dashboard-header {
    margin-bottom: 2rem;
    text-align: left;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    right: -22px;
    top: -28px;
    width: clamp(180px, 23vw, 290px);
    aspect-ratio: 1 / 1;
    background: url('/static/img/psicovolucion-logo-main-v2.png') center / cover no-repeat;
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.dashboard-header > * {
    position: relative;
    z-index: 1;
}

.dashboard-brand-mark {
    margin-bottom: 0.45rem;
}

.dashboard-logo-decor {
    display: block;
    width: clamp(88px, 12vw, 122px);
    max-height: 122px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    background: transparent;
    padding: 0;
    opacity: 0.34;
    filter: drop-shadow(0 3px 8px rgba(58, 111, 93, 0.08));
}
.dashboard-greeting {
    font-size: 2.2rem;
    font-weight: 700;
    color: #3a6f5d;
    margin-bottom: 0.2em;
}
.dashboard-welcome {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5em;
}
.dashboard-quick-access {
    margin-bottom: 2.5rem;
}
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.quick-access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f8f6;
    border-radius: 12px;
    padding: 1.2em 0.5em;
    font-size: 1.1rem;
    color: #3a6f5d;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px #0001;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    border: 2px solid transparent;
}
.quick-access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f8f6;
    border-radius: 12px;
    padding: 1.2em 0.5em;
    font-size: 1.1rem;
    font-weight: 500;
    color: #3a6f5d;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(60, 111, 93, 0.06);
    gap: 0.3em;
}

.quick-access-btn span {
    font-size: 0.92em;
    font-weight: 400;
    margin-top: 0.2em;
    color: #3a6f5d;
    opacity: 0.85;
}
.progress-bar-container {
    margin: 1.2em 0 0.7em 0;
}
.progress-bar-bg {
    width: 100%;
    height: 18px;
    background: #e0e7e3;
    border-radius: 9px;
    overflow: hidden;
    margin-bottom: 0.3em;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3a6f5d 60%, #a0c4a8 100%);
    width: 0%;
    border-radius: 9px;
    transition: width 0.7s cubic-bezier(.4,1.4,.6,1);
}
.progress-bar-label {
    font-size: 1rem;
    color: #3a6f5d;
    font-weight: 500;
}
.progress-extra {
    display: flex;
    gap: 2em;
    font-size: 1rem;
    color: #555;
    margin-top: 0.5em;
}
@media (max-width: 700px) {
    .dashboard-header, .dashboard-quick-access, .dashboard-progress-summary {
        padding-left: 0.2em;
        padding-right: 0.2em;
    }
    .dashboard-logo-decor {
        margin: 0 auto;
        width: min(24vw, 94px);
        max-height: 94px;
        opacity: 0.3;
    }
    .dashboard-header::after {
        right: -30px;
        top: -20px;
        width: min(44vw, 190px);
        opacity: 0.07;
    }
    .quick-access-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 0.6rem;
    }
    .dashboard-greeting {
        font-size: 1.3rem;
    }
}
.delete-btn-visible {
    background: #ff3b3b;
    color: #fff;
    border: 2px solid #b30000;
    font-weight: bold;
    margin-left: 12px;
    padding: 8px 22px;
    border-radius: 8px;
    font-size: 1.15rem;
    box-shadow: 0 2px 12px rgba(255, 59, 59, 0.25);
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
    animation: pulseDeleteBtn 1.2s infinite;
}
@keyframes pulseDeleteBtn {
    0% { box-shadow: 0 2px 12px rgba(255, 59, 59, 0.25); }
    50% { box-shadow: 0 2px 24px rgba(255, 59, 59, 0.45); transform: scale(1.07); }
    100% { box-shadow: 0 2px 12px rgba(255, 59, 59, 0.25); }
}
.delete-btn-visible:hover {
    background: #b30000;
    color: #fff;
    transform: scale(1.12);
}
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@500;700&family=Manrope:wght@500;700&family=Merriweather:wght@400;700&family=Nunito:wght@600;700&display=swap');

/* Reset básico */
html {
    font-size: clamp(16px, 0.35vw + 14.8px, 18px);
    -webkit-text-size-adjust: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilo general */
body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #f3f7f4, #e1f0ea);
    color: #2f4f4f;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Contenedor principal */
.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Título */
h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #3a6f5d;
}

.brand-logo {
    display: block;
    width: clamp(96px, 32vw, 150px);
    max-height: 150px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    background: transparent;
    padding: 0;
    margin: 0 auto 10px;
}

.brand-tagline {
    margin: 0 0 14px;
    font-size: 0.95rem;
    color: #4f7264;
    font-weight: 600;
}

.site-brand-title {
    margin-bottom: 6px;
}

.site-brand-link {
    display: inline-flex;
    align-items: center;
}

.site-brand-logo {
    width: clamp(64px, 12vw, 88px);
    max-height: 88px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    background: transparent;
    padding: 0;
}

/* Texto */
p {
    font-size: 1rem;
    margin-bottom: 25px;
    color: #5f7f73;
}

/* Mensajes UX */
.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.daily-support-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px solid #d2e7dc;
    background: linear-gradient(135deg, #f3fbf7 0%, #e8f5ef 100%);
}

.daily-support-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.daily-support-banner p {
    margin: 0;
    font-size: 0.92rem;
    color: #3c6557;
    font-weight: 600;
}

/* Elementos de formulario */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3a6f5d;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.upload-preview {
    margin-bottom: 12px;
    text-align: left;
}

.upload-preview p {
    margin-bottom: 8px;
    color: #4e6f63;
    font-size: 0.92rem;
}

.preview-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #dcebe4;
}

.avatar-preview-image {
    max-width: 180px;
    max-height: 180px;
    border-radius: 999px;
}

.avatar-crop-stage {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid #dcebe4;
    position: relative;
    background: #f4faf7;
    cursor: grab;
    touch-action: none;
}

.avatar-crop-stage.dragging {
    cursor: grabbing;
}

.avatar-crop-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    -webkit-user-drag: none;
}

.avatar-crop-overlay {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    pointer-events: none;
    box-shadow: inset 0 0 0 2px rgba(58, 111, 93, 0.75);
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0) 62%, rgba(35, 61, 51, 0.18) 100%);
}

.crop-controls {
    margin-top: 10px;
    text-align: left;
}

.crop-controls label {
    display: block;
    margin-bottom: 6px;
    color: #44685a;
    font-size: 0.9rem;
}

.crop-controls input[type="range"] {
    width: 100%;
    margin-bottom: 6px;
}

.reset-crop-btn {
    margin-bottom: 6px;
}

.crop-action-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.app-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    min-width: 240px;
    max-width: 360px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.app-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.app-toast-text {
    flex: 1;
}

.app-toast-close {
    width: auto;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    line-height: 1;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    font-size: 0.9rem;
}

.app-toast-close:hover {
    background: rgba(0, 0, 0, 0.18);
}

.app-toast-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.app-toast.success {
    background: #e7f6ef;
    color: #2d6f5b;
}

.app-toast.error {
    background: #fdecea;
    color: #b23b3b;
}

.app-toast.info {
    background: #eef4fe;
    color: #315f98;
}

.crop-controls small {
    color: #5f7f73;
}

.toast-pref-row {
    text-align: left;
    margin-bottom: 12px;
}

.toast-pref-row label {
    display: block;
    margin-bottom: 6px;
    color: #44685a;
    font-size: 0.9rem;
}

.drop-zone {
    border: 2px dashed #b9d8ca;
    background: #f7fcf9;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
    background: #edf8f2;
    border-color: #3a6f5d;
}

.drop-zone p {
    margin-bottom: 4px;
}

.drop-zone small {
    display: block;
    color: #5a7f70;
}

.drop-zone .paste-hint {
    margin-top: 4px;
    font-size: 0.82rem;
    opacity: 0.9;
}

.drop-zone input[type="file"] {
    display: none;
}

button {
    width: 100%;
    padding: 12px;
    background-color: #3a6f5d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2e5c4c;
}

button:disabled {
    background-color: #a8b8b0;
    color: #f0f4f2;
    cursor: not-allowed;
    opacity: 0.65;
}

button:disabled:hover {
    background-color: #a8b8b0;
}

a {
    color: #3a6f5d;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout para auth page */
.auth-forms {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
}

.form-section {
    flex: 1 1 260px;
    max-width: 320px;
}

/* Ajustes del contenedor cuando usamos auth page */
.auth-container {
    max-width: 760px;
}

/* navegación interna del dashboard */
.dashboard-nav {
    margin: 20px 0;
    font-size: 1rem;
}
.dashboard-nav a {
    color: #3a6f5d;
    margin: 0 8px;
}
.dashboard-nav a:hover {
    text-decoration: underline;
}

body.dashboard-page {
    display: block;
    min-height: 100vh;
    padding: 28px;
}

.dashboard-shell {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.dashboard-hero,
.dashboard-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    padding: 22px;
}

.dashboard-hero h1 {
    margin-bottom: 8px;
}

.dashboard-hero p {
    margin-bottom: 0;
}

.dashboard-support-subtitle {
    margin-top: 10px;
    color: #4a6f61;
    font-size: 0.96rem;
}

.dashboard-panels {
    display: grid;
    gap: 18px;
    grid-template-columns: 1.35fr 1fr;
}

.dashboard-card h2 {
    color: #3a6f5d;
    margin-bottom: 10px;
}

.dashboard-card p {
    margin-bottom: 12px;
}

.support-community-card {
    border: 1px solid #dbece4;
    background: linear-gradient(135deg, #f6fcf9 0%, #eef7f2 100%);
}

.dashboard-grid-nav {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-grid-nav a {
    background: #f4faf7;
    border: 1px solid #dbece4;
    border-radius: 10px;
    padding: 10px 12px;
    color: #3a6f5d;
    text-decoration: none;
    transition: all 0.18s ease;
}

.dashboard-grid-nav a:hover {
    border-color: #3a6f5d;
    background: #ecf6f1;
    text-decoration: none;
}

.dashboard-chart-wrap {
    background: #fbfefd;
    border: 1px solid #dbece4;
    border-radius: 12px;
    padding: 10px;
}

.dashboard-chart-wrap canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 320px;
}

.motivation-wall {
    border: 1px solid #dbece4;
    background:
        radial-gradient(circle at 12% 12%, #f3fff9 0%, transparent 32%),
        radial-gradient(circle at 85% 6%, #fff8ed 0%, transparent 27%),
        linear-gradient(140deg, #f8fdfb 0%, #eef8f3 100%);
}

.motivation-wall-head {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.motivation-wall-head h2 {
    margin: 0;
}

.motivation-wall-head p {
    margin: 0;
    color: #53776a;
}

.motivation-wall-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.motivation-chip {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
    letter-spacing: 0.01em;
}

.motivation-chip.chip-self {
    background: #fff2f7;
    border-color: #f1ccda;
    color: #8d4564;
    font-family: 'Nunito', 'Segoe UI', sans-serif;
}

.motivation-chip.chip-strength {
    background: #fff5eb;
    border-color: #efd4b4;
    color: #8a5a2e;
    font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.motivation-chip.chip-calm {
    background: #eef9ff;
    border-color: #c8e2f0;
    color: #386d8a;
    font-family: 'Merriweather', Georgia, serif;
}

.motivation-chip.chip-hope {
    background: #effaf2;
    border-color: #cfe8d6;
    color: #3f7654;
    font-family: 'Comfortaa', 'Segoe UI', sans-serif;
}

.motivation-wall-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.motivation-wall-actions .small-btn {
    border: 1px solid #cfe4da;
    background: #ffffff;
    color: #2e5d4c;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

.motivation-wall-actions .small-btn:hover {
    border-color: #2f6a57;
    background: #f2fbf6;
}

.motivation-wall.soft-mode {
    background:
        radial-gradient(circle at 12% 12%, #f8fcfa 0%, transparent 32%),
        radial-gradient(circle at 85% 6%, #fcfaf5 0%, transparent 27%),
        linear-gradient(140deg, #fbfdfc 0%, #f3f8f5 100%);
}

.motivation-wall.soft-mode .motivation-note {
    animation: none;
    box-shadow: 0 3px 9px rgba(21, 56, 42, 0.06);
    filter: saturate(0.78);
}

.motivation-wall.soft-mode .motivation-note-badge {
    opacity: 0.9;
}

.motivation-wall-grid {
    columns: 3 220px;
    column-gap: 12px;
}

.motivation-note {
    break-inside: avoid;
    margin: 0 0 12px;
    border-radius: 14px;
    border: 1px solid #d6eadf;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 6px 14px rgba(21, 56, 42, 0.08);
    display: grid;
    gap: 10px;
    animation: motivation-rise 0.45s ease both;
}

.motivation-note-text {
    margin: 0;
    color: #2f5f4f;
    font-size: 0.94rem;
    line-height: 1.5;
}

.motivation-note-badge {
    justify-self: start;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #d7ebdf;
    background: #f3fbf7;
    color: #4d7567;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.motivation-note.is-self {
    background: linear-gradient(160deg, #fff8fb 0%, #ffffff 80%);
    border-color: #f0dce5;
}

.motivation-note.is-self .motivation-note-text {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    font-weight: 700;
}

.motivation-note.is-strength {
    background: linear-gradient(160deg, #fffaf3 0%, #ffffff 80%);
    border-color: #efdec8;
}

.motivation-note.is-strength .motivation-note-text {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.motivation-note.is-calm {
    background: linear-gradient(160deg, #f6fcff 0%, #ffffff 80%);
    border-color: #d2e6f2;
}

.motivation-note.is-calm .motivation-note-text {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.96rem;
    line-height: 1.58;
}

.motivation-note.is-hope {
    background: linear-gradient(160deg, #f7fff9 0%, #ffffff 80%);
    border-color: #d7ebdf;
}

.motivation-note.is-hope .motivation-note-text {
    font-family: 'Comfortaa', 'Segoe UI', sans-serif;
    font-weight: 700;
}

.motivation-note.is-self .motivation-note-badge {
    background: #fff0f6;
    border-color: #f0d4df;
    color: #8a4561;
}

.motivation-note.is-strength .motivation-note-badge {
    background: #fff4e8;
    border-color: #edd3b3;
    color: #86582c;
}

.motivation-note.is-calm .motivation-note-badge {
    background: #edf7fd;
    border-color: #c8dfed;
    color: #396a86;
}

.motivation-note.is-hope .motivation-note-badge {
    background: #eff9f2;
    border-color: #cce4d5;
    color: #3e7553;
}

@keyframes motivation-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    body.dashboard-page {
        padding: 16px;
    }

    .dashboard-panels {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .dashboard-grid-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .motivation-wall-grid {
        columns: 2 200px;
    }

    .motivation-note-text {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .motivation-note-badge {
        font-size: 0.71rem;
    }
}

@media (max-width: 560px) {
    body.dashboard-page {
        padding: 12px;
    }

    .dashboard-hero,
    .dashboard-card {
        padding: 16px;
        border-radius: 12px;
    }

    .dashboard-grid-nav {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .dashboard-grid-nav a {
        padding: 12px;
    }

    .motivation-wall-grid {
        columns: 1;
    }

    .motivation-note {
        margin-bottom: 10px;
        padding: 12px 11px;
        gap: 8px;
        border-radius: 12px;
    }

    .motivation-note-text {
        font-size: 0.91rem;
        line-height: 1.52;
    }

    .motivation-note-badge {
        font-size: 0.69rem;
        padding: 4px 7px;
    }

    .motivation-note.is-calm .motivation-note-text {
        font-size: 0.93rem;
        line-height: 1.6;
    }

    .motivation-note.is-strength .motivation-note-text,
    .motivation-note.is-hope .motivation-note-text,
    .motivation-note.is-self .motivation-note-text {
        letter-spacing: 0;
    }
}

.message.success {
    background-color: #e6f7f1;
    color: #2e7d65;
}

.message.error {
    background-color: #fdecea;
    color: #b23b3b;
}

.habits-list {
    list-style: none;
    margin: 18px 0;
    text-align: left;
}

.habit-item {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.habit-item.done span {
    text-decoration: line-through;
    opacity: 0.75;
}

.habit-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.habit-actions {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.habit-actions input[type="text"] {
    margin-bottom: 8px;
}

.small-btn {
    width: auto;
    padding: 6px 10px;
    font-size: 0.9rem;
}

.small-btn.danger {
    background-color: #b23b3b;
}

.small-btn.danger:hover {
    background-color: #922f2f;
}

/* Estilos para hábitos por categoría */
.habits-category-block {
    margin-bottom: 20px;
}

.category-title {
    font-size: 1.1rem;
    color: #3a6f5d;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dcebe4;
    font-weight: bold;
}

/* Grid de sugerencias */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.suggestion-card {
    background: #f8fbf9;
    border: 1px solid #dcebe4;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.suggestion-card:hover {
    border-color: #3a6f5d;
    box-shadow: 0 4px 12px rgba(58, 111, 93, 0.15);
    background: #fff;
}

.suggestion-emoji {
    font-size: 2rem;
    margin-bottom: 8px;
}

.suggestion-content {
    margin-bottom: 10px;
}

.suggestion-content strong {
    display: block;
    color: #2f4f4f;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.suggestion-content small {
    color: #5f7f73;
    font-size: 0.8rem;
    line-height: 1.3;
}

.habit-name {
    display: block;
    color: #2f4f4f;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.habit-date {
    display: block;
    color: #6f8f80;
    font-size: 0.8rem;
}

body.community-page {
    display: block;
    min-height: 100vh;
    padding: 24px;
}

.community-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 20px;
}

.community-sidebar {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.community-sidebar h2 {
    color: #3a6f5d;
    margin-bottom: 8px;
    min-height: 112px;
    position: relative;
    text-indent: -9999px;
    overflow: hidden;
    white-space: nowrap;
}

.community-sidebar h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: url('/static/img/psicovolucion-logo-main-v2.png') center / cover no-repeat;
}

.community-sidebar p {
    margin-bottom: 16px;
}

.community-sidebar nav {
    display: grid;
    gap: 10px;
}

.community-sidebar nav a {
    background: #f4faf7;
    border: 1px solid #dbece4;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

.community-sidebar nav a.active {
    background: #3a6f5d;
    color: #ffffff;
}

.community-main {
    display: grid;
    gap: 18px;
}

/* Keep community composer and stored posts at exactly the same content width. */
body.community-page .community-main > .daily-support-banner,
body.community-page .community-main > #community-composer,
body.community-page .community-main > .community-thread-feed,
body.community-page .community-main > .empty-feed {
    width: 100%;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Legacy thread-wide sizing rules intentionally disabled to keep original layout. */

.post-creator,
.post-card,
.empty-feed {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.community-feed-shell {
    display: grid;
    gap: 14px;
}

.community-feed-shell .post-card {
    margin: 0;
}

.community-feed-shell.community-gallery .community-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.community-feed-shell.community-gallery .post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.community-feed-shell.community-gallery .post-card,
.profile-feed-gallery .post-card {
    border: 1px solid #e4ece8;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.community-feed-shell.community-gallery .post-image {
    aspect-ratio: 1 / 1;
    max-height: none;
}

.community-thread-feed {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.community-thread-feed.community-gallery .community-posts-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: none;
    margin: 0 auto;
    gap: 0;
}

.community-thread-feed .community-thread-card {
    background: #ffffff;
    border: 1px solid #e4ece8;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
}

.community-thread-feed .community-thread-card:last-child {
    margin-bottom: 0;
}

.thread-header {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.thread-author-block {
    flex: 1;
    min-width: 0;
}

.thread-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.thread-date-desktop {
    white-space: nowrap;
}

.thread-date-mobile {
    display: none;
    color: #6b867b;
    font-size: 0.8rem;
    font-weight: 600;
}

.author-action-row .thread-icon-btn {
    min-width: 40px;
    padding-left: 10px;
    padding-right: 10px;
}

.community-thread-feed .post-content {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.community-thread-feed .post-image {
    border-radius: 14px;
    margin-bottom: 12px;
}

.community-thread-feed .post-actions {
    background: transparent;
    border: none;
    padding: 2px 0;
    margin-bottom: 8px;
}

.community-thread-feed .comment-form {
    margin-bottom: 10px;
}

.community-thread-feed .thread-reply-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.community-thread-feed .thread-reply-input {
    min-height: 40px;
    max-height: 110px;
    border-radius: 999px;
    border: 1px solid #dce9e3;
    background: #fbfdfc;
    padding: 8px 14px;
    font-size: 0.92rem;
    line-height: 1.35;
    resize: vertical;
    overflow: auto;
}

.community-thread-feed .thread-reply-input::placeholder {
    color: #6b867b;
}

.community-thread-feed .thread-reply-input:focus {
    border-color: #95bcab;
    box-shadow: 0 0 0 3px rgba(143, 184, 169, 0.18);
}

.community-thread-feed .thread-reply-submit {
    min-width: 40px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    padding: 0;
    font-size: 0.94rem;
}

.community-comment-list {
    gap: 10px;
}

.community-comment-list .comment-item {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #ecf2ef;
    border-radius: 12px;
    padding: 10px;
}

.community-comment-list .comment-item.is-collapsed {
    display: none;
}

.community-thread-card.comments-expanded .community-comment-list .comment-item.is-collapsed {
    display: grid;
}

.comment-author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2f4f4f;
    background: #e7f2ec;
    border: 1px solid #d4e5dd;
}

.comment-content-block {
    min-width: 0;
}

.community-thread-feed .comment-main-row {
    display: grid;
    gap: 2px;
    margin-bottom: 7px;
}

.community-thread-feed .comment-main-row span {
    color: #3f5d52;
    line-height: 1.45;
    word-break: break-word;
}

.community-thread-feed .comment-meta-row {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 0;
}

.thread-icon-btn {
    min-width: 40px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.95rem;
}

.community-thread-feed .support-btn {
    min-width: 42px;
}

.community-thread-feed .engagement-pill {
    background: #f7fbf9;
    border-color: #e4eeea;
    font-size: 0.8rem;
}

.comment-expand-btn {
    margin-top: 8px;
    border-radius: 999px;
    background: #f4faf7;
    border: 1px solid #dcebe4;
    color: #2f5f4f;
    font-weight: 700;
}

.comment-expand-btn:hover {
    background: #ebf6f1;
}

.mobile-thread-composer {
    display: none;
}

.mobile-thread-compose-btn {
    text-decoration: none;
}

.creator-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.post-header small {
    color: #6b867b;
    font-size: 0.82rem;
    font-weight: 600;
}

.mood-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e9f5ef;
    color: #2f4f4f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.post-content {
    text-align: left;
    margin-bottom: 12px;
    color: #2f4f4f;
    line-height: 1.55;
    font-size: 0.96rem;
}

.post-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
    max-height: 420px;
    object-fit: cover;
    border: 1px solid #e5e5e5;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid #e6eeea;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdfc 0%, #f5faf8 100%);
    flex-wrap: wrap;
}

.support-action-form {
    margin: 0;
}

.support-btn {
    min-width: 116px;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.engagement-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #d6e6df;
    background: #ffffff;
    color: #4b675c;
    font-size: 0.82rem;
    font-weight: 700;
}

.author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.author-row a {
    color: #2f4f4f;
    text-decoration: none;
    font-size: 0.94rem;
}

.author-row a:hover {
    text-decoration: underline;
}

.avatar-zoom-chip {
    margin-left: 2px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 0.72rem;
    border: 1px solid #dbece4;
    background: #f4faf7;
}

.avatar-zoom-chip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 8px);
    background: rgba(30, 48, 41, 0.95);
    color: #ffffff;
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    z-index: 20;
}

.avatar-zoom-chip:hover::after,
.avatar-zoom-chip:focus-visible::after {
    opacity: 1;
}

.avatar-zoom-chip.is-enabled {
    border-color: #bfdccd;
    background: #e9f6ef;
}

.avatar-zoom-chip.is-disabled {
    border-color: #d6e3dc;
    background: #f5f8f6;
}

.avatar-mini,
.avatar-large {
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #dcebe4;
}

.avatar-mini {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

.avatar-large {
    width: 72px;
    height: 72px;
}

.avatar-ig-frame {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #c8ded3;
}

.avatar-zoomable {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avatar-zoomable:hover {
    transform: scale(1.04);
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #98c4b0;
}

.avatar-zoom-locked {
    cursor: default;
}

.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #2f4f4f;
    background: #e8f3ee;
}

.profile-feed-gallery .profile-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.profile-feed-gallery .post-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profile-feed-gallery .post-header {
    margin-bottom: 6px;
}

.profile-feed-gallery .post-content {
    margin-bottom: 8px;
}

.profile-feed-gallery .post-image {
    aspect-ratio: 1 / 1;
    max-height: none;
}

.small-btn.liked {
    background-color: #2e7d65;
}

.comment-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-form input[type="text"] {
    margin-bottom: 0;
    border-radius: 10px;
    border: 1px solid #d8e7df;
    background: #fbfdfc;
}

.comment-form input[type="text"]:focus {
    border-color: #9bc1b0;
    box-shadow: 0 0 0 3px rgba(143, 184, 169, 0.2);
}

.comment-thread {
    margin-top: 8px;
}

.comment-thread-title {
    margin-bottom: 8px;
    color: #3f6055;
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.comment-list {
    list-style: none;
    margin-top: 0;
    text-align: left;
    display: grid;
    gap: 8px;
}

.comment-list li {
    background: #f8fbf9;
    border: 1px solid #e2ece7;
    border-radius: 10px;
    padding: 10px;
    font-size: 0.95rem;
}

.comment-main-row {
    display: grid;
    gap: 2px;
    margin-bottom: 8px;
}

.comment-main-row a {
    color: #2e5145;
    text-decoration: none;
    width: fit-content;
}

.comment-main-row a:hover {
    text-decoration: underline;
}

.comment-main-row span {
    color: #425f54;
    line-height: 1.45;
}

.comment-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.comment-meta-row small {
    color: #648175;
    font-weight: 600;
}

.community-welcome-note {
    background: #f4faf7;
    border: 1px solid #dbece4;
    border-left: 4px solid #8fb8a9;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.community-welcome-note p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.community-care-note {
    background: #fff8ef;
    border: 1px solid #f0d8b8;
    border-left: 4px solid #e2a35e;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.community-care-note p {
    margin-bottom: 8px;
    color: #6f5a43;
    font-size: 0.92rem;
}

.community-care-note a {
    font-weight: 700;
}

.mood-private-note {
    background: #eff8f3;
    border: 1px solid #d6e9df;
    border-left: 4px solid #8fb8a9;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.mood-private-note p {
    margin: 0;
    font-size: 0.9rem;
    color: #4a6f61;
}

.mood-diary-list {
    display: grid;
    gap: 10px;
}

.mood-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.mood-insight-card {
    background: #ffffff;
    border: 1px solid #deebe4;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.mood-insight-card h3 {
    margin-bottom: 8px;
    color: #345f50;
    font-size: 0.98rem;
}

.mood-insight-card p {
    margin-bottom: 8px;
    color: #42675a;
    font-size: 0.92rem;
    line-height: 1.5;
}

.mood-insight-card small {
    color: #5f7f73;
    font-size: 0.82rem;
}

.mood-insight-focus {
    border-left: 4px solid #8fb8a9;
    background: #f6fbf8;
}

.mood-ranking-card {
    border-left: 4px solid #d9c28a;
    background: #fffcf3;
}

.mood-ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.mood-ranking-list li {
    background: #fff;
    border: 1px solid #efe3c7;
    border-radius: 8px;
    padding: 0;
}

.mood-ranking-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    text-decoration: none;
}

.mood-ranking-link:hover {
    background: #fff6dd;
    text-decoration: none;
}

.mood-ranking-list li strong {
    color: #5f4d2a;
    font-size: 0.9rem;
}

.mood-ranking-list li span {
    color: #7b6b46;
    font-size: 0.82rem;
}

.mood-insight-action {
    border-left: 4px solid #9bbfd0;
    background: #f5f9fc;
}

.mood-insight-action ul {
    margin: 0 0 8px 18px;
    display: grid;
    gap: 6px;
    color: #44685a;
    font-size: 0.9rem;
}

.mood-action-form {
    margin-bottom: 8px;
}

.mood-action-metrics {
    display: block;
    margin-bottom: 8px;
    color: #56796c;
}

.mood-record-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #e7cd87;
    background: #fff8df;
    color: #7f6430;
    font-size: 0.82rem;
    font-weight: 700;
}

.mood-filter-form {
    margin-bottom: 12px;
}

.mood-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px 170px auto auto;
    gap: 8px;
    align-items: center;
}

.mood-clear-filters {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f7f5;
    color: #44685a;
    border: 1px solid #d7e5de;
}

.mood-clear-filters:hover {
    text-decoration: none;
    background: #eaf3ef;
}

.mood-diary-card {
    border: 1px solid #e4ece8;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.mood-diary-text p {
    margin: 0;
    color: #2f4f4f;
    line-height: 1.55;
    white-space: pre-wrap;
}

.support-hero-card {
    border: 1px solid #dbece4;
    background: linear-gradient(135deg, #f5fcf8 0%, #edf6f1 100%);
}

.support-note-strong {
    color: #2f5f4f;
    font-weight: 700;
    margin-top: 6px;
}

.support-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.support-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #deebe4;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    padding: 16px;
}

.support-card h2 {
    font-size: 1rem;
    color: #345f50;
    margin-bottom: 8px;
}

.support-card p {
    margin-bottom: 8px;
    color: #4a6f61;
    font-size: 0.93rem;
}

.support-card ul {
    margin-left: 18px;
    color: #4a6f61;
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
}

.support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.support-links a {
    background: #edf7f2;
    border: 1px solid #cfe2d8;
    border-radius: 999px;
    padding: 6px 12px;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    color: #2f5f4f;
}

.support-links a:hover {
    background: #e4f2eb;
    text-decoration: none;
}

.author-action-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.comment-main-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: baseline;
}

.comment-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.comment-meta-row small {
    color: #5f7f73;
}

.profile-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.profile-main-info h1 {
    font-size: 1.35rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.profile-main-info p {
    margin: 6px 0;
    color: #4f7065;
    font-size: 0.95rem;
}

.profile-main-info .avatar-zoom-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    margin: 0 0 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    border: 1px solid #dbece4;
    background: #f4faf7;
}

.profile-main-info .avatar-zoom-status::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 8px);
    background: rgba(30, 48, 41, 0.95);
    color: #ffffff;
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    z-index: 20;
}

.profile-main-info .avatar-zoom-status:hover::after,
.profile-main-info .avatar-zoom-status:focus-visible::after {
    opacity: 1;
}

.profile-main-info .avatar-zoom-status.is-enabled {
    color: #2f6a55;
    border-color: #bfdccd;
    background: #e9f6ef;
}

.profile-main-info .avatar-zoom-status.is-disabled {
    color: #5f7f73;
    border-color: #d6e3dc;
    background: #f5f8f6;
}

.profile-stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: #335447;
    font-size: 0.95rem;
    margin-top: 8px;
}

.profile-form,
.follow-form {
    margin-top: 8px;
}

.profile-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.92rem;
    color: #44685a;
}

.profile-option-row input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.section-title {
    margin-bottom: 10px;
    color: #335447;
    font-size: 1.08rem;
    letter-spacing: -0.01em;
}

.messages-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 14px;
}

.message-users,
.message-thread {
    background: #ffffff;
    border: 1px solid #e8efeb;
    border-radius: 14px;
    padding: 14px;
}

.message-users ul {
    list-style: none;
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.message-search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 8px;
}

.message-search-form input[type="text"] {
    margin-bottom: 0;
}

.messages-policy-note {
    margin-bottom: 10px;
    color: #5f7f73;
    font-size: 0.92rem;
}

.message-users li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    background: #f8fbf9;
    border: 1px solid #e3ece8;
}

.following-badge {
    margin-left: auto;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e6f4ed;
    border: 1px solid #bfdccd;
    color: #2f5f4f;
    font-weight: 600;
}

.message-users li.selected a {
    background: #e6f4ed;
    border-color: #bfdccd;
}

.follow-suggestions-box {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #e8efeb;
}

.follow-suggestions-box h4 {
    margin: 0 0 8px;
    color: #335447;
    font-size: 0.92rem;
}

.follow-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.follow-suggestions-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    background: #f8fbf9;
    border: 1px solid #e3ece8;
}

.suggestion-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.suggestion-user-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.suggestion-user-text span {
    font-size: 0.9rem;
    color: #335447;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-user-text small {
    color: #6f8c81;
    font-size: 0.76rem;
}

.messages-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.messages-filter-link {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f2f7f4;
    border: 1px solid #d7e5de;
    color: #44685a;
    font-size: 0.85rem;
    text-decoration: none;
}

.messages-filter-link:hover {
    text-decoration: none;
    border-color: #bfdccd;
    background: #ebf5f0;
}

.messages-filter-link.active {
    background: #e6f4ed;
    border-color: #bfdccd;
    color: #2f5f4f;
}

.thread-box {
    margin-top: 10px;
    margin-bottom: 12px;
    max-height: 430px;
    overflow-y: auto;
    scroll-behavior: smooth;
    display: grid;
    gap: 10px;
    padding-right: 4px;
}

.msg-bubble {
    border-radius: 12px;
    padding: 10px;
    max-width: 78%;
}

.msg-bubble p {
    margin: 6px 0;
}

.ai-origin-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e8f3ee;
    color: #3a6f5d;
    border: 1px solid #cfe2d8;
    margin-bottom: 4px;
}

.msg-bubble.mine {
    margin-left: auto;
    background: #dbefe5;
}

.msg-bubble.theirs {
    margin-right: auto;
    background: #f3f7f5;
    border: 1px solid #e4ece8;
}

.message-send-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.message-send-form input[type="text"] {
    margin-bottom: 0;
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.notification-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.notification-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e4ece8;
    border-radius: 10px;
    padding: 10px;
    background: #f8fbf9;
}

.notification-list li.unread {
    border-color: #b8d7c8;
    background: #ebf7f0;
}

.notification-actions a {
    font-weight: bold;
}

/* Estilos para recordatorios de hábitos */
.habit-summary-card {
    background: linear-gradient(135deg, #e7f6ef 0%, #d4ebe0 100%);
    border: 2px solid #b8d7c8;
    border-radius: 14px;
    padding: 20px;
    margin-top: 16px;
}

.habit-summary-card h3 {
    color: #2e5c4c;
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

.stat-item {
    text-align: center;
    background: #ffffff;
    padding: 16px 12px;
    border-radius: 10px;
    border: 1px solid #dcebe4;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #3a6f5d;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #5f7f73;
}

.reminders-list {
    display: grid;
    gap: 12px;
}

.reminder-item {
    background: #ffffff;
    border: 1px solid #dcebe4;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: all 0.2s ease;
}

.reminder-item:hover {
    border-color: #3a6f5d;
    box-shadow: 0 4px 12px rgba(58, 111, 93, 0.1);
}

.reminder-item.disabled {
    background: #f8f8f8;
    opacity: 0.7;
}

.reminder-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.reminder-time {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2f4f4f;
}

.reminder-status {
    font-size: 0.9rem;
}

.reminder-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 900px) {
    .community-layout {
        grid-template-columns: 1fr;
    }

    .community-main {
        order: 1;
    }

    .community-sidebar {
        position: static;
        order: 2;
        margin-top: 14px;
        border-top: 1px solid #d7e7df;
        padding-top: 14px;
    }

    .community-sidebar::before {
        content: "Accesos rapidos";
        display: block;
        margin: 0 0 10px;
        color: #5f7b6e;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .creator-row,
    .comment-form {
        grid-template-columns: 1fr;
    }

    .post-actions {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .comment-meta-row {
        flex-wrap: wrap;
    }

    .community-main > .post-creator,
    .community-main > .community-thread-feed,
    .community-main > .empty-feed {
        padding: 14px;
    }

    .community-thread-feed .thread-reply-form {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .thread-header {
        flex-direction: column;
        gap: 6px;
    }

    .thread-date-desktop {
        display: none;
    }

    .thread-date-mobile {
        display: inline;
    }

    .author-action-row {
        gap: 6px;
    }

    .messages-layout,
    .message-send-form {
        grid-template-columns: 1fr;
    }

    .notification-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .community-feed-shell.community-gallery .community-posts-grid {
        grid-template-columns: 1fr;
    }

        .profile-header {
            flex-direction: column;
            align-items: flex-start;
        }
}

/* ===========================
   GALLERY STYLES
   =========================== */

.gallery-category-title {
    font-size: 1.6rem;
    color: #3a6f5d;
    margin-bottom: 20px;
    font-weight: 600;
}

.gallery-main {
    gap: 20px;
}

.gallery-legal-note {
    background: linear-gradient(135deg, #e8f5f1, #f3f9f7);
}

.gallery-legal-note h3,
.gallery-upload-panel h3 {
    color: #3a6f5d;
    margin-bottom: 10px;
}

.gallery-legal-note p,
.gallery-tip p,
.gallery-empty-state p {
    margin-bottom: 0;
    color: #5f7f73;
}

.gallery-upload-form {
    display: grid;
    gap: 10px;
    max-width: 520px;
}

.gallery-tip {
    border: 1px solid #d5e8df;
}

.gallery-empty-state {
    border-left: 4px solid #8fb8a9;
    background: #f8fbfa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* Aspect ratio 4:3 */
    overflow: hidden;
    cursor: pointer;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-art {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    background-size: cover;
    background-position: center;
}

.gallery-image-wrapper:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-image-wrapper:hover .gallery-art {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.gallery-image-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.gallery-view-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #3a6f5d;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.gallery-view-btn:hover {
    background: #fff;
}

/* Modal para imagen completa */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.modal-content-image {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

.modal-content-image img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-image-hidden {
    display: none;
}

.modal-art {
    width: min(90vw, 980px);
    height: min(70vh, 620px);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background-size: cover;
    background-position: center;
}

.modal-art-hidden {
    display: none;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ddd;
}

.modal-image-title {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
}

.profile-avatar-modal-content {
    position: relative;
    max-width: min(92vw, 620px);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: default;
}

#profile-avatar-modal-image {
    width: min(92vw, 620px);
    height: min(92vw, 620px);
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.profile-avatar-modal-content .modal-close {
    position: absolute;
    right: 10px;
    top: 10px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (hover: none) {
    .avatar-zoom-chip::after,
    .profile-main-info .avatar-zoom-status::after {
        display: none;
    }
}

.scene-forest, .scene-forest_path, .scene-meadow, .scene-mist, .scene-lake, .scene-river,
.scene-beach, .scene-sea_sunset, .scene-waves, .scene-coast, .scene-deep_ocean, .scene-marine_breeze,
.scene-mountain_snow, .scene-valley, .scene-mountain_dawn, .scene-summit, .scene-trail, .scene-panorama,
.scene-sunrise_gold, .scene-sunrise_rose, .scene-horizon, .scene-first_rays, .scene-new_day, .scene-sunrise_orange,
.scene-flowers, .scene-lavender, .scene-zen, .scene-roses, .scene-garden, .scene-floral_path,
.scene-stars, .scene-clouds, .scene-blue_sky, .scene-purple_sunset, .scene-aurora, .scene-night {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.28), transparent 30%),
        radial-gradient(circle at 70% 80%, rgba(255,255,255,0.15), transparent 35%),
        linear-gradient(135deg, #b8d8cc 0%, #8fb8a9 45%, #5c8677 100%);
}

.scene-beach, .scene-sea_sunset, .scene-waves, .scene-coast, .scene-deep_ocean, .scene-marine_breeze {
    background-image:
        radial-gradient(circle at 30% 15%, rgba(255,246,210,0.35), transparent 25%),
        linear-gradient(180deg, #8fd0e9 0%, #5ea9c8 45%, #2f708d 100%);
}

.scene-mountain_snow, .scene-valley, .scene-mountain_dawn, .scene-summit, .scene-trail, .scene-panorama {
    background-image:
        radial-gradient(circle at 75% 25%, rgba(255,255,255,0.4), transparent 28%),
        linear-gradient(160deg, #d8e6f0 0%, #9fb7cc 42%, #607f96 100%);
}

.scene-sunrise_gold, .scene-sunrise_rose, .scene-horizon, .scene-first_rays, .scene-new_day, .scene-sunrise_orange {
    background-image:
        radial-gradient(circle at 50% 12%, rgba(255,230,140,0.45), transparent 30%),
        linear-gradient(180deg, #ffd6a5 0%, #ffb9a7 35%, #c98780 100%);
}

.scene-flowers, .scene-lavender, .scene-zen, .scene-roses, .scene-garden, .scene-floral_path {
    background-image:
        radial-gradient(circle at 40% 20%, rgba(255,255,255,0.3), transparent 25%),
        linear-gradient(145deg, #d1f0d8 0%, #a7d7af 40%, #6ea478 100%);
}

.scene-stars, .scene-clouds, .scene-blue_sky, .scene-purple_sunset, .scene-aurora, .scene-night {
    background-image:
        radial-gradient(circle at 22% 18%, rgba(255,255,255,0.45), transparent 15%),
        radial-gradient(circle at 70% 30%, rgba(255,255,255,0.25), transparent 20%),
        linear-gradient(150deg, #6d7fb8 0%, #4f5d9c 45%, #2a3260 100%);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }

    body.community-page {
        padding: 12px;
        padding-bottom: 78px;
    }

    .post-creator,
    .post-card,
    .empty-feed,
    .profile-card {
        padding: 16px;
        border-radius: 14px;
    }

    .profile-feed-gallery .profile-posts-grid,
    .community-feed-shell.community-gallery .community-posts-grid {
        grid-template-columns: 1fr;
    }

    .community-comment-list .comment-item {
        grid-template-columns: 26px 1fr;
        gap: 8px;
    }

    .community-thread-feed .thread-reply-input {
        min-height: 38px;
        font-size: 0.9rem;
    }

    .community-thread-feed .thread-reply-submit {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .comment-author-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.72rem;
    }

    .mobile-thread-composer {
        display: flex;
        justify-content: center;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 10px;
        z-index: 45;
        pointer-events: none;
    }

    .mobile-thread-compose-btn {
        pointer-events: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-width: 160px;
        border-radius: 999px;
        border: 1px solid #2f5f4f;
        background: #3a6f5d;
        color: #ffffff;
        font-weight: 700;
        padding: 11px 18px;
        box-shadow: 0 10px 22px rgba(26, 53, 43, 0.2);
    }

    .profile-header {
        align-items: center;
        text-align: center;
    }

    .profile-main-info {
        width: 100%;
    }

    .profile-main-info h1 {
        font-size: 1.2rem;
    }

    .post-content {
        font-size: 0.94rem;
    }

    .profile-main-info .avatar-zoom-status {
        margin: 0 auto 8px;
    }

    .profile-stats {
        justify-content: center;
        gap: 10px;
    }

    #profile-avatar-modal-image {
        width: min(94vw, 420px);
        height: min(94vw, 420px);
        border-radius: 14px;
    }

    .profile-avatar-modal-content .modal-close {
        top: 8px;
        right: 8px;
    }

    .gallery-upload-form {
        max-width: 100%;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .mood-filter-row {
        grid-template-columns: 1fr;
    }

    .mood-insights-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-category-title {
        font-size: 1.3rem;
    }
    
    .modal-content-image img {
        max-height: 70vh;
    }
}

/* ===========================
   MUSIC STYLES
   =========================== */

.music-category-title {
    font-size: 1.6rem;
    color: #3a6f5d;
    margin-bottom: 20px;
    font-weight: 600;
}

.music-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(125deg, #ffffff 0%, #edf8f3 52%, #dff2e8 100%);
    border: 1px solid #d8ebe1;
}

.music-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(58, 111, 93, 0.15) 0%, rgba(58, 111, 93, 0) 70%);
    pointer-events: none;
}

.music-hero h1 {
    margin-bottom: 10px;
    font-size: 1.95rem;
    line-height: 1.2;
}

.music-hero p {
    margin: 0;
    max-width: 70ch;
}

.music-legal-card {
    border: 1px solid #cfe4da;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef8f3 0%, #f7fcfa 100%);
    padding: 18px 20px;
}

.music-legal-card h3 {
    color: #2f6a57;
    margin-bottom: 8px;
}

.music-legal-card p {
    margin: 0;
    color: #537667;
}

.music-note-card {
    border: 1px solid #d9e9e2;
    border-radius: 14px;
    background: #ffffff;
    padding: 15px 20px;
}

.music-note-card p {
    margin: 0;
    color: #5b7c6f;
}

.music-visualization-section {
    border: 1px solid #d7e8df;
    border-radius: 16px;
    background: linear-gradient(145deg, #f9fdfb 0%, #f0f8f4 100%);
    padding: 18px;
}

.music-visualization-header h3 {
    margin: 0 0 8px;
    color: #2d6654;
    font-size: 1.2rem;
}

.music-visualization-header p {
    margin: 0 0 14px;
    color: #537667;
}

.music-visualization-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.music-visualization-card {
    background: #ffffff;
    border: 1px solid #dcebe4;
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 8px;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.music-visualization-card:hover {
    transform: translateY(-4px);
    border-color: #bddfd0;
    box-shadow: 0 12px 24px rgba(46, 92, 72, 0.14);
}

.music-visualization-cover-wrap {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.music-visualization-cover-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 31, 22, 0.04) 0%, rgba(9, 31, 22, 0.24) 100%);
    pointer-events: none;
}

.music-visualization-cover-title {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 1;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.15;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(16, 33, 28, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(2px);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
}

.music-visualization-cover {
    width: 100%;
    height: 138px;
    object-fit: cover;
    border: 1px solid #d8e8de;
    background: #eef7f2;
    display: block;
    transition: transform 260ms ease;
}

.music-visualization-card:hover .music-visualization-cover {
    transform: scale(1.03);
}

.music-visualization-card h4 {
    margin: 0;
    color: #315f50;
    font-size: 1rem;
}

.music-visualization-card p {
    margin: 0;
    color: #5a7a6d;
    font-size: 0.9rem;
    line-height: 1.45;
}

.music-visualization-mantra {
    color: #2f6a57;
    font-weight: 700;
    font-size: 0.86rem;
}

.music-visualization-card .small-btn {
    width: auto;
    justify-self: start;
}

.music-visualization-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.music-session-timer {
    margin-top: 14px;
    display: grid;
    gap: 6px;
    border-top: 1px solid #dbeae3;
    padding-top: 12px;
}

.music-session-timer label {
    color: #2f6a57;
    font-size: 0.9rem;
    font-weight: 700;
}

.music-session-select {
    width: fit-content;
    min-width: 170px;
    margin: 0;
    border: 1px solid #d5e6de;
    border-radius: 8px;
    background: #ffffff;
    color: #2f4f4f;
    padding: 8px 10px;
}

.music-session-status {
    margin: 0;
    color: #5a7a6d;
    font-size: 0.86rem;
}

.visualization-goals-journal {
    margin-top: 16px;
    border-top: 1px solid #dbeae3;
    padding-top: 14px;
    display: grid;
    gap: 8px;
}

.visualization-goals-journal h4 {
    margin: 0;
    color: #2d6654;
    font-size: 1rem;
}

.visualization-goals-journal p {
    margin: 0;
    color: #56786b;
    font-size: 0.9rem;
}

.visualization-goals-journal label {
    color: #2f6a57;
    font-size: 0.88rem;
    font-weight: 700;
}

.visualization-goals-journal textarea {
    margin: 0;
    min-height: 84px;
    border: 1px solid #d5e6de;
    border-radius: 10px;
    background: #ffffff;
    color: #2f4f4f;
    font-size: 0.92rem;
}

.visualization-goals-journal textarea::placeholder {
    color: #83a193;
}

.visualization-goals-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.visualization-goals-actions .small-btn {
    width: auto;
}

.visualization-goals-status {
    margin: 0;
    color: #5a7a6d;
    font-size: 0.84rem;
}

.anti-stress-hero p {
    margin-bottom: 0;
}

.anti-stress-shell {
    border: 1px solid #d7e8df;
    border-radius: 16px;
    background: linear-gradient(145deg, #f9fdfb 0%, #eef8f3 100%);
    padding: 18px;
    display: grid;
    gap: 12px;
}

.anti-stress-breath-panel {
    border: 1px solid #d6e8df;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.anti-stress-breath-panel h3 {
    margin: 0;
    color: #2f6251;
    font-size: 1rem;
}

.anti-stress-breath-hint {
    margin: 0;
    color: #5c7d70;
    font-size: 0.88rem;
}

.anti-stress-breath-stage {
    border: 1px dashed #d6e8df;
    border-radius: 12px;
    padding: 10px;
    display: grid;
    justify-items: center;
    gap: 6px;
}

.anti-stress-breath-circle {
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #d6f0e3 0%, #8fc6ae 60%, #5a8f78 100%);
    transition: transform 0.7s ease, filter 0.7s ease;
}

.anti-stress-breath-stage[data-phase="inhale"] .anti-stress-breath-circle {
    transform: scale(1.35);
    filter: saturate(1.1);
}

.anti-stress-breath-stage[data-phase="hold"] .anti-stress-breath-circle {
    transform: scale(1.35);
}

.anti-stress-breath-stage[data-phase="exhale"] .anti-stress-breath-circle {
    transform: scale(0.8);
    filter: saturate(0.8);
}

.anti-stress-breath-stage[data-phase="rest"] .anti-stress-breath-circle,
.anti-stress-breath-stage[data-phase="idle"] .anti-stress-breath-circle,
.anti-stress-breath-stage[data-phase="pause"] .anti-stress-breath-circle,
.anti-stress-breath-stage[data-phase="done"] .anti-stress-breath-circle {
    transform: scale(1);
}

.anti-stress-breath-phase,
.anti-stress-breath-counter {
    margin: 0;
    color: #446c5d;
    font-size: 0.86rem;
    font-weight: 600;
}

.anti-stress-breath-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.anti-stress-breath-actions .small-btn {
    width: auto;
}

.anti-stress-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.anti-stress-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #355f50;
    font-size: 0.9rem;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid #d5e6de;
    border-radius: 10px;
    padding: 8px 10px;
}

.anti-stress-controls input[type="color"] {
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 8px;
    border: 1px solid #d5e6de;
    padding: 2px;
}

.anti-stress-controls input[type="range"] {
    width: 130px;
    margin: 0;
}

.anti-stress-controls select {
    border: 1px solid #d5e6de;
    border-radius: 8px;
    background: #ffffff;
    color: #355f50;
    padding: 6px 10px;
    font-size: 0.88rem;
}

.anti-stress-upload-label input[type="file"] {
    max-width: 210px;
    font-size: 0.78rem;
}

.anti-stress-controls .small-btn {
    width: auto;
}

.anti-stress-board-wrap {
    border: 1px solid #cfe2d9;
    border-radius: 14px;
    background: #ffffff;
    padding: 10px;
}

.anti-stress-canvas {
    width: 100%;
    height: min(60vh, 460px);
    display: block;
    border-radius: 10px;
    background: repeating-linear-gradient(
        0deg,
        #ffffff,
        #ffffff 26px,
        #f5faf7 26px,
        #f5faf7 27px
    );
    touch-action: none;
    cursor: crosshair;
}

.anti-stress-canvas.with-mandala {
    background: #ffffff;
}

.anti-stress-canvas.with-template {
    background: #ffffff;
}

.anti-stress-status {
    margin: 0;
    color: #56786b;
    font-size: 0.9rem;
}

.empty-chair-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid #d9d4ef;
    background:
        radial-gradient(circle at 14% 20%, rgba(244, 228, 255, 0.75) 0%, rgba(244, 228, 255, 0) 42%),
        radial-gradient(circle at 84% 14%, rgba(217, 245, 228, 0.7) 0%, rgba(217, 245, 228, 0) 40%),
        linear-gradient(130deg, #fffdfd 0%, #f7f6ff 44%, #f2fcf6 100%);
}

.empty-chair-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #d8c9f5;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    margin-bottom: 10px;
    color: #604b88;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.empty-chair-hero h1 {
    margin-bottom: 8px;
    color: #49396e;
}

.empty-chair-hero p {
    margin-bottom: 0;
    max-width: 74ch;
    color: #5e5771;
}

.empty-chair-shell {
    border: 1px solid #e2daf1;
    border-radius: 18px;
    background: linear-gradient(170deg, #fdfcff 0%, #f7fbff 52%, #f8fff9 100%);
    padding: 18px;
    display: grid;
    gap: 14px;
}

.empty-chair-card {
    border: 1px solid #dfd9eb;
    border-radius: 16px;
    background: #ffffff;
    padding: 16px;
    box-shadow: 0 14px 28px rgba(86, 80, 118, 0.08);
}

.empty-chair-card h2 {
    margin: 0;
    color: #43385f;
    font-size: 1.06rem;
}

.empty-chair-how {
    display: grid;
    gap: 12px;
}

.empty-chair-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.empty-chair-step {
    border: 1px solid #e8e1f5;
    border-radius: 12px;
    background: linear-gradient(145deg, #fffefe 0%, #f8f7ff 100%);
    padding: 10px;
}

.empty-chair-step h3 {
    margin: 0 0 6px;
    color: #53457b;
    font-size: 0.94rem;
}

.empty-chair-step p {
    margin: 0;
    color: #635d75;
    font-size: 0.88rem;
}

.empty-chair-benefits {
    display: grid;
    gap: 10px;
}

.empty-chair-benefit-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.empty-chair-benefit-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: linear-gradient(120deg, #efe8ff 0%, #e6f7ec 100%);
    border: 1px solid #dbd3ec;
    color: #4f4568;
    font-size: 0.83rem;
    font-weight: 700;
    padding: 6px 10px;
}

.empty-chair-practice {
    display: grid;
    gap: 10px;
}

.empty-chair-practice-head {
    display: grid;
    gap: 6px;
}

.empty-chair-practice-head p {
    margin: 0;
    color: #615b70;
    font-size: 0.9rem;
}

.empty-chair-seats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.empty-seat {
    border: 1px solid #e1d9f2;
    border-radius: 12px;
    background: #fcfbff;
    padding: 10px;
    display: grid;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.empty-seat header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.empty-seat h3 {
    margin: 0;
    color: #4a3e67;
    font-size: 0.92rem;
}

.empty-seat span {
    color: #7d7397;
    font-size: 0.76rem;
}

.empty-seat textarea {
    min-height: 130px;
    margin: 0;
    border: 1px solid #ddd3f1;
    border-radius: 10px;
    background: #ffffff;
    color: #3f3a4f;
    font-size: 0.9rem;
}

.empty-seat.active {
    border-color: #bca8ea;
    box-shadow: 0 10px 20px rgba(108, 85, 163, 0.15);
    transform: translateY(-2px);
}

.empty-chair-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.empty-chair-actions .small-btn {
    width: auto;
}

.empty-chair-prompt {
    margin: 0;
    border: 1px dashed #d9cceb;
    border-radius: 10px;
    background: #f9f4ff;
    padding: 8px 10px;
    color: #624f86;
    font-size: 0.85rem;
    font-weight: 700;
}

.empty-chair-integration {
    display: grid;
    gap: 10px;
}

.empty-chair-integration p {
    margin: 0;
    color: #625b75;
    font-size: 0.9rem;
}

.empty-chair-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.empty-chair-grid-3 label {
    display: grid;
    gap: 6px;
    color: #4c4069;
    font-size: 0.82rem;
    font-weight: 700;
}

.empty-chair-grid-3 textarea {
    min-height: 106px;
    margin: 0;
    border: 1px solid #ddd3f1;
    border-radius: 10px;
    background: #ffffff;
    color: #3f3a4f;
    font-size: 0.88rem;
}

.empty-chair-history-head {
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.empty-chair-history-head h3 {
    margin: 0;
    color: #4a3e67;
    font-size: 0.95rem;
}

.empty-chair-history-head .small-btn {
    width: auto;
}

.empty-chair-history {
    display: grid;
    gap: 8px;
}

.empty-chair-history-empty {
    margin: 0;
    color: #6b6480;
    font-size: 0.86rem;
}

.empty-chair-history-item {
    border: 1px solid #e0d8f2;
    border-radius: 10px;
    background: linear-gradient(130deg, #fffefe 0%, #f8f7ff 100%);
    padding: 10px;
    display: grid;
    gap: 4px;
}

.empty-chair-history-item time {
    color: #7b7391;
    font-size: 0.75rem;
    font-weight: 700;
}

.empty-chair-history-item p {
    margin: 0;
    color: #514b63;
    font-size: 0.83rem;
}

/* Estilos de audio eliminados */

.bonfire-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid #f0d7b5;
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 232, 194, 0.65) 0%, rgba(255, 232, 194, 0) 44%),
        radial-gradient(circle at 86% 18%, rgba(255, 193, 132, 0.4) 0%, rgba(255, 193, 132, 0) 42%),
        linear-gradient(145deg, #fff7ef 0%, #fff2df 42%, #fff9f2 100%);
}

.bonfire-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #efc893;
    background: rgba(255, 255, 255, 0.82);
    color: #8d4f1a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    margin-bottom: 10px;
}

.bonfire-hero h1 {
    margin-bottom: 8px;
    color: #8f3b17;
}

.bonfire-hero p {
    margin-bottom: 0;
    max-width: 76ch;
    color: #705b4c;
}

.bonfire-shell {
    border: 1px solid #efd5bc;
    border-radius: 18px;
    background: linear-gradient(170deg, #fffaf5 0%, #fff4eb 100%);
    padding: 18px;
    display: grid;
    gap: 14px;
}

.bonfire-card {
    border: 1px solid #edd9c5;
    border-radius: 16px;
    background: #ffffff;
    padding: 16px;
    box-shadow: 0 16px 28px rgba(104, 66, 37, 0.09);
}

.bonfire-card h2 {
    margin: 0 0 8px;
    color: #7f3d16;
    font-size: 1.05rem;
}

.bonfire-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.bonfire-card-head h2 {
    margin: 0;
}

.bonfire-card-head .small-btn {
    width: auto;
}

.bonfire-help,
.bonfire-scene-desc {
    margin: 0;
    color: #746153;
    font-size: 0.9rem;
}

.bonfire-chip-grid {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bonfire-chip {
    width: auto;
    border-radius: 999px;
    padding: 8px 12px;
    background: linear-gradient(120deg, #fdebd8 0%, #fff4e7 100%);
    border: 1px solid #efc89a;
    color: #7b4b27;
    font-weight: 700;
    font-size: 0.84rem;
}

.bonfire-chip:hover {
    background: linear-gradient(120deg, #fcd8b8 0%, #ffe9d3 100%);
}

.bonfire-chip.dragging {
    opacity: 0.55;
}

.bonfire-custom-label {
    margin-top: 14px;
    display: block;
    color: #6b4122;
    font-size: 0.88rem;
    font-weight: 700;
}

.bonfire-custom-row {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.bonfire-custom-row textarea {
    min-height: 90px;
    margin: 0;
    border: 1px solid #ebd4be;
    border-radius: 10px;
    background: #fffdfb;
    color: #544538;
}

.bonfire-custom-row .small-btn {
    width: fit-content;
}

.bonfire-stage {
    position: relative;
    margin-top: 12px;
    border: 1px solid #e7d4be;
    border-radius: 16px;
    min-height: 260px;
    background:
        radial-gradient(circle at 50% 100%, rgba(130, 71, 34, 0.4) 0%, rgba(130, 71, 34, 0) 42%),
        linear-gradient(180deg, #2b2433 0%, #221b2a 54%, #201623 100%);
    overflow: hidden;
}

.bonfire-glow {
    position: absolute;
    inset: auto 50% 16px auto;
    transform: translateX(50%);
    width: 180px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 167, 60, 0.5) 0%, rgba(255, 123, 36, 0.1) 55%, rgba(255, 80, 24, 0) 100%);
    filter: blur(6px);
}

.bonfire-fire {
    position: absolute;
    left: 50%;
    bottom: 24px;
    width: 118px;
    height: 148px;
    transform: translateX(-50%);
    background:
        radial-gradient(circle at 50% 78%, #fff5a3 0%, #ffcb60 34%, #ff8e2b 62%, #cf3e13 100%);
    clip-path: polygon(50% 0%, 68% 18%, 85% 36%, 94% 58%, 86% 82%, 70% 100%, 50% 92%, 32% 100%, 13% 82%, 6% 58%, 16% 36%, 32% 18%);
    animation: bonfireFlicker 1.25s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 14px rgba(255, 118, 38, 0.66));
}

.bonfire-embers,
.bonfire-smoke {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bonfire-drop-zone {
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    border: 1px dashed rgba(255, 208, 143, 0.7);
    border-radius: 999px;
    padding: 6px 14px;
    color: #ffd8a0;
    font-size: 0.78rem;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bonfire-drop-zone.is-over {
    transform: translateX(-50%) scale(1.05);
    border-color: #ffe3b9;
    color: #fff2dd;
}

.ember-token {
    position: absolute;
    left: 50%;
    bottom: 74px;
    transform: translate(-50%, 0);
    color: #ffe7c6;
    font-size: 0.82rem;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 139, 50, 0.7);
    animation: emberFall 1.15s ease forwards;
}

.smoke-token {
    position: absolute;
    left: 50%;
    bottom: 98px;
    transform: translate(-50%, 0) scale(0.9);
    color: rgba(235, 241, 255, 0.78);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    animation: smokeRise 2.05s ease forwards;
}

.bonfire-status {
    margin-top: 10px;
    margin-bottom: 0;
    color: #6d5343;
    font-size: 0.9rem;
}

.bonfire-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bonfire-actions .small-btn {
    width: auto;
}

.bonfire-volume-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #efcfb1;
    border-radius: 999px;
    background: #fff8ee;
    color: #754c2d;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 10px;
}

.bonfire-volume-wrap input[type="range"] {
    width: 120px;
    margin: 0;
}

.bonfire-affirmation-card textarea {
    min-height: 94px;
}

.bonfire-affirmation-item {
    border-color: #e8d2bd;
    background: linear-gradient(125deg, #fffcf8 0%, #fff2e4 100%);
}

.bonfire-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bonfire-modal[aria-hidden="false"] {
    display: flex;
}

.bonfire-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 16, 26, 0.55);
    backdrop-filter: blur(2px);
}

.bonfire-modal-card {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    border: 1px solid #f0d5bb;
    border-radius: 16px;
    background: linear-gradient(145deg, #fffdf9 0%, #fff2e6 100%);
    box-shadow: 0 18px 40px rgba(56, 34, 18, 0.28);
    padding: 18px;
    display: grid;
    gap: 10px;
}

.bonfire-modal-card h3 {
    margin: 0;
    color: #7f3d16;
    font-size: 1.05rem;
}

.bonfire-modal-card p {
    margin: 0;
    color: #6f5545;
    font-size: 0.9rem;
}

.bonfire-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bonfire-modal-actions .small-btn {
    width: auto;
}

.bonfire-log {
    display: grid;
    gap: 8px;
}

.bonfire-log-empty {
    margin: 0;
    color: #7a6557;
    font-size: 0.87rem;
}

.bonfire-log-item {
    border: 1px solid #efd8c2;
    border-radius: 10px;
    background: linear-gradient(125deg, #fffdfa 0%, #fff5ea 100%);
    padding: 10px;
    display: grid;
    gap: 4px;
}

.bonfire-log-item time {
    color: #8d6d58;
    font-size: 0.75rem;
    font-weight: 700;
}

.bonfire-log-item p {
    margin: 0;
    color: #5f4a3d;
    font-size: 0.84rem;
}

@keyframes bonfireFlicker {
    0% {
        transform: translateX(-50%) scale(0.98) rotate(-1.2deg);
    }
    100% {
        transform: translateX(-50%) scale(1.03) rotate(1.2deg);
    }
}

@keyframes emberFall {
    0% {
        opacity: 0;
        transform: translate(-50%, -8px) scale(0.88);
    }
    28% {
        opacity: 1;
        transform: translate(-50%, 10px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 36px) scale(0.72);
    }
}

@keyframes smokeRise {
    0% {
        opacity: 0.9;
        transform: translate(-50%, 0) scale(0.82);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translate(-62%, -150px) scale(1.25);
        filter: blur(2px);
    }
}

@media (max-width: 960px) {
    .empty-chair-steps,
    .empty-chair-seats,
    .empty-chair-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .audio-lab-actions .small-btn {
        flex: 1 1 calc(50% - 8px);
    }

    .bonfire-custom-row .small-btn {
        width: 100%;
    }

    .bonfire-volume-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .bonfire-modal-actions .small-btn {
        flex: 1 1 calc(50% - 8px);
    }
}

.feedback-hero p {
    margin-bottom: 10px;
}

.feedback-form {
    display: grid;
    gap: 10px;
}

.feedback-type-row {
    display: grid;
    gap: 6px;
}

.feedback-type-row label {
    font-weight: 700;
    color: #355f50;
    font-size: 0.9rem;
}

.feedback-type-row select {
    max-width: 240px;
}

.feedback-shell {
    border: 1px solid #d7e8df;
    border-radius: 16px;
    background: linear-gradient(145deg, #f9fdfb 0%, #eef8f3 100%);
    padding: 16px;
}

.feedback-title {
    margin: 0 0 12px;
    color: #2f6251;
}

.feedback-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 12px;
}

.feedback-filter-form label {
    color: #3d6658;
    font-size: 0.85rem;
    font-weight: 700;
}

.feedback-filter-form select,
.feedback-filter-form input[type="search"] {
    margin: 0;
}

.feedback-filter-form input[type="search"] {
    min-width: 220px;
}

.feedback-filter-form .small-btn {
    text-decoration: none;
}

.feedback-filter-hint {
    margin: 0 0 10px;
    color: #53776a;
    font-size: 0.88rem;
}

.feedback-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.feedback-card {
    border-radius: 12px;
    border: 1px solid #d5e7de;
    background: #ffffff;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.feedback-card-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.feedback-card p {
    margin: 0;
    color: #3a6355;
    line-height: 1.45;
}

.feedback-date {
    color: #6c8a7e;
    font-size: 0.82rem;
}

.feedback-chip {
    border-radius: 999px;
    border: 1px solid #d6e8df;
    background: #f4fbf7;
    color: #4b6f61;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
}

.feedback-card.type-opinion {
    border-color: #cfe4dc;
}

.feedback-card.type-sugerencia {
    border-color: #d9e6ce;
}

.feedback-card.type-queja {
    border-color: #ecd5cf;
}

.feedback-card.type-bug {
    border-color: #d3d9e9;
}

.selfhelp-corner {
    margin-top: 16px;
    border-top: 1px solid #dbeae3;
    padding-top: 14px;
    display: grid;
    gap: 10px;
}

.selfhelp-corner-header h4 {
    margin: 0;
    color: #2d6654;
    font-size: 1rem;
}

.selfhelp-corner-header p {
    margin: 6px 0 0;
    color: #56786b;
    font-size: 0.9rem;
}

.selfhelp-corner-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.selfhelp-story-card,
.selfhelp-reflections-card {
    background: #ffffff;
    border: 1px solid #dcebe4;
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.selfhelp-story-card h5,
.selfhelp-reflections-card h5 {
    margin: 0;
    color: #315f50;
    font-size: 0.95rem;
}

.selfhelp-story-card p {
    margin: 0;
    color: #5a7a6d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.selfhelp-reflections-list {
    margin: 0;
    padding-left: 18px;
    color: #5a7a6d;
    display: grid;
    gap: 6px;
}

.selfhelp-reflections-list li {
    line-height: 1.4;
    font-size: 0.9rem;
}

.selfhelp-story-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.selfhelp-story-actions .small-btn {
    width: auto;
}

.selfhelp-favorites {
    border-top: 1px solid #dbeae3;
    padding-top: 12px;
}

.selfhelp-favorites h5 {
    margin: 0 0 8px;
    color: #315f50;
    font-size: 0.95rem;
}

.selfhelp-favorites ul {
    margin: 0;
    padding-left: 18px;
    color: #5a7a6d;
    display: grid;
    gap: 4px;
}

.music-closing-ritual {
    margin-top: 14px;
}

.music-closing-ritual-accordion {
    margin-top: 14px;
    border: 1px solid #d8e9e1;
    border-radius: 14px;
    background: #f7fcf9;
    padding: 10px 12px;
}

.music-closing-ritual-accordion summary {
    cursor: pointer;
    color: #2f6a57;
    font-weight: 700;
}

.music-closing-ritual-accordion[open] {
    background: #f3faf6;
}

.music-closing-ritual-card {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border: 1px solid #d8e9e1;
    border-radius: 16px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
    padding: 18px;
    display: grid;
    gap: 10px;
    text-align: left;
}

.music-closing-ritual-card h3 {
    margin: 0;
    color: #2f6a57;
    font-size: 1.15rem;
}

.music-closing-ritual-intro {
    margin: 0;
    color: #56786b;
    font-size: 0.92rem;
}

.music-closing-ritual-step {
    margin: 0;
    color: #2f5f4f;
    font-size: 1.05rem;
    font-weight: 700;
}

.music-closing-ritual-progress {
    margin: 0;
    color: #5f7f73;
    font-size: 0.86rem;
}

.music-closing-ritual-close {
    width: auto;
    justify-self: start;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.music-calibration-panel {
    border: 1px solid #d6e7df;
    border-radius: 14px;
    background: #f8fcfa;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.music-calibration-panel summary {
    cursor: pointer;
    color: #2f6a57;
    font-weight: 700;
}

.music-calibration-help {
    margin: 10px 0 12px;
    color: #56786b;
    font-size: 0.9rem;
}

.music-calibration-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.music-calibration-group {
    border: 1px solid #dbeae3;
    border-radius: 12px;
    background: #ffffff;
    padding: 10px;
}

.music-calibration-group h4 {
    margin: 0 0 8px;
    color: #325e4e;
    font-size: 0.9rem;
}

.music-calibration-group label {
    display: grid;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 0.86rem;
    color: #56786b;
}

.music-calibration-group label:last-child {
    margin-bottom: 0;
}

.music-calibration-group input[type="range"] {
    width: 100%;
    accent-color: #3a6f5d;
}

.calib-value {
    color: #2f6a57;
    font-size: 0.8rem;
    font-weight: 700;
}

.music-calibration-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.music-calibration-preset {
    width: auto;
    background: #4a7f6e;
}

.music-calibration-preset:hover {
    background: #3a6f5d;
}

.music-calibration-reset {
    width: auto;
}

.music-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.music-stop-all {
    width: auto;
    min-width: 140px;
}

.music-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.music-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Aspect ratio 16:9 */
    overflow: hidden;
    background: #000;
}

.music-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.music-thumbnail:hover img {
    opacity: 0.7;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.music-thumbnail:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 70px;
    height: 70px;
    background: rgba(58, 111, 93, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    padding-left: 5px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.music-thumbnail:hover .play-button {
    transform: scale(1.1);
    background: rgba(58, 111, 93, 1);
}

.music-info {
    padding: 16px;
}

.music-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.music-card-title-wrap {
    display: grid;
    gap: 4px;
}

.music-emoji-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #eef8f3;
    border: 1px solid #d7eadf;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.music-title {
    font-size: 1rem;
    color: #2f4f4f;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.4;
}

.music-duration {
    font-size: 0.9rem;
    color: #7a9187;
    margin: 0;
}

.sound-live-badge {
    display: none;
    margin-top: 10px;
    align-items: center;
    width: fit-content;
    border: 1px solid #b7d9c8;
    background: #e8f6ef;
    color: #2f6a57;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sound-live-badge.show {
    display: inline-flex;
}

.sound-card {
    border: 1px solid #dcebe4;
}

.sound-card.is-playing {
    border-color: #3a6f5d;
    box-shadow: 0 12px 24px rgba(58, 111, 93, 0.2);
}

.sound-controls {
    padding: 0 16px 16px;
    display: grid;
    gap: 10px;
}

.sound-control-block {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid #e1eee7;
    border-radius: 10px;
    background: #fbfdfc;
}

.sound-control-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sound-control-heading {
    font-size: 0.88rem;
    color: #4f7063;
    font-weight: 700;
}

.sound-control-value {
    font-size: 0.84rem;
    color: #2f6a57;
    font-weight: 700;
}

.sound-volume {
    width: 100%;
    accent-color: #3a6f5d;
    margin: 0;
}

.sound-intensity {
    margin: 0;
    background: #f8fbf9;
    border: 1px solid #dcebe4;
    color: #2f4f4f;
    border-radius: 8px;
    padding: 9px 10px;
}

.sound-intensity:focus {
    border-color: #3a6f5d;
}

.sound-card.is-playing .sound-intensity {
    border-color: #b7d9c8;
    background: #f3faf6;
}

.sound-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sound-actions .small-btn {
    min-width: 116px;
}

/* Modal para video */
.modal-content-video {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    max-width: 90%;
    max-height: 90%;
}

.modal-content-video .modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.modal-content-video .modal-close:hover {
    color: #ddd;
}

@media (max-width: 768px) {
    .music-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .music-hero h1 {
        font-size: 1.55rem;
    }

    .music-hero p {
        font-size: 0.95rem;
    }

    .music-legal-card,
    .music-note-card {
        padding: 14px;
    }

    .sound-actions {
        flex-direction: column;
    }

    .music-toolbar {
        justify-content: stretch;
    }

    .music-calibration-grid {
        grid-template-columns: 1fr;
    }

    .music-visualization-grid {
        grid-template-columns: 1fr;
    }

    .music-visualization-card .small-btn {
        width: 100%;
    }

    .music-visualization-cover {
        height: 150px;
    }

    .music-visualization-cover-title {
        font-size: 0.8rem;
    }

    .music-visualization-card:hover {
        transform: none;
    }


@media (prefers-reduced-motion: reduce) {
    .music-visualization-card,
    .music-visualization-cover {
        transition: none;
    }

    .music-visualization-card:hover,
    .music-visualization-card:hover .music-visualization-cover {
        transform: none;
    }
}
    .music-visualization-actions {
        width: 100%;
    }

    .music-session-select {
        width: 100%;
    }

    .visualization-goals-actions .small-btn {
        width: 100%;
    }

    .selfhelp-corner-grid {
        grid-template-columns: 1fr;
    }

    .selfhelp-story-actions .small-btn {
        width: 100%;
    }

    .music-calibration-actions {
        justify-content: stretch;
    }

    .music-calibration-reset {
        width: 100%;
    }

    .music-stop-all {
        width: 100%;
    }

    .sound-actions .small-btn {
        width: 100%;
    }
    
    .music-category-title {
        font-size: 1.3rem;
    }
    
    .music-title {
        font-size: 0.95rem;
    }
}

.message-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-user-row a {
    flex: 1;
}

.inline-follow-form {
    margin: 0;
}

.inline-follow-form .small-btn {
    padding: 6px 10px;
    white-space: nowrap;
}