/* SpeakZero — Papel Minimal
   cream #F7F3EA · text #1A1A1A · terracotta #E85D3D · white cards #FFFFFF
   serif (Fraunces/Georgia) for English, clean sans for Spanish. */
:root {
  --cream: #f7f3ea;
  --ink: #1a1a1a;
  --terra: #e85d3d;
  --card: #ffffff;
  --muted: #666666;
  --line: #e5ddcc;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}
.serif, h1, h2, .en { font-family: Fraunces, Georgia, "Times New Roman", serif; }
header.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
}
header.top .brand { font-size: 20px; font-weight: 700; }
main { max-width: 640px; margin: 0 auto; padding: 0 20px 140px; }
h1 { font-size: 52px; line-height: 1.05; margin: 8px 0; }
h2 { font-size: 26px; margin: 28px 0 8px; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
}
.btn {
  display: block; width: 100%;
  background: var(--ink); color: #fff;
  border: none; border-radius: 999px;
  padding: 16px; font-size: 18px; font-weight: 700;
  cursor: pointer; text-align: center; text-decoration: none;
}
.btn.terra { background: var(--terra); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.small { width: auto; padding: 10px 18px; font-size: 15px; display: inline-block; }
button:disabled { opacity: .5; cursor: default; }
.streak { font-size: 14px; }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress > div { height: 100%; background: var(--terra); }
nav.bottom {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--cream);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 12px 4px calc(12px + env(safe-area-inset-bottom));
  font-size: 15px;
}
nav.bottom a { color: var(--ink); text-decoration: none; padding: 4px 8px; }
nav.bottom a.active { color: var(--terra); font-weight: 700; }
.cta-fixed {
  position: fixed; left: 16px; right: 16px; bottom: 64px;
}
.node {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--line); background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; margin: 6px; cursor: pointer;
}
.node.done { background: var(--terra); color: #fff; border-color: var(--terra); }
.node.current { border-color: var(--terra); box-shadow: 0 0 0 4px #fbe3dc; }
.phrase { border-bottom: 1px solid var(--line); padding: 12px 0; }
.phrase:last-child { border-bottom: none; }
.phrase .en { font-size: 22px; }
.wrong { text-decoration: line-through; color: var(--muted); }
input, textarea, select {
  width: 100%; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; font-size: 16px; background: #fff; margin: 8px 0;
}
.chat { display: flex; flex-direction: column; gap: 8px; }
.bubble { padding: 12px 16px; border-radius: 16px; max-width: 85%; }
.bubble.me { background: var(--ink); color: #fff; align-self: flex-end; }
.bubble.ai { background: #fff; border: 1px solid var(--line); }
cite { display: block; font-size: 13px; color: var(--muted); font-style: normal; margin-top: 6px; }

/* El rincón de Azahar — reserved section at the END of the page content.
   It scrolls WITH the page (never position:fixed), so where she lies down,
   she stays. Never covers text or buttons. */
.azahar-corner {
  margin: 40px 0 8px;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  text-align: center;
  background: #fffdf6;
}
.azahar-corner img {
  width: 176px; height: 146px; object-fit: cover; border-radius: 16px;
  /* Slow, smooth transitions only: 1100–1500 ms ease-in-out. */
  transition: opacity 1.25s ease-in-out, transform 1.5s ease-in-out;
}
.azahar-corner .status { font-size: 14px; color: var(--muted); margin-top: 8px; }
@media (prefers-reduced-motion: reduce) {
  .azahar-corner img { transition: none; }
}
