/* Acertijo del Dia — ficha.css (premium editorial redesign) */
:root {
  color-scheme: light;
  --background: 220 20% 98.6%;
  --foreground: 240 10% 12%;
  --card: 0 0% 100%;
  --primary: 250 85% 60%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 18% 95.8%;
  --muted-foreground: 240 4% 46%;
  --border: 240 6% 88%;
  --radius: 0.75rem;
}

[data-theme="dark"] {
  color-scheme: dark;
  --background: 242 12% 8%;
  --foreground: 220 15% 92%;
  --card: 242 10% 12%;
  --primary: 252 80% 68%;
  --primary-foreground: 0 0% 100%;
  --secondary: 242 10% 16%;
  --muted-foreground: 240 5% 58%;
  --border: 240 6% 22%;
  --input: 242 8% 18%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: hsl(var(--background)); color: hsl(var(--foreground)); }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv02","cv03","cv04","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  padding-bottom: 56px;
}
button { cursor: pointer; font: inherit; border: 0; background: transparent; color: inherit; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.992); }
  to { opacity: 1; transform: none; }
}
@keyframes stmtIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes feedIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes pillIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.95); }
  to { opacity: 1; transform: none; }
}
@keyframes sk-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes todayPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

/* ═══════════════════════════════════════════
   CONFETTI
   ═══════════════════════════════════════════ */
.confetti-shell {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -10px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ═══════════════════════════════════════════
   PAGE LAYOUT + BACKGROUND GRADIENT
   ═══════════════════════════════════════════ */
.ficha-page {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding: 5.8rem 16px 0;
}
.ficha-page::before {
  content: '';
  position: fixed; top: 0; left: 0; right: 0;
  height: 50vh; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 80% 40% at 50% -10%, hsl(var(--primary) / 0.05), transparent);
}
[data-theme="dark"] .ficha-page::before {
  background: radial-gradient(ellipse 80% 40% at 50% -10%, hsl(var(--primary) / 0.03), transparent);
}

/* ═══════════════════════════════════════════
   SKELETON LOADING (shimmer)
   ═══════════════════════════════════════════ */
.ficha-skeleton { padding-top: 0; }
.skel-line {
  border-radius: 8px;
  background: linear-gradient(90deg, hsl(var(--secondary)) 25%, hsl(var(--background)) 50%, hsl(var(--secondary)) 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}
.skel-breadcrumb { width: 55%; height: 12px; margin-bottom: 1.6rem; }
.skel-title { width: 80%; height: 32px; margin-bottom: 0.8rem; }
.skel-intro { width: 65%; height: 14px; margin-bottom: 1rem; }
.skel-meta { width: 40%; height: 20px; margin-bottom: 1.8rem; }
.skel-card {
  border-radius: 24px;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--card));
  padding: 24px;
}
.skel-stmt { width: 100%; height: 14px; margin-bottom: 0.7rem; }
.skel-stmt.short { width: 60%; }
.skel-input { width: 100%; height: 42px; margin-top: 1.2rem; border-radius: 10px; }

/* ═══════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════ */
.ficha-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  font-size: 0.70rem; font-weight: 560;
  letter-spacing: 0.01em;
  color: hsl(var(--muted-foreground) / 0.75);
  margin-bottom: 1.2rem;
  animation: feedIn 0.3s cubic-bezier(0.16,1,0.3,1) both;
}
.ficha-breadcrumb svg { display: inline-block; vertical-align: middle; opacity: 0.55; }
.ficha-breadcrumb a {
  color: hsl(var(--muted-foreground) / 0.75);
  display: inline-flex; align-items: center; gap: 0.2rem;
  transition: color 0.14s ease;
  border-bottom: none;
}
.ficha-breadcrumb a:hover { color: hsl(var(--primary)); }
.ficha-breadcrumb .sep {
  color: hsl(var(--muted-foreground) / 0.35);
  font-size: 0.62rem; user-select: none;
}
.ficha-breadcrumb span:last-child {
  color: hsl(var(--foreground) / 0.7);
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   TODAY PILL (with pulsing dot)
   ═══════════════════════════════════════════ */
.ficha-today-pill {
  display: inline-flex; align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.76rem;
  border-radius: 999px;
  font-size: 0.68rem; font-weight: 740;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--primary)), #9275ea);
  margin-bottom: 0.82rem;
  box-shadow: 0 2px 8px hsl(var(--primary) / 0.22);
  animation: pillIn 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
