/* ================= SYSTEM DESIGN VARIABLES ================= */
:root {
  --bg: #fffcf4;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-elev: #ffffff;
  --border: #000000;
  --border-highlight: #000000;
  --border-focus: #ff90e8;
  --text: #121212;
  --text-dim: #5c5c5c;
  --accent: #ff90e8;
  --accent-copper: #ffdf00;
  --accent-glow: rgba(255, 144, 232, 0.1);
  --accent-hover: #ff75e3;
  --success: #a3e635;
  --warning: #ffdf00;
  --info: #a3e5f7;
  --danger: #ff5c5c;
  --radius: 0px;
  --radius-sm: 0px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --glass-blur: none;
  --transition: all 0.15s ease;
  --brutalist-shadow: 6px 6px 0px #000000;
  --brutalist-shadow-hover: 3px 3px 0px #000000;
}

/* ================= BASIC RESET & CONFIG ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ================= ACCESIBILIDAD: FOCUS VISIBLE GLOBAL =================
   Brutalism con bordes negros oculta el focus default del browser.
   Outline rosa accent + offset 2px = visible sin pelearse con la estética.
   Aplica a botones, links, inputs, divs interactivos, etc. */
:focus-visible {
  outline: 3px solid var(--accent, #ff90e8);
  outline-offset: 2px;
  border-radius: 2px;
}
/* Inputs y textareas: outline integrado con el borde, no offset */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent, #ff90e8);
  outline-offset: 0;
}
/* Skip default outline en click con mouse, solo mostrarlo en keyboard nav */
:focus:not(:focus-visible) {
  outline: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-copper);
}

/* ================= FLOATING GLOWING ORBS ================= */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}
.orb-1 {
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(100, 74, 64, 0.15) 0%, transparent 80%);
  top: -10vw;
  right: -5vw;
}
.orb-2 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(254, 224, 194, 0.08) 0%, transparent 80%);
  bottom: -15vw;
  left: -10vw;
}
.orb-3 {
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.05) 0%, transparent 80%);
  top: 30%;
  left: 40%;
}

/* ================= CYBER-BRUTALIST BUTTONS ================= */
.btn-brutalist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: 4px 4px 0px var(--border);
}

.btn-brutalist:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--border);
}

.btn-accent {
  background: var(--accent);
  color: #0c0c0e;
  border-color: #ffe0c2;
  box-shadow: 5px 5px 0px var(--accent-copper);
}

.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 2px 2px 0px var(--accent-copper);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  box-shadow: 4px 4px 0px var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  box-shadow: 2px 2px 0px var(--accent);
  color: var(--text);
}

.btn-block {
  width: 100%;
  display: flex;
}

/* ================= LANDING PAGE GENERAL STYLING ================= */
.landing-body {
  background-color: var(--bg);
}

.landing-header {
  background: var(--bg, #fffcf4);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 0 var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-icon {
  font-size: 1.8rem;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--text);
}
.logo-text span {
  color: #000;
  background: var(--accent-copper);
  padding: 0 0.2rem;
  margin-left: 0.1rem;
}

/* ================= BRAND LOGO CYBER-BRUTALIST ================= */
.brand-logo-brutalist {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  color: #000 !important;
  background: var(--accent-copper);
  border: 2.5px solid #000;
  padding: 0.35rem 0.8rem;
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transform: rotate(-1.5deg);
  box-shadow: 4px 4px 0px #000000;
  transition: var(--transition);
  user-select: none;
  cursor: pointer;
  text-decoration: none !important;
}
.brand-logo-brutalist span {
  background: #000;
  color: #fffcf4 !important;
  padding: 0 0.3rem;
  margin-left: 0.15rem;
}
.brand-logo-brutalist:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 6px 6px 0px #000000;
}
.brand-logo-lg {
  font-size: 2.2rem;
  padding: 0.5rem 1.2rem;
  border-width: 3px;
  box-shadow: 6px 6px 0px #000000;
  margin-bottom: 1.5rem;
  display: inline-flex;
}
.brand-logo-lg:hover {
  box-shadow: 8px 8px 0px #000000;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--text);
}
.lang-toggle {
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.06em;
  box-shadow: 2px 2px 0 #000;
  transition: var(--transition, all 0.15s ease);
}
.lang-toggle:hover {
  background: var(--accent-copper, #ffdf00);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}

/* Hero Section */
.hero-section {
  padding: 6rem 2rem 4rem;
  text-align: center;
}
.hero-container {
  max-width: 900px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: var(--accent-copper);
  border: 2px solid #000;
  color: #000;
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 #000;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.hero-title span {
  color: var(--accent-copper);
  position: relative;
}
.hero-title span::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(230, 163, 130, 0.2);
  z-index: -1;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 2px 2px 0 #000;
  border-radius: 4px;
}
.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}
.hero-ctas .btn-large {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

/* Carrusel Infinito de Libros (Brutalist Slider) */
.slider-section {
  padding: 3rem 0;
  overflow: hidden;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  background: rgba(20, 20, 25, 0.3);
  position: relative;
}
.slider-wrapper {
  width: 100%;
  display: flex;
}
.slider-track {
  display: flex;
  width: max-content;
  animation: scrollInfinite 50s linear infinite;
  will-change: transform;
}
.slider-track > .slider-card-brutalist {
  margin-right: 2rem;
  flex-shrink: 0;
}
.slider-track:hover {
  animation-play-state: paused;
}

@keyframes scrollInfinite {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.slider-card-brutalist {
  width: 230px;
  height: 150px;
  flex-shrink: 0;
  background: #fffcf4;
  border: 2.5px solid #000;
  border-radius: 0;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: 5px 5px 0 #000;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
/* Borde decorativo vertical izquierdo, color por género/card */
.slider-card-brutalist::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 8px;
  background: var(--card-accent, var(--accent-copper, #ffdf00));
  border-right: 2px solid #000;
}
.slider-card-brutalist:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--card-accent, var(--accent-copper, #ffdf00));
}

.card-info {
  overflow: hidden;
  padding-left: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}
.card-info h4 {
  font-family: var(--font-display, inherit);
  font-size: 1.05rem;
  font-weight: 900;
  color: #000;
  margin-bottom: 0.15rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.card-info p {
  font-size: 0.78rem;
  color: #444;
  margin-bottom: 0.5rem;
  font-style: italic;
}
.card-badge {
  display: inline-block;
  font-size: 0.66rem;
  background: #000;
  color: #fff;
  border: 1.5px solid #000;
  padding: 0.18rem 0.5rem;
  border-radius: 0;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: auto;
  align-self: flex-start;
}

/* Color accent por card (para el borde izquierdo y la sombra hover) */
.card-color-1 { --card-accent: #ffdf00; }   /* amarillo cafecito */
.card-color-2 { --card-accent: #ff90e8; }   /* rosa Gumroad */
.card-color-3 { --card-accent: #2d4a3e; }   /* verde distopía */
.card-color-4 { --card-accent: #c97b3a; }   /* ocre realismo mágico */
.card-color-5 { --card-accent: #3a5dc9; }   /* azul ciencia ficción */

/* Features Section */
.features-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title-wrapper {
  text-align: center;
  margin-bottom: 4rem;
}
.section-subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  background: var(--accent-copper);
  color: #000;
  border: 2px solid #000;
  letter-spacing: 0.15em;
  font-weight: 800;
  display: inline-block;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
  box-shadow: 2px 2px 0 #000;
}
.section-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text);
}
.section-desc {
  color: var(--text-dim);
  margin-top: 0.5rem;
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.feature-card-brutalist {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 2.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 6px 6px 0px var(--border);
  transition: var(--transition);
}
.feature-card-brutalist:hover {
  transform: translate(-3px, -3px);
  border-color: var(--accent);
  box-shadow: 9px 9px 0px var(--accent);
}
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}
.feature-card-brutalist h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}
.feature-card-brutalist p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Pricing / Cafecito Section */
.pricing-section {
  padding: 6rem 2rem;
  border-top: 2px solid var(--border);
  background: radial-gradient(circle at bottom, rgba(100, 74, 64, 0.05), transparent 40%);
}
.pricing-container {
  max-width: 1000px;
  margin: 0 auto;
}
.pricing-single-card {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.pricing-single-card .price-card-brutalist {
  max-width: 540px;
  width: 100%;
}
.cafecito-optional {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1.5px dashed var(--accent-copper);
  text-align: center;
}
.cafecito-optional-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  font-style: italic;
}
.btn-cafecito-optional {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-copper);
  color: #000;
  border: 2px solid #000;
  padding: 0.55rem 1.1rem;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 3px 3px 0 #000;
  transition: var(--transition);
  letter-spacing: 0.02em;
}
.btn-cafecito-optional:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}
.price-card-brutalist {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 2.5px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  box-shadow: 6px 6px 0px var(--border);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}
.price-card-brutalist:hover {
  transform: translate(-3px, -3px);
  border-color: var(--accent);
  box-shadow: 9px 9px 0px var(--accent);
}
.price-card-brutalist.popular {
  border-color: var(--accent-copper);
  box-shadow: 6px 6px 0px var(--accent-copper);
  background: rgba(30, 25, 25, 0.7);
}
.price-card-brutalist.popular:hover {
  border-color: var(--accent);
  box-shadow: 9px 9px 0px var(--accent);
}
.popular-ribbon {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--accent-copper);
  color: #0c0c0e;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.3rem 0.6rem;
  border-radius: 99px;
  letter-spacing: 0.05em;
}
.card-tier {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.price-card-brutalist.popular .card-tier {
  color: var(--accent-copper);
}
.card-price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 1rem;
}
.price-card-brutalist.popular .card-price {
  color: white;
}
.card-price-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  line-height: 1.5;
}
.card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 3rem;
  flex: 1;
}
.card-features li {
  font-size: 0.95rem;
  color: var(--text);
}
.card-features strong {
  color: var(--text);
}
.price-card-brutalist.popular .card-features li {
  color: #ffffff;
}
.price-card-brutalist.popular .card-features strong {
  color: var(--accent-copper);
}

.landing-footer {
  padding: 3rem 2rem;
  border-top: 2px solid var(--border);
  background: #08080a;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim);
}


/* ================= APPLICATION LAYOUT (DASHBOARD) ================= */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* App Sidebar (Translucent Obsidian Glass) */
.app-sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 2.5px solid var(--border);
  backdrop-filter: var(--glass-blur);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 1.5rem;
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.sidebar-brand .brand-icon {
  font-size: 2rem;
}
.sidebar-brand .brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text);
}
.sidebar-brand .brand-text p {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--accent-copper);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: 2px solid transparent;
  color: var(--text-dim);
  padding: 0.8rem 1.15rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.nav-btn:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.04);
}

