/* Freidora Sin Vueltas — paleta obligatoria de 00-MARCA (sin blanco ni negro puros, sin dorado) */
:root {
  --coral: #E8623D;
  --coral-dark: #C94A2E;
  --coral-light: #F2906F;
  --teal: #12968A;
  --teal-dark: #0D7A70;
  --crema: #FDF3E7;
  --crema-dark: #F6E9D8;
  --texto: #3B2A20;
  --texto-gris: #6B5647;
  --radio: 20px;

  --card: #FFFAF3;              /* crema muy clara para tarjetas (no es blanco puro) */
  --linea: rgba(59, 42, 32, .10);
  --sombra: 0 6px 18px rgba(59, 42, 32, .08);
  --tab-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--crema); }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--texto);
  background: var(--crema);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 900; letter-spacing: -.01em; }

#view {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

/* ---------- barra de pestañas ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--card);
  border-top: 1px solid var(--linea);
  box-shadow: 0 -6px 18px rgba(59, 42, 32, .06);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 12px; font-weight: 800; color: var(--texto-gris);
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--coral-dark); }
.tabbar a.on svg { stroke: var(--coral); }

/* ---------- encabezados ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.brand { font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--coral-dark); }
.hello { font-size: 26px; margin-top: 2px; }
.level-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--sombra);
  font-size: 13px; font-weight: 800; color: var(--teal-dark);
}
.back {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px -4px; padding: 8px 10px 8px 4px;
  border: 0; background: none; font-weight: 800; color: var(--texto-gris); cursor: pointer;
}
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.section-title { font-size: 19px; margin: 26px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section-title small { font-size: 13px; font-weight: 700; color: var(--texto-gris); }
.muted { color: var(--texto-gris); }

/* ---------- buscador ---------- */
.searchbox {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 2px solid var(--crema-dark); border-radius: var(--radio);
  padding: 12px 14px; box-shadow: var(--sombra);
}
.searchbox:focus-within { border-color: var(--coral-light); }
.searchbox svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--coral); stroke-width: 2.4; stroke-linecap: round; }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; font-weight: 700; }
.searchbox input::placeholder { color: var(--texto-gris); opacity: .8; font-weight: 600; }
.searchbox .clear { border: 0; background: var(--crema-dark); border-radius: 999px; width: 28px; height: 28px; font-weight: 900; cursor: pointer; color: var(--texto-gris); }
a.searchbox { cursor: text; }
a.searchbox span { font-size: 17px; font-weight: 600; color: var(--texto-gris); }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--crema-dark);
  background: var(--card); font-size: 14px; font-weight: 800; color: var(--texto); cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--coral); border-color: var(--coral); color: var(--crema); }
.chip .n { font-weight: 700; opacity: .7; }
.filter-label { font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-gris); margin: 14px 0 6px; }

/* ---------- tarjetas ---------- */
.card { background: var(--card); border-radius: var(--radio); box-shadow: var(--sombra); }
.module-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--card); border-radius: var(--radio); box-shadow: var(--sombra); margin-bottom: 10px;
}
.module-card .ico {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; font-size: 30px;
  background: var(--crema-dark);
}
.module-card.principal .ico { background: var(--coral); }
.module-card h3 { font-size: 18px; }
.module-card p { margin: 2px 0 0; font-size: 14px; color: var(--texto-gris); font-weight: 600; }
.module-card .count { margin-left: auto; text-align: right; font-weight: 900; font-size: 20px; color: var(--coral-dark); line-height: 1; }
.module-card .count small { display: block; font-size: 11px; font-weight: 800; color: var(--texto-gris); letter-spacing: .04em; margin-top: 3px; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  padding: 14px 6px; background: var(--card); border-radius: var(--radio); box-shadow: var(--sombra); min-height: 104px;
}
.cat .e { font-size: 30px; line-height: 1; }
.cat b { font-size: 13.5px; line-height: 1.15; font-weight: 800; }
.cat small { font-size: 12px; color: var(--texto-gris); font-weight: 700; }