.ficha-today-pill::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.85);
  display: inline-block;
  animation: todayPulse 1.6s ease-in-out infinite;
}
[data-theme="dark"] .ficha-today-pill {
  box-shadow: 0 2px 8px hsl(var(--primary) / 0.35);
}

/* ═══════════════════════════════════════════
   PUZZLE HEADER
   ═══════════════════════════════════════════ */
.ficha-title {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: hsl(var(--foreground));
  margin-bottom: 0.7rem;
  text-wrap: balance;
  animation: cardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

.ficha-intro {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}

.ficha-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.8rem;
}

/* ─── Section color tokens ─── */
.sec-logica-pura         { --sec-h: 250; --sec-s: 72%; --sec-l: 58%; }
.sec-territorio-numerico { --sec-h: 212; --sec-s: 82%; --sec-l: 50%; }
.sec-trampa-visual       { --sec-h: 168; --sec-s: 60%; --sec-l: 38%; }
.sec-jugadas-maestras    { --sec-h: 26;  --sec-s: 92%; --sec-l: 52%; }
.sec-factor-azar         { --sec-h: 338; --sec-s: 72%; --sec-l: 54%; }
.sec-ingenio-eterno      { --sec-h: 44;  --sec-s: 92%; --sec-l: 46%; }
.sec-default             { --sec-h: 240; --sec-s: 6%;  --sec-l: 58%; }

/* ─── Level dots (section-colored) ─── */
.ficha-level-row { display: inline-flex; align-items: center; gap: 0.55rem; }
.level-dots { display: inline-flex; align-items: center; gap: 4px; }
.level-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: hsl(var(--border));
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.level-dot.filled {
  background: hsl(var(--sec-h, 250) var(--sec-s, 72%) var(--sec-l, 58%));
  box-shadow: 0 0 5px hsl(var(--sec-h, 250) var(--sec-s, 72%) var(--sec-l, 58%) / 0.25);
}
[data-theme="dark"] .level-dot { background: hsl(var(--border) / 0.6); }
[data-theme="dark"] .level-dot.filled {
  background: hsl(var(--sec-h, 250) var(--sec-s, 72%) calc(var(--sec-l, 58%) + 14%));
  box-shadow: 0 0 6px hsl(var(--sec-h, 250) var(--sec-s, 72%) var(--sec-l, 58%) / 0.4);
}
.level-label {
  font-size: 0.74rem; font-weight: 660; letter-spacing: -0.005em;
  color: hsl(var(--sec-h, 240) var(--sec-s, 6%) calc(var(--sec-l, 58%) - 12%));
}
[data-theme="dark"] .level-label {
  color: hsl(var(--sec-h, 240) var(--sec-s, 6%) calc(var(--sec-l, 58%) + 18%));
}
.ficha-meta-sep { color: hsl(var(--muted-foreground) / 0.4); font-size: 0.75rem; user-select: none; }
.ficha-section-chip {
  font-size: 0.72rem; font-weight: 580;
  color: hsl(var(--muted-foreground));
}

/* Legacy diff-badge (keep for related cards meta) */
.diff-badge {
  display: inline-flex; align-items: center;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.68rem; font-weight: 740;
  letter-spacing: 0.01em;
  color: #fff;
}
.diff-badge[data-diff="1"] { background: hsl(152 62% 42%); }
.diff-badge[data-diff="2"] { background: hsl(200 70% 42%); }
.diff-badge[data-diff="3"] { background: hsl(28 80% 45%); }
.diff-badge[data-diff="4"] { background: hsl(8 70% 48%); }
.diff-badge[data-diff="5"] { background: hsl(0 70% 42%); }
[data-theme="dark"] .diff-badge[data-diff="1"] { background: hsl(152 40% 16%); color: hsl(152 55% 62%); }
[data-theme="dark"] .diff-badge[data-diff="2"] { background: hsl(200 40% 16%); color: hsl(200 55% 62%); }
[data-theme="dark"] .diff-badge[data-diff="3"] { background: hsl(28 40% 14%);  color: hsl(28 55% 62%);  }
[data-theme="dark"] .diff-badge[data-diff="4"] { background: hsl(8 40% 14%);   color: hsl(8 55% 62%);   }
[data-theme="dark"] .diff-badge[data-diff="5"] { background: hsl(0 40% 14%);   color: hsl(0 55% 62%);   }

