:root{
  --teal:#0F766E; --teal-dark:#115E59; --amber:#F59E0B; --ink:#1F2937;
  --muted:#6B7280; --line:#E5E7EB; --bgsoft:#F0FDF9; --radius:14px;
}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);background:#fff;line-height:1.55;font-size:17px}
.site-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem 1rem;
  padding:.8rem 1.1rem;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:10}
.logo{font-size:1.35rem;font-weight:800;color:var(--ink);text-decoration:none}
.logo span{color:var(--teal)}
.site-header nav a{color:var(--muted);text-decoration:none;margin-left:1rem;font-size:.95rem}
.site-header nav a:hover{color:var(--teal)}
main{max-width:760px;margin:0 auto;padding:1.2rem 1.1rem 2.5rem}
h1{font-size:1.75rem;line-height:1.25;margin:.4rem 0 .6rem}
h2{font-size:1.3rem;margin:1.6rem 0 .6rem}
.intro{color:#374151}
.hero h1{font-size:2rem}
.search-box input{width:100%;padding:.85rem 1rem;font-size:1.05rem;border:2px solid var(--line);
  border-radius:var(--radius);outline:none}
.search-box input:focus{border-color:var(--teal)}
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin:1rem 0}
@media(max-width:520px){.tiles{grid-template-columns:1fr}}
.tile{display:block;border:1px solid var(--line);border-radius:var(--radius);padding:1rem;
  text-decoration:none;color:var(--ink);background:#fff}
.tile:hover{border-color:var(--teal)}
.tile strong{display:block;color:var(--teal-dark);font-size:1.05rem}
.tile span{color:var(--muted);font-size:.92rem}
.tool-card{border:1px solid var(--line);border-radius:var(--radius);padding:1.1rem;background:var(--bgsoft);margin:1rem 0}
.field{margin-bottom:.9rem}
.field label{display:block;font-weight:600;margin-bottom:.3rem;font-size:.98rem}
.field input[type=number],.field input[type=date],.field select{width:100%;padding:.7rem .8rem;
  font-size:1.05rem;border:1.5px solid #CBD5E1;border-radius:10px;background:#fff}
.field .hint{color:var(--muted);font-size:.85rem;margin-top:.2rem}
.check{display:flex;align-items:center;gap:.5rem;font-weight:600}
.check input{width:1.15rem;height:1.15rem}
.calc-btn{width:100%;padding:.95rem;font-size:1.15rem;font-weight:800;color:#fff;background:var(--teal);
  border:none;border-radius:12px;cursor:pointer}
.calc-btn:hover{background:var(--teal-dark)}
.result{border:2px solid var(--amber);border-radius:var(--radius);padding:1.1rem;margin:1rem 0;background:#FFFBEB}
.result h2{margin-top:0}
.badge{background:var(--amber);color:#1F2937;font-size:.72rem;padding:.15rem .5rem;border-radius:999px;
  vertical-align:middle;text-transform:uppercase;letter-spacing:.03em}
.line{display:flex;justify-content:space-between;gap:1rem;padding:.45rem 0;border-bottom:1px dashed var(--line)}
.line.total{border-bottom:none;border-top:2px solid var(--amber);font-size:1.15rem;margin-top:.3rem}
table{width:100%;border-collapse:collapse;margin:.8rem 0;font-size:.95rem}
th,td{border:1px solid var(--line);padding:.45rem .6rem;text-align:right}
th:first-child,td:first-child{text-align:left}
th{background:var(--bgsoft)}
.faq details{border:1px solid var(--line);border-radius:10px;padding:.7rem 1rem;margin-bottom:.6rem}
.faq summary{font-weight:700;cursor:pointer}
.related ul{padding-left:1.2rem}
.related a{color:var(--teal-dark)}
.site-footer{border-top:1px solid var(--line);padding:1.4rem 1.1rem;color:var(--muted);font-size:.9rem;text-align:center}
.site-footer nav a{color:var(--teal-dark);margin:0 .6rem;text-decoration:none}
.note{background:#FEF3C7;border-radius:10px;padding:.7rem 1rem;font-size:.93rem}
.error{background:#FEF2F2;border:1.5px solid #DC2626;color:#991B1B;border-radius:10px;padding:.8rem 1rem;margin:.8rem 0;font-weight:600}
.copy-btn{margin-top:.9rem;width:100%;padding:.85rem;font-size:1rem;font-weight:700;color:var(--teal-dark);background:#fff;border:2px solid var(--teal);border-radius:12px;cursor:pointer;min-height:48px}
.field input[type=number],.field input[type=date],.field select{font-size:16px;min-height:48px}
.calc-btn{min-height:52px}
.como{overflow-x:auto}
@media(max-width:480px){th,td{padding:.35rem .4rem;font-size:.85rem}h1{font-size:1.5rem}.site-header nav a{margin-left:.6rem}}

.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:.8rem 0}
.table-wrap table{margin:0;min-width:520px}
canvas.chart{width:100%;height:auto;display:block;background:#fff;border:1px solid var(--line);border-radius:10px;margin:.8rem 0}
.result .extra{margin-top:.6rem;font-size:.95rem}

/* ===== Fase 3 ===== */
.field input[type=text],.field textarea{width:100%;padding:.7rem .8rem;font-size:16px;min-height:48px;border:1.5px solid #CBD5E1;border-radius:10px;background:#fff;font-family:inherit}
.field textarea{min-height:120px;line-height:1.5;resize:vertical}
input[type=range]{width:100%;min-height:48px;accent-color:var(--teal)}
input[type=file]{width:100%;font-size:1rem;padding:.6rem 0}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:.6rem;margin:.8rem 0}
.stat{border:1px solid var(--line);border-radius:10px;padding:.6rem .5rem;text-align:center;background:#fff}
.stat strong{display:block;font-size:1.25rem;color:var(--teal-dark)}
.stat span{font-size:.8rem;color:var(--muted)}
.bar-row{margin:.55rem 0}
.bar-row .bar-label{display:flex;justify-content:space-between;font-size:.88rem;margin-bottom:.2rem}
.bar-track{height:10px;background:var(--line);border-radius:999px;overflow:hidden}
.bar-fill{height:100%;background:var(--teal);border-radius:999px}
.gauge{position:relative;height:26px;border-radius:999px;overflow:hidden;display:flex;margin:1rem 0 .4rem}
.gauge div{height:100%}
.gauge .g-bajo{flex:185;background:#60A5FA}.gauge .g-normal{flex:65;background:#34D399}.gauge .g-sobre{flex:50;background:#FBBF24}.gauge .g-obeso{flex:100;background:#F87171}
.gauge-marker{position:absolute;top:-2px;width:4px;height:30px;background:var(--ink);border-radius:2px;transform:translateX(-2px)}
.gauge-labels{display:flex;justify-content:space-between;font-size:.75rem;color:var(--muted);margin-bottom:.6rem}
.cal-wrap{overflow-x:auto;margin:.8rem 0}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(34px,1fr));gap:3px;min-width:280px}
.cal-grid .cal-head{font-weight:700;text-align:center;font-size:.78rem;color:var(--muted);padding:.2rem 0}
.cal-cell{border:1px solid var(--line);border-radius:8px;min-height:40px;padding:.15rem .3rem;font-size:.82rem;background:#fff}
.cal-cell .cal-d{font-weight:700}
.cal-cell.fuera{opacity:.32}
.cal-cell.fur{background:#DBEAFE;border-color:#60A5FA}
.cal-cell.fertil{background:#FCE7F3;border-color:#F9A8D4}
.cal-cell.ovulacion{background:#F59E0B;border-color:#D97706;color:#1F2937}
.cal-cell.periodo{background:#FEE2E2;border-color:#F87171}
.cal-legend{display:flex;flex-wrap:wrap;gap:.4rem;font-size:.8rem;margin:.4rem 0}
.cal-legend span{border:1px solid var(--line);border-radius:999px;padding:.12rem .55rem;background:#fff}
.mes-titulo{font-weight:700;margin:.7rem 0 .3rem;text-transform:capitalize}
.typing-text{font-size:1.12rem;line-height:1.75;background:#fff;border:1.5px solid #CBD5E1;border-radius:10px;padding:.9rem 1rem;white-space:pre-wrap;word-break:break-word}
.typing-text .ok{color:var(--teal-dark)}
.typing-text .bad{background:#FEE2E2;color:#991B1B}
.typing-text .current{border-bottom:3px solid var(--amber)}
canvas.wheel{width:100%;max-width:480px;height:auto;display:block;margin:.6rem auto;background:#fff}
.dyn-row{display:flex;gap:.5rem;margin-bottom:.5rem}
.dyn-row input{flex:1;min-width:0;padding:.7rem .8rem;font-size:16px;min-height:48px;border:1.5px solid #CBD5E1;border-radius:10px;background:#fff}
.dyn-row button{flex:0 0 48px;border:1.5px solid var(--line);background:#fff;border-radius:10px;font-size:1.1rem;cursor:pointer;min-height:48px}
.btn-sec{width:100%;padding:.8rem;font-size:1rem;font-weight:700;color:var(--teal-dark);background:#fff;border:2px solid var(--teal);border-radius:12px;cursor:pointer;min-height:48px;margin-top:.4rem}
.img-preview{max-width:100%;border-radius:10px;border:1px solid var(--line);margin:.6rem 0}
.winner{font-size:1.5rem;font-weight:800;text-align:center;color:var(--teal-dark);margin:.6rem 0}
select.modo{margin-bottom:.4rem}
.conv-card{border:1px solid var(--line);border-radius:10px;padding:.7rem .9rem;margin-bottom:.6rem;background:#fff}
.conv-card strong{display:block;color:var(--teal-dark);margin-bottom:.2rem}
.conv-card p{margin:.2rem 0 .5rem;word-break:break-word}
.conv-card button{padding:.45rem .9rem;font-weight:700;color:var(--teal-dark);background:#fff;border:2px solid var(--teal);border-radius:10px;cursor:pointer;min-height:44px}