.guide-link {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px;
  background: var(--card); border-radius: var(--radio); box-shadow: var(--sombra); font-weight: 800;
}
.guide-link .e { font-size: 24px; }
.guide-link .arrow { margin-left: auto; color: var(--coral); font-weight: 900; }

/* lista de recetas */
.r-list { display: flex; flex-direction: column; gap: 10px; }
.r-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--card); border-radius: var(--radio); box-shadow: var(--sombra);
}
.r-item .e {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--crema-dark);
}
.r-item .body { min-width: 0; flex: 1; }
.r-item h4 { font-size: 16px; font-weight: 800; line-height: 1.25; }
.r-item .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--texto-gris); }
.r-item .meta .t { color: var(--coral-dark); }
.r-item .badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.dot-done { font-size: 11px; font-weight: 900; color: var(--teal-dark); background: rgba(18, 150, 138, .12); padding: 3px 8px; border-radius: 999px; }
.heart-mini { width: 18px; height: 18px; fill: var(--coral); }
.results-count { font-size: 14px; font-weight: 800; color: var(--texto-gris); margin: 16px 0 10px; }
.empty { text-align: center; padding: 34px 16px; color: var(--texto-gris); font-weight: 700; }
.empty .e { font-size: 42px; display: block; margin-bottom: 8px; }
.more { display: block; width: 100%; margin-top: 12px; padding: 14px; border: 2px solid var(--crema-dark); background: var(--card); border-radius: var(--radio); font-weight: 900; color: var(--coral-dark); cursor: pointer; }

/* ---------- receta ---------- */
.r-hero { text-align: center; padding: 6px 0 4px; }
.r-hero .e { font-size: 64px; line-height: 1; }
.r-hero h1 { font-size: 27px; margin: 10px 0 8px; }
.r-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: var(--crema-dark); color: var(--texto-gris); }
.tag.teal { background: rgba(18, 150, 138, .12); color: var(--teal-dark); }

.big-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 10px; }
.big {
  border-radius: var(--radio); padding: 16px 10px; text-align: center; background: var(--coral); color: var(--crema);
}
.big b { display: block; font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.big span { display: block; margin-top: 6px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.big.temp { background: var(--coral-dark); }
.small-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.small-stats div { background: var(--card); border-radius: var(--radio); padding: 10px 12px; text-align: center; box-shadow: var(--sombra); }
.small-stats b { display: block; font-size: 15px; font-weight: 900; }
.small-stats span { font-size: 12px; font-weight: 800; color: var(--texto-gris); text-transform: uppercase; letter-spacing: .06em; }

.r-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin: 14px 0 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 16px; border-radius: var(--radio); border: 2px solid transparent;
  font-weight: 900; font-size: 16px; cursor: pointer;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.ghost { background: var(--card); border-color: var(--crema-dark); color: var(--texto); }
.btn.ghost.on { border-color: var(--coral-light); color: var(--coral-dark); }
.btn.ghost.on svg { fill: var(--coral); stroke: var(--coral); }
.btn.primary { background: var(--teal); color: var(--crema); }
.btn.primary.on { background: var(--crema-dark); color: var(--teal-dark); }

.block { background: var(--card); border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px; margin-top: 12px; }
.block h2 { font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.block p { margin: 0; }
.why { font-size: 16px; font-weight: 700; color: var(--texto); }
.ing { list-style: none; margin: 0; padding: 0; }
.ing li { border-bottom: 1px solid var(--linea); }
.ing li:last-child { border-bottom: 0; }
.ing label { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; cursor: pointer; font-weight: 700; }
.ing input { appearance: none; flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 2px solid var(--coral-light); background: var(--crema); cursor: pointer; display: grid; place-items: center; }
.ing input:checked { background: var(--coral); border-color: var(--coral); }
.ing input:checked::after { content: ''; width: 6px; height: 11px; border: solid var(--crema); border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg); }
.ing input:checked + span { text-decoration: line-through; color: var(--texto-gris); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); cursor: pointer; font-weight: 600; font-size: 16px; }
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(s); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--coral); color: var(--crema); font-weight: 900; font-size: 15px;
}
.steps li.ok { color: var(--texto-gris); }
.steps li.ok::before { content: '✓'; background: var(--teal); }
.hint { font-size: 12.5px; color: var(--texto-gris); font-weight: 700; margin: -4px 0 6px; }
.done-when { background: rgba(18, 150, 138, .10); border-left: 4px solid var(--teal); }
.fix { padding: 10px 0; border-bottom: 1px solid var(--linea); }
.fix:last-child { border-bottom: 0; }
.fix b { display: block; color: var(--coral-dark); font-weight: 900; }
.fix p { font-weight: 600; }
.plain-list { margin: 0; padding-left: 20px; font-weight: 600; }
.plain-list li { margin: 4px 0; }
.bridge { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: var(--radio); background: var(--teal); color: var(--crema); font-weight: 900; }

