/* =============================================================================
   GinasWorld.Life — Estética de refugio emocional
   Paleta del spec · tipografías suaves · movimiento orgánico y lento
   ============================================================================= */

:root {
    /* Paleta emocional */
    --azul-calma:     #CFE8FF;
    --lavanda-suave:  #DCCCFB;
    --verde-natura:   #CFECC7;
    --beige-calido:   #F7F1E8;
    --rosa-emocional: #F8DDEB;

    /* Derivados para texto y acentos */
    --tinta:        #4A4458;  /* texto principal: malva grisáceo suave */
    --tinta-suave:  #6E6880;
    --tinta-tenue:  #9A93A8;
    --blanco-calido:#FDFBF7;
    --acento:       #B79CE8;  /* lavanda más saturada para CTAs */
    --acento-hover: #A487DD;

    /* Forma y profundidad */
    --radio:        22px;
    --radio-sm:     14px;
    --sombra-suave: 0 14px 40px -18px rgba(90, 78, 120, 0.35);
    --sombra-card:  0 24px 60px -24px rgba(90, 78, 120, 0.45);

    /* Ritmo */
    --transicion: 0.5s cubic-bezier(0.22, 1, 0.36, 1);

    --fuente-titulo: 'Quicksand', system-ui, sans-serif;
    --fuente-texto:  'Nunito', system-ui, sans-serif;
    --fuente-script: 'Great Vibes', 'Parisienne', cursive; /* caligrafía corrida, estilo Palmer */
}

/* --- Reset suave ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; }

body.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--fuente-texto);
    color: var(--tinta);
    line-height: 1.7;
    /* Cielo emocional: degradado calmo y vivo */
    background:
        radial-gradient(1200px 700px at 15% -10%, var(--azul-calma) 0%, transparent 55%),
        radial-gradient(1000px 700px at 100% 0%, var(--rosa-emocional) 0%, transparent 50%),
        radial-gradient(1100px 800px at 50% 120%, var(--verde-natura) 0%, transparent 55%),
        var(--beige-calido);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
}

/* El contenido real va por encima del aurora (por orden en el DOM, sin crear
   contexto de apilado en .content: si no, atrapa los modales debajo del topbar). */
.topbar, .content, .footer { position: relative; }

/* =============================================================================
   Aurora — fondo vivo con blobs de color que flotan (estilo "antigravity")
   ============================================================================= */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Capa ambiental (mariposas + pétalos), encima del aurora y detrás del contenido */
.ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.aurora__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
    mix-blend-mode: multiply;
}
.aurora__blob--1 {
    width: 46vmax; height: 46vmax;
    top: -12vmax; left: -10vmax;
    background: radial-gradient(circle at 30% 30%, var(--azul-calma), transparent 70%);
    animation: drift-1 26s ease-in-out infinite alternate;
}
.aurora__blob--2 {
    width: 40vmax; height: 40vmax;
    top: -6vmax; right: -12vmax;
    background: radial-gradient(circle at 70% 30%, var(--rosa-emocional), transparent 70%);
    animation: drift-2 32s ease-in-out infinite alternate;
}
.aurora__blob--3 {
    width: 50vmax; height: 50vmax;
    bottom: -16vmax; left: 10vmax;
    background: radial-gradient(circle at 40% 60%, var(--lavanda-suave), transparent 70%);
    animation: drift-3 30s ease-in-out infinite alternate;
}
.aurora__blob--4 {
    width: 38vmax; height: 38vmax;
    bottom: -10vmax; right: 4vmax;
    background: radial-gradient(circle at 60% 60%, var(--verde-natura), transparent 70%);
    animation: drift-4 28s ease-in-out infinite alternate;
}
@keyframes drift-1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10vmax, 8vmax) scale(1.15); }
}
@keyframes drift-2 {
    0%   { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-8vmax, 12vmax) scale(0.95); }
}
@keyframes drift-3 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(12vmax, -10vmax) scale(1.2); }
}
@keyframes drift-4 {
    0%   { transform: translate(0, 0) scale(1.05); }
    100% { transform: translate(-10vmax, -8vmax) scale(0.9); }
}

h1, h2, h3 { font-family: var(--fuente-titulo); font-weight: 600; line-height: 1.2; color: var(--tinta); }

a { color: var(--acento-hover); text-decoration: none; transition: color var(--transicion); }
a:hover { color: var(--tinta); }

/* --- Topbar --------------------------------------------------------------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem clamp(1rem, 5vw, 3rem);
    backdrop-filter: blur(8px);
    background: rgba(253, 251, 247, 0.55);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar__brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.topbar__logo { height: 48px; width: auto; display: block; animation: float-soft 6s ease-in-out infinite; transition: transform var(--transicion); }
.topbar__logo:hover { animation: none; transform: scale(1.14); }
.topbar__wordmark { height: 34px; width: auto; display: block; transition: transform var(--transicion); transform-origin: center; }
.topbar__wordmark:hover { transform: scale(1.08); }
.topbar__nav { display: flex; align-items: center; gap: 1.4rem; }
.topbar__link { font-weight: 600; font-size: 0.98rem; color: var(--tinta-suave); }
.topbar__link:hover { color: var(--tinta); }
.topbar__logout { margin: 0; }
.topbar__link--button { background: none; border: 0; cursor: pointer; font-family: var(--fuente-texto); padding: 0; }

/* Botón hamburguesa: oculto en escritorio, visible en móvil */
.topbar__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; border-radius: 10px; }
.topbar__burger span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: var(--tinta-suave); transition: transform var(--transicion), opacity var(--transicion); }
.topbar__burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.topbar__burger.is-open span:nth-child(2) { opacity: 0; }
.topbar__burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* --- Contenido / Footer --------------------------------------------------- */
.content { flex: 1; width: 100%; }
.footer { text-align: center; padding: 2.5rem 1rem 3rem; }
.footer__logo { height: 40px; width: auto; opacity: 0.85; margin-bottom: 0.6rem; display: inline-block; transition: transform var(--transicion), opacity var(--transicion); transform-origin: center; }
.footer__logo:hover { transform: scale(1.1); opacity: 1; }
.footer__message { color: var(--tinta-tenue); font-size: 0.95rem; }
.footer__help { color: var(--tinta-tenue); font-size: 0.82rem; margin-top: 0.8rem; opacity: 0.85; }
.footer__help a { color: var(--acento-hover); font-weight: 600; }

