:root {
  --paper: #f6efe1;
  --paper-shadow: #ebe2d0;
  --paper-edge: #d9cdb4;
  --ink: #2d2418;
  --ink-soft: #5a4a36;
  --ink-faded: #8a7860;
  --accent: #c4633f;
  --accent-soft: #d97757;
  --accent-light: #f4dfd0;
  --gold: #b08a3e;
  --gold-soft: #d4b376;
  --sage: #8a9a7c;
  --sage-light: #d8dfc8;
  --rosa: #e8b8b0;
  --rosa-deep: #b56d6a;
  --tierra: #a07050;
  --tierra-deep: #6b4628;
  --crema: #ead9b8;
  --naranja: #e89968;
  --naranja-deep: #a85a2a;
  --ambar: #d4a259;
  --ambar-deep: #8a5a1c;
  --verde: #a8b88a;
  --verde-deep: #4a5a3a;

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;

  --shadow-soft: 0 8px 30px rgba(60, 40, 20, 0.12);
  --shadow-deep: 0 20px 60px rgba(60, 40, 20, 0.25);
  --shadow-card: 0 4px 20px rgba(60, 40, 20, 0.10);
  --shadow-page: 0 2px 8px rgba(60, 40, 20, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse at top left, #efe4cc 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, #e8d9bb 0%, transparent 60%),
    linear-gradient(135deg, #e3d4b3 0%, #d8c69e 100%);
  background-attachment: fixed;
  position: relative;
  min-height: 100vh;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.3 0 0 0 0 0.2 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.view.active {
  display: flex;
  opacity: 1;
}

.view::-webkit-scrollbar { width: 0; }

.view-menu {
  padding: 24px 16px 32px;
}

.menu-stage {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeUp 0.7s ease both;
}

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

.menu-header {
  text-align: center;
  margin-bottom: 32px;
  width: 100%;
}

.menu-deco {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 22px;
}

.menu-deco .line {
  flex: 0 1 50px;
  height: 1px;
  background: var(--ink-soft);
  opacity: 0.4;
}

.menu-deco .ornament {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.4em;
}

.menu-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.menu-title {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

.menu-title .italic {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.menu-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 320px;
  margin: 0 auto;
}

.menu-cards {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bonos-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.bonos-label .line {
  flex: 1;
  height: 1px;
  background: var(--ink-faded);
  opacity: 0.35;
}

.card {
  position: relative;
  width: 100%;
  background: var(--paper);
  border: 1px solid rgba(90, 74, 54, 0.18);
  border-radius: 18px;
  padding: 22px 22px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: inherit;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, border-color 0.3s;
  overflow: hidden;
  animation: cardIn 0.6s ease both;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0 0.25 0 0 0 0.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
  mix-blend-mode: multiply;
  border-radius: inherit;
}

.card > * { position: relative; z-index: 1; }

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

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.25s; }
.card:nth-child(4) { animation-delay: 0.32s; }
.card:nth-child(5) { animation-delay: 0.39s; }

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(60, 40, 20, 0.18);
  border-color: var(--accent);
}

.card:active {
  transform: translateY(-1px) scale(0.99);
}

.card-main {
  background: linear-gradient(135deg, #f6efe1 0%, #f0e3c8 100%);
  padding: 26px 22px 22px;
  border: 1.5px solid var(--accent);
}

.card-main::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(196, 99, 63, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.card-tag {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
  z-index: 2;
}

.main-tag {
  background: var(--accent);
  color: var(--paper);
}

.bono-tag {
  background: rgba(196, 99, 63, 0.12);
  color: var(--accent);
  border: 1px solid rgba(196, 99, 63, 0.3);
}

.card-illu {
  width: 70px;
  height: 50px;
  margin-bottom: 6px;
}

.card-illu svg { width: 100%; height: 100%; }

.card-illu.small {
  width: 50px;
  height: 42px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.card-main .card-title {
  font-size: 28px;
}

.card-meta {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: 12px;
}

.card-arrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  letter-spacing: 0.02em;
  transition: transform 0.3s;
}

.card:hover .card-arrow {
  transform: translateX(4px);
}

.menu-footer {
  margin-top: 32px;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faded);
  letter-spacing: 0.15em;
}

.view-book {
  padding: 16px 12px 12px;
  max-width: 540px;
  margin: 0 auto;
  height: 100vh;
  overflow: hidden;
}

.book-topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 14px;
  flex-shrink: 0;
  gap: 12px;
}

.back-btn {
  background: transparent;
  border: 1px solid var(--ink-faded);
  border-radius: 100px;
  padding: 7px 14px 7px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.back-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.book-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.brand-mark {
  font-size: 14px;
  color: var(--accent);
}

.brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.toc-toggle {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--ink-faded);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toc-toggle:hover { background: rgba(196, 99, 63, 0.08); }
.toc-toggle span {
  width: 14px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
}
.toc-toggle span:nth-child(2) { width: 10px; }
.toc-toggle span:nth-child(3) { width: 14px; }

.book-shadow {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 460px;
  height: 30px;
  background: radial-gradient(ellipse at center, rgba(60, 40, 20, 0.28) 0%, transparent 70%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}

.book {
  position: relative;
  width: 100%;
  max-width: 460px;
  flex: 1;
  margin: 0 auto;
  perspective: 1800px;
  perspective-origin: center center;
  z-index: 1;
}

.page {
  position: absolute;
  inset: 0;
  background: var(--paper);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(180, 150, 100, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(180, 150, 100, 0.05) 0%, transparent 40%);
  border-radius: 4px 16px 16px 4px;
  box-shadow:
    inset 8px 0 16px -8px rgba(60, 40, 20, 0.18),
    var(--shadow-deep);
  overflow: hidden;
  transform-origin: left center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1);
  will-change: transform;
}

.page::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(90deg, rgba(60, 40, 20, 0.18) 0%, rgba(60, 40, 20, 0.05) 50%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0 0.25 0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.page.flipped {
  transform: rotateY(-180deg);
}

.page-cover {
  background: linear-gradient(135deg, #e8d4b0 0%, #d4b888 50%, #c9a570 100%);
}

.page-cover.cover-planificador {
  background: linear-gradient(135deg, #f4dfd0 0%, #e8b89a 50%, #d97757 100%);
}

.page-cover.cover-lista {
  background: linear-gradient(135deg, #f0e3c8 0%, #d4b376 50%, #b08a3e 100%);
}

.page-cover.cover-diario {
  background: linear-gradient(135deg, #e8d4b0 0%, #b89878 50%, #8a6a4a 100%);
}

.cover-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 38px 28px 30px;
  text-align: center;
  z-index: 3;
}

.cover-deco-top, .cover-deco-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.cover-deco-top {
  flex-direction: row;
  gap: 14px;
  justify-content: center;
}

.cover-deco-top .line {
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--ink-soft);
  opacity: 0.5;
}

.cover-deco-top .ornament {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.4em;
}

.cover-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 14px;
}

.cover-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
  margin-top: 12px;
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cover-title .word { display: block; }
.cover-title .amp {
  font-style: italic;
  font-weight: 300;
  font-size: 32px;
  color: var(--accent);
  margin: -4px 0;
}
.cover-title .italic {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.cover-sub {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 280px;
  margin-top: 14px;
}

.cover-sub em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.cover-illu {
  width: 110px;
  margin: 6px 0;
}

.cover-author {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faded);
  margin-bottom: 6px;
}

.cover-hint {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faded);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.cover-hint .arrow {
  display: inline-block;
  animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.toc-inner, .end-inner, .content-inner {
  position: relative;
  height: 100%;
  padding: 30px 28px 28px 40px;
  display: flex;
  flex-direction: column;
  z-index: 3;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.toc-inner::-webkit-scrollbar,
.content-inner::-webkit-scrollbar,
.recipe-inner::-webkit-scrollbar { width: 4px; }
.toc-inner::-webkit-scrollbar-thumb,
.content-inner::-webkit-scrollbar-thumb,
.recipe-inner::-webkit-scrollbar-thumb { background: rgba(90, 74, 54, 0.2); border-radius: 2px; }

.page-header {
  text-align: center;
  margin-bottom: 22px;
}

.page-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  color: var(--ink-faded);
  letter-spacing: 0.3em;
  display: block;
  margin-bottom: 6px;
}

.page-chapter {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.page-flourish {
  display: block;
  font-size: 16px;
  color: var(--accent);
  margin-top: 6px;
}

.toc-list {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.toc-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dotted rgba(90, 74, 54, 0.25);
  cursor: pointer;
  transition: padding 0.25s ease, color 0.25s ease;
}

.toc-item:hover {
  padding-left: 6px;
  color: var(--accent);
}

.toc-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--accent);
  min-width: 22px;
  font-weight: 500;
}

.toc-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14.5px;
  color: var(--ink);
  flex: 1;
}

.toc-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(90, 74, 54, 0.4);
  margin: 0 4px;
  transform: translateY(-3px);
}

.toc-page-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-faded);
}

.page-footer-deco {
  text-align: center;
  font-size: 14px;
  color: var(--accent);
  margin-top: 16px;
  opacity: 0.7;
}

.page-recipe .recipe-inner {
  position: relative;
  height: 100%;
  padding: 28px 26px 28px 38px;
  display: flex;
  flex-direction: column;
  z-index: 3;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.recipe-top, .content-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.recipe-num, .content-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  color: var(--ink-faded);
  letter-spacing: 0.2em;
}

.recipe-illu {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-illu svg { width: 100%; height: 100%; }

.recipe-title, .content-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 4px 0 6px;
}

.recipe-intro, .content-intro {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(90, 74, 54, 0.18);
}

.recipe-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.meta-tag {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent);
  border: 0.5px solid rgba(196, 99, 63, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-tag.age { background: var(--sage-light); color: var(--verde-deep); border-color: rgba(74, 90, 58, 0.25); }
.meta-tag.time { background: #f0e3c8; color: var(--gold); border-color: rgba(176, 138, 62, 0.25); }
.meta-tag.serv { background: #f4dfd0; color: var(--accent); border-color: rgba(196, 99, 63, 0.25); }

.section-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 8px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  flex: 0 0 12px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.ing-list, .item-list {
  list-style: none;
  margin-bottom: 14px;
}

.ing-list li, .item-list li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  padding: 5px 0;
  border-bottom: 1px dashed rgba(90, 74, 54, 0.15);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ing-list li::before, .item-list li::before {
  content: '◦';
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
  transform: translateY(-1px);
}

.ing-list li:last-child, .item-list li:last-child { border-bottom: none; }

.prep-list {
  list-style: none;
  counter-reset: step;
  margin-bottom: 14px;
}

.prep-list li {
  position: relative;
  padding: 6px 0 8px 28px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  counter-increment: step;
}

.prep-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-tip, .content-tip {
  margin-top: auto;
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 10px 12px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--accent);
  border-radius: 0 6px 6px 0;
  display: flex;
  gap: 8px;
}

.recipe-tip::before, .content-tip::before {
  content: '✦';
  color: var(--accent);
  font-style: normal;
  flex-shrink: 0;
  transform: translateY(1px);
}

.day-card {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(196, 99, 63, 0.18);
  border-radius: 10px;
  padding: 14px 14px 12px;
  margin-bottom: 12px;
}

.day-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(196, 99, 63, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.day-name::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.meal-row {
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 4px 0;
  align-items: baseline;
}

.meal-time {
  flex: 0 0 78px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11.5px;
  color: var(--ink-soft);
  font-weight: 500;
}

.meal-food {
  flex: 1;
  color: var(--ink);
}

.cat-block {
  margin-bottom: 16px;
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(90, 74, 54, 0.15);
}

.cat-icon {
  width: 24px;
  height: 24px;
  background: var(--accent-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}

.cat-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}

.check-list {
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.check-list li .checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all 0.2s;
}

.check-list li.checked {
  color: var(--ink-faded);
  text-decoration: line-through;
  text-decoration-color: rgba(90, 74, 54, 0.4);
}

.check-list li.checked .checkbox {
  background: var(--accent);
}

.check-list li.checked .checkbox::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.field-list {
  list-style: none;
  margin-bottom: 14px;
}

.field-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  margin-bottom: 6px;
  border-left: 2px solid var(--accent);
}

.field-label {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
}

.field-desc {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.example-card {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(196, 99, 63, 0.15);
}

.example-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12.5px;
  line-height: 1.5;
}

.example-label {
  flex: 0 0 80px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-soft);
}

.example-val {
  flex: 1;
  color: var(--ink);
  font-weight: 500;
}

.example-note {
  font-size: 12px;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(90, 74, 54, 0.2);
  line-height: 1.5;
}

.section-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 16px;
}

.page-footer {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  color: var(--ink-faded);
  padding-top: 12px;
  margin-top: 14px;
  border-top: 1px solid rgba(90, 74, 54, 0.12);
  letter-spacing: 0.15em;
}

.end-inner {
  align-items: center;
  text-align: center;
  justify-content: center;
}

.end-flourish {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.8;
}

.end-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.end-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}

.end-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 280px;
  margin-bottom: 24px;
  font-weight: 300;
}

