/* Spanish practice: look and feel (loaded after styles.css). Scoped under .es-app; the colours come from the
   site's own tokens through the --es-* aliases defined in styles.css, so dark mode follows the site. There is no
   header, theme switch or animated background here: the site's header and footer surround the app. */

/* ---------- Pestañas ---------- */
.es-app .es-tabs {
  display: flex; gap: 4px; justify-content: center; width: fit-content; max-width: 100%;
  margin: 0 auto 18px; padding: 4px; border-radius: 999px;
  background: var(--es-card); border: 1px solid var(--es-line); box-shadow: var(--es-shadow);
}
.es-app .es-tabs button,
.es-app .es-tabs button:not(.active) {
  background: transparent; border: 0; color: var(--es-muted); font-weight: 600; padding: 0.55rem 1.05rem; border-radius: 999px;
}
.es-app .es-tabs button:hover { color: var(--es-text); filter: none; }
.es-app .es-tabs button.active { background: var(--es-accent); color: var(--es-on-accent); }

/* ---------- Contenido ---------- */
.es-app .tab { scroll-margin-top: 76px; }
.es-app .tab.active { animation: es-rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes es-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.es-app .card { border-radius: 18px; position: relative; }
.es-app .review-cta { background-image: linear-gradient(135deg, color-mix(in srgb, var(--es-gold) 12%, transparent), transparent 60%); }

/* Frase del día: la protagonista */
.es-app .phrase-card { padding: 26px 22px 22px; }
.es-app .phrase-card .row { justify-content: flex-start; }
.es-app #phrase-reveal { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--es-line); animation: es-rise 0.3s ease; }
.es-app .example { color: var(--es-text); }

/* Más práctica: accesos a Mis errores, Lecturas y Mi progreso */
.es-app .hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.es-app .hub-btn {
  display: flex; align-items: center; gap: 6px; justify-content: flex-start; text-align: left; min-height: 48px;
  padding: 10px 12px; border-radius: 14px; background: var(--es-card-2); border: 1px solid var(--es-line); color: var(--es-text);
  font-weight: 600; min-width: 0; font-size: 0.9rem; line-height: 1.2; hyphens: auto;
}
.es-app .hub-btn:hover { border-color: var(--es-accent); }
.es-app .hub-btn small { margin-left: auto; color: var(--es-muted); font-weight: 600; }
.es-app .hub-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.es-app .mision-card:empty { display: none; }

@media (max-width: 480px) {
  .es-app .es-tabs { width: 100%; }
  .es-app .es-tabs button { flex: 1; padding: 0.55rem 0.4rem; font-size: 0.92rem; }
  .es-app .card { border-radius: 16px; }
  .es-app .phrase-card { padding: 22px 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .es-app .tab.active, .es-app #phrase-reveal { animation: none !important; }
}