.nav-btn.active {
  color: #0c0c0e;
  background: var(--accent);
  border-color: #ffe0c2;
  box-shadow: 4px 4px 0px var(--accent-copper);
}

/* Iconos SVG inline (Lucide) en sidebar — heredan color del nav-btn */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform 160ms ease;
}
.nav-btn:hover .nav-icon svg {
  transform: rotate(-4deg) scale(1.08);
}
.nav-btn.active .nav-icon svg {
  stroke: #0c0c0e;
}

.sidebar-footer {
  border-top: 2px solid var(--border);
  padding-top: 1.25rem;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* User profile badge with Donor Status Support */
.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-copper), #b87a5d);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: #0c0c0e;
  font-size: 0.95rem;
}
.user-badge.pro-user .user-avatar {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}
.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.user-role {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.user-badge.pro-user .user-role {
  color: #fbbf24;
  font-weight: 700;
}

/* Cafecito sidebar promo button */
.btn-cafecito-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffdd00;
  color: #000;
  border: 2px solid #000;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 3px 3px 0px #000;
}
.btn-cafecito-sidebar:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0px #000;
  background: #ffea55;
}
.btn-cafecito-sidebar.hidden {
  display: none !important;
}

/* App Main Panel */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: radial-gradient(circle at top right, rgba(100, 74, 64, 0.05), transparent 450px), var(--bg);
}

.main-header {
  padding: 2rem 2.5rem 1.5rem;
}
.header-welcome h1, .header-welcome h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.header-welcome p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Stats Widgets (High Contrast Glass brutalism) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 4px 4px 0px var(--border);
  transition: var(--transition);
}
.stat-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--accent);
  box-shadow: 6px 6px 0px var(--accent);
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon.purple { background: rgba(168, 85, 247, 0.1); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.2); }
.stat-icon.orange { background: rgba(230, 163, 130, 0.1); color: var(--accent-copper); border: 1px solid rgba(230, 163, 130, 0.2); }
.stat-icon.green { background: rgba(134, 239, 172, 0.1); color: #166534; border: 1px solid rgba(134, 239, 172, 0.2); }
.stat-icon.blue { background: rgba(147, 197, 253, 0.1); color: var(--info); border: 1px solid rgba(147, 197, 253, 0.2); }
.stat-icon.pink { background: rgba(255, 144, 232, 0.12); color: #d63ab5; border: 1px solid rgba(255, 144, 232, 0.25); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #0c0c0e;
  border: 2px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 4px 4px 0px var(--border);
  border-radius: var(--radius, 0);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--border);
  background: var(--accent-hover, var(--accent));
}
.btn-primary:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0px var(--border);
}

.stat-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 700;
}
.stat-info h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Tab contents */
.tab-content-container {
  padding: 0 2.5rem 3rem;
  flex: 1;
}
.tab-view {
  display: none;
  animation: tabFadeIn 0.35s ease;
}
.tab-view.active {
  display: block;
}

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

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.75rem;
}
.section-header h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}

.badge {
  background: var(--bg-elev);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================= BOOKS CATALOG GRID ================= */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.book-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 2.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 4px 4px 0px var(--border);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.book-card:hover {
  transform: translate(-3px, -3px);
  border-color: var(--accent);
  box-shadow: 7px 7px 0px var(--accent);
}

.book-cover-image-container {
  aspect-ratio: 2 / 3;          /* Ratio típico de libros — coincide con la mayoría de covers reales */
  width: 100%;
  position: relative;
  background: #fffcf4;
  border-bottom: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
}
.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;             /* Llena el container sin huecos */
  object-position: center;
  transition: transform 0.5s ease;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.book-card:hover .book-cover-img {
  transform: scale(1.04);
}

/* Cover procedural fallback styling - Hardcover Brutalist Spine physics */
.book-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 1rem 1rem 1.75rem !important; /* Más espacio a la izquierda por el lomo */
  position: relative;
  box-shadow: inset 14px 0 0px rgba(0, 0, 0, 0.4), 
              inset 16px 0 0px rgba(255, 255, 255, 0.1),
              inset -4px -4px 0px rgba(0, 0, 0, 0.25);
  border: 2px solid #000;
  overflow: hidden;
  box-sizing: border-box;
}
.fallback-spine-line {
  position: absolute;
  top: 0;
  left: 14px;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 1px 0 1px rgba(255, 255, 255, 0.15);
  z-index: 2;
}
.fallback-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.62rem;
  background: #000000;
  color: #ffffff;
  padding: 0.2rem 0.5rem;
  border: 1.5px solid #000000;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
  z-index: 3;
}
.fallback-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: white;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 3;
}
.fallback-author {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 3;
}

/* Cover fallback brutalist nuevo (cuando OL + Google + longitood no tienen cover).
   Color por género, tipografía grande, número de catálogo decorativo.
   Mantiene aspect ratio coherente con el container 260px del book-card. */
.cover-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 14px 14px 16px;
  font-family: var(--font-sans, system-ui, sans-serif);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.cover-fb-top {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 2px solid currentColor;
  padding-bottom: 6px;
  opacity: 0.85;
}
.cover-fb-title {
  font-family: var(--font-display, inherit);
  font-size: clamp(15px, 2.2vw, 22px);
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  align-self: center;
  word-break: break-word;
  text-align: left;
  padding: 0.5rem 0;
}
.cover-fb-author {
  font-size: 12px;
  font-style: italic;
  font-weight: 600;
  border-top: 2px solid currentColor;
  padding-top: 6px;
  opacity: 0.9;
}

.book-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.book-title-mock {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.book-title-mock:hover {
  color: var(--accent-copper);
}

.book-author-mock {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.75rem;
}

.book-rating-stars {
  display: flex;
  gap: 0.15rem;
}
.star {
  font-size: 1.2rem;
  color: rgba(18, 18, 18, 0.12);
  cursor: pointer;
  transition: transform 0.1s ease;
}
.star.active {
  color: var(--warning);
  text-shadow: 0 0 6px rgba(254, 240, 138, 0.4);
}
.star:hover {
  transform: scale(1.25);
}

.book-awards-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.75rem 0;
}
.award-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(134, 239, 172, 0.08);
  border: 1px solid rgba(134, 239, 172, 0.2);
  color: #166534;
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.book-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.delete-btn {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
}
.delete-btn:hover {
  color: var(--danger);
  background: rgba(252, 165, 165, 0.15);
}

.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-style: italic;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.loading-spinner::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-copper);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================= SEARCH & ADD ================= */
.search-box-container {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 2.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 4px 4px 0px var(--border);
  margin-bottom: 2rem;
}
.search-input-wrapper {
  display: flex;
  gap: 0.75rem;
  position: relative;
  align-items: center;
}
.search-input-icon {
  position: absolute;
  left: 1.25rem;
  font-size: 1.1rem;
  color: var(--text-dim);
  pointer-events: none;
}
.search-input-wrapper input {
  flex: 1;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  font-size: 0.98rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}