.ficha-section-label {
  font-size: 0.74rem; font-weight: 580;
  color: hsl(var(--muted-foreground));
}

/* ═══════════════════════════════════════════
   PUZZLE CARD (premium, difficulty-tinted left border)
   ═══════════════════════════════════════════ */
.ficha-card {
  padding: 1.72rem 1.58rem 1.78rem;
  background: linear-gradient(180deg, #fff 0%, #fdfcff 100%);
  border: 1px solid hsl(var(--border) / 0.5);
  border-top-width: 3px;
  border-top-color: hsl(250 85% 60%);
  border-radius: 24px;
  box-shadow: 0 2px 8px rgba(48,38,75,0.04), 0 1px 0 rgba(255,255,255,0.98) inset;
  margin-bottom: 1.4rem;
  animation: cardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
/* Section-based border-top color — slugs match catalog section_slug */
.ficha-card[data-section="logica-pura"]         { border-top-color: hsl(250 85% 60%); }
.ficha-card[data-section="territorio-numerico"] { border-top-color: hsl(212 82% 50%); }
.ficha-card[data-section="trampa-visual"]       { border-top-color: hsl(168 60% 38%); }
.ficha-card[data-section="jugadas-maestras"]    { border-top-color: hsl(26  92% 52%); }
.ficha-card[data-section="factor-azar"]         { border-top-color: hsl(338 72% 54%); }
.ficha-card[data-section="ingenio-eterno"]      { border-top-color: hsl(44  92% 46%); }

.ficha-statement-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[data-theme="dark"] .ficha-card {
  background: linear-gradient(180deg, hsl(242 12% 14%) 0%, hsl(242 12% 11%) 100%);
  border-color: rgba(120, 100, 180, 0.18);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 16px 48px hsl(240 50% 3% / 0.6),
    0 4px 12px hsl(240 40% 5% / 0.3);
}
/* Dark mode: lighter variants of same hues */
[data-theme="dark"] .ficha-card[data-section="logica-pura"]         { border-top-color: hsl(250 85% 68%); }
[data-theme="dark"] .ficha-card[data-section="territorio-numerico"] { border-top-color: hsl(212 82% 62%); }
[data-theme="dark"] .ficha-card[data-section="trampa-visual"]       { border-top-color: hsl(168 60% 52%); }
[data-theme="dark"] .ficha-card[data-section="jugadas-maestras"]    { border-top-color: hsl(26  92% 62%); }
[data-theme="dark"] .ficha-card[data-section="factor-azar"]         { border-top-color: hsl(338 72% 66%); }
[data-theme="dark"] .ficha-card[data-section="ingenio-eterno"]      { border-top-color: hsl(44  92% 58%); }

/* ─── Statement (Crimson Pro — literary object) ─── */
.ficha-statement { margin-bottom: 1.4rem; }
.ficha-statement p,
.ficha-statement :is(ul, ol) {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: -0.005em;
  color: hsl(var(--foreground) / 0.92);
  animation: stmtIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
.ficha-statement p:nth-child(2) { animation-delay: 0.06s; }
.ficha-statement p:nth-child(3) { animation-delay: 0.12s; }
.ficha-statement p:nth-child(4) { animation-delay: 0.18s; }
.ficha-statement p:nth-child(5) { animation-delay: 0.24s; }
.ficha-statement p + p { margin-top: 0.9em; }
.puzzle-fig { margin: 1rem 0; text-align: center; }
.puzzle-fig img, .puzzle-inline-img { max-width: 100%; height: auto; border-radius: 6px; }
.puzzle-statement-media {
  margin: 1rem 0;
  text-align: center;
}
.puzzle-statement-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
}
.puzzle-statement-media figcaption {
  margin-top: 0.45rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.76rem;
}
.ficha-statement .katex-display { overflow-x: auto; overflow-y: hidden; padding: 0.2rem 0; }

/* ─── Answer separator ─── */
.answer-sep {
  height: 1px;
  background: linear-gradient(90deg, hsl(var(--border) / 0.6), hsl(var(--border) / 0.2));
  margin: 1.5rem 0 1.3rem;
}

/* ─── Answer input area (matches home2v2) ─── */
.ficha-card .answer-stack {
  margin-top: 1.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}
.ficha-card .input-wrapper {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}
.ficha-answer-input {
  width: 100%;
  min-height: 3.4rem;
  padding: 0 1.18rem;
  border-radius: 14px;
  border: 1.5px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 1rem; font-weight: 440; font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.02);
  transition: all 0.16s ease;
  outline: none;
}
.ficha-answer-input:focus {
  border-color: hsl(var(--primary) / 0.4);
  box-shadow: 0 0 0 3px hsla(250, 85%, 60%, 0.08);
}
.ficha-answer-input::placeholder {
  color: hsl(var(--muted-foreground) / 0.62);
  font-style: italic;
}
.ficha-answer-input:disabled {
  opacity: 0.6;
  cursor: default;
}
[data-theme="dark"] .ficha-answer-input {
  background: hsl(242 12% 15%);
  border-color: rgba(120, 100, 180, 0.3);
}
[data-theme="dark"] .ficha-answer-input:focus {
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}

.ficha-submit-btn {
  flex: 0 0 auto;
  min-width: 5.6rem;
  padding: 0 1.4rem;
  min-height: 3.2rem;
  height: 3.2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #7154e8, #9275ea);
  color: #fff;
  font-size: 0.92rem; font-weight: 720;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: none;
  box-shadow: 0 3px 12px rgba(113,84,232,0.2);
  transition: all 0.18s cubic-bezier(0.22,1,0.36,1);
}
.ficha-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(113,84,232,0.22);
}
.ficha-submit-btn:active:not(:disabled) { transform: translateY(0); transition-duration: 70ms; }
.ficha-submit-btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.ficha-submit-btn.is-loading { opacity: 0.6; pointer-events: none; }
.ficha-submit-btn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }

/* ─── Celebration state (correct answer inside card) ─── */
.answer-celebrate {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, hsl(145 52% 93%), hsl(148 45% 96%));
  border: 1px solid hsl(152 62% 42% / 0.22);
  animation: feedIn 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
[data-theme="dark"] .answer-celebrate {
  background: hsl(145 25% 11%);
  border-color: hsl(152 62% 42% / 0.3);
}
.celebrate-icon {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: hsl(152 62% 42%);
  color: #fff; font-size: 0.9rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.celebrate-text {
  font-size: 0.95rem; line-height: 1.3;
  color: hsl(var(--foreground));
  display: flex; flex-direction: column; gap: 0.1rem;
}
.celebrate-label {
  font-size: 0.72rem; font-weight: 820;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: hsl(152 40% 38%);
}
[data-theme="dark"] .celebrate-label { color: hsl(152 50% 55%); }
.celebrate-text strong {
  font-weight: 600;
  color: hsl(152 52% 28%);
}
[data-theme="dark"] .celebrate-text strong { color: hsl(152 62% 68%); }

/* Solution section inside correct feedback card. */
.fc-sol-divider {
  height: 1px;
  background: hsl(var(--border) / 0.5);
  margin: 0 1.36rem;
}
.fc-sol-meta {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1.18rem 0.3rem 1.36rem;
}
.fc-sol-kicker {
  font-size: 0.72rem; font-weight: 760;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: hsl(152 40% 38%);
}
[data-theme="dark"] .fc-sol-kicker { color: hsl(152 50% 55%); }
.fc-sol-topic {
  font-size: 0.72rem; font-weight: 500;
  color: hsl(var(--muted-foreground) / 0.7);
}
.fc-sol-prose {
  padding: 0 1.36rem 1rem;
}
.fc-sol-prose p {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.05rem; line-height: 1.75;
  color: hsl(var(--foreground) / 0.88);
  letter-spacing: -0.005em;
}
.fc-sol-prose p + p { margin-top: 0.7em; }
.fc-sol-prose strong { font-weight: 600; }
.fc-sol-prose .katex-display { margin: 0.8rem 0; overflow-x: auto; }
[data-theme="dark"] .fc-sol-prose p { color: hsl(var(--foreground) / 0.82); }

/* ═══════════════════════════════════════════
   HINTS — amber body panel
   ═══════════════════════════════════════════ */
.hints-block {
  margin-bottom: 0.8rem;
  animation: feedIn 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

.hints-list {
  margin-top: 0.62rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #fdfaf2 0%, #fefcf4 100%);
  border: 1px solid rgba(180,140,50,0.18);
  border-radius: 14px;
  animation: fadeIn 0.22s ease both;
  display: flex; flex-direction: column; gap: 0.5rem;
}
[data-theme="dark"] .hints-list { background: hsl(35 12% 11%); border-color: hsl(40 30% 22%); }

.hint-more-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: none; border: none; padding: 0.32rem 0 0;
  font-size: 0.84rem; font-weight: 600;
  color: hsl(36 65% 36%);
  cursor: pointer;
  transition: color 0.14s ease;
}
.hint-more-link:hover { color: hsl(36 72% 28%); }
.hint-more-link:disabled { opacity: 0.45; cursor: default; }
[data-theme="dark"] .hint-more-link { color: hsl(42 60% 60%); }
[data-theme="dark"] .hint-more-link:hover { color: hsl(42 70% 68%); }

