/* Bead app screens: setup, today, grid, journey, progress, milestones. */
body.app{padding-block:20px 130px}
.wrap{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:20px}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;min-width:0}
.brand .mark{width:34px;height:34px;flex:none}
.brand b{display:block;font-family:var(--font-display);font-weight:600;font-size:26px;line-height:1;letter-spacing:-.01em}
.brand span{display:block;font-size:13px;color:var(--muted);line-height:1.2}
.brand b{color:var(--fg)}
.menu{display:flex;flex-direction:column;gap:14px}
.menu textarea{width:100%;min-height:90px;border-radius:16px;border:0;padding:12px 14px;background:var(--surface-2);
  box-shadow:inset 4px 4px 9px var(--in-d),inset -4px -4px 8px var(--in-l);resize:vertical}
.sect{display:flex;flex-direction:column;gap:12px}
.sect-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.sect-head h2{font-size:20px}
.picks{display:flex;flex-direction:column;gap:10px}
.pick{width:100%;text-align:left;display:flex;flex-direction:column;gap:4px;padding:14px 16px;border-radius:20px;background:var(--surface);
  box-shadow:5px 5px 12px var(--sh-d),-4px -4px 10px var(--sh-l),inset 1px 1px 3px var(--in-l);min-height:60px}
.pick[aria-pressed="true"]{background:var(--c-fill);box-shadow:inset 4px 4px 9px var(--in-d),inset -4px -4px 8px var(--in-l)}
.pick .pn{font-weight:600;line-height:1.35}
.pick .pt{font-size:13px;color:var(--muted)}
.pick[aria-pressed="true"] .pt{color:var(--fg)}
.pick .pr{display:flex;gap:8px;align-items:center;justify-content:space-between}
.selected{display:flex;flex-wrap:wrap;gap:8px}
.ctiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(min-width:560px){.ctiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
.ctile{position:relative;align-items:flex-start;justify-content:flex-start;aspect-ratio:auto;max-width:none;font-size:inherit;font-weight:inherit;text-align:left;display:flex;flex-direction:column;gap:2px;padding:14px 14px 12px;min-height:84px;border-radius:20px;background:var(--surface);color:var(--fg);
  box-shadow:5px 5px 12px var(--sh-d),-4px -4px 10px var(--sh-l),inset 1px 1px 3px var(--in-l);border-left:6px solid hsl(var(--h) 55% 58%);transition:transform .12s,box-shadow .12s}
.ctile .tn{font-family:var(--font-display);font-weight:600;font-size:17px;line-height:1.2;padding-right:30px}
.ctile .ts{font-size:12.5px;color:var(--muted)}
.ctile .tk{position:absolute;top:10px;right:10px;width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--surface-2);color:transparent;box-shadow:inset 2px 2px 4px var(--in-d),inset -2px -2px 4px var(--in-l)}
.ctile[aria-pressed="true"]{background:var(--c-fill);box-shadow:inset 4px 4px 9px var(--in-d),inset -4px -4px 8px var(--in-l)}
.ctile[aria-pressed="true"] .ts{color:var(--fg)}
.ctile[aria-pressed="true"] .tk{background:var(--accent);color:var(--on-accent);box-shadow:none}
.ctile[aria-disabled="true"]{opacity:.5}
.ctile:focus-visible{outline:3px solid var(--accent);outline-offset:2px}