.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.search-results-section {
  margin-bottom: 2.5rem;
}
.search-results-section h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent-copper);
  font-weight: 700;
}
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.search-result-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  box-shadow: 4px 4px 0px var(--border);
  transition: var(--transition);
}
.search-result-card:hover {
  border-color: var(--accent);
  box-shadow: 5px 5px 0px var(--accent);
}
.result-cover-placeholder {
  width: 60px;
  height: 85px;
  background: var(--bg-elev);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.result-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.result-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.result-author {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.result-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.btn-add-quick {
  background: rgba(134, 239, 172, 0.1);
  border: 1.5px solid rgba(134, 239, 172, 0.25);
  color: #166534;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 0.5rem;
  font-weight: 700;
  align-self: flex-start;
  transition: var(--transition);
}
.btn-add-quick:hover {
  background: var(--success);
  color: #0c0c0e;
  border-color: var(--success);
}

/* Manual Insert Form */
.manual-insert-card {
  background: var(--bg-card);
  border: 2.5px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 4px 4px 0px var(--border);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group.full-width {
  grid-column: span 2;
}
.form-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 700;
}
.form-group input, .form-group select {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.8rem;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
}
.form-actions {
  grid-column: span 2;
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* ================= SUGGESTIONS LIST PANEL ================= */
.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.recommendation-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 2.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  box-shadow: 4px 4px 0px var(--border);
  transition: var(--transition);
  align-items: center;
}
.recommendation-card:hover {
  border-color: var(--accent);
  box-shadow: 6px 6px 0px var(--accent);
}
.rec-cover-placeholder {
  width: 70px;
  height: 100px;
  background: radial-gradient(circle, rgba(230, 163, 130, 0.1), #1a1a24);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 1.5px solid rgba(230, 163, 130, 0.2);
  flex-shrink: 0;
}
.rec-details {
  flex: 1;
}
.rec-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.rec-author {
  font-size: 0.85rem;
  color: var(--accent-copper);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.rec-reason {
  font-size: 0.85rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--info);
  padding: 0.4rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.rec-cover-image {
  width: 90px;
  height: 130px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--border);
  overflow: hidden;
}
.rec-cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rec-genre-badge {
  display: inline-block;
  background: var(--accent);
  color: #000;
  border: 2px solid #000;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.5rem;
  box-shadow: 1.5px 1.5px 0px #000;
}
.rec-description {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.45;
  margin: 0.4rem 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rec-add-btn {
  padding: 0.4rem 1rem !important;
  font-size: 0.8rem !important;
}
.rec-actions, .discover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}
.btn-dismiss-suggestion {
  background: transparent;
  color: #666;
  border: 1.5px dashed #999;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition, all 0.15s ease);
}
.btn-dismiss-suggestion:hover {
  background: #fff;
  color: #000;
  border-color: #000;
  border-style: solid;
}
.btn-snooze-suggestion {
  background: transparent;
  color: #8a6d00;
  border: 1.5px dashed #c9a300;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition, all 0.15s ease);
}
.btn-snooze-suggestion:hover {
  background: #fff5d6;
  color: #000;
  border-color: #8a6d00;
  border-style: solid;
}

/* ================= MODAL DETALLE DE LIBRO ================= */
.book-detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 4vh 1rem;
}
.book-detail-modal.active {
  display: flex;
  animation: bookDetailIn 0.2s ease-out;
}
@keyframes bookDetailIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.book-detail-box {
  background: #fffcf4;
  border: 3px solid #000;
  box-shadow: 10px 10px 0 var(--accent-copper, #ffdf00);
  max-width: 1040px;
  width: 100%;
  padding: 2.25rem 2.25rem 2rem;
  position: relative;
}
.book-detail-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #fff;
  border: 2px solid #000;
  width: 36px;
  height: 36px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  transition: var(--transition, all 0.15s ease);
  z-index: 2;
}
.book-detail-close:hover {
  background: var(--accent, #ff90e8);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}
.book-detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.25rem;
  align-items: start;
}
.book-detail-cover {
  width: 320px;
  aspect-ratio: 2 / 3;
  background: #fff;
  border: 3px solid #000;
  box-shadow: 8px 8px 0 #000;
  overflow: hidden;
  position: relative;
}
.book-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.book-detail-title {
  font-family: var(--font-display, inherit);
  font-size: 2.1rem;
  font-weight: 900;
  color: #000;
  line-height: 1.1;
  margin-bottom: 0.35rem;
  padding-right: 2.5rem;
}
.book-detail-author {
  font-size: 1rem;
  color: #444;
  font-style: italic;
  margin-bottom: 1rem;
}
.book-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.book-detail-meta-item {
  background: #fff;
  border: 1.5px solid #000;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #000;
}
.book-detail-awards {
  margin-bottom: 1rem;
}
.book-detail-award {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-copper, #ffdf00);
  color: #000;
  border: 2px solid #000;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  margin: 0 0.4rem 0.4rem 0;
  box-shadow: 2px 2px 0 #000;
}
.book-detail-country {
  background: #fff;
  border: 1.5px solid #000;
  padding: 0.05rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
}
.book-detail-description {
  font-size: 0.95rem;
  color: #1a1a1a;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.book-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1.5px dashed #000;
}
.btn-goodreads-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 2px 2px 0 #000;
  transition: var(--transition, all 0.15s ease);
  font-family: inherit;
}
.btn-goodreads-link:hover {
  background: #553b08;
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}
/* Rating editable (estrellas grandes en modal unificado) */
.book-detail-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.5rem 0 1.25rem;
}
.book-detail-rating .star {
  font-size: 1.9rem;
  line-height: 1;
  color: #ccc;
  cursor: pointer;
  transition: transform 0.1s ease;
  user-select: none;
  font-family: serif;
}
.book-detail-rating .star.active { color: #ffdf00; text-shadow: 1px 1px 0 #000; }
.book-detail-rating .star:hover { transform: scale(1.15); color: #ffdf00; }
.book-detail-rating-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #555;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 0.4rem;
}

/* Botón de borrar libro (destructivo, rojo) */
.btn-detail-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  color: var(--danger, #ff5c5c);
  border: 2px solid var(--danger, #ff5c5c);
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--danger, #ff5c5c);
  font-family: inherit;
  transition: all 0.15s ease;
  margin-left: auto;
}
.btn-detail-delete:hover {
  background: var(--danger, #ff5c5c);
  color: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}

/* Botón de marcar leído/no leído */
.btn-detail-read {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  font-family: inherit;
  transition: all 0.15s ease;
}
.btn-detail-read:hover { background: #ffdf00; transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #000; }
.btn-detail-read.is-read { background: #a3e635; color: #000; }

/* Botón descargar EPUB unificado */
.btn-detail-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #000;
  color: var(--cream, #fffcf4);
  border: 2px solid #000;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--accent, #ff90e8);
  font-family: inherit;
  transition: all 0.15s ease;
}
.btn-detail-download:hover { background: var(--accent, #ff90e8); color: #000; transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #000; }

/* Botón cambiar portada (library only) */
.btn-detail-cover {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  font-family: inherit;
  transition: all 0.15s ease;
}
.btn-detail-cover:hover { background: #ff90e8; transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #000; }

@media (max-width: 900px) {
  .book-detail-box { max-width: 100%; padding: 1.75rem 1.5rem; }
  .book-detail-grid { grid-template-columns: 240px 1fr; gap: 1.5rem; }
  .book-detail-cover { width: 240px; }
  .book-detail-title { font-size: 1.7rem; }
}
@media (max-width: 700px) {
  .book-detail-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .book-detail-cover {
    width: 200px;
    margin: 0 auto;
  }
  .book-detail-title { font-size: 1.4rem; padding-right: 1rem; text-align: center; }
  .book-detail-author { text-align: center; }
  .book-detail-actions { justify-content: center; }
  .btn-detail-delete { margin-left: 0; }
}

/* ================= MODAL DE PERFIL ================= */
.profile-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 4vh 1rem;
}
.profile-modal.active {
  display: flex;
  animation: bookDetailIn 0.2s ease-out;
}
.profile-box {
  background: #fffcf4;
  border: 3px solid #000;
  box-shadow: 10px 10px 0 var(--accent, #ff90e8);
  max-width: 480px;
  width: 100%;
  padding: 2rem 2rem 1.75rem;
  position: relative;
}
.profile-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #fff;
  border: 2px solid #000;
  width: 36px;
  height: 36px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
}
.profile-box h2 {
  font-family: var(--font-display, inherit);
  font-size: 1.5rem;
  font-weight: 900;
  color: #000;
  margin-bottom: 0.3rem;
}
.profile-subtitle {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1.5rem;
}
.profile-section {
  margin-bottom: 1.25rem;
}
.profile-section h4 {
  font-family: var(--font-display, inherit);
  font-size: 1rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.profile-section .input-group {
  margin-bottom: 0.6rem;
}
.profile-section .input-group label {
  display: block;
  font-size: 0.78rem;
  color: #444;
  margin-bottom: 0.2rem;
  font-weight: 600;
}
.profile-section .input-group input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 2px solid #000;
  font-size: 0.92rem;
  background: #fff;
  font-family: inherit;
}
.profile-divider {
  border: none;
  border-top: 1.5px dashed #000;
  margin: 1.5rem 0;
}
.btn-profile-logout {
  width: 100%;
  background: transparent;
  color: #a83232;
  border: 2px dashed #a83232;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-profile-logout:hover {
  background: #a83232;
  color: #fff;
  border-style: solid;
}
/* Hover sobre el user-badge en sidebar indica que es clickeable */
.user-badge {
  cursor: pointer;
  transition: var(--transition, all 0.15s ease);
}
.user-badge:hover {
  transform: translate(-1px, -1px);
}

/* ================= EMPTY STATE BIBLIOTECA (onboarding 3 pasos) ================= */
.empty-state-library {
  padding: 3rem 1rem;
  text-align: center;
}
.empty-state-header {
  margin-bottom: 2rem;
}
.empty-state-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}
.empty-state-header h3 {
  font-family: var(--font-display, inherit);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text, #000);
  margin-bottom: 0.5rem;
}
.empty-state-header p {
  font-size: 1rem;
  color: var(--text-dim, #555);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.55;
}
.empty-state-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}
.empty-step-card {
  background: #fffcf4;
  border: 2.5px solid #000;
  box-shadow: 5px 5px 0 #000;
  padding: 1.5rem 1.25rem 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition, all 0.15s ease);
  font-family: inherit;
  position: relative;
}
.empty-step-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--accent-copper, #ffdf00);
}
.empty-step-num {
  position: absolute;
  top: -14px;
  left: -10px;
  background: var(--accent-copper, #ffdf00);
  color: #000;
  border: 2px solid #000;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, inherit);
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 2px 2px 0 #000;
}
.empty-step-title {
  font-family: var(--font-display, inherit);
  font-size: 1.1rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 0.4rem;
}
.empty-step-desc {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.45;
}
.rec-pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}
.rec-rotate-btn {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.rec-toolbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
  background: var(--bg-card, #fff);
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  flex-wrap: wrap;
}
.rec-toolbar-counter {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
}
.rec-toolbar-counter strong {
  color: var(--accent, #ff90e8);
  font-weight: 800;
}
.btn-rotate-cafecito {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-copper);
  color: #000;
  border: 2px solid #000;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition: var(--transition, all 0.15s ease);
  letter-spacing: 0.02em;
  font-family: inherit;
}
.btn-rotate-cafecito:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
  background: var(--accent, #ff90e8);
}
.btn-rotate-cafecito:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 #000;
}

/* ================= DESCUBRÍ — Filtros y tarjetas ================= */
.discover-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px dashed var(--border, #000);
}
.discover-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-card, #fff);
  color: var(--text, #000);
  border: 2px solid var(--border, #000);
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--border, #000);
  transition: var(--transition, all 0.15s ease);
  font-family: inherit;
}
.discover-chip:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--border, #000);
}
.discover-chip.active {
  background: var(--accent-copper, #ffdf00);
  color: #000;
  box-shadow: 4px 4px 0 var(--border, #000);
}
.discover-card .award-item-primary {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: var(--accent-copper, #ffdf00);
  color: #000;
  border: 2px solid #000;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  margin: 0.5rem 0 0.3rem;
  box-shadow: 2px 2px 0 #000;
}
.award-country {
  background: #fff;
  color: #000;
  border: 1.5px solid #000;
  padding: 0.05rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.award-item-extra {
  font-size: 0.78rem;
  color: var(--text-dim, #666);
  margin-bottom: 0.5rem;
  font-style: italic;
}
.award-item-extra span {
  display: inline-block;
}

/* ================= PORTAL DE ACCESO UNIFICADO (LOGIN / REGISTRO / OTP) ================= */
.login-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(25px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.login-box {
  background: rgba(25, 25, 30, 0.6);
  border: 2.5px solid var(--border);
  backdrop-filter: var(--glass-blur);
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  width: 90%;
  max-width: 420px;
  text-align: center;
  box-shadow: 8px 8px 0px var(--border);
  animation: portalScaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: var(--transition);
  position: relative;
}
.login-box:hover {
  border-color: var(--accent-copper);
  box-shadow: 10px 10px 0px var(--accent-copper);
}

@keyframes portalScaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.login-logo {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  display: inline-block;
}
.login-box h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: white;
}
.login-box p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 1rem;
}
.auth-form.active {
  display: flex;
}

.login-box .input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}
.login-box .input-group label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 700;
}
.login-box input {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text) !important;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.login-box input:focus {
  border-color: var(--border-focus);
  outline: none;
}
/* Forzar máxima visibilidad del autofill del navegador */
.login-box input:-webkit-autofill,
.login-box input:-webkit-autofill:hover, 
.login-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: #121212 !important;
  -webkit-box-shadow: 0 0 0px 1000px #fffcf4 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* OTP Code Box */
.otp-container {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1rem 0;
}
.otp-digit {
  width: 48px;
  height: 54px;
  background: var(--bg) !important;
  border: 2.5px solid var(--border) !important;
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  text-align: center !important;
  border-radius: var(--radius-sm) !important;
  padding: 0 !important;
  color: var(--text) !important;
}
.otp-digit:focus {
  border-color: var(--accent) !important;
}

.auth-switcher {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.auth-switcher span {
  color: var(--accent-copper);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.auth-switcher span:hover {
  color: var(--accent);
}

.otp-resend-text {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}
.otp-resend-link {
  color: var(--info);
  font-weight: 700;
  cursor: pointer;
}
.otp-resend-link.disabled {
  color: var(--text-dim);
  cursor: not-allowed;
  pointer-events: none;
}

.login-box.shake {
  animation: authShake 0.4s ease;
}
@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ================= NOTIFICACIONES TOAST ================= */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 10000;
}
.toast {
  background: rgba(20, 20, 25, 0.95);
  backdrop-filter: var(--glass-blur);
  border: 2px solid var(--border);
  color: white;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 400px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: var(--transition);
}
@keyframes toastSlideIn {
  from { transform: translateX(120%); }
  to { transform: translateX(0); }
}
.toast.success { border-left: 4px solid var(--success); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.error { border-left: 4px solid var(--danger); }
.toast-icon {
  font-size: 1.2rem;
}
.toast-message {
  font-size: 0.88rem;
  font-weight: 600;
  flex: 1;
}

/* ================= LOADER BAR DE CABECERA ================= */
.loader-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--accent-copper), var(--info));
  width: 0%;
  z-index: 10001;
  transition: width 0.3s ease;
}

/* ================= DETAILS DRAWER (TACTIL DRAWER) ================= */
.details-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 100vw; height: 100vh;
  z-index: 1000;
  display: flex;
  visibility: hidden;
  transition: visibility 0.4s;
}
.details-drawer.active {
  visibility: visible;
}
.drawer-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.details-drawer.active .drawer-overlay {
  opacity: 1;
}
.drawer-container {
  position: absolute;
  top: 0; right: 0;
  width: 480px; height: 100%;
  background: rgba(20, 20, 25, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-left: 2.5px solid var(--border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.details-drawer.active .drawer-container {
  transform: translateX(0);
}
.drawer-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0;
  color: var(--text-dim);
  font-size: 1.25rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}
.drawer-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}
.drawer-inner {
  padding: 3rem 2.25rem;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.drawer-top {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.drawer-cover-wrapper {
  width: 140px;
  height: 210px;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.drawer-cover-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.drawer-main-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
#drawerTitle {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1.2;
  color: white;
}
#drawerAuthor {
  font-size: 1.05rem;
  color: var(--accent-copper);
  font-weight: 700;
}
.drawer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.drawer-stat-pill {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 99px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #cbd5e0 !important;
  font-weight: 600;
}
.drawer-rating-row {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.rating-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #a0aec0 !important;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.drawer-rating-stars {
  display: flex;
  gap: 0.25rem;
}
.drawer-rating-stars .star {
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.2);
}
.drawer-rating-stars .star.active {
  color: var(--warning);
}
.drawer-awards-box {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.drawer-middle {
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  padding: 1.5rem 0;
}
.drawer-middle h4 {
  font-family: var(--font-display);
  color: white;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.drawer-desc-text {
  font-size: 0.95rem;
  color: #ffffff !important;
  line-height: 1.7;
}
.drawer-bottom {
  margin-top: auto;
  display: flex;
}
.btn-annas-archive {
  width: 100%;
  background: #ffdd00;
  color: #000;
  border: 2px solid #000;
  padding: 1rem;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 4px 4px 0px #000;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-annas-archive:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000;
  background: #ffe330;
}

/* ================= CYBER-BRUTALIST PAYWALL MODAL STYLING ================= */
.paywall-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(25px);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  visibility: hidden;
  opacity: 0;
}
.paywall-modal.active {
  visibility: visible;
  opacity: 1;
}
.paywall-box {
  background: #fffcf4;
  border: 3px solid #000;
  padding: 3rem 2.25rem 2.25rem;
  border-radius: var(--radius);
  width: 90%;
  max-width: 480px;
  text-align: center;
  box-shadow: 8px 8px 0px var(--accent-copper);
  animation: portalScaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.paywall-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0;
  color: var(--text-dim);
  font-size: 1.2rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.paywall-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}
.paywall-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}
.paywall-box h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 900;
  color: #000;
  margin-bottom: 0.6rem;
}
.paywall-lead {
  color: #2d2d2d;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.paywall-lead strong {
  background: var(--accent-copper);
  color: #000;
  padding: 0 0.3rem;
  font-weight: 800;
}
.paywall-benefits {
  list-style: none;
  text-align: left;
  background: #fff;
  border: 2px solid #000;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: 3px 3px 0 #000;
}
.paywall-benefits li {
  font-size: 0.88rem;
  color: #000;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.45;
}
.benefit-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  border: 1.5px solid #000;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}
.paywall-close {
  background: #fff;
  border: 2px solid #000;
  color: #000;
  width: 32px;
  height: 32px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
}
.paywall-close:hover {
  background: var(--accent);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}
.btn-cafecito-real {
  background: var(--accent-copper) !important;
  color: #000 !important;
  border: 2.5px solid #000 !important;
  font-weight: 800;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.btn-cafecito-real:hover {
  background: #ffec5c !important;
}
.btn-confirm-cafecito {
  display: block;
  width: 100%;
  background: #fff;
  color: #000;
  border: 2px dashed #000;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}
.btn-confirm-cafecito:hover {
  background: var(--accent);
  border-style: solid;
}
.btn-confirm-cafecito.hidden {
  display: none;
}
.btn-paywall-skip {
  background: transparent;
  border: none;
  color: #666;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.5rem;
  font-family: inherit;
}
.btn-paywall-skip:hover {
  color: #000;
}

/* ================= SECCIÓN DE NOTICIAS ================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.news-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 4px 4px 0px var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}
.news-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--accent);
  box-shadow: 6px 6px 0px var(--accent);
}
.news-date {
  font-size: 0.7rem;
  background: var(--accent-copper);
  color: #000000 !important;
  border: 1.5px solid #000;
  padding: 0.2rem 0.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  align-self: flex-start;
  box-shadow: 2px 2px 0px #000;
}
.news-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.3;
}
.news-summary {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.news-link {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  margin-top: auto;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: var(--transition);
}
.news-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
  transform: translateX(4px);
}

/* ================= RESPONSIVE DESIGN (MOBILE-FIRST) ================= */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
  .hero-ctas {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .hero-ctas .btn-brutalist {
    width: 100%;
    max-width: 320px;
  }
  .pricing-cards-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .app-container {
    flex-direction: column-reverse;
    height: 100vh;
    overflow: hidden;
  }
  
  .app-sidebar {
    width: 100%;
    height: 64px;
    background: rgba(10, 10, 12, 0.95);
    border-right: 0;
    border-top: 2.5px solid var(--border);
    padding: 0.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
  }
  
  .sidebar-brand, .sidebar-footer {
    display: none !important;
  }
  
  .sidebar-nav {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    gap: 0;
  }
  
  .nav-btn {
    padding: 0.4rem;
    font-size: 0.68rem;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    flex: 1;
    text-align: center;
    white-space: nowrap;
    box-shadow: none !important;
  }
  
  .nav-btn.active {
    background: transparent;
    border: 0;
    color: var(--accent-copper);
    box-shadow: none !important;
  }
  
  .app-main {
    flex: 1;
    height: calc(100vh - 64px);
    overflow-y: auto;
  }
  
  .main-header {
    padding: 1.25rem 1.25rem 1rem;
  }
  
  .header-welcome h2 {
    font-size: 1.35rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .stat-card {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  
  .stat-info h3 {
    font-size: 1.1rem;
  }
  
  .tab-content-container {
    padding: 0 1rem 2rem;
  }
  
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .book-card-body {
    padding: 0.85rem;
  }
  
  .book-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width, .form-actions {
    grid-column: span 1;
  }
  
  .recommendation-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  /* Details Drawer turns into a Mobile Bottom Sheet */
  .drawer-container {
    width: 100%;
    height: 82%;
    top: auto;
    bottom: 0;
    right: 0;
    border-left: 0;
    border-top: 2.5px solid var(--border);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .details-drawer.active .drawer-container {
    transform: translateY(0);
  }
  .drawer-inner {
    padding: 2rem 1.25rem;
    gap: 1.25rem;
  }
  .drawer-top {
    gap: 1rem;
  }
  .drawer-cover-wrapper {
    width: 85px;
    height: 125px;
  }
}

/* ================= ADDITIONAL GUMROAD NEOBRUTALIST STYLES ================= */

.auth-close-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border-radius: 50% !important;
  border: 2.5px solid #000 !important;
  background: var(--bg) !important;
  color: #000 !important;
  font-weight: 800 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000 !important;
  transition: var(--transition);
  z-index: 10;
}
.auth-close-btn:hover {
  background: var(--danger) !important;
  color: #fff !important;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #000 !important;
}

/* Simulated SMTP Terminal Mailbox */
.simulated-mailbox {
  background: #fffcf4;
  border: 3px solid #000000;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 4px 4px 0px #000000;
  font-family: 'Courier New', Courier, monospace;
  text-align: left;
  color: #000000;
}
.mailbox-header {
  background: #ffdf00;
  border-bottom: 3px solid #000000;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.mailbox-dot {
  width: 10px;
  height: 10px;
  border: 1.5px solid #000000;
  border-radius: 50% !important;
}
.mailbox-dot.red { background: #ff5c5c; }
.mailbox-dot.yellow { background: #ffdf00; }
.mailbox-dot.green { background: #a3e635; }
.mailbox-title {
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: auto;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #000000;
}
.mailbox-content {
  padding: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.4;
}
.mailbox-content p {
  margin-bottom: 0.25rem;
  color: #000000;
}
.mailbox-divider {
  border: none;
  border-top: 1.5px dashed #000000;
  margin: 0.5rem 0;
}
.mailbox-body {
  background: #ffffff;
  border: 2px solid #000000;
  padding: 0.5rem;
  margin-top: 0.5rem;
}
.simulated-code-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 2px solid #000000;
  padding: 0.5rem;
  margin: 0.5rem 0;
}
.simulated-otp-code {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: #ff90e8;
}
.btn-copy-otp {
  background: #a3e635;
  border: 2px solid #000000;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 2px 2px 0px #000000;
}
.btn-copy-otp:hover {
  box-shadow: 0px 0px 0px #000000;
  transform: translate(2px, 2px);
}
.mailbox-footer {
  font-size: 0.68rem;
  color: #5c5c5c !important;
  margin-top: 0.5rem;
}

/* Recommendation Category Filters */
.recommendation-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1.75rem;
}
.filter-btn {
  background: #ffffff;
  border: 3px solid #000000;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 3px 3px 0px #000000;
  color: #121212;
}
.filter-btn:hover {
  background: #ffdf00;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #000000;
}
.filter-btn.active {
  background: #ff90e8;
  box-shadow: 1px 1px 0px #000000;
  transform: translate(2px, 2px);
}

/* Cafecito Coffee Sticker in Paywall Modal */
.cafecito-sticker-modal {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0.5rem auto 1rem auto;
  display: block;
  animation: wobbleSticker 4s ease-in-out infinite alternate;
}
@keyframes wobbleSticker {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(5deg); }
}

/* Locked Recommendations / Pro Overlay */
.pro-lock-card {
  position: relative;
  overflow: hidden;
  border: 3px solid #000000 !important;
  background: #fffcf4 !important;
  box-shadow: 6px 6px 0px #000000 !important;
}
.pro-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 252, 244, 0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  z-index: 5;
}
.lock-icon-shield {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  animation: bounceLock 2s infinite alternate;
}
@keyframes bounceLock {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}
.pro-lock-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: #121212;
}
.pro-lock-desc {
  font-size: 0.75rem;
  color: #5c5c5c;
  margin-bottom: 1rem;
  max-width: 200px;
}
.btn-lock-action {
  background: #ffdf00;
  border: 2px solid #000000;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 2px 2px 0px #000000;
  transition: var(--transition);
  color: #121212;
}
.btn-lock-action:hover {
  box-shadow: 0px 0px 0px #000000;
  transform: translate(2px, 2px);
}

/* Custom Responsive Hero Side-by-Side Flex Layout */
.hero-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.hero-content {
  flex: 1.2;
  max-width: 650px;
  text-align: left;
}
.hero-image-wrapper {
  flex: 0.8;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-graphic {
  width: 100%;
  max-width: 480px;
  height: auto;
  object-fit: contain;
  border: 3px solid #000000;
  box-shadow: 8px 8px 0px #000000;
  background: #ffffff;
  animation: swingHero 6s ease-in-out infinite alternate;
}

/* Hero 2 columnas: izquierda copy con CTA, derecha card de apoyo cafecito */
.hero-side {
  flex: 0.95;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.hero-support-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fffcf4;
  border: 3px solid #000;
  box-shadow: 8px 8px 0 var(--accent-copper, #ffdf00);
  padding: 1.5rem 1.5rem 1.25rem;
  text-align: center;
}
.hero-graphic-tucked {
  width: 60%;
  max-width: 200px;
  height: auto;
  display: block;
  margin: -3rem auto 0.5rem;
  border: 2.5px solid #000;
  box-shadow: 4px 4px 0 #000;
  background: #fff;
  animation: swingHero 6s ease-in-out infinite alternate;
}
.hero-support-ribbon {
  position: absolute;
  top: -18px;
  right: -14px;
  background: var(--accent-copper, #ffdf00);
  color: #000;
  border: 2px solid #000;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 2px 2px 0 #000;
  letter-spacing: 0.05em;
  transform: rotate(3deg);
}
.hero-support-title {
  font-family: var(--font-display, inherit);
  font-size: 1.35rem;
  font-weight: 800;
  color: #000;
  margin: 0.4rem 0 0.75rem;
  line-height: 1.25;
}
.hero-support-desc {
  font-size: 0.9rem;
  color: #2d2d2d;
  line-height: 1.5;
  margin-bottom: 0.85rem;
}
.hero-support-desc-cta {
  color: #000;
  font-weight: 500;
  margin-bottom: 1.1rem;
}
.btn-cafecito-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent-copper, #ffdf00);
  color: #000;
  border: 2.5px solid #000;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 4px 4px 0 #000;
  transition: var(--transition, all 0.15s ease);
  letter-spacing: 0.02em;
  font-family: inherit;
  margin-bottom: 0.6rem;
}
.btn-cafecito-support:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
  background: #ffec5c;
}
.hero-support-note {
  display: block;
  font-size: 0.76rem;
  color: #555;
  font-style: italic;
  margin-top: 0.3rem;
}
@keyframes swingHero {
  0% { transform: translateY(0) rotate(-1deg); }
  100% { transform: translateY(-8px) rotate(1deg); }
}

@media (max-width: 900px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 2rem;
  }
  .hero-content {
    max-width: 100%;
    text-align: center;
  }
  .hero-ctas {
    justify-content: center;
  }
}

/* ================= GUMROAD-STYLE ANALYTICS & STICKERS ================= */
.achievements-section {
  margin-top: 1rem;
  margin-bottom: 2rem;
}
.analytics-sub-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stickers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.sticker-badge {
  background: #ffffff;
  border: 3px solid #000000;
  box-shadow: 4px 4px 0px #000000;
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}
.sticker-badge:hover {
  transform: translate(-3px, -3px) rotate(1.5deg);
  box-shadow: 7px 7px 0px #000000;
}
.sticker-icon {
  font-size: 2.2rem;
  filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.15));
}
.sticker-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sticker-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.sticker-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.3;
}
/* Locked achievements style */
.sticker-badge.locked {
  filter: grayscale(100%) opacity(0.6);
  background: #faf8f5;
  border-style: dashed;
}
.sticker-badge.locked:hover {
  transform: none;
  box-shadow: 4px 4px 0px #000000;
}
.sticker-lock-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.8rem;
  background: #000;
  color: #fff;
  padding: 2px 5px;
  font-weight: 800;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}
.chart-card {
  background: #ffffff;
  border: 3px solid #000000;
  box-shadow: 6px 6px 0px #000000;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.2s ease;
}
.chart-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0px #000000;
}
.chart-card-header {
  border-bottom: 2px solid #000000;
  padding-bottom: 0.75rem;
}
.chart-card-header h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}
.chart-card-header p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}
.canvas-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
}
.canvas-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Neobrutalist Tooltip */
.chart-tooltip {
  position: absolute;
  background: #ffffff;
  border: 2px solid #000000;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #000000;
  box-shadow: 3px 3px 0px #000000;
  pointer-events: none;
  z-index: 1000;
  display: none;
  font-family: var(--font-sans);
}