/* ═══════════════════════════════════════════
   TODAY CTA
   ═══════════════════════════════════════════ */
.today-cta {
  margin: 1.4rem 0 0;
}
.today-cta-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.84rem; font-weight: 600;
  color: hsl(var(--primary));
  border-bottom: 1px solid hsl(var(--primary) / 0.2);
  transition: border-color 0.14s ease, gap 0.14s ease;
}
.today-cta-link:hover { border-color: hsl(var(--primary)); gap: 0.6rem; }

/* ═══════════════════════════════════════════
   SIGUE ENTRENANDO (clean inline nav links)
   ═══════════════════════════════════════════ */
.sigue-section {
  margin: 2.2rem 0 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid hsl(var(--border) / 0.6);
}
.sigue-title {
  font-size: 0.64rem; font-weight: 760;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: hsl(var(--muted-foreground) / 0.7);
  margin-bottom: 0.82rem;
}
.sigue-links {
  display: flex; flex-direction: column; gap: 0;
}
.sigue-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.72rem 0.62rem;
  margin: 0 -0.62rem;
  border-radius: 10px;
  font-size: 0.875rem; font-weight: 520;
  color: hsl(var(--foreground) / 0.85);
  transition: color 0.14s ease, background 0.14s ease;
}
.sigue-btn + .sigue-btn { border-top: 1px solid hsl(var(--border) / 0.3); border-radius: 10px; }
.sigue-btn:hover {
  color: hsl(var(--primary));
  background: hsl(var(--secondary) / 0.6);
}
.sigue-btn svg { color: hsl(var(--muted-foreground) / 0.5); transition: color 0.14s ease, transform 0.14s ease; }
.sigue-btn:hover svg { color: hsl(var(--primary) / 0.7); transform: translateX(3px); }
[data-theme="dark"] .sigue-btn:hover { background: hsl(var(--secondary) / 0.4); }

/* ═══════════════════════════════════════════
   RELATED GRID (with section-colored top accents)
   ═══════════════════════════════════════════ */
.related-section { margin-top: 2.6rem; }
.related-hd {
  font-size: 0.68rem; font-weight: 780;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.related-card {
  display: block;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border) / 0.6);
  border-top: 3px solid hsl(var(--border) / 0.5);
  border-radius: 14px;
  padding: 14px 16px;
  transition: transform 0.18s cubic-bezier(0.22,1,0.36,1), box-shadow 0.18s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 1px 4px hsl(240 20% 10% / 0.05);
}
.related-card[data-section="logica-pura"]         { border-top-color: hsl(250 85% 60%); }
.related-card[data-section="territorio-numerico"] { border-top-color: hsl(212 82% 50%); }
.related-card[data-section="trampa-visual"]       { border-top-color: hsl(168 60% 38%); }
.related-card[data-section="jugadas-maestras"]    { border-top-color: hsl(26  92% 52%); }
.related-card[data-section="factor-azar"]         { border-top-color: hsl(338 72% 54%); }
.related-card[data-section="ingenio-eterno"]      { border-top-color: hsl(44  92% 46%); }
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px hsl(240 20% 10% / 0.1), 0 2px 6px hsl(240 20% 10% / 0.04);
}
[data-theme="dark"] .related-card {
  border-color: hsl(var(--border) / 0.5);
  border-top-color: hsl(var(--border) / 0.5);
  box-shadow: 0 2px 6px hsl(240 40% 4% / 0.2);
}
[data-theme="dark"] .related-card:hover {
  box-shadow: 0 8px 24px hsl(240 40% 4% / 0.5);
}
[data-theme="dark"] .related-card[data-section="logica-pura"]         { border-top-color: hsl(250 85% 68%); }
[data-theme="dark"] .related-card[data-section="territorio-numerico"] { border-top-color: hsl(212 82% 62%); }
[data-theme="dark"] .related-card[data-section="trampa-visual"]       { border-top-color: hsl(168 60% 52%); }
[data-theme="dark"] .related-card[data-section="jugadas-maestras"]    { border-top-color: hsl(26  92% 62%); }
[data-theme="dark"] .related-card[data-section="factor-azar"]         { border-top-color: hsl(338 72% 66%); }
[data-theme="dark"] .related-card[data-section="ingenio-eterno"]      { border-top-color: hsl(44  92% 58%); }