/* ---------- guías ---------- */
.guide h1 { font-size: 26px; margin-bottom: 6px; }
.guide .content { margin-top: 12px; }
.guide h3 { font-size: 20px; margin: 22px 0 8px; color: var(--coral-dark); }
.guide h4 { font-size: 17px; margin: 18px 0 6px; }
.guide p, .guide li { font-size: 16px; font-weight: 600; }
.guide p { margin: 0 0 10px; }
.guide strong { font-weight: 900; }
.guide blockquote { margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; background: var(--crema-dark); font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 10px -16px 14px; padding: 0 16px; }
.guide table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 14.5px; background: var(--card); border-radius: 16px; box-shadow: var(--sombra); overflow: hidden; }
.guide th { text-align: left; background: var(--coral); color: var(--crema); padding: 10px 12px; font-weight: 900; white-space: nowrap; }
.guide td { padding: 10px 12px; border-top: 1px solid var(--linea); font-weight: 600; vertical-align: top; }
.guide tbody tr:nth-child(even) td { background: rgba(246, 233, 216, .5); }

/* ---------- progreso ---------- */
.level-card { padding: 20px; border-radius: var(--radio); background: var(--coral); color: var(--crema); }
.level-card .lvl { font-size: 13px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.level-card h2 { font-size: 26px; margin: 4px 0 14px; }
.bar { height: 12px; border-radius: 999px; background: rgba(253, 243, 231, .35); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--crema); transition: width .5s ease; }
.level-card .next { margin-top: 8px; font-size: 14px; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stats div { background: var(--card); border-radius: var(--radio); box-shadow: var(--sombra); padding: 14px 8px; text-align: center; }
.stats b { display: block; font-size: 26px; font-weight: 900; color: var(--coral-dark); line-height: 1.1; }
.stats span { font-size: 12px; font-weight: 800; color: var(--texto-gris); }
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ach { padding: 14px; border-radius: var(--radio); background: var(--card); box-shadow: var(--sombra); }
.ach .e { font-size: 28px; }
.ach b { display: block; font-size: 15px; margin-top: 6px; }
.ach p { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--texto-gris); }
.ach.locked { box-shadow: none; background: var(--crema-dark); }
.ach.locked .e { filter: grayscale(1); opacity: .45; }

