:root{
  --bg:#f6f1f4; --surface:#ffffff; --sunk:#ede5ea; --ink:#2a1a2e; --muted:#6f5f73; --line:#e0d4dc;
  --berry:#b0356a; --berry-soft:#f7dfe9; --on-berry:#ffffff;
  --aloe:#2f7d5d; --aloe-soft:#dcefe6; --amber:#a86a00; --amber-soft:#f8ead0; --red:#b3372f; --red-soft:#f8dedb;
  --display:"Bricolage Grotesque","Trebuchet MS",sans-serif; --body:"Figtree",system-ui,sans-serif;
}
@media (prefers-color-scheme: dark){:root{
  --bg:#191218; --surface:#241a23; --sunk:#2e222d; --ink:#f3e9f0; --muted:#b3a2b0; --line:#3d2f3b;
  --berry:#ee7fab; --berry-soft:#47223a; --on-berry:#2a0f1d;
  --aloe:#6fcfa3; --aloe-soft:#1d3a2e; --amber:#e9b04f; --amber-soft:#3f3015; --red:#f08a80; --red-soft:#47211e; color-scheme:dark}}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.5 var(--body);
  padding:calc(16px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) calc(96px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
h1,h2,h3{font-family:var(--display);margin:0;line-height:1.15}
h1{font-size:28px} h2{font-size:21px} h3{font-size:17px}
p{margin:0} [hidden]{display:none!important}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--berry);outline-offset:2px}
.wrap{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:16px}
.wrap.wide{max-width:960px}
.center{text-align:center} .muted{color:var(--muted)} .small{font-size:14px}
.brand{font-family:var(--display);font-weight:700;font-size:22px}
.brand span{color:var(--berry)}
.row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.col{display:flex;flex-direction:column;gap:10px;min-width:0}
.panel{background:var(--surface);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:12px}
.label{font-size:12.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:700}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{font-size:13.5px;font-weight:700;padding:3px 10px;border-radius:999px;background:var(--sunk);color:var(--muted);white-space:nowrap}
.chip.ok{background:var(--aloe-soft);color:var(--aloe)} .chip.warn{background:var(--amber-soft);color:var(--amber)}
.chip.bad{background:var(--red-soft);color:var(--red)} .chip.berry{background:var(--berry-soft);color:var(--berry)}
.btn{border:0;border-radius:14px;padding:15px 18px;font-weight:700;background:var(--berry);color:var(--on-berry);width:100%;font-size:17px;text-align:center;text-decoration:none;display:block}
.btn.ghost{background:var(--sunk);color:var(--ink)}
.btn.sm{width:auto;padding:8px 14px;border-radius:10px;font-size:15px;display:inline-block}
.btn:disabled{opacity:.5;cursor:not-allowed}
.link{background:none;border:0;color:var(--muted);text-decoration:underline;padding:8px;font-size:15px}
input[type=text],input[type=password],input[type=number],select,textarea{width:100%;padding:13px 14px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);font-size:17px}
label.f{display:flex;flex-direction:column;gap:6px;font-weight:600}
/* big tick rows */
.tick{display:flex;align-items:center;gap:14px;width:100%;text-align:left;border:2px solid var(--line);background:var(--surface);border-radius:16px;padding:14px 16px}
.tick .box{flex:none;width:38px;height:38px;border-radius:12px;border:2.5px solid var(--muted);display:grid;place-items:center;font-size:24px;font-weight:700;color:transparent}
.tick .t{flex:1;min-width:0;display:flex;flex-direction:column}
.tick .t b{font-size:18px} .tick .t small{color:var(--muted);font-size:14px}
.tick.on{border-color:var(--aloe);background:var(--aloe-soft)}
.tick.on .box{background:var(--aloe);border-color:var(--aloe);color:var(--surface)}
.tick.locked{opacity:.6}
.tick .pts{font-weight:700;color:var(--berry);font-size:14px;white-space:nowrap}
.special{background:var(--berry-soft);border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:6px}
.special h3{color:var(--berry)}
.pre{white-space:pre-wrap}
.steps{margin:0;padding-left:22px;color:var(--muted);font-size:15px}
/* bottom nav */
.nav{position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);display:flex;justify-content:center;
  padding:6px max(8px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px));z-index:5}
.nav button{flex:1;max-width:160px;border:0;background:none;padding:10px 4px;font-weight:700;color:var(--muted);border-radius:12px;font-size:15px}
.nav button[aria-pressed="true"]{color:var(--berry);background:var(--berry-soft)}
.seg{display:flex;background:var(--sunk);border-radius:999px;padding:3px;gap:2px;flex-wrap:wrap}
.seg button{border:0;background:none;padding:8px 14px;border-radius:999px;font-weight:700;color:var(--muted);font-size:15px}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink)}
/* photos */
.pose{display:grid;grid-template-columns:110px 1fr;gap:14px;align-items:center}
.pose svg,.pose img{width:110px;height:140px;border-radius:12px;background:var(--sunk);object-fit:cover}
.pose .acts{display:flex;flex-direction:column;gap:8px}
.filebtn{position:relative;overflow:hidden}
.filebtn input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.pgrid{display:grid;grid-template-columns:auto repeat(4,minmax(0,1fr));gap:6px;align-items:center}
.pgrid img,.pgrid .none{width:100%;aspect-ratio:3/4;border-radius:8px;object-fit:cover;background:var(--sunk);display:grid;place-items:center;color:var(--muted);font-size:12px}
/* journey grid */
.grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.day{aspect-ratio:1;border-radius:10px;border:1px solid var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:700;font-variant-numeric:tabular-nums;min-width:0}
.day small{font-size:10px;font-weight:700;text-transform:uppercase}
.day.full{background:var(--aloe-soft);color:var(--aloe);border-color:transparent}
.day.half{background:var(--amber-soft);color:var(--amber);border-color:transparent}
.day.miss{background:var(--red-soft);color:var(--red);border-color:transparent}
.day.future{color:var(--muted)} .day.today{outline:2.5px solid var(--berry);outline-offset:1px}
.big{font-family:var(--display);font-size:44px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.bar{height:10px;border-radius:99px;background:var(--sunk);overflow:hidden;flex:1;min-width:60px}
.bar i{display:block;height:100%;background:var(--berry);border-radius:99px}
.lb .r{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line)}
.lb .r:last-child{border-bottom:0}
.lb .k{width:28px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums}
.lb .n{flex:1;min-width:0;font-weight:600;overflow-wrap:anywhere}
.lb .p{font-weight:700;font-variant-numeric:tabular-nums}
.lb .me{color:var(--berry)}
.tablebox{overflow-x:auto;background:var(--surface);border-radius:16px}
table{border-collapse:collapse;width:100%;font-size:15px}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
th{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
tr.tap{cursor:pointer}
.dots{display:inline-flex;gap:3px;vertical-align:middle}
.dots i{width:11px;height:11px;border-radius:3px;border:1.5px solid var(--muted)}
.dots i.y{background:var(--aloe);border-color:var(--aloe)}
.msg{background:var(--sunk);border-radius:12px;padding:14px;white-space:pre-wrap;user-select:all}
#toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(96px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);padding:12px 18px;border-radius:12px;font-weight:600;max-width:90vw;z-index:20;text-align:center}
@media (prefers-reduced-motion:no-preference){.tick{transition:background .15s,border-color .15s}}