.related-card-section {
  display: block;
  font-size: 0.72rem; font-weight: 720;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: hsl(var(--muted-foreground) / 0.7);
  margin-bottom: 0.3rem;
}
.related-card-title {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.05rem; font-weight: 600;
  line-height: 1.3;
  color: hsl(var(--foreground));
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-excerpt {
  font-size: 0.8rem; line-height: 1.45;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-meta {
  display: flex; align-items: center; gap: 6px;
}

/* ═══════════════════════════════════════════
   RATING ROW (inside correct feedback card)
   ═══════════════════════════════════════════ */
.fc-rating-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.62rem 1.18rem 0.62rem 1.36rem;
  border-top: 1px solid hsl(var(--border) / 0.3);
}
.fc-rating-label {
  font-size: 0.74rem; font-weight: 600;
  color: hsl(var(--muted-foreground) / 0.7);
}
.fc-rating-stars {
  display: flex; gap: 0;
}
.fc-rating-stars button {
  color: hsl(var(--border));
  font-size: 1.3rem;
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.14s cubic-bezier(0.34,1.56,0.64,1), color 0.12s ease;
  padding: 0;
}
.fc-rating-stars button:hover { transform: translateY(-2px) scale(1.2); color: hsl(var(--primary) / 0.6); }
.fc-rating-stars button.on { color: hsl(var(--primary)); }
[data-theme="dark"] .fc-rating-stars button { color: hsl(var(--border) / 0.6); }
[data-theme="dark"] .fc-rating-stars button.on { color: hsl(var(--primary)); }

/* ─── Share actions inside correct feedback footer ─── */
.fc-share-actions {
  display: flex; align-items: center; gap: 0.42rem;
  flex-shrink: 0; align-self: flex-start;
}
.fc-share-icon-btn {
  width: 1.96rem; height: 1.96rem; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  transition: all 0.14s ease;
  flex-shrink: 0;
}
.fc-share-icon-btn:hover {
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.05);
}
.fc-share-wa:hover { border-color: #25d36640; color: #25d366; background: #25d3660d; }
.fc-share-tg:hover { border-color: #0088cc40; color: #0088cc; background: #0088cc0d; }
[data-theme="dark"] .fc-share-icon-btn { background: hsl(var(--secondary)); border-color: hsl(var(--border)); }

/* ─── Pre-solve challenge share button (in meta row) ─── */
.ficha-share-challenge {
  margin-left: 0.28rem;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(42, 38, 52, 0.42);
  opacity: 1;
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.ficha-share-challenge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ficha-share-challenge:hover,
.ficha-share-challenge:focus-visible {
  color: rgba(42, 38, 52, 0.66);
  background: transparent;
  outline: none;
}

.ficha-share-challenge:focus-visible {
  box-shadow: none;
}

.ficha-share-challenge:active {
  transform: scale(0.95);
}

[data-theme="dark"] .ficha-share-challenge {
  color: rgba(214, 208, 229, 0.46);
}

[data-theme="dark"] .ficha-share-challenge:hover,
[data-theme="dark"] .ficha-share-challenge:focus-visible {
  color: rgba(232, 226, 246, 0.82);
  background: transparent;
}

/* ─── Intro inside card ─── */
.ficha-card-intro {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid hsl(var(--border) / 0.3);
  line-height: 1.65;
}

/* ─── Archive CTA link (cal-archive-link style) ─── */
.f2-archive-cta { display: flex; justify-content: center; margin-top: 16px; }
.f2-archive-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.68rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid hsl(var(--border));
  background: #fff;
  font-size: .82rem; font-weight: 640; letter-spacing: -.01em;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(15,23,42,.04);
  transition: all .18s ease;
}
.f2-archive-link svg { opacity: .5; transition: transform .18s ease, opacity .18s ease; }
.f2-archive-link:hover {
  border-color: rgba(113,84,232,.4);
  color: #7154e8;
  background: hsl(250 72% 97.5%);
  box-shadow: 0 4px 16px rgba(113,84,232,.1);
  transform: translateY(-1px);
}
.f2-archive-link:hover svg { opacity: 1; transform: translateX(2px); }
[data-theme="dark"] .f2-archive-link { background: hsl(var(--card)); }
[data-theme="dark"] .f2-archive-link:hover { background: hsl(var(--primary) / 0.08); }

/* ═══════════════════════════════════════════
   SHARE ROW
   ═══════════════════════════════════════════ */
.ficha-share-row {
  display: flex; align-items: center; gap: 0.62rem;
  margin: 1.4rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid hsl(var(--border) / 0.5);
}
.ficha-share-label {
  font-size: 0.78rem; font-weight: 640;
  color: hsl(var(--muted-foreground) / 0.7);
  margin-right: 0.2rem;
}
.ficha-share-btn {
  width: 2.2rem; height: 2.2rem; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  transition: all 0.14s ease;
}
.ficha-share-btn:hover {
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.05);
}
.ficha-share-wa:hover { border-color: #25d36640; color: #25d366; background: #25d3660d; }
.ficha-share-tg:hover { border-color: #0088cc40; color: #0088cc; background: #0088cc0d; }
[data-theme="dark"] .ficha-share-btn { background: hsl(var(--secondary)); border-color: hsl(var(--border)); }

/* ═══════════════════════════════════════════
   ERROR STATE
   ═══════════════════════════════════════════ */
.ficha-error {
  text-align: center;
  padding: 3rem 1rem;
}
.ficha-error-title {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 2rem; font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 0.6rem;
}
.ficha-error-msg {
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.4rem;
}
.ficha-error-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.68rem 1.2rem;
  border-radius: 10px;
  background: hsl(var(--primary));
  color: #fff;
  font-size: 0.88rem; font-weight: 700;
  transition: opacity 0.14s ease;
}
.ficha-error-link:hover { opacity: 0.88; }

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */
.ficha-toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  font-size: 0.82rem; font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10000;
  pointer-events: none;
}
.ficha-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════
   SUPPORT CTA (dark gradient card — shared design with sobre)
   ═══════════════════════════════════════════ */
.support-cta {
  display: grid;
  grid-template-columns: 44px 1fr 16px;
  align-items: center;
  gap: 0.9rem;
  margin: 2rem 0 0;
  padding: 1.3rem 1.2rem;
  border: 1px solid #4b3c72;
  border-radius: 20px;
  background: radial-gradient(circle at 16% 0, rgba(255,255,255,0.18), transparent 38%), linear-gradient(135deg, #241f2c, #4b3c72);
  box-shadow: 0 12px 32px rgba(45,39,54,0.18);
  color: #fff;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.support-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(45,39,54,0.26); }
.support-cta:active { transform: translateY(0); transition-duration: 80ms; }
.support-cta-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: rgba(255,255,255,0.13);
  display: grid; place-items: center; flex-shrink: 0;
}
.support-cta-body strong { display: block; font-size: 1rem; font-weight: 860; letter-spacing: -0.02em; }
.support-cta-body p { margin: 0.18rem 0 0; font-size: 0.76rem; font-weight: 500; color: rgba(255,255,255,0.7); line-height: 1.4; }
.support-cta-arrow { opacity: 0.7; flex-shrink: 0; transition: transform 0.14s ease; }
.support-cta:hover .support-cta-arrow { transform: translate(2px, -2px); }
[data-theme="dark"] .support-cta {
  background: radial-gradient(circle at 16% 0, rgba(255,255,255,0.1), transparent 38%), linear-gradient(135deg, #1a1626, #352a52);
  border-color: #5a4a8a;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
[data-theme="dark"] .support-cta:hover { box-shadow: 0 18px 42px rgba(0,0,0,0.45); }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer-std {
  margin-top: 3.5rem;
  padding: 2rem 0 2.4rem;
  border-top: 1px solid hsl(var(--border) / 0.6);
}
[data-theme="dark"] .site-footer-std { border-top-color: hsl(var(--border) / 0.5); }
.footer-top-std { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin-bottom: 0.5rem; }
.footer-links-std { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 0.6rem; }
.footer-links-std a { font-size: 0.75rem; font-weight: 500; color: hsl(var(--muted-foreground)); transition: color 0.12s ease; }
.footer-links-std a:hover { color: hsl(var(--foreground)); }
.footer-legal-std a { font-size: 0.72rem; color: hsl(var(--muted-foreground)); opacity: 0.72; }
.footer-sep-std { font-size: 0.68rem; color: hsl(var(--muted-foreground)); opacity: 0.5; user-select: none; }
.footer-copy-std { text-align: center; font-size: 0.72rem; color: hsl(var(--muted-foreground)); opacity: 0.7; line-height: 1.4; }
.heart-std { color: #fb7185; }

/* ═══════════════════════════════════════════
   INTRO PRE (outside card, before title)
   ═══════════════════════════════════════════ */
.ficha-intro-pre {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.68;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.8rem;
  animation: stmtIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}

.ficha-intro-rich p {
  margin: 0 0 0.72rem;
}

.ficha-intro-rich p:last-child {
  margin-bottom: 0;
}

.ficha-intro-rich strong {
  font-weight: 700;
  color: hsl(var(--foreground));
}

/* ═══════════════════════════════════════════
   PROGRESS STRIP CONTAINER
   ═══════════════════════════════════════════ */
#f2ProgressStrip {
  margin-top: 1.08rem;
  border-radius: 14px;
  padding: 1.48rem 1.58rem 1.42rem;
  background: linear-gradient(140deg, #2a2058 0%, #1d1848 100%);
  position: relative; overflow: hidden;
  box-shadow: 0 4px 16px rgba(26,22,72,0.28),
              0 1px 4px rgba(26,22,72,0.18),
              0 1px 0 rgba(255,255,255,0.04) inset;
  animation: feedIn 0.32s cubic-bezier(0.16,1,0.3,1) 0.1s both;
  border: 1px solid rgba(113,84,232,0.12);
}




/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
  .ficha-page { padding-top: 5.4rem; padding-left: 14px; padding-right: 14px; }
  .ficha-card { padding: 1.2rem 1rem 1.3rem; }
  .ficha-card .answer-stack { flex-direction: column; }
  .ficha-submit-btn { width: 100%; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .fc-main { padding: 0.9rem 0.9rem 0.8rem 1.1rem; }
  .fc-footer { padding: 0.6rem 0.9rem 0.7rem 1.1rem; flex-wrap: wrap; }
  .fc-actions { margin-top: 0.4rem; }
  .support-cta { grid-template-columns: 38px 1fr 14px; padding: 1.1rem 1rem; gap: 0.72rem; }
  .support-cta-icon { width: 38px; height: 38px; border-radius: 10px; }
}
@media (max-width: 400px) {
  .related-grid { grid-template-columns: 1fr; }
  .ficha-title { font-size: 1.7rem; }
  .postnav-grid { grid-template-columns: 1fr; }
}

/* Puzzle editorial media */
.puzzle-media-figure {
  margin: 0.7rem auto 1rem;
  padding: 0;
  max-width: min(100%, 440px);
  text-align: center;
}

.puzzle-media-figure img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.puzzle-media-figure figcaption {
  margin-top: 0.45rem;
  color: var(--muted, #6b5e72);
  font-size: 0.88rem;
  line-height: 1.45;
}

.puzzle-media-figure--size-small {
  max-width: min(100%, 390px);
}

.puzzle-media-figure--size-medium {
  max-width: min(100%, 460px);
}

.puzzle-media-figure--size-large {
  max-width: min(100%, 560px);
}

.puzzle-media-figure--tone-diagram,
.puzzle-media-figure--tone-construction {
  background: transparent;
  border: 0;
}

.puzzle-media-figure--tone-board {
  padding: 0.45rem;
  border: 1px solid rgba(124, 92, 53, 0.12);
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.55);
}

.puzzle-media-figure--tone-board img {
  border-radius: 10px;
}

.puzzle-media-figure--solution {
  margin-top: 0.9rem;
}

/* Puzzle editorial lists */
.ficha-statement :is(ul, ol) {
  margin: 0.75rem 0 1.05rem;
  padding-inline-start: 1.45rem;
  color: inherit;
}

.ficha-statement ul { list-style: disc; }
.ficha-statement ol { list-style: decimal; }

.ficha-statement li {
  margin: 0.18rem 0;
  padding-inline-start: 0.2rem;
}

.ficha-statement li::marker {
  color: hsl(var(--primary) / 0.78);
  font-weight: 600;
}

/* Interactive fichas: the board itself is the answer UI. Hide the legacy text answer form. */
.ficha-page--interactive #fichaAnswerSep,
.ficha-page--interactive #fichaInputWrap {
  display: none !important;
}