/* ---------- segmentado (guardadas) ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--crema-dark); border-radius: 999px; margin: 6px 0 14px; }
.seg button { border: 0; padding: 10px; border-radius: 999px; background: transparent; font-weight: 900; color: var(--texto-gris); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--coral-dark); box-shadow: var(--sombra); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 40; max-width: min(92vw, 460px); padding: 14px 18px; border-radius: var(--radio);
  background: var(--texto); color: var(--crema); font-weight: 800; box-shadow: 0 12px 30px rgba(59, 42, 32, .3);
  animation: pop .25s ease;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 10px); } }

.loading { text-align: center; padding: 60px 0; color: var(--texto-gris); font-weight: 800; }

/* ---------- regalos ---------- */
.gift { display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-dark); background: rgba(18, 150, 138, .12); padding: 3px 9px; border-radius: 999px; margin-bottom: 4px; }
.tag.gift-tag { background: var(--teal); color: var(--crema); }
.r-item .meta .from { color: var(--teal-dark); }
.gift-hero { text-align: center; padding: 6px 0 4px; }
.gift-hero .e { font-size: 64px; line-height: 1.1; margin-top: 6px; }
.gift-hero h1 { font-size: 30px; margin-top: 6px; }
.gift-hero p { margin: 4px 0 0; font-weight: 700; color: var(--texto-gris); }
.gift-count { display: inline-block; margin-top: 12px; padding: 8px 16px; border-radius: 999px; background: var(--coral); color: var(--crema); font-weight: 800; }
.gift-count b { font-size: 18px; }
.big b.two { font-size: 30px; }
.small-stats .wide { grid-column: 1 / -1; }
.bridge .e { font-size: 26px; }
.bridge b { display: block; }
.bridge small { display: block; font-weight: 700; opacity: .92; font-size: 13.5px; }
.bridge .arrow { margin-left: auto; font-size: 22px; }
.table-wrap.in-block { margin: 12px -16px; }
.mini-table { border-collapse: collapse; min-width: 100%; font-size: 15px; }
.mini-table th { text-align: left; background: var(--coral); color: var(--crema); padding: 8px 12px; font-weight: 900; }
.mini-table td { padding: 8px 12px; border-top: 1px solid var(--linea); font-weight: 700; }
.mini-table tbody tr:nth-child(even) td { background: rgba(246, 233, 216, .6); }
.block p + p { margin-top: 10px; }