/* --- Botones -------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--fuente-titulo);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    transition: transform var(--transicion), box-shadow var(--transicion), background var(--transicion);
}
.btn--primary { background: var(--acento); color: var(--blanco-calido); box-shadow: var(--sombra-suave); }
.btn--primary:hover { background: var(--acento-hover); color: var(--blanco-calido); transform: translateY(-2px); }
.btn--ghost { background: rgba(255,255,255,0.6); color: var(--tinta); }
.btn--ghost:hover { background: rgba(255,255,255,0.9); transform: translateY(-2px); }
.btn--block { width: 100%; }
.btn--soft { background: var(--verde-natura); color: var(--tinta); }
.btn--danger { background: transparent; color: var(--tinta-tenue); box-shadow: none; }
.btn--danger:hover { color: #C98C9A; background: rgba(248, 221, 235, 0.5); }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* =============================================================================
   HERO
   ============================================================================= */
.hero {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 5rem) 1.25rem;
}

.hero__inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    text-align: center;
}
/* Logo protagonista del hero: grande, con latido suave */
.hero__logo {
    width: clamp(180px, 34vw, 280px);
    height: auto;
    margin: 0 auto 0.5rem;
    display: block;
    filter: drop-shadow(0 18px 40px rgba(90, 78, 120, 0.25));
    animation: logo-breathe 6s ease-in-out infinite;
    will-change: transform;
}
.hero__greeting {
    font-family: var(--fuente-script);
    font-size: clamp(4.5rem, 14vw, 8rem);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 1rem;
    color: var(--acento-hover);
}
.hero__message {
    font-size: clamp(1.05rem, 2.4vw, 1.3rem);
    color: var(--tinta-suave);
    max-width: 56ch;
    margin: 0 auto;
}
.hero__message p { margin-bottom: 1.05rem; }
.hero__message .soft { color: var(--tinta-tenue); }
.hero__cta { margin-top: 2.5rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Líneas que aparecen escalonadas (animación CSS pura) */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal-up 1.2s cubic-bezier(0.22,1,0.36,1) forwards; }
.reveal--1 { animation-delay: 0.15s; }
.reveal--2 { animation-delay: 0.5s; }
.reveal--3 { animation-delay: 0.85s; }
.reveal--4 { animation-delay: 1.2s; }
.reveal--5 { animation-delay: 1.55s; }
.reveal--6 { animation-delay: 1.9s; }

.signature {
    margin-top: 2.2rem;
    font-family: var(--fuente-script);
    font-weight: 400;
    color: var(--acento-hover);
    font-size: 2.1rem;
}

/* =============================================================================
   AUTH (login)
   ============================================================================= */
.auth {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 8vw, 5rem) 1.25rem;
    min-height: calc(100vh - 70px);
}
.auth__card {
    width: 100%;
    max-width: 440px;
    background: rgba(253, 251, 247, 0.82);
    backdrop-filter: blur(10px);
    border-radius: var(--radio);
    padding: clamp(2rem, 5vw, 3rem);
    box-shadow: var(--sombra-card);
    text-align: center;
    animation: reveal-up 1s cubic-bezier(0.22,1,0.36,1) both;
}
.auth__welcome { margin-bottom: 1.8rem; }
.auth__leaf { font-size: 2.4rem; display: inline-block; animation: float-soft 6s ease-in-out infinite; }
.auth__logo {
    width: 96px; height: 96px; display: inline-block;
    border-radius: 50%;
    animation: logo-breathe 5s ease-in-out infinite;
    will-change: transform;
}
@keyframes logo-breathe {
    0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
    50%      { transform: translateY(-7px) scale(1.04) rotate(2deg); }
}
.auth__title { font-size: 1.6rem; margin: 0.8rem 0 0.5rem; }
.auth__subtitle { color: var(--tinta-suave); }
.auth__error {
    background: var(--rosa-emocional);
    color: #9C5C70;
    border-radius: var(--radio-sm);
    padding: 0.8rem 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}
.auth__form { display: flex; flex-direction: column; gap: 1.1rem; text-align: left; }
.auth__back { display: inline-block; margin-top: 1.5rem; font-size: 0.92rem; color: var(--tinta-tenue); }
.auth__alt { margin-top: 1.3rem; font-size: 0.95rem; color: var(--tinta-suave); }
.auth__alt a { font-weight: 600; }

/* --- Campos de formulario ------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field__label { font-weight: 600; font-size: 0.92rem; color: var(--tinta-suave); }
.field__input, .field__textarea {
    font-family: var(--fuente-texto);
    font-size: 1rem;
    color: var(--tinta);
    background: rgba(255,255,255,0.85);
    border: 1.5px solid transparent;
    border-radius: var(--radio-sm);
    padding: 0.85rem 1rem;
    transition: border-color var(--transicion), box-shadow var(--transicion);
    width: 100%;
}
.field__input:focus, .field__textarea:focus {
    outline: none;
    border-color: var(--lavanda-suave);
    box-shadow: 0 0 0 4px rgba(220, 204, 251, 0.4);
}
.field__textarea { resize: vertical; min-height: 220px; line-height: 1.8; }

/* Campo de contraseña con botón "ojo" para mostrar/ocultar */
.field__password { position: relative; display: block; }
.field__password .field__input { padding-right: 3.2rem; } /* espacio para el ojo */
.field__toggle {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tinta-tenue);
    cursor: pointer;
    border-radius: 50%;
    transition: color var(--transicion), background var(--transicion);
}
.field__toggle:hover { color: var(--acento-hover); background: rgba(220, 204, 251, 0.3); }
.field__toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(220, 204, 251, 0.5); }

/* =============================================================================
   DIARIO
   ============================================================================= */
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: clamp(1.5rem, 5vw, 3rem) 1.25rem; }
.wrap--wide { max-width: 900px; }

.page-head { margin-bottom: 2rem; }
.page-head__title { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.page-head__subtitle { color: var(--tinta-suave); margin-top: 0.4rem; }
.page-head__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.flash {
    background: var(--verde-natura);
    color: #4C6B47;
    border-radius: var(--radio-sm);
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.5rem;
    animation: reveal-up 0.8s ease both;
}

/* Barra del diario: contador + búsqueda colapsable */
.diary-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem;
}
.stats {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    color: var(--tinta-suave); font-size: 0.95rem;
}
.stats__item strong { color: var(--acento-hover); font-family: var(--fuente-titulo); }
.stats__dot { color: var(--tinta-tenue); }