.dayhead{display:flex;align-items:center;justify-content:space-between;gap:10px}
.dayhead .dt{text-align:center;display:flex;flex-direction:column}
.dayhead .dt b{font-family:var(--font-display);font-size:20px;font-weight:600}
.summary{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.summary .txt{flex:1 1 200px;display:flex;flex-direction:column;gap:6px;min-width:0}
.ring{position:relative;flex:none}
.ring svg{display:block}
.ring .rb{stroke:var(--surface-2)}
.ring .rf{stroke:var(--accent);transition:stroke-dashoffset .5s}
.ring .rm{stroke:var(--fg);stroke-width:3;stroke-linecap:round}
.ring .rl{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.ring .rl b{font-family:var(--font-display);font-size:26px;font-weight:600;line-height:1}
.ring .rl span{font-size:12px;color:var(--muted);margin-top:2px}
.hcard{padding:16px 18px;border-radius:24px;display:flex;flex-direction:column;gap:10px}
.hcard h3{font-size:16px;font-weight:600;line-height:1.35}
.hcard .tinyline{font-size:13px;color:var(--muted)}
.segs{display:grid;grid-template-columns:1fr 1.4fr;gap:10px}
.seg{min-height:46px;border-radius:16px;font-weight:600;font-size:14px;padding:0 10px;background:var(--surface);
  box-shadow:4px 4px 10px var(--sh-d),-3px -3px 8px var(--sh-l),inset 1px 1px 3px var(--in-l);transition:transform .12s}
.seg[aria-pressed="true"]{box-shadow:inset 4px 4px 9px rgba(0,0,0,.22),inset -3px -3px 7px rgba(255,255,255,.15);transform:scale(.985)}
.seg[data-v="1"][aria-pressed="true"]{background:var(--accent-mid);color:var(--fg)}
.seg[data-v="2"][aria-pressed="true"]{background:var(--accent);color:var(--on-accent)}
.stepper{display:flex;align-items:center;gap:12px}
.stepper .val{flex:1;text-align:center;font-family:var(--font-display);font-size:22px;font-weight:600}
.stepper .val small{font-family:var(--font-body);font-size:13px;font-weight:500;color:var(--muted);margin-left:4px}
.bar{height:12px;border-radius:999px;background:var(--surface-2);box-shadow:inset 2px 2px 5px var(--in-d),inset -2px -2px 4px var(--in-l);overflow:hidden}
.bar i{display:block;height:100%;border-radius:999px;background:var(--accent);min-width:0}
.run{font-size:12.5px;font-weight:700;color:var(--accent)}
.lockmsg{padding:14px 16px;border-radius:18px;font-size:14px}

.tile.now{outline:3px solid var(--fg);outline-offset:2px}
.tile[disabled]{opacity:.45;cursor:default}
.hrow{display:flex;flex-direction:column;gap:6px}
.hrow .hh{display:flex;justify-content:space-between;gap:10px;font-size:14px;font-weight:600}
.hrow .hh span:last-child{color:var(--muted);font-weight:600}
.dots{display:grid;grid-template-columns:repeat(20,minmax(0,1fr));gap:3px}
.dots i{aspect-ratio:1;border-radius:4px;background:var(--surface-2);box-shadow:inset 1px 1px 2px var(--in-d)}
.dots i.p{background:var(--accent-mid);box-shadow:none}
.dots i.s{background:var(--accent);box-shadow:none}
.dots i.f{opacity:.35}

.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:14px}
.stat{padding:16px;border-radius:22px;display:flex;flex-direction:column;gap:2px}
.stat b{font-family:var(--font-display);font-size:30px;font-weight:600;line-height:1.1}
.stat span{font-size:13px;color:var(--muted)}
.cbar{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,2fr) 44px;gap:10px;align-items:center;font-size:14px}
.cbar .bar i{background:var(--c-deep)}
.cbar .nm{font-weight:600;overflow-wrap:anywhere}
.chart{width:100%;height:auto;display:block}
.chart text{font-family:var(--font-body);font-size:10px;fill:var(--muted)}
.chart .gl{stroke:var(--in-d);stroke-width:1}
.chart .tl{stroke:var(--fg);stroke-width:1.5;stroke-dasharray:4 3}
.chart .bf{fill:var(--accent)}
.chart .bn{fill:var(--surface-2)}

.ms-card{display:flex;flex-direction:column;gap:14px}
.ms-card .hd{display:flex;gap:16px;align-items:center}
.badge{flex:none;width:64px;height:64px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--accent);color:var(--on-accent);
  font-family:var(--font-display);font-weight:600;line-height:1;box-shadow:5px 5px 12px var(--sh-d),-4px -4px 10px var(--sh-l),inset 2px 2px 4px rgba(255,255,255,.35),inset -3px -3px 6px rgba(0,0,0,.2)}