@media (max-width: 990px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .chart-card {
    grid-column: 1 / -1 !important;
  }
}

/* ================= RECENT READ-TOGGLE BUTTON STYLE ================= */
.btn-read-toggle {
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 2px 2px 0px #000000;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  text-transform: uppercase;
}
.btn-read-toggle:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #000000;
  background: var(--info);
}
.btn-read-toggle.read {
  background: var(--success);
}
.btn-read-toggle.read:hover {
  background: #8ae40f; /* verde ligeramente más interactivo */
}

/* ================= DEBUG OTP BUTTON STYLE ================= */
.btn-debug-otp {
  background: var(--warning);
  color: #000000;
  border: 2px solid #000000;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 3px 3px 0px #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  width: 100%;
  text-transform: uppercase;
}
.btn-debug-otp:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px #000000;
  background: #ffea55;
}

/* ================= FILTROS DE BIBLIOTECA (CHIPS) ================= */
.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px dashed #000;
}
.lib-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-card, #fff);
  color: #000;
  border: 2px solid #000;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  transition: var(--transition, all 0.15s ease);
  font-family: inherit;
}
.lib-chip:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}
.lib-chip[aria-pressed="true"] {
  background: var(--accent-copper, #ffdf00);
  color: #000;
  box-shadow: 4px 4px 0 #000;
  border-width: 3px;
}
.lib-chip-clear {
  background: transparent;
  border: 2px dashed #888;
  color: #666;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.lib-chip-clear:hover {
  border-color: #000;
  color: #000;
  border-style: solid;
}
.lib-filter-counter {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-dim, #555);
  font-weight: 600;
  font-style: italic;
}

/* ================= DRAG-AND-DROP (SortableJS) ================= */
.book-card { position: relative; }
.book-card-drag-handle {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #000;
    padding: 0.15rem 0.4rem;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: grab;
    z-index: 5;
    letter-spacing: -2px;
    box-shadow: 1.5px 1.5px 0 #000;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.book-card:hover .book-card-drag-handle { opacity: 1; }
.book-card-drag-handle:active { cursor: grabbing; }
.book-card-ghost {
    opacity: 0.3;
    background: #ffdf00 !important;
    border: 3px dashed #000 !important;
}
.book-card-dragging {
    transform: rotate(2deg);
    box-shadow: 8px 8px 0 #000 !important;
}

/* ================= COVER OVERRIDE MODAL ================= */
.cover-override-modal {
  position: fixed; inset: 0;
  background: rgba(10,10,12,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 4vh 1rem;
}
.cover-override-modal.active { display: flex; }
.cover-override-box {
  background: #fffcf4;
  border: 3px solid #000;
  box-shadow: 10px 10px 0 var(--accent-copper, #ffdf00);
  max-width: 500px; width: 100%;
  padding: 2rem; position: relative;
}
.cover-override-close {
  position: absolute; top: 1rem; right: 1rem;
  background: #fff; border: 2px solid #000;
  width: 32px; height: 32px; font-weight: 800; cursor: pointer;
  box-shadow: 2px 2px 0 #000;
}
.cover-override-box h2 {
  font-family: var(--font-display, inherit);
  font-size: 1.4rem; font-weight: 900; color: #000; margin-bottom: 0.4rem;
}
.cover-override-subtitle { color: #555; margin-bottom: 1.5rem; }
.cover-override-section { margin-bottom: 1rem; }
.cover-override-section h4 {
  font-family: var(--font-display, inherit);
  font-size: 0.95rem; font-weight: 800;
  color: #000; margin-bottom: 0.3rem;
}
.cover-section-desc { font-size: 0.78rem; color: #555; margin-bottom: 0.6rem; }
.cover-override-section input[type="file"],
.cover-override-section input[type="url"] {
  display: block; width: 100%; padding: 0.5rem;
  border: 2px solid #000; margin-bottom: 0.6rem; background: #fff;
  font-family: inherit;
}
.cover-override-divider {
  border: none; border-top: 1.5px dashed #000; margin: 1.25rem 0;
}
.btn-reset-cover {
  width: 100%; background: transparent; color: #555;
  border: 2px dashed #555; padding: 0.5rem; cursor: pointer;
  font-size: 0.85rem; font-family: inherit;
}
.btn-reset-cover:hover { background: #fff; color: #000; border-color: #000; border-style: solid; }
.btn-cover-override {
  background: transparent; color: #666;
  border: 1.5px dashed #999; padding: 0.25rem 0.55rem;
  font-size: 0.72rem; font-weight: 600; cursor: pointer;
  font-family: inherit; margin-left: 0.4rem;
}
.btn-cover-override:hover { background: #fff; color: #000; border-color: #000; border-style: solid; }

/* ================= HERO NEW (adaptado del scroll-tilted hero) ================= */
.hero-new {
  position: relative;
  min-height: 88vh;
  background: var(--bg, #fffcf4);
  overflow: hidden;
  padding: 2rem 1.5rem 3rem;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 4rem 4rem;
  pointer-events: none;
  z-index: 0;
}
.hero-new-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
}

/* Stack de tipografía gigante */
.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: -0.5rem;
  margin: 1rem 0 1.5rem;
}
.hero-mega {
  font-family: 'Outfit', 'Arial Black', Impact, sans-serif;
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: uppercase;
  color: #000;
  text-shadow:
    1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000,
    5px 5px 0 #000, 6px 6px 0 #000, 7px 7px 0 #000, 8px 8px 0 #000,
    9px 9px 0 #000, 10px 10px 0 #000;
}
.hero-mega-1 {
  text-align: left;
  padding-left: 4%;
  text-shadow:
    1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000,
    5px 5px 0 #000, 6px 6px 0 #000;
}
.hero-mega-2 {
  text-align: center;
  font-size: clamp(4.5rem, 13vw, 12rem);
  color: var(--accent, #ff90e8);
  text-shadow:
    1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000,
    5px 5px 0 #000, 6px 6px 0 #000, 7px 7px 0 #000, 8px 8px 0 #000,
    9px 9px 0 #000, 10px 10px 0 #000, 11px 11px 0 #000, 12px 12px 0 #000;
}
.hero-mega-3 {
  text-align: right;
  padding-right: 4%;
}

/* Overlays flotantes — cards de libros + arrows + badge */
.hero-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.hero-overlays > *  { pointer-events: auto; }

/* Cards flotantes con libros */
.hero-float-card {
  position: absolute;
  background: var(--bg-card, #fff);
  border: 3px solid #000;
  box-shadow: 6px 6px 0 #000;
  padding: 0.9rem;
  width: 110px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 3;
}
.hero-float-card-left {
  top: auto;
  bottom: 8%;
  left: 6%;
  transform: rotate(-9deg);
  animation: heroFloat1 6s ease-in-out infinite;
}
.hero-float-card-right {
  top: auto;
  bottom: 18%;
  right: 6%;
  transform: rotate(8deg);
  animation: heroFloat2 6s ease-in-out infinite 1.2s;
}
@keyframes heroFloat1 {
  0%, 100% { transform: rotate(-9deg) translateY(0); }
  50%      { transform: rotate(-7deg) translateY(-6px); }
}
@keyframes heroFloat2 {
  0%, 100% { transform: rotate(8deg) translateY(0); }
  50%      { transform: rotate(10deg) translateY(-7px); }
}
/* Card flotante cafecito (3ra card, CTA interactivo) */
.hero-float-card-cafecito {
  position: absolute;
  top: auto;
  bottom: 4%;
  left: 12%;
  width: 135px;
  background: var(--accent-copper, #ffdf00);
  border: 3px solid #000;
  box-shadow: 6px 6px 0 #000;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: #000;
  cursor: pointer;
  pointer-events: auto;
  transform: rotate(-5deg);
  animation: heroFloat3 5s ease-in-out infinite 0.6s;
  z-index: 6;
}
.hero-float-card-cafecito:hover {
  transform: rotate(0deg) scale(1.1);
  animation-play-state: paused;
}
.hero-cafecito-cta-arrow {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
  color: #000;
  margin-top: 0.25rem;
  transition: transform 0.2s ease;
}
.hero-float-card-cafecito:hover .hero-cafecito-cta-arrow {
  transform: translateX(4px);
}
.hero-cafecito-icon {
  font-size: 2.2rem;
  line-height: 1;
}
@keyframes heroFloat3 {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50%      { transform: rotate(-3deg) translateY(-5px); }
}
.hero-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem;
  border: 2px solid #000;
  font-family: 'Outfit', inherit;
  font-weight: 900;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-card-cover-1 { background: #fff; color: #000; }
.hero-card-cover-2 { background: var(--accent, #ff90e8); color: #000; }
.hero-card-cover-spine {
  position: absolute;
  top: 0; bottom: 0; left: 8px;
  width: 4px;
  background: rgba(0,0,0,0.25);
}
.hero-card-cover-title {
  padding-left: 12px;
  line-height: 1.1;
}
.hero-card-info { text-align: center; }
.hero-card-title {
  font-family: 'Outfit', inherit;
  font-weight: 800;
  font-size: 0.82rem;
  color: #000;
  margin: 0;
  line-height: 1.2;
}
.hero-card-author {
  font-size: 0.7rem;
  color: #555;
  margin: 0.15rem 0 0;
  font-style: italic;
}

/* Circular badge */
.hero-circular-badge {
  position: absolute;
  bottom: -5%;
  right: 5%;
  width: 120px;
  height: 120px;
  background: var(--accent-copper, #ffdf00);
  border: 3px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 5px 5px 0 #000;
  transform: rotate(12deg);
  transition: transform 0.2s ease;
  z-index: 5;
}
.hero-circular-badge:hover { transform: rotate(0deg) scale(1.06); }
.hero-badge-text {
  position: absolute;
  inset: 6px;
  animation: heroSpin 12s linear infinite;
  animation-play-state: paused;
}
.hero-circular-badge:hover .hero-badge-text { animation-play-state: running; }
.hero-badge-text text {
  font-family: 'Outfit', inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  fill: #000;
  text-transform: uppercase;
}
@keyframes heroSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.hero-badge-arrow {
  font-family: 'Outfit', inherit;
  font-size: 1.6rem;
  font-weight: 900;
  color: #000;
}

/* Footer del hero — tagline + CTAs + chips */
.hero-new-footer {
  position: relative;
  z-index: 4;
  text-align: center;
  margin-top: 1.5rem;
}
.hero-new-tagline {
  max-width: 640px;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
  color: var(--text-dim, #555);
  line-height: 1.6;
}
.hero-new-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.hero-new-chips {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Trío de cards inline: contenedor flex en el flow (no absolute) */
.hero-cards-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  position: relative;
  z-index: 4;
}

/* Override: cards ahora son flex items en hero-cards-row, no absolute */
.hero-cards-row .hero-float-card {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 140px;
}
.hero-cards-row .hero-float-card-cafecito {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 160px;
}
/* Las animaciones heroFloat1/2/3 usan translateY sobre transform: siguen funcionando */

/* Responsive: en mobile ocultamos cards flotantes y badge para no romper */
@media (max-width: 900px) {
  .hero-mega { font-size: clamp(2.8rem, 14vw, 5rem); }
  .hero-float-card { display: none; }
  .hero-float-card-cafecito { display: none; }
  .hero-circular-badge { width: 90px; height: 90px; bottom: auto; right: 8px; top: 8px; }
  .hero-new { padding: 2rem 1rem 3rem; min-height: auto; }

  /* En mobile las cards inline siguen visibles (override del display:none de cards absolute) */
  .hero-cards-row .hero-float-card,
  .hero-cards-row .hero-float-card-cafecito { display: flex; }
  .hero-cards-row { gap: 0.75rem; margin: 1rem 0; }
  .hero-cards-row .hero-float-card { width: 95px; }
  .hero-cards-row .hero-float-card-cafecito { width: 110px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-float-card-left,
  .hero-float-card-right,
  .hero-float-card-cafecito,
  .hero-badge-text { animation: none; }
}

/* Microcopy aclaratoria debajo del stack tipográfico */
.hero-microcopy {
  text-align: center;
  font-family: 'Outfit', inherit;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 600;
  font-style: italic;
  color: #1a1a1a;
  margin-top: 0.5rem;
  letter-spacing: -0.005em;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero CTAs — jerarquía clara */
.hero-new-ctas .btn-accent {
  background: #000 !important;
  color: #fff !important;
  border: 3px solid #000 !important;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.9rem 1.8rem;
  box-shadow: 6px 6px 0 var(--accent, #ff90e8) !important;
  transition: var(--transition, all 0.15s ease);
}
.hero-new-ctas .btn-accent:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--accent, #ff90e8) !important;
  background: var(--accent, #ff90e8) !important;
  color: #000 !important;
}
.hero-new-ctas .btn-outline {
  background: transparent;
  color: #000;
  border: 2px solid #000;
  font-weight: 700;
  padding: 0.9rem 1.6rem;
  box-shadow: none;
}
.hero-new-ctas .btn-outline:hover {
  background: #fff;
  box-shadow: 4px 4px 0 #000;
  transform: translate(-2px, -2px);
}

/* Hero chips como stickers rotados brutalist */
.hero-new-chips {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}
.hero-new-chips .hero-chip {
  background: #fffcf4;
  color: #000;
  border: 2.5px solid #000;
  padding: 0.5rem 1rem;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 3px 3px 0 #000;
  letter-spacing: 0.02em;
  font-family: 'Outfit', inherit;
  display: inline-block;
  transition: var(--transition, all 0.15s ease);
}
.hero-new-chips .hero-chip:nth-child(1) { transform: rotate(-2deg); }
.hero-new-chips .hero-chip:nth-child(2) { transform: rotate(1deg); }
.hero-new-chips .hero-chip:nth-child(3) { transform: rotate(-1deg); }
.hero-new-chips .hero-chip:hover {
  transform: rotate(0deg) translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
}


/* ================= HERO GUMROAD-STYLE ================= */
.hero-gumroad {
  position: relative;
  min-height: 80vh;
  background: #fffcf4;
  overflow: hidden;
  padding: 4rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-gumroad-container {
  position: relative;
  max-width: 760px;
  width: 100%;
  text-align: center;
  z-index: 2;
}

/* Contenido central */
.hero-gumroad-content {
  position: relative;
  z-index: 3;
}
.hero-gumroad-title {
  font-family: ''Outfit'', ''Inter'', system-ui, sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #000;
  margin: 0 0 1.25rem;
}
.hero-gumroad-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.55;
  color: #2d2d2d;
  margin: 0 auto 2rem;
  max-width: 580px;
}
.hero-gumroad-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.btn-gumroad-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fffcf4;
  border: 3px solid #000;
  padding: 14px 28px;
  font-family: ''Outfit'', inherit;
  font-weight: 700;
  font-size: 1rem;
  min-height: 48px;
  text-decoration: none;
  box-shadow: 6px 6px 0 #ff90e8;
  transition: transform 140ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 140ms;
  letter-spacing: 0.01em;
}
.btn-gumroad-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 #ff90e8;
}
.btn-gumroad-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #ff90e8;
}
.btn-gumroad-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #000;
  border: 2px solid #000;
  padding: 14px 24px;
  font-family: ''Outfit'', inherit;
  font-weight: 700;
  font-size: 1rem;
  min-height: 48px;
  text-decoration: none;
  transition: background 140ms;
}
.btn-gumroad-secondary:hover {
  background: #f4f4f0;
}
.hero-gumroad-trust {
  font-size: 0.85rem;
  color: #555;
  margin: 0 0 2.5rem;
  letter-spacing: 0.01em;
}
.hero-gumroad-cafecito-text {
  font-size: 0.9rem;
  color: #555;
}
.hero-gumroad-cafecito-link {
  color: #000;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 140ms;
}
.hero-gumroad-cafecito-link:hover {
  color: #ff90e8;
}

/* Libros flotantes decorativos (como las coins de Gumroad) */
.hero-gumroad-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero-deco-book {
  position: absolute;
  width: 64px;
  height: 88px;
  background: #ff90e8;
  border: 2.5px solid #000;
  box-shadow: 3px 3px 0 #000;
}
.hero-deco-book::before {
  content: '''';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 3px;
  background: rgba(0,0,0,0.25);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-deco-book { animation: heroDecoFloat 6s ease-in-out infinite; }
}

/* Posicionamiento y rotación de cada libro decorativo */
.deco-book-1 { top: 8%;  left: 8%;  transform: rotate(-18deg); animation-delay: 0s;   }
.deco-book-2 { top: 18%; left: 22%; transform: rotate(12deg);  animation-delay: 0.6s; width: 52px; height: 70px; }
.deco-book-3 { top: 65%; left: 5%;  transform: rotate(8deg);   animation-delay: 1.2s; width: 56px; height: 76px; }
.deco-book-4 { top: 10%; right: 8%; transform: rotate(15deg);  animation-delay: 0.3s; }
.deco-book-5 { top: 22%; right: 22%; transform: rotate(-10deg); animation-delay: 0.9s; width: 50px; height: 68px; }
.deco-book-6 { top: 62%; right: 6%; transform: rotate(-20deg); animation-delay: 1.5s; width: 58px; height: 78px; }

@keyframes heroDecoFloat {
  0%, 100% { transform: var(--rot, rotate(0deg)) translateY(0); }
  50%      { transform: var(--rot, rotate(0deg)) translateY(-6px); }
}
.deco-book-1 { --rot: rotate(-18deg); }
.deco-book-2 { --rot: rotate(12deg); }
.deco-book-3 { --rot: rotate(8deg); }
.deco-book-4 { --rot: rotate(15deg); }
.deco-book-5 { --rot: rotate(-10deg); }
.deco-book-6 { --rot: rotate(-20deg); }

/* Responsive */
@media (max-width: 700px) {
  .hero-gumroad { min-height: auto; padding: 2.5rem 1rem 3rem; }
  .hero-gumroad-title { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .hero-gumroad-subtitle { font-size: 0.95rem; }
  .hero-gumroad-ctas { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .btn-gumroad-primary, .btn-gumroad-secondary { width: 100%; }
  .deco-book-2, .deco-book-5 { display: none; }
  .hero-deco-book { width: 44px; height: 60px; }
}

/* ================= HERO MEGA V4 (stacked tipografía + libros flotantes) ================= */
.hero-mega-v4 {
  position: relative;
  min-height: 100vh;
  background: #fffcf4;
  overflow: hidden;
  padding: 4rem 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-mega-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 5rem 5rem;
  pointer-events: none;
  z-index: 0;
}

.hero-mega-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  text-align: center;
}

/* Stack tipográfico mega */
.hero-mega-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: -0.5rem;
  margin-bottom: 2rem;
}
.hero-mega-word {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.03em;
  margin: 0;
  text-transform: uppercase;
  color: #000;
}
.hero-mega-w1 {
  font-size: clamp(3rem, 9vw, 7rem);
  text-align: left;
  padding-left: 6%;
  text-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000, 5px 5px 0 #000, 6px 6px 0 #000;
}
.hero-mega-w2 {
  font-size: clamp(5rem, 15vw, 13rem);
  text-align: center;
  color: var(--accent, #ff90e8);
  text-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000, 5px 5px 0 #000, 6px 6px 0 #000, 7px 7px 0 #000, 8px 8px 0 #000, 9px 9px 0 #000, 10px 10px 0 #000, 11px 11px 0 #000, 12px 12px 0 #000;
}
.hero-mega-w3 {
  font-size: clamp(3rem, 9vw, 7rem);
  text-align: right;
  padding-right: 6%;
  text-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000, 5px 5px 0 #000, 6px 6px 0 #000;
}

.hero-mega-tagline {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: #2d2d2d;
  margin: 0 auto 1.75rem;
  max-width: 620px;
  line-height: 1.6;
  font-weight: 500;
}

.hero-mega-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-mega-trust {
  font-size: 0.88rem;
  color: #555;
  margin: 0 0 2rem;
  letter-spacing: 0.01em;
}

.hero-mega-cafecito {
  font-size: 0.95rem;
  color: #555;
}

/* Decoración: 14 libros flotantes (rosa principalmente, 2 amarillos justificados) */
.hero-mega-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.deco-book {
  position: absolute;
  background: var(--accent, #ff90e8);
  border: 2.5px solid #000;
  box-shadow: 3px 3px 0 #000;
}
.deco-book::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 5px;
  width: 3px;
  background: rgba(0,0,0,0.25);
}

/* 14 libros con posiciones, tamaños y rotaciones únicas */
.deco-b1  { top: 5%;  left: 3%;   width: 56px; height: 76px; transform: rotate(-15deg); --rot: rotate(-15deg); }
.deco-b2  { top: 18%; left: 8%;   width: 44px; height: 60px; transform: rotate(10deg);  --rot: rotate(10deg); background: var(--accent-copper, #ffdf00); }
.deco-b3  { top: 35%; left: 2%;   width: 60px; height: 82px; transform: rotate(-8deg);  --rot: rotate(-8deg); }
.deco-b4  { top: 55%; left: 6%;   width: 48px; height: 66px; transform: rotate(12deg);  --rot: rotate(12deg); }
.deco-b5  { top: 75%; left: 4%;   width: 52px; height: 72px; transform: rotate(-20deg); --rot: rotate(-20deg); }
.deco-b6  { top: 88%; left: 14%;  width: 44px; height: 60px; transform: rotate(8deg);   --rot: rotate(8deg); }
.deco-b7  { top: 8%;  right: 4%;  width: 58px; height: 80px; transform: rotate(18deg);  --rot: rotate(18deg); }
.deco-b8  { top: 22%; right: 10%; width: 46px; height: 64px; transform: rotate(-12deg); --rot: rotate(-12deg); background: var(--accent-copper, #ffdf00); }
.deco-b9  { top: 40%; right: 3%;  width: 54px; height: 74px; transform: rotate(15deg);  --rot: rotate(15deg); }
.deco-b10 { top: 58%; right: 8%;  width: 50px; height: 68px; transform: rotate(-10deg); --rot: rotate(-10deg); }
.deco-b11 { top: 78%; right: 5%;  width: 56px; height: 76px; transform: rotate(20deg);  --rot: rotate(20deg); }
.deco-b12 { top: 90%; right: 16%; width: 46px; height: 64px; transform: rotate(-15deg); --rot: rotate(-15deg); }
.deco-b13 { top: 12%; left: 45%;  width: 40px; height: 56px; transform: rotate(8deg);   --rot: rotate(8deg); opacity: 0.7; }
.deco-b14 { top: 92%; left: 48%;  width: 42px; height: 58px; transform: rotate(-12deg); --rot: rotate(-12deg); opacity: 0.7; }

/* 6 libros decorativos extra (cierra los espacios vacíos identificados) */
.deco-b15 { top: 2%;  right: 18%; width: 48px; height: 66px; transform: rotate(-22deg); --rot: rotate(-22deg); }
.deco-b16 { top: 3%;  left: 32%;  width: 42px; height: 58px; transform: rotate(15deg);  --rot: rotate(15deg); background: var(--accent-copper, #ffdf00); opacity: 0.7; }
.deco-b17 { top: 48%; left: 18%;  width: 50px; height: 68px; transform: rotate(8deg);   --rot: rotate(8deg); }
.deco-b18 { top: 50%; right: 16%; width: 52px; height: 72px; transform: rotate(-14deg); --rot: rotate(-14deg); }
.deco-b19 { top: 68%; left: 22%;  width: 44px; height: 60px; transform: rotate(20deg);  --rot: rotate(20deg); }
.deco-b20 { top: 70%; right: 22%; width: 46px; height: 62px; transform: rotate(-18deg); --rot: rotate(-18deg); background: var(--accent-copper, #ffdf00); opacity: 0.7; }

@media (prefers-reduced-motion: no-preference) {
  .deco-book { animation: heroBookFloat 7s ease-in-out infinite; }
  .deco-b1 { animation-delay: 0s; }
  .deco-b2 { animation-delay: 0.4s; }
  .deco-b3 { animation-delay: 0.8s; }
  .deco-b4 { animation-delay: 1.2s; }
  .deco-b5 { animation-delay: 1.6s; }
  .deco-b6 { animation-delay: 2.0s; }
  .deco-b7 { animation-delay: 0.2s; }
  .deco-b8 { animation-delay: 0.6s; }
  .deco-b9 { animation-delay: 1.0s; }
  .deco-b10 { animation-delay: 1.4s; }
  .deco-b11 { animation-delay: 1.8s; }
  .deco-b12 { animation-delay: 2.2s; }
  .deco-b13 { animation-delay: 2.6s; }
  .deco-b14 { animation-delay: 3.0s; }
  .deco-b15 { animation-delay: 3.4s; }
  .deco-b16 { animation-delay: 3.8s; }
  .deco-b17 { animation-delay: 4.2s; }
  .deco-b18 { animation-delay: 4.6s; }
  .deco-b19 { animation-delay: 5.0s; }
  .deco-b20 { animation-delay: 5.4s; }
}

@keyframes heroBookFloat {
  0%, 100% { transform: var(--rot, rotate(0deg)) translateY(0); }
  50%      { transform: var(--rot, rotate(0deg)) translateY(-8px); }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-mega-w1 { font-size: clamp(2rem, 11vw, 4rem); padding-left: 0; text-align: center; }
  .hero-mega-w2 { font-size: clamp(3rem, 17vw, 6rem); text-shadow: 1px 1px 0 #000, 2px 2px 0 #000, 3px 3px 0 #000, 4px 4px 0 #000, 5px 5px 0 #000; }
  .hero-mega-w3 { font-size: clamp(2rem, 11vw, 4rem); padding-right: 0; text-align: center; }
  .hero-mega-ctas { flex-direction: column; align-items: stretch; }
  .btn-gumroad-primary, .btn-gumroad-secondary { width: 100%; }
  /* Solo 6 libros en mobile */
  .deco-b2, .deco-b4, .deco-b6, .deco-b8, .deco-b10, .deco-b12, .deco-b13, .deco-b14,
  .deco-b15, .deco-b16, .deco-b17, .deco-b18, .deco-b19, .deco-b20 { display: none; }
  .deco-book { width: 36px !important; height: 50px !important; }
  .hero-mega-badge { width: 90px; height: 90px; min-width: 90px; min-height: 90px; max-width: 90px; max-height: 90px; bottom: auto; top: 1rem; right: 1rem; }
  .hero-mega-badge-text { width: 90px; height: 90px; }
  .hero-mega-badge-arrow { font-size: 1.2rem; }
}

/* Circular badge "EMPEZAR GRATIS" - spin solo en hover (regla CLAUDE.md) */
.hero-mega-badge {
  position: absolute;
  bottom: 6%;
  right: 5%;
  width: 130px;
  height: 130px;
  min-width: 130px;
  min-height: 130px;
  max-width: 130px;
  max-height: 130px;
  background: var(--accent-copper, #ffdf00);
  border: 3px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 6px 6px 0 #000;
  transform: rotate(12deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 5;
  pointer-events: auto;
  overflow: hidden;
}
.hero-mega-badge:hover {
  transform: rotate(0deg) scale(1.06);
  box-shadow: 8px 8px 0 #000;
}
.hero-mega-badge-text {
  width: 130px;
  height: 130px;
  display: block;
  /* Por default NO gira — cumple regla CLAUDE.md (badge spinning solo en hover) */
  animation: heroMegaBadgeSpin 12s linear infinite;
  animation-play-state: paused;
}
.hero-mega-badge:hover .hero-mega-badge-text {
  animation-play-state: running;
}
.hero-mega-badge-text text {
  font-family: 'Outfit', inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  fill: #000;
  text-transform: uppercase;
}
@keyframes heroMegaBadgeSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.hero-mega-badge-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Outfit', inherit;
  font-size: 1.8rem;
  font-weight: 900;
  color: #000;
  line-height: 1;
  pointer-events: none;
}

/* ==================================================================
   STICKY CTA MOBILE — visible solo en <=768px (regla CLAUDE.md)
   ================================================================== */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #000;
  color: #fffcf4;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  border-top: 3px solid #ff90e8;
  z-index: 100;
  transition: background 0.15s ease, color 0.15s ease;
}
.mobile-sticky-cta:hover,
.mobile-sticky-cta:focus-visible {
  background: #ff90e8;
  color: #000;
  outline: 3px solid #ffdf00;
  outline-offset: -3px;
}
.mobile-sticky-cta-arrow {
  font-size: 1.2rem;
  line-height: 1;
}

/* ==================================================================
   MOBILE RESPONSIVE — @media (max-width: 768px)
   Cubre landing (header, slider, features, footer) + app (overlay, inputs,
   touch targets) + sticky CTA mobile. NO toca hero v4 (sus propias @media
   en 900px), ni el JSON-LD, ni la paleta.
   ================================================================== */
@media (max-width: 768px) {
  /* Mostrar sticky CTA y reservar espacio para que no tape contenido */
  .mobile-sticky-cta { display: flex; }
  .landing-body { padding-bottom: 72px; }

  /* --- Landing: Header --- */
  .landing-header { padding: 0.75rem 0; }
  .nav-container {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1rem;
  }
  .nav-links {
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .nav-links a:not(.btn):not(.btn-brutalist) {
    font-size: 0.85rem;
    padding: 0.6rem 0.5rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }
  .lang-toggle {
    min-height: 48px;
    min-width: 48px;
    padding: 0.5rem 0.7rem;
  }
  .nav-links .btn-brutalist {
    padding: 0.6rem 0.9rem;
    font-size: 0.82rem;
    min-height: 48px;
  }
  .brand-logo-brutalist { font-size: 1.15rem; }

  /* --- Landing: Slider de cards de libros --- */
  .slider-section { padding: 1.5rem 0; }
  .slider-track > .slider-card-brutalist {
    min-width: 170px;
    flex: 0 0 170px;
  }
  .slider-card-brutalist h4 { font-size: 0.95rem; }
  .slider-card-brutalist p { font-size: 0.78rem; }

  /* --- Landing: Features grid → single column --- */
  .features-section { padding: 3rem 1rem; }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .feature-card-brutalist { padding: 1.5rem; }

  /* --- Landing: Footer en una columna --- */
  .landing-footer { padding: 1.5rem 1rem; }
  .footer-container {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .footer-copy { font-size: 0.8rem; }

  /* --- App: Login overlay full-screen mobile --- */
  .login-overlay {
    padding: 0;
    align-items: stretch;
  }
  .login-box {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem 1.25rem;
    margin: 0;
    min-height: 100vh;
    border-width: 0;
    box-shadow: none;
  }

  /* --- Inputs: 16px mínimo (anti-zoom iOS Safari) --- */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  input[type="date"],
  textarea,
  select {
    font-size: 16px;
  }

  /* --- Touch targets ≥48px (WCAG 2.2 / CLAUDE.md) --- */
  button,
  .btn,
  .btn-brutalist,
  input[type="submit"],
  input[type="button"] {
    min-height: 48px;
  }
  /* Excepciones que ya son grandes por contexto: no forzar height absurdo */
  .auth-close-btn { min-height: auto; }
}

/* ============================================================
   ICON SYSTEM — monoline brutalist SVG via external sprite
   ============================================================ */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
  stroke-width: 2;
}
.icon-lg  { width: 1.4em; height: 1.4em; }
.icon-xl  { width: 2em;   height: 2em;   }
.icon-2xl { width: 3rem;  height: 3rem;  vertical-align: middle; }

/* Sub-pixel align cuando el icono va antes de texto */
.icon + span,
.icon + strong { margin-left: 0.4em; }

/* ============================================================
   DISCOVER toolbar — contador + botón mezclar
   ============================================================ */
.discover-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1.25rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-secondary, #1a2027);
  border: 2px solid var(--border, #2d3743);
  font-size: 0.85rem;
}
.discover-counter {
  color: var(--text-dim, #9ba5b3);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.btn-discover-shuffle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent, #ff90e8);
  color: #000;
  border: 2px solid #000;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  font-family: inherit;
  transition: all 0.12s ease;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn-discover-shuffle:hover {
  background: #ffdf00;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000;
}
.btn-discover-shuffle:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}
#discoverSentinel {
  font-style: italic;
}

/* ============================================================
   NYT BESTSELLER badge (Descubrí cards)
   ============================================================ */
.nyt-badge {
  background: #000 !important;
  color: var(--cream, #fffcf4) !important;
  border-color: #000 !important;
  position: relative;
}
.nyt-badge strong { color: var(--accent, #ff90e8); letter-spacing: 0.04em; }
.nyt-badge .award-country { background: var(--accent, #ff90e8); color: #000; border-color: #000; }
.discover-card.is-nyt { border-left: 6px solid var(--accent, #ff90e8); }
/* Cuando un libro NYT también ganó un premio (cross-reference): el badge premio va debajo del NYT */
.award-item-crossref {
  background: #ffdf00 !important;
  color: #000 !important;
  border-color: #000 !important;
  margin-top: 0.4rem;
}

/* ============================================================
   HONEST TESTIMONIALS section (landing)
   ============================================================ */
.honest-section {
  padding: 4.5rem 1.5rem;
  max-width: 100%;
}
.honest-container {
  max-width: 760px;
  margin: 0 auto;
  background: var(--cream, #fffcf4);
  border: 3px solid #000;
  box-shadow: 8px 8px 0 #000;
  padding: 2.5rem 2rem;
}
.honest-section .section-subtitle {
  display: inline-block;
  background: #ffdf00;
  border: 2px solid #000;
  padding: 0.25rem 0.7rem;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.honest-section .section-title {
  font-family: var(--font-display, "Outfit"), sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  color: #000;
}
.honest-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 600;
  margin: 0 0 1rem;
  color: #000;
}
.honest-body {
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0 0 0.85rem;
  color: #222;
}
.honest-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.honest-contact {
  font-size: 0.92rem;
  margin: 0;
  color: #333;
}
.honest-contact a {
  font-weight: 700;
  color: #000;
  border-bottom: 2px solid #ff90e8;
  text-decoration: none;
}
.honest-contact a:hover { background: #ff90e8; }
@media (max-width: 640px) {
  .honest-container { padding: 1.75rem 1.25rem; box-shadow: 6px 6px 0 #000; }
  .honest-section { padding: 3rem 1rem; }
}

/* ============================================================
   INLINE FIELD VALIDATION — blur-triggered (WCAG 2.2 + brutalist)
   ============================================================ */
.input-group { position: relative; }

/* Estado inválido: borde rojo 3px brutalist */
.input-group input.invalid,
.profile-section input.invalid,
.form-group input.invalid {
  border-color: var(--danger, #ff5c5c);
  border-width: 3px;
  padding-right: 2.5rem;
}

/* Estado válido: borde verde + check absoluto a la derecha */
.input-group input.valid,
.profile-section input.valid,
.form-group input.valid {
  border-color: var(--success, #a3e635);
  border-width: 3px;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 18px 18px;
}

/* Mensaje de error inline */
.field-error {
  display: block;
  margin: 0.4rem 0 0;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--danger, #ff5c5c);
  line-height: 1.35;
}
.field-error[hidden] { display: none; }

/* Si el input falla, también marcamos el label con peso */
.input-group:has(input.invalid) label,
.form-group:has(input.invalid) label,
.profile-section .input-group:has(input.invalid) label {
  color: var(--danger, #ff5c5c);
}

/* Reduce motion: sin animaciones en feedback de validación */
@media (prefers-reduced-motion: reduce) {
  .input-group input.invalid,
  .input-group input.valid { transition: none; }
}