/* Búsqueda colapsable (<details>) */
.search { flex: none; }
.search__toggle {
    list-style: none; cursor: pointer; user-select: none;
    background: rgba(255,255,255,0.8); color: var(--tinta-suave);
    border-radius: 999px; padding: 0.55rem 1.1rem; font-weight: 600; font-size: 0.92rem;
    transition: background var(--transicion);
}
.search__toggle::-webkit-details-marker { display: none; }
.search__toggle:hover { background: #fff; }
.search[open] .search__toggle { background: var(--lavanda-suave); color: var(--tinta); }
.search__form {
    margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.6rem;
    background: rgba(255,255,255,0.6); border-radius: var(--radio-sm); padding: 1rem;
}
.filters__search, .filters__mood {
    width: 100%;
    font-family: var(--fuente-texto); font-size: 1rem; color: var(--tinta);
    background: rgba(255,255,255,0.95);
    border: 1.5px solid transparent; border-radius: var(--radio-sm);
    padding: 0.7rem 1rem; transition: border-color var(--transicion), box-shadow var(--transicion);
}
.filters__mood { cursor: pointer; }
.filters__search:focus, .filters__mood:focus {
    outline: none; border-color: var(--lavanda-suave);
    box-shadow: 0 0 0 4px rgba(220, 204, 251, 0.4);
}
.search__actions { display: flex; align-items: center; gap: 1rem; }
.filters__clear { color: var(--tinta-tenue); font-size: 0.9rem; }
.search__result { color: var(--tinta-tenue); font-size: 0.9rem; margin-bottom: 1rem; }

/* Lista de entradas (cada tarjeta es un enlace) */
.entries { display: flex; flex-direction: column; gap: 1.1rem; }
.entry-card {
    display: block; text-decoration: none; color: inherit;
    background: rgba(253, 251, 247, 0.85);
    border-radius: var(--radio);
    padding: 1.3rem 1.5rem;
    box-shadow: var(--sombra-suave);
    transition: transform var(--transicion), box-shadow var(--transicion);
    animation: reveal-up 0.9s cubic-bezier(0.22,1,0.36,1) both;
}
.entry-card:hover { transform: translateY(-3px); box-shadow: var(--sombra-card); color: inherit; }
.entry-card__meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.entry-card__date { font-size: 0.85rem; color: var(--tinta-tenue); font-weight: 600; }
.entry-card__mood { font-size: 0.85rem; color: var(--acento-hover); }
.entry-card__audio { font-size: 0.95rem; }
.entry-card__excerpt { margin-top: 0.55rem; color: var(--tinta-suave); line-height: 1.6; }
.entry-card__cta { display: inline-block; margin-top: 0.9rem; font-weight: 600; font-size: 0.9rem; color: var(--acento-hover); }

/* Vista individual */
.entry-full { background: rgba(253,251,247,0.82); border-radius: var(--radio); padding: clamp(1.6rem,4vw,2.6rem); box-shadow: var(--sombra-card); }
.entry-full__date { color: var(--tinta-tenue); font-weight: 600; font-size: 0.9rem; }
.entry-full__body { margin-top: 1.2rem; white-space: pre-wrap; font-size: 1.08rem; line-height: 1.9; }
.entry-actions { display: flex; gap: 0.8rem; margin-top: 2rem; flex-wrap: wrap; align-items: center; }

/* Reproductor de audio en la vista de entrada */
.entry-audio { margin-top: 1.4rem; }
.entry-audio__label { display: block; font-size: 0.9rem; color: var(--tinta-suave); font-weight: 600; margin-bottom: 0.5rem; }
.entry-audio__player { width: 100%; height: 42px; }
.entry-card__audio { margin-left: 0.5rem; }

/* Grabador de voz en el formulario */
.recorder {
    background: rgba(255,255,255,0.6);
    border-radius: var(--radio-sm);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.recorder__row { display: flex; align-items: center; gap: 1rem; }
.recorder__btn { display: inline-flex; align-items: center; gap: 0.5rem; }
.recorder__dot {
    width: 11px; height: 11px; border-radius: 50%;
    background: #C98C9A; display: inline-block; flex: none;
}
.recorder.is-recording .recorder__dot { animation: rec-pulse 1.1s ease-in-out infinite; }
@keyframes rec-pulse { 0%,100% { opacity: 0.35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }
.recorder__time { font-family: var(--fuente-titulo); color: var(--tinta-suave); font-variant-numeric: tabular-nums; }
.recorder__preview { width: 100%; height: 40px; }
.recorder__discard { background: none; border: 0; cursor: pointer; color: var(--tinta-tenue); font-size: 0.9rem; text-decoration: underline; align-self: flex-start; font-family: var(--fuente-texto); }
.recorder__current { font-size: 0.9rem; color: var(--tinta-suave); }

/* Estado vacío */
.empty { text-align: center; padding: 3rem 1rem; color: var(--tinta-suave); }
.empty__leaf { font-size: 3rem; display: block; margin-bottom: 1rem; animation: float-soft 7s ease-in-out infinite; }

/* Form del diario */
.diary-form { display: flex; flex-direction: column; gap: 1.3rem; }
.diary-form__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* Selector de ánimo — botón disparador */
.mood-trigger {
    display: flex; align-items: center; gap: 0.7rem; width: 100%;
    background: rgba(255,255,255,0.85);
    border: 1.5px solid transparent; border-radius: var(--radio-sm);
    padding: 0.8rem 1rem; cursor: pointer;
    font-family: var(--fuente-texto); font-size: 1rem; color: var(--tinta);
    transition: border-color var(--transicion), box-shadow var(--transicion);
}
.mood-trigger:hover { border-color: var(--lavanda-suave); }
.mood-trigger:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(220,204,251,0.4); }
.mood-trigger__emoji { font-size: 1.5rem; line-height: 1; }
.mood-trigger__text { flex: 1; text-align: left; }
.mood-trigger__chevron { color: var(--tinta-tenue); font-size: 1.2rem; }

/* Modal de ánimo — centrado en pantalla (en móvil se vuelve bottom-sheet) */
.mood-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.mood-modal[hidden] { display: none; } /* respetar el atributo hidden (si no, el overlay invisible captura los clics) */
.mood-modal__overlay { position: absolute; inset: 0; background: rgba(74,68,88,0.4); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.25s ease; }
.mood-modal__card {
    position: relative; z-index: 1; width: 100%; max-width: 460px;
    max-height: 85vh; overflow-y: auto;
    background: var(--blanco-calido);
    border-radius: var(--radio);
    padding: 1.5rem 1.4rem 1.8rem;
    box-shadow: var(--sombra-card);
    opacity: 0; transform: translateY(14px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.mood-modal.is-open .mood-modal__overlay { opacity: 1; }
.mood-modal.is-open .mood-modal__card { opacity: 1; transform: translateY(0) scale(1); }

/* En teléfonos: bottom-sheet (pegado abajo, sube deslizando) */
@media (max-width: 560px) {
    .mood-modal { align-items: flex-end; padding: 0; }
    .mood-modal__card {
        max-width: none; max-height: 80vh;
        border-radius: var(--radio) var(--radio) 0 0;
        padding-bottom: 2rem;
        transform: translateY(100%);
    }
    .mood-modal.is-open .mood-modal__card { transform: translateY(0); }
}
.mood-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.mood-modal__title { font-size: 1.3rem; }
.mood-modal__x { background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--tinta-tenue); cursor: pointer; padding: 0 0.3rem; }
.mood-modal__clear { display: block; margin: 1rem auto 0; background: none; border: 0; color: var(--tinta-tenue); font-size: 0.9rem; text-decoration: underline; cursor: pointer; font-family: var(--fuente-texto); }

/* Grilla de ánimos: emoji grande + etiqueta, alegre y compacta */
.mood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.mood-card {
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
    background: rgba(255,255,255,0.7);
    border: 1.5px solid transparent; border-radius: var(--radio-sm);
    padding: 0.9rem 0.4rem; cursor: pointer;
    transition: transform var(--transicion), border-color var(--transicion), background var(--transicion);
}
.mood-card:hover { transform: translateY(-3px); background: #fff; }
.mood-card__emoji { font-size: 1.9rem; line-height: 1; }
.mood-card__label { font-size: 0.82rem; color: var(--tinta-suave); text-align: center; }
.mood-card.is-selected { border-color: var(--acento); background: var(--lavanda-suave); }
.mood-card.is-selected .mood-card__label { color: var(--tinta); font-weight: 600; }
/* "Sin ánimo": una card más, apenas atenuada (sin borde punteado) */
.mood-card--clear .mood-card__emoji { opacity: 0.55; }
.mood-card--clear .mood-card__label { color: var(--tinta-tenue); }

/* Bloquear scroll del fondo cuando el modal está abierto */
body.no-scroll { overflow: hidden; }

/* =============================================================================
   Animaciones — suaves, lentas, orgánicas
   ============================================================================= */
@keyframes reveal-up {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes float-soft {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-8px) rotate(3deg); }
}

/* Respeto a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* =============================================================================
   Responsive — mobile-first (el uso principal es en celular)
   ============================================================================= */

/* Tablet y abajo */
@media (max-width: 768px) {
    .hero { padding: 2.5rem 1.25rem; }
    .hero__cta { width: 100%; }
    .hero__cta .btn { width: 100%; max-width: 340px; }
}

/* Teléfonos */
@media (max-width: 560px) {
    /* Header móvil: circular a la IZQUIERDA · wordmark al CENTRO · hamburguesa a la DERECHA */
    .topbar { padding: 0.6rem 1rem; position: relative; justify-content: flex-start; }
    .topbar__brand { gap: 0; }
    .topbar__logo { height: 46px; }     /* circular, a la izquierda */
    .topbar__wordmark {                  /* wordmark centrado respecto al header */
        height: 30px;
        position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
        pointer-events: none;            /* el toque pasa al header/brand */
    }
    .topbar__burger { position: absolute; right: 0.8rem; top: 50%; transform: translateY(-50%); }

    /* Mostrar la hamburguesa; el nav pasa a desplegable */
    .topbar__burger { display: flex; }
    .topbar__nav {
        position: absolute; top: 100%; right: 0; left: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: rgba(253, 251, 247, 0.97);
        backdrop-filter: blur(10px);
        box-shadow: var(--sombra-card);
        padding: 0.4rem 0;
        max-height: 0; overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    .topbar__nav.is-open { max-height: 70vh; padding: 0.6rem 0; }
    .topbar__link { padding: 0.9rem 1.4rem; width: 100%; font-size: 1.05rem; }
    .topbar__logout { width: 100%; }
    .topbar__link--button { padding: 0.9rem 1.4rem; width: 100%; text-align: left; }

    .hero { min-height: calc(100svh - 60px); } /* svh evita el salto por la barra del navegador */
    .hero__greeting { margin-bottom: 1.1rem; }
    .hero__message p { margin-bottom: 0.9rem; }

    .wrap { padding: 1.5rem 1.1rem 2.5rem; }
    .page-head__row { flex-direction: column; align-items: stretch; }
    .page-head__row .btn { width: 100%; }

    .entry-card { padding: 1.2rem 1.3rem; }
    .entry-actions { flex-direction: column; align-items: stretch; }
    .entry-actions .btn,
    .entry-actions form,
    .entry-actions form .btn { width: 100%; }

    .diary-form__actions { flex-direction: column; }
    .diary-form__actions .btn { width: 100%; }

    .auth__card { padding: 1.8rem 1.4rem; }

    /* Áreas táctiles cómodas: nada por debajo de ~48px de alto */
    .btn { padding: 0.95rem 1.6rem; min-height: 48px; }
    .mood-card { padding: 0.8rem 0.3rem; }
    .mood-card__emoji { font-size: 1.7rem; }
}

/* Pantallas muy chicas (≤360px) */
@media (max-width: 360px) {
    .hero__greeting { font-size: 2.3rem; }
}

/* Inputs a 16px en móvil: por debajo de eso, iOS hace zoom automático al enfocar */
@media (max-width: 560px) {
    .field__input, .field__textarea { font-size: 16px; }
    .filters__search, .filters__mood { font-size: 16px; }
    /* La barra del diario apila: contador arriba, búsqueda a lo ancho */
    .diary-bar { flex-direction: column; align-items: stretch; gap: 0.8rem; }
    .search__toggle { text-align: center; }
}

/* =============================================================================
   JARDÍN — escena/lienzo
   ============================================================================= */
.garden-page { width: 100%; max-width: 900px; margin: 0 auto; padding: clamp(1rem,4vw,2rem) 1rem 3rem; }
.garden-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.garden-head__title { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.garden-head__sub { color: var(--tinta-suave); margin-top: 0.2rem; font-size: 0.95rem; }
.garden-flash { margin-bottom: 1rem; }

/* El lienzo donde todo convive */
.scene {
    position: relative;
    width: 100%;
    height: clamp(380px, 62vh, 620px);
    border-radius: var(--radio);
    box-shadow: var(--sombra-card);
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.scene__sky { position: absolute; inset: 0 0 auto 0; height: 40%; pointer-events: none; }
.scene__sun { position: absolute; top: 8%; right: 8%; font-size: 2.2rem; animation: float-soft 8s ease-in-out infinite; }

/* Pista de "toca para plantar" cuando está vacío */
.scene__hint {
    position: absolute; left: 50%; top: 55%; transform: translate(-50%,-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    color: var(--tinta-suave); font-weight: 600; pointer-events: none; text-align: center;
    background: rgba(253,251,247,0.7); padding: 1rem 1.4rem; border-radius: var(--radio);
}
.scene__hint-emoji { font-size: 2rem; animation: float-soft 3s ease-in-out infinite; }
.scene__help { text-align: center; color: var(--tinta-tenue); font-size: 0.88rem; margin-top: 0.9rem; }

/* Una planta colocada en el lienzo */
.splant {
    position: absolute; transform: translate(-50%, -85%);
    background: none; border: 0; cursor: pointer; padding: 0;
    display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
    -webkit-tap-highlight-color: transparent;
    transition: transform var(--transicion);
}
.splant:hover { transform: translate(-50%, -90%) scale(1.06); }
.splant__visual { font-size: 2.6rem; line-height: 1; animation: sway 5s ease-in-out infinite; display: block; }
.splant--mature .splant__visual { animation: bloom-pop 4s ease-in-out infinite; }
.splant__tag {
    font-family: var(--fuente-script); font-size: 1.05rem; color: var(--tinta);
    background: rgba(253,251,247,0.82); border-radius: 999px; padding: 0.05rem 0.6rem;
    max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.splant .asset--emoji { display: block; }
.splant .asset--img { width: 56px; height: 56px; object-fit: contain; display: block; }

/* ----- Modales del jardín (genéricos) ----- */
.gmodal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.gmodal[hidden] { display: none; }
.gmodal__overlay { position: absolute; inset: 0; background: rgba(74,68,88,0.4); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.25s ease; }
.gmodal__card {
    position: relative; z-index: 1; width: 100%; max-width: 520px; max-height: 82vh;
    background: var(--blanco-calido); border-radius: var(--radio); padding: 1.3rem 1.3rem 1.6rem;
    box-shadow: var(--sombra-card); overflow: hidden; display: flex; flex-direction: column;
    opacity: 0; transform: translateY(14px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.gmodal__card--sm { max-width: 380px; }
.gmodal.is-open .gmodal__overlay { opacity: 1; }
.gmodal.is-open .gmodal__card { opacity: 1; transform: translateY(0) scale(1); }
.gmodal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.gmodal__title { font-size: 1.25rem; }
.gmodal__x { background: none; border: 0; font-size: 1.7rem; line-height: 1; color: var(--tinta-tenue); cursor: pointer; padding: 0 0.3rem; }
.gmodal__scroll { overflow-y: auto; }

/* Despensa dentro del modal */
.shop__cat { font-size: 1rem; margin: 1.1rem 0 0.6rem; color: var(--tinta); }
.shop__cat:first-child { margin-top: 0; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.6rem; }
.shop-card {
    background: rgba(255,255,255,0.7); border: 0; cursor: pointer;
    border-radius: var(--radio-sm); padding: 0.8rem 0.4rem; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    transition: transform var(--transicion), background var(--transicion);
}
.shop-card:hover { transform: translateY(-3px); background: #fff; }
.shop-card__emoji { font-size: 2rem; line-height: 1; }
.shop-card__name { font-size: 0.82rem; color: var(--tinta); font-weight: 600; }
.shop-card__time { font-size: 0.7rem; color: var(--tinta-tenue); }

/* Ponerle nombre */
.name-pick { text-align: center; display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.name-pick__emoji { font-size: 3rem; display: block; margin-bottom: 0.4rem; animation: sway 5s ease-in-out infinite; flex: none; }
.name-pick__hint { flex: none; }
/* El formulario (input + botón Plantar) queda SIEMPRE visible abajo */
.name-pick__form { display: flex; flex-direction: column; gap: 0.7rem; flex: none; padding-top: 0.6rem; }

/* Cuidar */
.care__species { color: var(--tinta-suave); font-size: 0.9rem; }
.care__stage { color: var(--tinta-tenue); font-size: 0.85rem; margin: 0.3rem 0 1rem; }
.care__row { margin: 0 0 0.6rem; }
.care__more { margin-top: 0.5rem; }
.care__more summary { cursor: pointer; color: var(--tinta-tenue); font-size: 0.9rem; list-style: none; padding: 0.4rem 0; }
.care__more summary::-webkit-details-marker { display: none; }
.care__rename { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.6rem 0; }
.care__remove { margin-top: 0.3rem; }
.plant__bar { width: 100%; height: 8px; background: rgba(220,204,251,0.3); border-radius: 999px; overflow: hidden; }
.plant__bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--verde-natura), var(--acento)); border-radius: 999px; transition: width 0.6s ease; }

/* Terrenos */
.terrain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.8rem; }
.terrain-opt { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.terrain-opt__btn {
    width: 100%; height: 70px; border-radius: var(--radio-sm); cursor: pointer;
    border: 2.5px solid transparent; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--sombra-suave); transition: transform var(--transicion);
}
.terrain-opt__btn:hover { transform: translateY(-2px); }
.terrain-opt.is-current .terrain-opt__btn { border-color: var(--acento); }
.terrain-opt__emoji { font-size: 1.6rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15)); }
.terrain-opt__name { font-size: 0.8rem; color: var(--tinta-suave); }

@keyframes sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes bloom-pop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* --- Jardín: barra de ánimo --- */
.mood-bar { margin-bottom: 1rem; background: rgba(253,251,247,0.7); border-radius: var(--radio-sm); padding: 0.7rem 0.9rem; }
.mood-bar__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.mood-bar__label { font-weight: 600; color: var(--tinta); font-size: 0.92rem; }
.mood-bar__pct { font-family: var(--fuente-titulo); color: var(--acento-hover); font-weight: 600; }
.mood-bar__track { height: 12px; background: rgba(220,204,251,0.35); border-radius: 999px; overflow: hidden; }
.mood-bar__fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #CFE8FF, var(--verde-natura), var(--acento)); transition: width 0.7s cubic-bezier(0.22,1,0.36,1); }

/* --- Jardín: planta lista para cosechar --- */
.splant__ready { position: absolute; top: -8px; right: -6px; font-size: 1.1rem; animation: bloom-pop 1.6s ease-in-out infinite; }

/* --- Jardín: menú de herramientas --- */
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin: 0.4rem 0 0.8rem; }
.tool { margin: 0; }
.tool__btn {
    width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    background: rgba(255,255,255,0.8); border: 1.5px solid transparent; border-radius: var(--radio-sm);
    padding: 0.7rem 0.4rem; cursor: pointer; font-family: var(--fuente-texto); font-size: 0.85rem;
    color: var(--tinta); transition: transform var(--transicion), border-color var(--transicion), background var(--transicion);
}
.tool__btn:hover { transform: translateY(-2px); background: #fff; border-color: var(--lavanda-suave); }
.tool__emoji { font-size: 1.5rem; line-height: 1; }
.tool__btn--harvest { background: var(--verde-natura); font-weight: 600; }
.tool__btn--harvest:hover { background: #bfe3a8; }

/* --- Jardín: palabras motivadoras para nombrar la planta --- */
.name-pick__hint { font-size: 0.9rem; color: var(--tinta-suave); margin-bottom: 0.7rem; }
/* Solo las palabras scrollean; flex:1 + min-height:0 para que el botón no se empuje */
.name-words { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0.2rem; }
.name-word {
    background: rgba(220,204,251,0.25); border: 1.5px solid transparent;
    border-radius: 999px; padding: 0.45rem 0.9rem; cursor: pointer;
    font-family: var(--fuente-script); font-size: 1.15rem; color: var(--acento-hover);
    transition: transform var(--transicion), background var(--transicion), border-color var(--transicion);
}
.name-word:hover { transform: translateY(-2px); background: rgba(220,204,251,0.5); }
.name-word.is-picked { background: var(--lavanda-suave); border-color: var(--acento); color: var(--tinta); }

/* --- Jardín: cielo día/noche --- */
.scene__celestial { position: absolute; top: 8%; right: 9%; font-size: 2.4rem; animation: float-soft 9s ease-in-out infinite; z-index: 1; }
.scene[data-moment="noche"] { filter: brightness(0.82) saturate(0.9); }
.scene__stars i {
    position: absolute; width: 3px; height: 3px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 4px #fff; opacity: 0.85;
    animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 0%,100% { opacity: 0.2; } 50% { opacity: 0.95; } }

/* --- Jardín: tamaño de la planta según su etapa de crecimiento --- */
.splant[data-stagenum="0"] .splant__visual { font-size: 1.3rem; opacity: 0.9; }  /* semilla */
.splant[data-stagenum="1"] .splant__visual { font-size: 1.9rem; }                /* brote */
.splant[data-stagenum="2"] .splant__visual { font-size: 2.6rem; }                /* creciendo */
.splant[data-stagenum="3"] .splant__visual { font-size: 3.4rem; }                /* madura */
/* --- Jardín: tool quitar (rojo suave) --- */
.tool__btn--remove { color: #C98C9A; }
.tool__btn--remove:hover { background: rgba(248,221,235,0.6); border-color: #E8B7C5; }

/* --- Diario: tarjeta de acompañamiento (feedback al escribir) --- */
.dfeedback {
    display: flex; gap: 0.8rem; align-items: flex-start;
    background: linear-gradient(135deg, rgba(220,204,251,0.35), rgba(248,221,235,0.3));
    border-radius: var(--radio); padding: 1.1rem 1.2rem; margin-bottom: 1.5rem;
    box-shadow: var(--sombra-suave);
    animation: reveal-up 0.8s cubic-bezier(0.22,1,0.36,1) both;
}
.dfeedback__icon { font-size: 1.6rem; line-height: 1.4; flex: none; }
.dfeedback__text { color: var(--tinta); line-height: 1.6; font-size: 1rem; }

/* --- Jardín: tool de quitar (rojo suave) --- */
.tool__btn--remove { color: #C98C9A; }
.tool__btn--remove:hover { background: rgba(248,221,235,0.6); border-color: #E8B7C5; }

/* =============================================================================
   ADMIN (panel del papá)
   ============================================================================= */
.admin-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.admin-user { background: rgba(253,251,247,0.85); border-radius: var(--radio); padding: 1.2rem 1.4rem; box-shadow: var(--sombra-suave); }
.admin-user__head { display: flex; align-items: center; gap: 0.6rem; justify-content: space-between; }
.admin-user__name { font-size: 1.2rem; }
.admin-user__meta { color: var(--tinta-tenue); font-size: 0.85rem; margin: 0.2rem 0 0.7rem; }
.admin-stats { list-style: none; padding: 0; margin: 0 0 1rem; color: var(--tinta-suave); font-size: 0.9rem; display: flex; flex-direction: column; gap: 0.2rem; }
.admin-stats strong { color: var(--acento-hover); }
.admin-badge { font-size: 0.72rem; background: rgba(220,204,251,0.4); color: var(--tinta); border-radius: 999px; padding: 0.15rem 0.6rem; font-weight: 600; }
.admin-badge--alert { background: var(--rosa-emocional); color: #9C5C70; }

.admin-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin-section { font-size: 1.15rem; margin: 1.8rem 0 0.9rem; }

.admin-alerts { display: flex; flex-direction: column; gap: 0.8rem; }
.admin-alert { background: rgba(253,251,247,0.85); border-left: 4px solid var(--tinta-tenue); border-radius: var(--radio-sm); padding: 0.9rem 1.1rem; }
.admin-alert--high { border-left-color: #E0A03C; }
.admin-alert--critical { border-left-color: #C0392B; }
.admin-alert__top { display: flex; justify-content: space-between; font-size: 0.85rem; }
.admin-alert__level { font-weight: 700; }
.admin-alert__date { color: var(--tinta-tenue); }
.admin-alert__kw { color: var(--tinta-suave); font-size: 0.85rem; margin-top: 0.3rem; }
.admin-alert__excerpt { margin: 0.5rem 0 0; padding-left: 0.8rem; border-left: 2px solid var(--lavanda-suave); color: var(--tinta-suave); font-style: italic; }

.admin-entries { display: flex; flex-direction: column; gap: 1rem; }
.admin-entry { background: rgba(253,251,247,0.85); border-radius: var(--radio); padding: 1.1rem 1.3rem; box-shadow: var(--sombra-suave); }
.admin-entry--deleted { opacity: 0.7; background: rgba(248,221,235,0.25); }
.admin-entry__top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.admin-entry__date { font-size: 0.85rem; color: var(--tinta-tenue); font-weight: 600; }
.admin-entry__mood { font-size: 0.85rem; color: var(--acento-hover); }
.admin-entry__body { margin-top: 0.6rem; white-space: pre-wrap; line-height: 1.7; }
.admin-entry__audio { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.7rem; flex-wrap: wrap; }
.admin-entry__audio audio { height: 40px; max-width: 100%; }
.admin-entry__dl { font-size: 0.85rem; }
.admin-entry__del { margin: 0.7rem 0 0; }
.admin-entry__del-btn { background: none; border: 0; color: var(--tinta-tenue); font-size: 0.85rem; cursor: pointer; text-decoration: underline; font-family: var(--fuente-texto); }
.admin-entry__del-btn:hover { color: #C0392B; }

/* --- Registro: selector de género --- */
.gender-pick { display: flex; flex-direction: column; gap: 0.5rem; }
.gender-opt { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; background: rgba(255,255,255,0.85); border: 1.5px solid transparent; border-radius: var(--radio-sm); padding: 0.7rem 1rem; transition: border-color var(--transicion), background var(--transicion); }
.gender-opt:hover { border-color: var(--lavanda-suave); }
.gender-opt:has(input:checked) { border-color: var(--acento); background: var(--lavanda-suave); }
.gender-opt input { accent-color: var(--acento); }

/* =============================================================================
   PECERA (acuario): agua, peces nadando, accesorios del fondo
   ============================================================================= */
.no-scroll { overflow: hidden; }

.aqua-tools-top { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.aqua-tools-top__f { margin: 0; }

.tank {
    position: relative;
    width: 100%;
    height: clamp(360px, 56vh, 560px);
    border-radius: var(--radio);
    overflow: hidden;
    box-shadow: var(--sombra-card), inset 0 0 60px rgba(255, 255, 255, 0.25);
    border: 3px solid rgba(255, 255, 255, 0.55);
    cursor: pointer;
    isolation: isolate;
}
.tank__light { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: background var(--transicion); }
.tank__glass {
    position: absolute; inset: 0; z-index: 4; pointer-events: none;
    background: linear-gradient(115deg, rgba(255,255,255,0.28) 0%, transparent 22%, transparent 78%, rgba(255,255,255,0.12) 100%);
}
.tank__sand {
    position: absolute; left: 0; right: 0; bottom: 0; height: 12%; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(244,232,200,0) 0%, rgba(238,222,180,0.9) 100%);
}

/* Peces */
.afish {
    position: absolute; z-index: 2;
    background: none; border: 0; padding: 0; cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    will-change: transform;
}
.afish__body { display: block; transition: transform 0.4s ease; }
.afish__visual { display: block; line-height: 1; filter: drop-shadow(0 3px 6px rgba(40,60,90,0.22)); }
.afish[data-stagenum="0"] .afish__visual { font-size: 1.5rem; }
.afish[data-stagenum="1"] .afish__visual { font-size: 2.2rem; }
.afish[data-stagenum="2"] .afish__visual { font-size: 3rem; }
.afish--predator[data-stagenum="2"] .afish__visual { font-size: 3.6rem; }
.afish__tag {
    font-size: 0.62rem; color: var(--tinta); background: rgba(255,255,255,0.8);
    border-radius: 999px; padding: 0.05rem 0.5rem; margin-top: 0.12rem;
    white-space: nowrap; opacity: 0; transition: opacity var(--transicion); pointer-events: none;
}
.afish:hover .afish__tag, .afish:focus .afish__tag { opacity: 1; }

/* Accesorios del fondo */
.adecor {
    position: absolute; z-index: 1; transform: translate(-50%, -50%);
    background: none; border: 0; padding: 0.2rem; cursor: pointer;
    animation: sway 6s ease-in-out infinite;
}
.adecor__visual { font-size: 2.2rem; display: block; line-height: 1; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.15)); }
.adecor[data-item="burbujas"] { animation: bubble-rise 4s ease-in-out infinite; }
@keyframes bubble-rise {
    0%, 100% { transform: translate(-50%, -50%); opacity: 0.85; }
    50%      { transform: translate(-50%, -82%); opacity: 1; }
}

/* Tienda: pez carnívoro marcado */
.shop-card--pred { border: 1.5px solid rgba(231, 111, 81, 0.35); }
.shop-card--pred .shop-card__time { color: #C0654A; }

/* Luz */
.light-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.light-opt { margin: 0; }
.light-opt__btn {
    width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
    padding: 1rem 0.5rem; border-radius: var(--radio-sm); border: 2px solid transparent;
    background: rgba(255,255,255,0.7); cursor: pointer; transition: border-color var(--transicion), background var(--transicion);
}
.light-opt.is-current .light-opt__btn { border-color: var(--acento); background: var(--lavanda-suave); }
.light-opt__emoji { font-size: 1.8rem; }
.light-opt__name { font-size: 0.85rem; color: var(--tinta); }

@media (prefers-reduced-motion: reduce) {
    .adecor { animation: none; }
}

/* --- Pecera: peces ilustrados (SVG) en lugar de emoji --- */
.afish__visual .asset--img { width: 100%; height: auto; display: block; }
/* Tamaño del pez = clase (chico/mediano/grande) × etapa, conservando proporción */
.afish[data-size="chico"][data-stagenum="0"]   .afish__visual { width: 46px; }
.afish[data-size="chico"][data-stagenum="1"]   .afish__visual { width: 66px; }
.afish[data-size="chico"][data-stagenum="2"]   .afish__visual { width: 88px; }
.afish[data-size="mediano"][data-stagenum="0"] .afish__visual { width: 52px; }
.afish[data-size="mediano"][data-stagenum="1"] .afish__visual { width: 74px; }
.afish[data-size="mediano"][data-stagenum="2"] .afish__visual { width: 86px; }
.afish[data-size="grande"][data-stagenum="0"]  .afish__visual { width: 56px; }
.afish[data-size="grande"][data-stagenum="1"]  .afish__visual { width: 76px; }
.afish[data-size="grande"][data-stagenum="2"]  .afish__visual { width: 96px; }
/* respaldo si falta data-size */
.afish[data-stagenum="0"] .afish__visual { width: 52px; }
.afish[data-stagenum="1"] .afish__visual { width: 78px; }
.afish[data-stagenum="2"] .afish__visual { width: 100px; }
.shop-card__img { width: 56px; height: auto; display: block; margin: 0 auto; }
@media (max-width: 560px) {
    .afish__visual { transform: scale(0.84); transform-origin: center; }
}

/* === Pecera: accesorios SVG que DESCANSAN en el fondo (no flotan) ========== */
.adecor {
    z-index: 1;
    transform: translate(-50%, -100%);   /* la base del accesorio queda en pos_y */
    transform-origin: 50% 100%;
    animation: none;                      /* anula el flote anterior */
}
.adecor__visual { font-size: 0; line-height: 0; filter: drop-shadow(0 5px 4px rgba(20, 45, 65, 0.22)); }
.adecor__visual .asset--img { width: 100%; height: auto; display: block; }

/* Plantas y corales: se mecen suave DESDE LA BASE (no se desplazan) */
.adecor[data-item="alga"],
.adecor[data-item="planta"],
.adecor[data-item="kelp"],
.adecor[data-item="coral"] { animation: plant-sway 6s ease-in-out infinite; }
@keyframes plant-sway {
    0%, 100% { transform: translate(-50%, -100%) rotate(-2.5deg); }
    50%      { transform: translate(-50%, -100%) rotate(2.5deg); }
}

/* Tamaño de cada accesorio */
.adecor[data-item="castillo"] .adecor__visual { width: 120px; }
.adecor[data-item="coral"]    .adecor__visual { width: 66px; }
.adecor[data-item="roca"]     .adecor__visual { width: 84px; }
.adecor[data-item="tronco"]   .adecor__visual { width: 92px; }
.adecor[data-item="cofre"]    .adecor__visual { width: 74px; }
.adecor[data-item="alga"]     .adecor__visual,
.adecor[data-item="planta"]   .adecor__visual,
.adecor[data-item="kelp"]     .adecor__visual { width: 50px; }
.adecor[data-item="ancla"]    .adecor__visual { width: 50px; }
.adecor[data-item="concha"]   .adecor__visual,
.adecor[data-item="caracol"]  .adecor__visual,
.adecor[data-item="perla"]    .adecor__visual { width: 48px; }
.adecor[data-item="burbujas"] .adecor__visual { width: 44px; animation: bubbler-pulse 3s ease-in-out infinite; }
@keyframes bubbler-pulse { 0%,100% { opacity: .9; } 50% { opacity: 1; } }

/* Imágenes en las tiendas */
.shop-card__img--decor { width: 46px; }

/* === Pecera: selector de pecera 1 / 2 ====================================== */
.tank-tabs { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; }
.tank-tab {
    padding: 0.45rem 1.2rem; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
    font-family: var(--fuente-titulo); color: var(--tinta-suave);
    background: rgba(255,255,255,0.6); border: 1.5px solid transparent;
    transition: color var(--transicion), background var(--transicion), box-shadow var(--transicion);
}
.tank-tab:hover { color: var(--tinta); }
.tank-tab.is-active { background: var(--acento); color: var(--blanco-calido); box-shadow: var(--sombra-suave); }

/* === Jardín: accesorios que descansan sobre el terreno ===================== */
.gdecor {
    position: absolute; z-index: 3;
    transform: translate(-50%, -100%);     /* la base del accesorio en pos_y */
    transform-origin: 50% 100%;
    background: none; border: 0; padding: 0; cursor: pointer;
}
.gdecor__visual { display: block; line-height: 0; font-size: 0; filter: drop-shadow(0 4px 4px rgba(40, 60, 30, 0.25)); }
.gdecor__visual .asset--img { width: 100%; height: auto; display: block; }
.gdecor__visual .asset--emoji { font-size: 2.2rem; line-height: 1; }

/* Tamaño por accesorio */
.gdecor[data-item="fuente"]       .gdecor__visual { width: 66px; }
.gdecor[data-item="casa_pajaros"] .gdecor__visual { width: 56px; }
.gdecor[data-item="farol"]        .gdecor__visual { width: 46px; }
.gdecor[data-item="banco"]        .gdecor__visual { width: 84px; }
.gdecor[data-item="valla"]        .gdecor__visual { width: 92px; }
.gdecor[data-item="camino"]       .gdecor__visual { width: 96px; }
.gdecor[data-item="estanque"]     .gdecor__visual { width: 96px; }
.gdecor[data-item="piedra"]       .gdecor__visual { width: 70px; }
.gdecor[data-item="gnomo"]        .gdecor__visual { width: 46px; }
.gdecor[data-item="regadera"]     .gdecor__visual { width: 60px; }
.gdecor[data-item="pajaro"]       .gdecor__visual { width: 50px; animation: float-soft 4s ease-in-out infinite; }
.gdecor[data-item="mariposa"]     .gdecor__visual { width: 46px; animation: float-soft 3.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .gdecor__visual { animation: none !important; }
}

/* Pecera/Jardín: botón "otra pecera/jardín" (selector cuando hay 2) */
.tank-tab--new { background: rgba(255,255,255,0.5); border: 1.5px dashed var(--tinta-tenue); color: var(--tinta-suave); }
.tank-tab--new:hover { border-color: var(--acento); color: var(--tinta); }

/* === Modo "colocar accesorio tocando" ===================================== */
.place-hint {
    position: fixed; left: 50%; top: 0.7rem; transform: translateX(-50%);
    z-index: 60; display: flex; gap: 0.55rem; align-items: center;
    background: var(--acento); color: var(--blanco-calido);
    border-radius: 999px; padding: 0.4rem 0.55rem 0.4rem 0.9rem; box-shadow: var(--sombra-suave);
    font-weight: 600; font-size: 0.82rem; font-family: var(--fuente-titulo);
    max-width: 94vw;
}
.place-hint__btn {
    background: rgba(255,255,255,0.92); color: var(--acento-hover); border: 0;
    border-radius: 999px; padding: 0.28rem 0.8rem; cursor: pointer; font-weight: 700;
    font-family: var(--fuente-texto); font-size: 0.82rem; white-space: nowrap;
}
.place-hint__btn--remove { background: #F8DDEB; color: #C0392B; }
.tank.is-placing, .scene.is-placing { cursor: crosshair; }
.tank.is-placing { box-shadow: var(--sombra-card), inset 0 0 0 3px var(--acento); }
.scene.is-placing { box-shadow: inset 0 0 0 3px var(--acento); }

/* === Pecera: accesorios por zona (superficie / agua) ====================== */
.adecor[data-zone="superficie"] { transform: translate(-50%, -8%); z-index: 5; }
.adecor[data-zone="agua"]       { transform: translate(-50%, -50%); }
.adecor[data-zone="superficie"] .adecor__visual,
.adecor[data-zone="agua"] .adecor__visual { animation: float-soft 5s ease-in-out infinite; }
.adecor[data-item="barco"] .adecor__visual { width: 110px; }
.adecor[data-item="yate"]  .adecor__visual { width: 100px; }
.adecor[data-item="buzo"]  .adecor__visual { width: 54px; }
/* botón "quitar" del cartel (rojo suave) */
.place-hint__cancel#placeRemove, .place-hint__cancel#gplaceRemove { color: #C0654A; }

/* === Arrastrar accesorios: mover, o soltar en la papelera (esquina) para quitar = */
.adecor, .gdecor { touch-action: none; }
.adecor.dragging, .gdecor.dragging { opacity: 0.92; z-index: 40; filter: drop-shadow(0 8px 10px rgba(20,40,60,0.35)); }
/* La papelera vive DENTRO de la escena, en una esquina; sólo se ve al arrastrar */
.trash-zone {
    position: absolute; right: 0.7rem; bottom: 0.7rem;
    z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
    background: rgba(255,255,255,0.86); color: var(--tinta-suave);
    border: 2px dashed rgba(120,110,140,0.55); border-radius: var(--radio-sm);
    padding: 0.55rem 0.7rem; box-shadow: var(--sombra-suave);
    font-weight: 700; font-size: 0.66rem; line-height: 1.15; text-align: center;
    font-family: var(--fuente-texto); pointer-events: none;
    opacity: 0; transform: scale(0.9); transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s ease;
}
.trash-zone:not([hidden]) { opacity: 1; transform: scale(1); }
.trash-zone__icon { font-size: 1.5rem; line-height: 1; }
.trash-zone.over { background: var(--rosa-emocional); border-color: #C0392B; color: #C0392B; transform: scale(1.12); }