.badge b{font-size:22px}.badge span{font-size:10px;letter-spacing:.08em;margin-top:2px}
.badge.lock{background:var(--surface-2);color:var(--muted);box-shadow:inset 4px 4px 9px var(--in-d),inset -4px -4px 8px var(--in-l)}
.ms-card h2{font-size:22px}
.ms-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px}
.ms-stats div{padding:12px;border-radius:16px;display:flex;flex-direction:column}
.ms-stats b{font-family:var(--font-display);font-size:22px;font-weight:600;overflow-wrap:anywhere}
.ms-stats span{font-size:12.5px;color:var(--muted)}
.cardimg{max-width:100%;height:auto;border-radius:20px;display:block;margin:0 auto;width:min(100%,360px)}

.cheers{display:flex;flex-wrap:wrap;gap:8px}
.cheer{padding:6px 12px;border-radius:999px;background:var(--accent-soft);color:var(--fg);font-size:13.5px;font-weight:600;box-shadow:3px 3px 7px var(--sh-d),-2px -2px 6px var(--sh-l),inset 1px 1px 2px var(--in-l)}
.mcard{display:flex;flex-direction:column;gap:12px;padding:18px;border-radius:24px}
.mhead{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap}
.mbig{font-family:var(--font-display);font-size:26px;font-weight:600;line-height:1.15;overflow-wrap:anywhere}
.mlog{display:flex;gap:10px;align-items:center}
.mlog input{flex:1;min-width:0;min-height:48px;border-radius:16px;border:0;padding:0 16px;background:var(--surface-2);box-shadow:inset 4px 4px 9px var(--in-d),inset -4px -4px 8px var(--in-l)}
.mlog .u{color:var(--muted);font-size:14px;max-width:70px;overflow-wrap:anywhere}
.spark{width:100%;height:auto;display:block}
.spark .ln{stroke:var(--accent);stroke-width:2.5;fill:none;stroke-linecap:round;stroke-linejoin:round}
.spark .pt{fill:var(--accent)}.spark .p0{fill:var(--surface);stroke:var(--accent);stroke-width:2.5}
.spark .gl{stroke:var(--fg);stroke-dasharray:4 3;stroke-width:1.2;opacity:.5}
.spark text{font-family:var(--font-body);font-size:10px;fill:var(--muted)}
.wins{display:flex;flex-direction:column;gap:10px}
.win{display:grid;grid-template-columns:58px minmax(0,1fr);gap:12px;font-size:14.5px;align-items:baseline}
.win time{color:var(--muted);font-size:12.5px;font-weight:700}
.win span{overflow-wrap:anywhere}
.letter{white-space:pre-wrap;overflow-wrap:anywhere}
.fx{position:fixed;left:50%;bottom:calc(130px + env(safe-area-inset-bottom,0px));width:0;height:0;z-index:31;pointer-events:none}
.fx i{position:absolute;left:-7px;top:-7px;width:14px;height:14px;border-radius:50%;background:var(--c);box-shadow:inset 2px 2px 3px rgba(255,255,255,.45),2px 2px 4px var(--sh-d);animation:pop .95s cubic-bezier(.2,.8,.3,1) forwards}
@keyframes pop{0%{transform:translate(0,0) scale(.3);opacity:1}65%{opacity:1}100%{transform:translate(var(--dx),var(--dy)) scale(1);opacity:0}}

.nav{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;justify-content:center;
  padding:8px max(16px,env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));pointer-events:none}
.nav nav{pointer-events:auto;width:100%;max-width:560px;display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:8px;border-radius:30px}
.nav button{min-height:54px;min-width:0;border-radius:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;font-weight:700;color:var(--muted)}
.nav button svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.nav button[aria-current="page"]{color:var(--accent);box-shadow:inset 4px 4px 9px var(--in-d),inset -4px -4px 8px var(--in-l);background:var(--surface-2)}
.toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom,0px));transform:translate(-50%,16px);z-index:30;max-width:min(92vw,420px);
  padding:12px 20px;border-radius:999px;background:var(--accent);color:var(--on-accent);font-weight:600;font-size:14.5px;text-align:center;opacity:0;pointer-events:none;
  box-shadow:6px 6px 16px var(--sh-d),-4px -4px 10px var(--sh-l);transition:opacity .25s,transform .25s}
.toast.on{opacity:1;transform:translate(-50%,0)}
.notice{padding:12px 16px;border-radius:18px;font-size:14px}
@media (max-width:420px){.brand b{font-size:23px}}