.end-btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 11px 22px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, background 0.2s;
}

.end-btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.end-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-faded);
  letter-spacing: 0.3em;
  margin-top: 28px;
}

.controls {
  position: relative;
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px 4px;
  flex-shrink: 0;
  z-index: 10;
  margin: 0 auto;
}

.ctrl {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--ink-faded);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-shadow: var(--shadow-soft);
}

.ctrl:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.ctrl:active:not(:disabled) { transform: translateY(0); }

.ctrl:disabled {
  opacity: 0.3;
  cursor: default;
}

.progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(90, 74, 54, 0.18);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.progress-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.toc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 28, 16, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.toc-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.toc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88%;
  max-width: 360px;
  background: var(--paper);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
  padding: 28px 24px;
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(60, 40, 20, 0.3);
}

.toc-drawer.open { transform: translateX(0); }

.toc-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(90, 74, 54, 0.18);
}

.toc-drawer-header h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
}

.toc-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--ink-faded);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.toc-close:hover { background: var(--ink); color: var(--paper); }

.toc-drawer-list { list-style: none; }

.toc-drawer-list .toc-item { padding: 14px 4px; }

@media (min-height: 700px) {
  .view-book { padding: 24px 12px 16px; }
  .recipe-title, .content-title { font-size: 26px; }
  .menu-title { font-size: 64px; }
}