/* ---------- kit: tabla de tiempos ---------- */
.pinned { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: var(--radio); background: var(--teal); color: var(--crema); }
.pinned .e { font-size: 28px; }
.pinned small { display: block; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.pinned b { font-size: 17px; }
.pinned .arrow { margin-left: auto; font-size: 22px; font-weight: 900; }
.tt-actions { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin: 14px 0 10px; }
.tt-actions .btn { min-height: 46px; font-size: 15px; }
.tt-intro { background: var(--card); border-radius: var(--radio); box-shadow: var(--sombra); padding: 12px 16px; margin-bottom: 12px; }
.tt-intro summary { font-weight: 900; cursor: pointer; color: var(--coral-dark); }
.tt-intro ul { margin: 10px 0 0; padding-left: 20px; }
.tt-search { margin-bottom: 10px; }
.tt-fam h3 { margin-top: 20px; }
.time-table table.tt { width: 100%; font-size: 14.5px; }
.time-table table.tt th { padding: 9px 10px; }
.time-table table.tt td { padding: 9px 10px; }
.time-table table.tt td.n { white-space: nowrap; font-weight: 800; color: var(--coral-dark); }
.tt-note { margin-top: 4px; }
.guide pre.formula { white-space: pre-wrap; background: var(--crema-dark); border-radius: 14px; padding: 12px 14px; font-family: inherit; font-weight: 900; font-size: 15px; margin: 0 0 12px; }

@media print {
  .tabbar, .back, .tt-actions, .tt-search, .tt-fams, .tt-intro, .toast { display: none !important; }
  #view { padding: 0; max-width: none; }
  .guide table { box-shadow: none; font-size: 11px; }
  .tt-fam { break-inside: avoid; }
}
.time-table .table-wrap { margin-left: 0; margin-right: 0; padding: 0; }
.time-table table.tt { font-size: 13.5px; }
.time-table table.tt th, .time-table table.tt td { padding: 8px 7px; }
.time-table table.tt th:first-child, .time-table table.tt td:first-child { padding-left: 10px; }

/* =====================================================================
   TEMA OSCURO — tomado de las referencias que pasó Ramiro (03/10/2026):
   fondo oscuro liso, acento naranja (acá: el coral de la marca), título
   en dos tonos y dos letras, categorías en fila de cuadrados, tarjetas
   horizontales, banner sólido, tarjeta de puntos y barra flotante con
   botón central. Sin brillos ni degradés de fondo.
   Para volver al tema claro, borrar este bloque entero.
   ===================================================================== */
:root {
  --bg: #15100D;               /* casi negro, cálido (la marca no usa negro puro) */
  --surface: #221A16;          /* tarjetas */
  --surface-2: #2C231E;        /* tarjetas dentro de tarjetas, cuadraditos */
  --borde: rgba(255, 236, 216, .07);
  --texto: #FDF3E7;
  --texto-gris: #B9A698;
  --crema-dark: #2C231E;
  --card: #221A16;
  --linea: rgba(255, 236, 216, .08);
  --sombra: 0 8px 22px rgba(0, 0, 0, .35);
  --acento-txt: #F28A64;
  --teal-txt: #45C9BB;
}
html, body { background: var(--bg); }

/* superficies lisas con borde fino, como en las referencias */
.searchbox, .chip, .module-card, .cat, .guide-link, .r-item, .small-stats div, .block,
.stats div, .ach, .btn.ghost, .more, .tt-intro, .level-chip, .guide table {
  background: var(--surface);
  border: 1px solid var(--borde);
  box-shadow: var(--sombra);
}
.module-card .ico, .r-item .e { background: var(--surface-2); }
.module-card.principal .ico { background: var(--coral); }
.searchbox:focus-within { border-color: var(--coral); }
.chip.on { background: var(--coral); border-color: var(--coral); color: var(--crema); }

.brand, .module-card .count, .r-item .meta .t, .fix b, .guide h3, .stats b, .time-table table.tt td.n,
.btn.ghost.on, .more, .seg button.on, .tt-intro summary, .guide-link .arrow { color: var(--acento-txt); }
.level-chip, .dot-done, .gift, .r-item .meta .from, .tag.teal { color: var(--teal-txt); }
.dot-done, .gift, .tag.teal { background: rgba(69, 201, 187, .14); }
.ing input { background: transparent; }
.btn.primary.on { background: rgba(69, 201, 187, .14); color: var(--teal-txt); }
.toast { background: #3B2A20; color: var(--crema); border: 1px solid var(--borde); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.guide blockquote, .guide pre.formula { background: var(--surface-2); }
.guide tbody tr:nth-child(even) td, .mini-table tbody tr:nth-child(even) td { background: rgba(255, 236, 216, .04); }
.ach.locked { background: rgba(255, 236, 216, .03); box-shadow: none; }
.seg { background: var(--surface); }
.seg button.on { background: var(--surface-2); }
.done-when { background: rgba(18, 150, 138, .16); }

/* ---------- inicio ---------- */
.home-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hero-title { margin: 0; line-height: .98; }
.hero-title .l1 {
  display: block; font-family: 'Baloo 2', 'Nunito', sans-serif; font-weight: 800;
  font-size: 40px; color: var(--crema); letter-spacing: -.01em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.hero-title .l2 {
  display: block; font-family: 'Kaushan Script', cursive; font-weight: 400;
  font-size: 54px; color: var(--coral); transform: rotate(-4deg); transform-origin: left center;
  margin: 2px 0 0 4px;
  text-shadow: 0 2px 0 #9E3923, 0 4px 0 #6E2716, 0 8px 16px rgba(0, 0, 0, .5);
}
.hero-sub { margin: 10px 0 18px; color: var(--texto-gris); font-weight: 700; font-size: 15px; }

.searchbar {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px;
  background: var(--surface); border: 1px solid var(--borde); border-radius: 18px; box-shadow: var(--sombra);
}
.searchbar svg.lupa { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--acento-txt); stroke-width: 2.4; stroke-linecap: round; }
.searchbar span.txt { color: var(--texto-gris); font-weight: 600; font-size: 16px; font-style: italic; }
.searchbar .filtro {
  width: 46px; height: 46px; border-radius: 14px; background: var(--coral); display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(232, 98, 61, .4);
}
.searchbar .filtro svg { width: 22px; height: 22px; fill: none; stroke: var(--crema); stroke-width: 2.2; stroke-linecap: round; }

.cat-row { display: flex; gap: 10px; overflow-x: auto; padding: 16px 2px 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-tile {
  flex: 0 0 auto; width: 82px; height: 86px; border-radius: 16px; background: var(--surface); border: 1px solid var(--borde);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
}
.cat-tile .e { font-size: 28px; line-height: 1; }
.cat-tile b { font-size: 11.5px; line-height: 1.1; font-weight: 800; padding: 0 4px; }
.cat-tile.on { background: var(--coral); border-color: var(--coral); box-shadow: 0 8px 20px rgba(232, 98, 61, .35); }
.cat-tile.on b { color: var(--crema); }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 0 10px; }
.sec-head h2 { font-size: 21px; font-weight: 900; }
.sec-head a { color: var(--acento-txt); font-weight: 800; font-size: 14px; }

.mod-row { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.mod-row::-webkit-scrollbar { display: none; }
.mod-card {
  flex: 0 0 168px; scroll-snap-align: start; border-radius: 18px; background: var(--surface); border: 1px solid var(--borde);
  padding: 10px; display: flex; flex-direction: column; box-shadow: var(--sombra); position: relative;
}
.mod-card .pic { height: 96px; border-radius: 13px; background: var(--surface-2); display: grid; place-items: center; font-size: 46px; position: relative; }
.mod-card.principal .pic { background: linear-gradient(160deg, #3a2a22, #2C231E); }
.mod-card .badge {
  position: absolute; top: 7px; left: 7px; font-size: 9.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px; background: var(--teal); color: var(--crema);
}
.mod-card.principal .badge { background: var(--coral); }
.mod-card h3 { font-size: 15px; font-weight: 800; margin: 10px 2px 2px; line-height: 1.2; }
.mod-card .cnt { margin: 0 2px; color: var(--acento-txt); font-weight: 900; font-size: 14px; }
.mod-card .go {
  position: absolute; right: 10px; bottom: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--coral);
  display: grid; place-items: center; color: var(--crema); font-weight: 900; font-size: 16px; line-height: 1;
}

.promo {
  margin-top: 18px; border-radius: 20px; background: var(--coral); color: #2a1610; padding: 18px 16px; position: relative; overflow: hidden;
  display: block; min-height: 132px;
}
.promo .pk { font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: rgba(42, 22, 16, .75); }
.promo h3 { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 26px; line-height: 1; margin: 6px 0 6px; color: #2a1610; max-width: 64%; text-transform: uppercase; }
.promo p { margin: 0 0 12px; font-weight: 700; font-size: 13.5px; max-width: 62%; color: rgba(42, 22, 16, .85); }
.promo .btn-promo { display: inline-block; background: #2a1610; color: var(--crema); font-weight: 900; font-size: 13.5px; padding: 8px 16px; border-radius: 999px; }
.promo .big-e { position: absolute; right: -6px; bottom: -10px; font-size: 104px; line-height: 1; transform: rotate(-10deg); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .3)); }

.prog-card { margin-top: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--borde); padding: 16px; box-shadow: var(--sombra); display: block; }
.prog-card .pt { font-family: 'Baloo 2', 'Nunito', sans-serif; font-weight: 800; font-size: 21px; color: var(--crema); }
.prog-card .ps { color: var(--texto-gris); font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.prog-card .row { display: flex; gap: 10px; background: var(--surface-2); border-radius: 14px; padding: 12px; align-items: flex-end; }
.prog-card .row > div { flex: 1; }
.prog-card small { display: block; font-size: 11.5px; font-weight: 800; color: var(--texto-gris); }
.prog-card .pts { font-size: 30px; font-weight: 900; color: var(--acento-txt); line-height: 1.1; }
.prog-card .nx { font-size: 15px; font-weight: 900; color: var(--crema); }
.prog-card .bar { margin-top: 10px; background: rgba(255, 236, 216, .1); }
.prog-card .bar i { background: var(--coral); }
.prog-card .ver { display: inline-block; margin-top: 12px; padding: 7px 16px; border-radius: 999px; border: 1.5px solid var(--acento-txt); color: var(--acento-txt); font-weight: 900; font-size: 13.5px; }

/* lista de recetas: botón naranja redondo a la derecha, como en las referencias */
.r-item .go { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; color: var(--crema); font-weight: 900; font-size: 17px; line-height: 1; }

/* ---------- barra de abajo: flotante, redondeada, con botón central ---------- */
.tabbar {
  left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
  height: 66px; padding-bottom: 0; border-radius: 26px;
  grid-template-columns: repeat(5, 1fr); overflow: visible;
  background: #201814; border: 1px solid var(--borde); box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
}
.tabbar a { color: var(--texto-gris); font-size: 11px; }
.tabbar a.on { color: var(--acento-txt); }
.tabbar a.on svg { stroke: var(--acento-txt); }
.tabbar a.center { position: relative; }
.tabbar a.center .ring {
  width: 62px; height: 62px; margin-top: -30px; border-radius: 50%; background: var(--coral);
  display: grid; place-items: center; border: 5px solid var(--bg); box-shadow: 0 10px 22px rgba(232, 98, 61, .45);
}
.tabbar a.center .ring svg { stroke: var(--crema); width: 26px; height: 26px; }
.tabbar a.center span { margin-top: 2px; }
.tabbar a.center.on { color: var(--acento-txt); }
#view { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

@media print {
  html, body { background: #fdfdfd !important; color: #3B2A20; }
  .guide table, .guide td, .guide th { color: #3B2A20; background: #fff !important; }
}
.searchbar .filtro { flex: 0 0 46px; }
.searchbar span.txt { flex: 1; }
.mod-row, .cat-row { scroll-padding-left: 16px; }
.mod-row::before, .mod-row::after, .cat-row::before, .cat-row::after { content: ''; flex: 0 0 4px; }
.home-top { position: relative; justify-content: center; margin-bottom: 4px; }
.home-logo { width: 170px; height: 170px; display: block; margin: -8px auto -6px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .5)); }
.home-top .level-chip { position: absolute; top: 4px; right: 0; }

/* Portada del inicio: la misma foto que la portada de Facebook, sin texto (12/10/2026).
   El degradé la funde con el fondo para que el título se lea. */
.home-hero { position: relative; isolation: isolate; margin: calc(-14px - env(safe-area-inset-top)) -16px 0; padding: calc(14px + env(safe-area-inset-top)) 16px 6px; }
.home-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('../img/portada-app.webp') center 38% / cover no-repeat; }
.home-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(21,16,13,0) 0%, rgba(21,16,13,.35) 40%, rgba(21,16,13,.86) 76%, #15100D 100%); }
.home-hero .hero-title { text-shadow: 0 2px 14px rgba(0,0,0,.55); }
.home-hero .hero-sub { color: #EADBCD; text-shadow: 0 1px 8px rgba(0,0,0,.6); margin-bottom: 14px; }
/* Halo circular suave detrás del logo, para que no se pierda en la portada (14/10/2026) */
.home-hero .home-top::before { content: ''; position: absolute; left: 50%; top: 50%; width: 250px; height: 250px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(21,16,13,.72) 0%, rgba(21,16,13,.45) 42%, rgba(21,16,13,0) 70%); pointer-events: none; }
.home-hero .home-logo { position: relative; z-index: 1; }
.home-hero .level-chip { z-index: 1; }
