/* alvvo health · ciclo (anel, registro diário, calendário, análise, gravidez) */
:root{--cy-per:#C2453A;--cy-per-soft:#F6D9D4;--cy-fert:#7FA6D1;--cy-fert-soft:#E2ECF6;--cy-ovu:#1C3D63;--cy-track:#ECE4D6}
@media (prefers-color-scheme:dark){:root{--cy-per:#F08A7E;--cy-per-soft:#3D1F1A;--cy-fert:#5E8EC4;--cy-fert-soft:#18283A;--cy-ovu:#A9CBF0;--cy-track:#2C2620}}

.mode-pill{display:inline-flex;gap:4px;align-items:center;padding:6px 14px;border-radius:999px;background:var(--lo-soft);color:var(--lo);font-size:13px;text-decoration:none}
.mode-pill.muted{background:var(--sunk);color:var(--muted)}
.cy-ask{display:flex;gap:12px;align-items:flex-start;background:var(--lo-soft);border-radius:18px;padding:14px 16px}
.cy-ask>span{font-size:20px;line-height:1.2}
.cy-ask>div{flex:1;display:flex;flex-direction:column;gap:10px;min-width:0}
.cy-ask.good{background:var(--ok-soft)}
.cy-ask p{margin:0}
.narrow2{max-width:180px}

/* anel */
.cy-hero{display:flex;justify-content:center}
.ring-box{position:relative;width:min(100%,380px);margin:0 auto}
svg.ring{display:block;width:100%;height:auto;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.ring .track{fill:none;stroke:var(--cy-track);stroke-width:22}
.ring path{fill:none;stroke-width:22;stroke-linecap:round}
.ring .per{stroke:var(--cy-per)}
.ring .per.pred{stroke:var(--cy-per-soft)}
.ring .fert{stroke:var(--cy-fert)}
.ring .ovu{stroke:var(--cy-ovu)}
.ring .late{stroke:var(--hi);stroke-dasharray:2 6;stroke-linecap:butt}
.ring .rt{fill:var(--line-2)}
.ring .rd{fill:var(--muted)}
.ring .rd.fl{fill:var(--cy-per)}
.ring .today-mk{fill:var(--ink)}
.ring .sel circle{fill:var(--surface);stroke:var(--line-2);stroke-width:2;filter:drop-shadow(0 2px 4px rgba(0,0,0,.18))}
.ring .sel-k{font:500 8px var(--f-ui);fill:var(--muted);text-anchor:middle}
.ring .sel-n{font:600 15px var(--f-data);fill:var(--ink);text-anchor:middle}
.ring .tri{stroke:var(--cy-track)}
.ring .preg{stroke:var(--cy-per)}
.ring-c{position:absolute;left:22%;right:22%;top:28%;bottom:28%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;pointer-events:none}
.ring-h{font:500 clamp(19px,5.4vw,24px)/1.18 var(--f-title);text-wrap:balance;display:block}
.ring-s{font-size:13px;color:var(--accent-ink);text-wrap:balance}
.ring-nav{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:4px}
.icon-btn{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--surface);font-size:22px;line-height:1;cursor:pointer;color:var(--ink)}
.icon-btn[disabled]{opacity:.35;cursor:default}
.cy-feel{display:flex;align-items:center;gap:12px;background:var(--accent-soft);border-radius:18px;padding:14px 16px;text-decoration:none;color:var(--ink)}
.cy-feel>span:nth-child(2){flex:1}
.cy-feel>span:last-child{font-size:22px;color:var(--accent-ink)}
.cy-feel-i{width:30px;height:30px;border-radius:50%;background:#E06B1F;color:#fff;display:grid;place-items:center;font-size:17px;flex:none}

/* fase */
svg.horm{width:100%;height:auto;display:block}
.horm .b-fol{fill:var(--cy-per-soft);opacity:.75}
.horm .b-lut{fill:var(--ok-soft)}
.horm path{fill:none;stroke-width:2;stroke-linecap:round}
.horm .h-e2,.ln.e2{stroke:#C2453A;background:#C2453A}
.horm .h-pg,.ln.pg{stroke:#2E8F6E;background:#2E8F6E}
.horm .h-lh,.ln.lh{stroke:#28649A;background:#28649A}
.horm .h-fsh,.ln.fsh{stroke:#C68A1E;background:#C68A1E}
.horm .h-now{stroke:var(--ink);stroke-width:1.2;stroke-dasharray:3 3}
.horm .h-now-d{fill:var(--ink)}
.h-ax{font:500 9px var(--f-ui);fill:var(--muted);text-anchor:middle}
.bbt .h-ax{text-anchor:start}
.ln{display:inline-block;width:14px;height:3px;border-radius:2px;vertical-align:middle;margin-right:4px}
.legend span{display:inline-flex;align-items:center;gap:2px}
.ok-txt{color:var(--ok)}
.cy-tip{background:var(--sunk);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:6px}
.cy-tip p{margin:0}
ul.bars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
ul.bars li{display:flex;flex-direction:column;gap:4px}
svg.bar{display:block;width:100%;height:8px}
svg.bar .bt{fill:var(--sunk)}svg.bar .bf{fill:var(--lo)}

/* registro do dia */
.weekstrip{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.weekstrip>*{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 0 8px;border-radius:12px;text-decoration:none;color:var(--ink);border:2px solid transparent;position:relative}
.weekstrip i{font:500 11px var(--f-title);font-style:normal;color:var(--muted)}
.weekstrip b{font:500 15px var(--f-data);width:34px;height:34px;display:grid;place-items:center;border-radius:50%}
.weekstrip .fl b{background:var(--cy-per);color:#fff}
.weekstrip .pf b{box-shadow:inset 0 0 0 1.5px var(--cy-per)}
.weekstrip .has::after{content:"";position:absolute;bottom:2px;width:5px;height:5px;border-radius:50%;background:var(--lo)}
.weekstrip .cur{border-color:var(--lo);background:var(--surface)}
.weekstrip .fut{opacity:.4}
.h3{font:600 16px var(--f-title)}
.tg-g{display:flex;flex-direction:column;gap:10px}
.tg-row{display:flex;flex-wrap:wrap;gap:8px}
.tg{border:1px solid var(--line-2);background:var(--surface);border-radius:999px;padding:8px 14px;font-size:14px;cursor:pointer;color:var(--ink);min-height:38px;line-height:1.2;text-align:left}
.tg[aria-pressed="true"]{background:var(--lo);border-color:var(--lo);color:#fff}
.tg.fl[aria-pressed="true"]{background:var(--cy-per);border-color:var(--cy-per)}
.tg[disabled]{opacity:.5}
.savebar{position:sticky;bottom:0;padding:10px 0 4px;background:linear-gradient(to top,var(--bg) 70%,transparent);z-index:5}
@media (max-width:900px){.savebar{bottom:calc(64px + env(safe-area-inset-bottom,0px))}}

/* calendário */
.cal-wrap.big .cal-g{gap:6px}
.cal-g>a{aspect-ratio:1;display:grid;place-items:center;border-radius:50%;font:400 14px var(--f-data);font-variant-numeric:tabular-nums;position:relative;color:var(--ink);text-decoration:none}
.cal-g>a:hover{background:var(--sunk)}
.cal-g>a.per,.cal-g>span.per{background:var(--cy-per);color:#fff}
.cal-g>a.pred,.cal-g>span.pred{box-shadow:inset 0 0 0 1.5px var(--cy-per);color:var(--accent-ink);background:transparent}
.cal-g>a.fert,.cal-g>span.fert{background:var(--cy-fert-soft);color:var(--lo)}
.cal-g>a.ovu,.cal-g>span.ovu{background:var(--cy-ovu);color:#fff}
.cal-g>a.log::after{content:"";position:absolute;bottom:3px;width:4px;height:4px;border-radius:50%;background:currentColor;opacity:.75}
.cal-g>a.hoje,.cal-g>span.hoje{outline:2px solid var(--ink);outline-offset:-2px}
.lg.logd{width:6px;height:6px;border:0;border-radius:50%;background:var(--ink)}
.lg.ovu{width:12px;height:12px;background:var(--cy-ovu);border-color:var(--cy-ovu)}
.lg.fert{background:var(--cy-fert);border-color:var(--cy-fert)}
.lg.per{background:var(--cy-per);border-color:var(--cy-per)}
.lg.pred{border-color:var(--cy-per)}

/* análise */
.flowgrid{display:grid;grid-template-columns:auto repeat(8,1fr);gap:4px 3px;align-items:center}
.flowgrid i{height:14px;border-radius:3px;background:transparent}
.flowgrid .lb{font-size:12px;color:var(--muted);padding-right:6px;white-space:nowrap}
.flowgrid .ax{font-size:11px;color:var(--muted);text-align:center}
.f1{background:#F2A49A!important}.f2{background:#E0675A!important}.f3{background:#C2453A!important}.f4{background:#7E1F17!important}.x{background:var(--cy-per-soft)!important}
i.sq{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:3px;vertical-align:-1px}
.cyc-row{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-bottom:1px solid var(--line)}
svg.cyc-svg{width:100%;height:auto;display:block}
.cr-track{fill:var(--cy-track)}.cr-per{fill:var(--cy-per)}.cr-fert{fill:var(--cy-fert)}
.cr-ov{fill:var(--surface);stroke:var(--cy-ovu);stroke-width:2}.cr-ov.conf{fill:var(--cy-ovu)}
.cr-l{font:500 9px var(--f-ui);fill:var(--muted)}
.cr-d.g0{fill:#C2453A}.cr-d.g1{fill:#E06B1F}.cr-d.g2{fill:#28649A}.cr-d.g3{fill:#2E8F6E}.cr-d.g4{fill:#7A5AA6}
svg.bbt{width:100%;height:auto;display:block}
.bbt-l{fill:none;stroke:var(--lo);stroke-width:1.6}
.bbt-d{fill:var(--lo)}
.bbt .cover{stroke:var(--muted);stroke-dasharray:4 4}
.bbt .ovl{stroke:var(--cy-ovu);stroke-width:1.2}
.talk{border-color:var(--hi);background:var(--hi-soft)}

/* modos e ajustes */
.modes{display:flex;flex-direction:column;gap:10px}
.mode-c{display:block;cursor:pointer}
.mode-c input{position:absolute;opacity:0;pointer-events:none}
.mode-c>span{display:flex;flex-direction:column;gap:4px;border:1px solid var(--line-2);border-radius:16px;padding:14px 16px;background:var(--surface)}
.mode-c input:checked+span{background:var(--lo);border-color:var(--lo);color:#fff}
.mode-c input:checked+span .small{color:#fff}
.mode-c input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
fieldset.bare{border:0;padding:0;margin:0;min-width:0}

/* gravidez */
ul.pn{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
ul.pn li{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;padding:8px 0;border-bottom:1px solid var(--line)}
ul.pn li .num{min-width:84px;color:var(--muted);font-size:13px}
ul.pn li>span:nth-child(2){flex:1;min-width:0}
ul.pn li.feito{opacity:.55}
ul.pn li.agora{font-weight:600}
.warnbox{border-color:var(--crit);background:var(--crit-soft)}

/* tela inicial */
.cy-home{display:flex;flex-direction:row!important;align-items:center;gap:14px;text-decoration:none;color:inherit;flex-wrap:wrap}
.cy-home>div,.cy-home-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;text-decoration:none;color:inherit}
.cy-home .ring-h{font-size:18px}
.cy-mini{position:relative;width:52px;height:52px;flex:none;display:grid;place-items:center;text-decoration:none;color:var(--ink)}
.cy-mini svg{position:absolute;inset:0;transform:rotate(-90deg)}
.cy-mini .mt{fill:none;stroke:var(--cy-track);stroke-width:5}
.cy-mini .mp{fill:none;stroke:var(--cy-per);stroke-width:5;stroke-linecap:round}
.cy-mini b{font:600 16px var(--f-data)}

/* navegação com 7 itens no celular */
@media (max-width:900px){
  nav.main.n7{justify-content:stretch;gap:0;padding-left:max(2px,env(safe-area-inset-left,0px));padding-right:max(2px,env(safe-area-inset-right,0px))}
  nav.main.n7 a{flex:1 1 0;min-width:0;padding:6px 0;font-size:10.5px;letter-spacing:-.01em}
  nav.main.n7 a span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  nav.main.n7 a.send svg{width:28px;height:28px}
}
@media (max-width:640px){
  .cy-home .btn{width:100%;justify-content:center}
}
@media (max-width:640px){
  .tabs.fit{gap:0}
  .tabs.fit a{flex:1 1 auto;padding:10px 4px;font-size:13.5px;text-align:center}
}
svg.ring{touch-action:none;user-select:none;-webkit-user-select:none}
.ring-box.preview svg.ring{cursor:default;opacity:.85}
.past-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:end}
.past-row>div:last-child:not(.field){grid-column:1/-1}
ul.fut{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
ul.fut li{display:flex;flex-direction:column;gap:3px;padding:10px 0;border-bottom:1px solid var(--line)}
ul.fut li:last-child{border-bottom:0}
.fut-h{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.fut-h b{font:500 17px var(--f-title);color:var(--lo)}
li.ent{display:flex;flex-direction:column;gap:8px}