@media (max-height: 600px) {
  .cover-title { font-size: 32px; }
  .cover-illu { width: 90px; }
  .recipe-title, .content-title { font-size: 22px; }
  .menu-title { font-size: 44px; }
  .menu-header { margin-bottom: 22px; }
}

@media (min-width: 768px) {
  .menu-stage { max-width: 520px; }
  .view-book { max-width: 600px; padding: 32px 16px 20px; }
  .book { max-width: 520px; }
  .menu-title { font-size: 72px; }
  .recipe-title, .content-title { font-size: 28px; }
  .recipe-inner, .toc-inner, .end-inner, .content-inner { padding-left: 50px; padding-right: 36px; }
}

/* === Banner de instalación PWA === */
.install-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: calc(100% - 24px);
  max-width: 420px;
  z-index: 300;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.install-banner.show {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.install-banner-inner {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.install-banner-icon {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.install-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.install-banner-text strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  color: var(--paper);
}

.install-banner-text span {
  font-size: 12px;
  color: rgba(246, 239, 225, 0.7);
}

.install-banner-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 9px 14px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
}

.install-banner-btn:hover {
  background: #d97757;
  transform: scale(1.05);
}

.install-banner-close {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  color: var(--paper);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.install-banner-close:hover { background: rgba(255,255,255,0.2); }

/* === Tutorial iOS === */
.ios-install-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 28, 16, 0.65);
  backdrop-filter: blur(6px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.ios-install-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.ios-install-card {
  background: var(--paper);
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ios-install-overlay.show .ios-install-card {
  transform: scale(1);
}

.ios-install-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--ink-faded);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.ios-install-close:hover {
  background: var(--ink);
  color: var(--paper);
}

.ios-install-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 8px;
  padding-right: 30px;
}

.ios-install-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.ios-install-card ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.ios-install-card li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 10px;
  padding-left: 4px;
}

.ios-install-card li::marker {
  color: var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
}

.ios-install-card .ios-tip {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  margin-top: 10px;
  margin-bottom: 0;
  text-align: center;
}
