/* Plate by Jazz. Same palette and type as the challenge page: cream, wood brown, one red for actions. */
:root{
  --bg:#f6f0e9;--paper:#fffbf7;--ink:#2a1911;--text:#5a4538;--mute:#927d6e;--line:#e7dacc;
  --wood:#8b5a3c;--wood2:#c49a78;--red:#a32b24;--red2:#bf3a31;--dark:#24150e;--soft:#f1e5d8;--blush:#fbeceb;
  --d:'DM Serif Display',Georgia,serif;--b:'Inter',system-ui,sans-serif;
  --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--bg);height:100%}
body{font-family:var(--b);color:var(--text);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}
input,select{font:inherit;color:var(--ink)}
.app{max-width:480px;margin:0 auto;min-height:100svh;background:var(--paper);position:relative;display:flex;flex-direction:column}
@media (min-width:520px){body{padding:24px 0}.app{min-height:calc(100svh - 48px);border-radius:28px;box-shadow:0 30px 60px -30px rgba(36,21,14,.45);overflow:hidden}}
.scr{flex:1;display:flex;flex-direction:column;padding:16px 20px calc(24px + var(--safe-b));gap:16px;animation:in .25s ease}
@keyframes in{from{opacity:0;transform:translateY(6px)}}
@media (prefers-reduced-motion:reduce){.scr{animation:none}}
.top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px}
.brand{font-size:12px;letter-spacing:.3em;font-weight:700;color:var(--ink)}.brand span{color:var(--wood)}
.back{width:44px;height:44px;border-radius:50%;background:var(--soft);display:grid;place-items:center;font-size:20px;color:var(--ink)}
.prog{flex:1;height:4px;background:var(--soft);border-radius:9px;overflow:hidden;margin:0 6px}.prog i{display:block;height:100%;background:var(--red);transition:width .3s}
h1,h2{font-family:var(--d);font-weight:400;color:var(--ink);line-height:1.08;letter-spacing:-.01em}
h1{font-size:36px}h2{font-size:28px}h1 em,h2 em{color:var(--red)}
.lead{font-size:15.5px;color:var(--text)}
.k{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:var(--wood)}
.grow{flex:1}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:54px;border-radius:14px;background:var(--red);color:#fff;font-weight:600;font-size:16px}
.btn:disabled{background:var(--wood2);opacity:.6;cursor:default}
.btn.dark{background:var(--dark)}
.btn.ghost{background:#fff;color:var(--ink);border:1px solid var(--line)}
.link{color:var(--red);font-weight:600;text-decoration:underline;text-underline-offset:3px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.opts{display:grid;gap:10px}
.opt{display:flex;align-items:center;gap:14px;min-height:64px;padding:12px 16px;border:1.5px solid var(--line);border-radius:14px;background:#fff;text-align:left}
.opt b{display:block;color:var(--ink);font-size:16px}.opt small{color:var(--mute);font-size:13px}
.opt .ic{width:38px;height:38px;border-radius:10px;background:var(--soft);display:grid;place-items:center;font-size:18px;flex:none}
.opt.on{border-color:var(--red);background:var(--blush)}
.opt.on .ic{background:var(--red);color:#fff}
.field{display:grid;gap:6px}
.field label{font-weight:600;color:var(--ink);font-size:14.5px}
.inp{position:relative}.inp input,.inp select{width:100%;min-height:52px;border:1px solid var(--line);border-radius:12px;padding:12px 48px 12px 14px;background:#fff;font-size:17px}
.inp select{padding-right:14px}
.inp em{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-style:normal;color:var(--mute);font-size:14px}
.inp input:focus,.inp select:focus{outline:2px solid var(--wood2);outline-offset:1px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.seg{display:inline-flex;background:var(--soft);border-radius:99px;padding:3px;align-self:start}
.seg button{min-height:40px;padding:0 16px;border-radius:99px;font-size:14px;font-weight:600}
.seg button.on{background:var(--dark);color:#fff}
.card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px}
.err{background:var(--blush);color:var(--red);border-radius:12px;padding:10px 12px;font-size:14px}
.tbc{background:#fff0c2;color:#5c4700;padding:1px 6px;border-radius:4px;font-size:.86em}
/* plan building */
.build{display:grid;place-items:center;gap:18px;text-align:center;flex:1}
.pct{font-family:var(--d);font-size:64px;color:var(--ink)}
.build .bar{width:100%;height:8px;background:var(--soft);border-radius:9px;overflow:hidden}.build .bar i{display:block;height:100%;background:var(--red);transition:width .2s}
.checks{display:grid;gap:8px;text-align:left;width:100%}
.checks div{display:flex;gap:10px;align-items:center;font-size:14.5px;color:var(--mute)}.checks div.on{color:var(--ink)}
.checks div::before{content:"";width:18px;height:18px;border-radius:50%;border:2px solid var(--line);flex:none}
.checks div.on::before{background:var(--red);border-color:var(--red);box-shadow:inset 0 0 0 3px #fff}
/* plan */
.macgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mac{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px;display:grid;gap:8px;justify-items:center}
.mac .k{justify-self:start}
.mini{width:84px;height:84px;position:relative}
.mini svg{width:100%;height:100%;transform:rotate(-90deg)}
.mini .rb{fill:none;stroke:var(--soft);stroke-width:7}.mini .rf{fill:none;stroke-width:7;stroke-linecap:round;transition:stroke-dashoffset .6s}
.mini b{position:absolute;inset:0;display:grid;place-items:center;font-size:17px;color:var(--ink)}
/* home */
.days{display:flex;gap:6px;justify-content:space-between}
.day{flex:1;min-height:58px;border-radius:14px;display:grid;place-items:center;gap:0;font-size:11px;color:var(--mute);padding:6px 0}
.day b{font-size:16px;color:var(--ink);width:30px;height:30px;border-radius:50%;display:grid;place-items:center;border:1.5px dashed var(--line)}
.day.has b{border:1.5px solid var(--wood2)}
.day.on{background:var(--soft)}.day.on b{border-color:var(--red)}
.hero{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px}
.hero .num{font-family:var(--d);font-size:52px;line-height:1;color:var(--ink)}
.hero small{display:block;color:var(--mute);font-size:14px;margin-top:4px}
.big{width:118px;height:118px;position:relative;flex:none}
.big svg{width:100%;height:100%;transform:rotate(-90deg)}
.big .rb{fill:none;stroke:var(--soft);stroke-width:9}.big .rf{fill:none;stroke:var(--red);stroke-width:9;stroke-linecap:round;transition:stroke-dashoffset .6s}
.big i{position:absolute;inset:0;display:grid;place-items:center;font-style:normal;font-size:26px}
.three{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.m3{background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px 10px;display:grid;gap:6px}
.m3 b{font-size:20px;color:var(--ink);line-height:1}.m3 span{font-size:12px;color:var(--mute)}
.m3 .mini{width:56px;height:56px;justify-self:center}.m3 .mini b{font-size:13px}
.list{display:grid;gap:10px}
.row{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:10px;width:100%;text-align:left}
.thumb{width:62px;height:62px;border-radius:12px;background:var(--soft) center/cover;flex:none;display:grid;place-items:center;font-size:24px}
.row .t{flex:1;min-width:0}.row .t b{display:block;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .t small{color:var(--mute);font-size:12.5px}
.row .kc{font-weight:700;color:var(--ink);font-size:15px}
.row .mm{display:flex;gap:10px;font-size:12px;color:var(--text);margin-top:2px}
.empty{border:1.5px dashed var(--line);border-radius:16px;padding:22px;text-align:center;color:var(--mute);font-size:14.5px}
.tabs{position:sticky;bottom:0;display:flex;justify-content:space-around;align-items:center;background:rgba(255,251,247,.96);backdrop-filter:blur(8px);border-top:1px solid var(--line);padding:6px 10px calc(6px + var(--safe-b));margin:auto -20px calc(-24px - var(--safe-b))}
.tab{min-width:64px;min-height:50px;display:grid;place-items:center;font-size:11.5px;font-weight:600;color:var(--mute)}
.tab.on{color:var(--red)}
.tab i{font-style:normal;font-size:20px;line-height:1}
.plus{width:58px;height:58px;border-radius:50%;background:var(--red);color:#fff;font-size:30px;display:grid;place-items:center;margin-top:-26px;box-shadow:0 12px 22px -10px rgba(163,43,36,.8)}
/* sheet */
.veil{position:fixed;inset:0;background:rgba(36,21,14,.4);z-index:20;display:flex;align-items:flex-end;justify-content:center;animation:fade .2s}
@keyframes fade{from{opacity:0}}
.sheet{width:100%;max-width:480px;background:var(--paper);border-radius:24px 24px 0 0;padding:10px 20px calc(22px + var(--safe-b));display:grid;gap:12px;animation:up .25s ease}
@keyframes up{from{transform:translateY(40px);opacity:.5}}
.grab{width:40px;height:5px;border-radius:9px;background:var(--line);justify-self:center;margin-bottom:6px}
.acts{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.act{background:#fff;border:1px solid var(--line);border-radius:16px;min-height:96px;display:grid;place-items:center;gap:4px;font-weight:600;color:var(--ink);font-size:14.5px;padding:12px}
.act i{font-style:normal;font-size:26px}
/* scan result */
.photo{margin:-16px -20px 0;height:300px;background:var(--dark) center/cover;position:relative}
.photo .back{position:absolute;left:16px;top:16px;background:rgba(255,251,247,.92)}
.res{margin-top:-28px;background:var(--paper);border-radius:24px 24px 0 0;position:relative;display:grid;gap:12px;padding-top:18px}
.name{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:0 12px;background:#fff}
.name input{flex:1;border:0;min-height:50px;font-family:var(--d);font-size:22px;background:none}
.name input:focus{outline:none}
.kcal{display:flex;align-items:center;gap:12px;padding:14px 16px}
.kcal .ic{width:42px;height:42px;border-radius:12px;background:var(--blush);display:grid;place-items:center;font-size:20px}
.kcal b{font-size:30px;color:var(--ink);line-height:1}
.chips3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.chip{background:var(--soft);border-radius:12px;padding:10px;display:grid;gap:2px}
.chip span{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--wood);font-weight:700}.chip b{font-size:18px;color:var(--ink)}
.item{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.item .t{flex:1;min-width:0}.item b{display:block;color:var(--ink);font-size:14.5px}.item small{color:var(--mute);font-size:12.5px}
.item button{width:40px;height:40px;border-radius:10px;color:var(--mute);font-size:18px}
.step{display:flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid var(--line);border-radius:12px;padding:6px 6px 6px 14px}
.step div{display:flex;align-items:center;gap:6px}.step button{width:44px;height:44px;border-radius:10px;background:var(--soft);font-size:20px;color:var(--ink)}
.step b{min-width:44px;text-align:center;color:var(--ink);font-size:17px}
.conf{font-size:12.5px;color:var(--mute)}
.scanning{flex:1;display:grid;place-items:center;text-align:center;gap:14px}
.scan-ph{width:230px;height:230px;border-radius:24px;background:var(--dark) center/cover;position:relative;overflow:hidden}
.scan-ph::after{content:"";position:absolute;left:0;right:0;height:40%;background:linear-gradient(transparent,rgba(196,154,120,.55),transparent);animation:sweep 1.6s ease-in-out infinite}
@keyframes sweep{from{top:-40%}to{top:100%}}
/* exercise */
.chipsrow{display:flex;flex-wrap:wrap;gap:8px}
.pill{min-height:44px;padding:0 16px;border-radius:99px;border:1.5px solid var(--line);background:#fff;font-weight:600;font-size:14.5px;color:var(--ink)}
.pill.on{background:var(--dark);border-color:var(--dark);color:#fff}
.burn{display:grid;place-items:center;gap:6px;text-align:center;flex:1}
.burn .flame{width:110px;height:110px;border-radius:50%;background:var(--blush);display:grid;place-items:center;font-size:44px}
.burn b{font-family:var(--d);font-weight:400;font-size:46px;color:var(--ink)}
/* progress */
.stat{display:flex;gap:10px}.stat .card{flex:1;padding:14px}.stat b{display:block;font-family:var(--d);font-weight:400;font-size:34px;color:var(--ink);line-height:1.1}
.cal28{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}
.cal28 i{aspect-ratio:1;border-radius:7px;background:var(--soft);display:grid;place-items:center;font-style:normal;font-size:11px;color:var(--mute)}
.cal28 i.y{background:var(--wood2);color:#fff}.cal28 i.t{outline:2px solid var(--red);outline-offset:1px}
.wchart{width:100%;height:150px}
.wchart .ln{fill:none;stroke:var(--red);stroke-width:2.5}.wchart .pt{fill:var(--red)}.wchart .ax{stroke:var(--line)}
.wchart text{font-size:10px;fill:var(--mute);font-family:var(--b)}
/* lock and gate */
.lock{display:grid;gap:14px;text-align:center;justify-items:center}
.lock .ic{width:84px;height:84px;border-radius:24px;background:var(--blush);display:grid;place-items:center;font-size:36px}
.codein{text-align:center;letter-spacing:.24em;text-transform:uppercase}
.offer{border:1.5px solid var(--red);border-radius:18px;padding:16px;text-align:left;display:grid;gap:6px;background:#fff}
.offer b{font-family:var(--d);font-weight:400;font-size:22px;color:var(--ink)}
.small{font-size:12.5px;color:var(--mute);text-align:center}
.setrow{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:56px;border-bottom:1px solid var(--line);font-size:15px;color:var(--ink)}
.setrow:last-child{border-bottom:0}.setrow span{color:var(--mute)}
.setrow button{color:var(--red);font-weight:600;min-height:44px}
.list{grid-template-columns:minmax(0,1fr)}
.row .back{flex:none}
/* her photos */
.scr.still{animation:none}
.obimg{height:min(32svh,250px);border-radius:20px;background:var(--soft) center 22%/cover;position:relative;flex:none}
.obnote{position:absolute;left:12px;bottom:12px;display:flex;align-items:center;gap:8px;background:rgba(255,251,247,.94);border-radius:99px;padding:5px 12px 5px 5px;font-size:12.5px;font-weight:600;color:var(--ink)}
.obnote img,.av,.jnote img,.jempty img{border-radius:50%;object-fit:cover}
.obnote img{width:28px;height:28px}
.buildimg{width:150px;height:150px;border-radius:50%;background:var(--soft) center 30%/cover;box-shadow:0 0 0 6px var(--paper),0 0 0 8px var(--wood2)}
.jnote{display:flex;gap:12px;align-items:flex-start;background:var(--blush);border-radius:16px;padding:12px 14px}
.jnote img{width:44px;height:44px;flex:none}.jnote p{font-size:14px;color:var(--ink)}
.gateimg{height:min(34svh,260px);margin:0 -20px;background:var(--soft) center 25%/cover;position:relative}
.gateimg::after{content:"";position:absolute;inset:auto 0 0;height:60px;background:linear-gradient(transparent,var(--paper))}
.hb{display:flex;align-items:center;gap:10px}.av{width:34px;height:34px;box-shadow:0 0 0 2px var(--paper),0 0 0 3.5px var(--wood2)}
.banner{height:150px;border-radius:20px;background:var(--dark) center 30%/cover;position:relative;overflow:hidden;display:flex;align-items:flex-end;padding:16px}
.banner::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 30%,rgba(36,21,14,.75))}
.banner h2{position:relative;color:#fff}.banner h2 em{color:#f3c7c0}
.jempty{display:flex;align-items:center;gap:12px;text-align:left}.jempty img{width:48px;height:48px;flex:none}
/* QA round 1 fixes */
.seg button{min-height:44px}
.item button{width:44px;height:44px}
.setrow button{min-width:44px;padding:0 6px}
.days{gap:4px}.day{min-width:44px}
.scanning{align-content:center;gap:16px}
.obimg{background-position:center 8%}
.gateimg{background-position:center 12%}
.note-ok{background:var(--dark);color:#fff;border-radius:12px;padding:10px 14px;font-size:14px}
.seg button{min-width:48px}
.name input{font-size:19px}
.name textarea{flex:1;border:0;padding:12px 0;font-family:var(--d);font-size:19px;line-height:1.2;color:var(--ink);background:none;resize:none;overflow:hidden}
.name textarea:focus{outline:none}
/* photos are pre-cropped to these exact shapes with her face centred, so the box never crops again */
.obimg{height:auto;aspect-ratio:3/2;background-position:center;background-size:cover}
.gateimg{height:auto;aspect-ratio:3/2;background-position:center}
.banner{height:auto;aspect-ratio:2.3/1;background-position:center}
.buildimg{background-position:center}

.banner::before{display:none}
.obfoot{position:sticky;bottom:0;z-index:5;display:grid;gap:10px;margin:0 -20px calc(-24px - var(--safe-b));padding:12px 20px calc(14px + var(--safe-b));background:var(--paper);border-top:1px solid var(--line)}
.obfoot::before{content:"";position:absolute;left:0;right:0;bottom:100%;height:18px;background:linear-gradient(transparent,var(--paper));pointer-events:none}
.obfoot #obErr:empty{display:none}
html{scroll-padding-bottom:120px}
