:root{
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,"Noto Serif","Book Antiqua",Georgia,serif;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",sans-serif;
  --bg:#f4efe1;--surface:#fbf8ef;--surface-2:#efe8d4;--ink:#1d2a22;--muted:#56655b;--line:#ded6bf;--line-strong:#b9ae8f;
  --forest:#1f4d3a;--forest-deep:#14352a;--forest-line:#3f6e55;--on-forest:#f4efe1;
  --amber:#d98a1b;--amber-ink:#8a5200;--amber-soft:#f7e5bf;--water:#2f6f9a;--water-soft:#d8e8f2;--danger:#b3372a;--ok:#2d7a4f;
  --contour:rgba(31,77,58,.09);--shadow:0 1px 2px rgba(20,53,42,.08),0 6px 18px rgba(20,53,42,.07);
  --seg-personal:#1f4d3a;--seg-group:#d98a1b;--seg-food:#2f6f9a;
  --tab-h:64px;--r:16px;
}
[data-theme=tent]{
  --bg:#150808;--surface:#220d0c;--surface-2:#2d1210;--ink:#ff9d85;--muted:#c4705d;--line:#4a1d19;--line-strong:#7a3128;
  --forest:#c9452c;--forest-deep:#1d0909;--forest-line:#a43a27;--on-forest:#ffb09b;
  --amber:#ff7a45;--amber-ink:#ff9d6e;--amber-soft:#3b1a10;--water:#d4503c;--water-soft:#3a1512;--danger:#ff6a5a;--ok:#e8845a;
  --contour:rgba(255,110,80,.08);--shadow:none;--seg-personal:#c9452c;--seg-group:#ff9d6e;--seg-food:#8f3426;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{color-scheme:light}[data-theme=tent]{color-scheme:dark}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.45 var(--sans);transition:background .4s,color .4s;overscroll-behavior-y:none}
body::before{content:"";position:fixed;inset:0;background:var(--contour);-webkit-mask:url(/img/topo.svg) center/cover no-repeat;mask:url(/img/topo.svg) center/cover no-repeat;pointer-events:none;z-index:0}
#app{position:relative;z-index:1;min-height:100dvh}
h1,h2,h3,h4{font-family:var(--serif);font-weight:700;margin:0;letter-spacing:-.01em}
p{margin:.4rem 0}
button{font:inherit;color:inherit;cursor:pointer}
:focus-visible{outline:3px solid var(--amber);outline-offset:2px;border-radius:6px}
.muted{color:var(--muted)}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.fine{font-size:.8rem;color:var(--muted);margin:.5rem 0 0}
.eyebrow{font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:0}
a{color:var(--forest);font-weight:600}[data-theme=tent] a{color:var(--amber)}
.link{background:none;border:0;padding:0;color:var(--forest);font-weight:600;text-decoration:underline;text-underline-offset:3px;font-size:.88rem}[data-theme=tent] .link{color:var(--amber)}

/* header & tabs */
.top{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:calc(env(safe-area-inset-top) + .5rem) .75rem .5rem;background:var(--forest-deep);color:var(--on-forest);box-shadow:0 2px 12px rgba(0,0,0,.18)}
.top::after{content:"";position:absolute;inset:0;background:rgba(255,255,255,.06);-webkit-mask:url(/img/topo.svg) 30% 20%/900px no-repeat;mask:url(/img/topo.svg) 30% 20%/900px no-repeat;pointer-events:none}
.top-l{display:flex;align-items:center;gap:.6rem;min-width:0;position:relative;z-index:1}.top-r{display:flex;gap:.1rem;position:relative;z-index:1}
.brand{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--amber);color:#1d2a22;flex:none}[data-theme=tent] .brand{color:#150808}
.top-t{display:flex;flex-direction:column;min-width:0}.top-t b{font-family:var(--serif);font-size:1.08rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sync{font-size:.7rem;opacity:.85;display:flex;align-items:center;gap:.3rem}.sync::before{content:"";width:7px;height:7px;border-radius:50%;background:#7fd1a0}
.sync.off::before{background:#ffb347}.sync.busy::before{background:#9ec9ff;animation:pulse 1s infinite}.sync.demo::before{background:#ffd27a}
.icon-btn{display:inline-grid;place-items:center;min-width:44px;height:44px;border:0;background:transparent;border-radius:12px;color:inherit}
.icon-btn:active{background:rgba(127,127,127,.2)}.icon-btn.sm{min-width:36px;height:36px;color:var(--muted)}.icon-btn svg{width:22px;height:22px}
.unit-pill{font-size:.75rem;font-weight:700;border:1.5px solid currentColor;border-radius:99px;padding:.15rem .55rem}
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid;grid-template-columns:repeat(5,1fr);padding:.25rem .25rem calc(env(safe-area-inset-bottom) + .25rem);background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -6px 20px rgba(20,53,42,.08)}
.tabs button{display:flex;flex-direction:column;align-items:center;gap:2px;border:0;background:none;padding:.35rem 0;min-height:56px;font-size:.72rem;font-weight:600;color:var(--muted);border-radius:14px;position:relative;transition:color .2s}
.tabs .ti{display:grid;place-items:center;width:52px;height:30px;border-radius:99px;transition:background .25s,transform .25s}
.tabs button[aria-current]{color:var(--forest)}[data-theme=tent] .tabs button[aria-current]{color:var(--amber)}
.tabs button[aria-current] .ti{background:var(--amber-soft);transform:translateY(-1px)}.tabs button:active .ti{transform:scale(.92)}
.view{position:relative;padding:.9rem .8rem calc(var(--tab-h) + env(safe-area-inset-bottom) + 5.5rem);max-width:640px;margin:0 auto;display:flex;flex-direction:column;gap:.85rem}
.view.enter{animation:rise .32s ease both}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes pulse{50%{opacity:.3}}
.fab{position:fixed;right:max(1rem,calc(50% - 320px + 1rem));bottom:calc(var(--tab-h) + env(safe-area-inset-bottom) + .9rem);z-index:25;width:58px;height:58px;border-radius:20px;border:0;background:var(--amber);color:#1d2a22;display:grid;place-items:center;box-shadow:0 6px 18px rgba(0,0,0,.28);transition:transform .15s}
[data-theme=tent] .fab{color:#150808}.fab:active{transform:scale(.92)}.fab svg{width:28px;height:28px}

/* cards, buttons, forms */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:1rem;box-shadow:var(--shadow)}
.h-sm{font-size:1.1rem;display:flex;align-items:center;gap:.5rem;margin-bottom:.4rem}.h-sm svg{width:20px;height:20px;color:var(--water)}.h-sm .link{margin-left:auto}
.count-pill{font:600 .72rem var(--sans);background:var(--amber-soft);color:var(--amber-ink);border-radius:99px;padding:.15rem .55rem}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:46px;padding:.55rem 1.1rem;border-radius:14px;border:1.5px solid var(--forest);background:transparent;color:var(--forest);font-weight:700;transition:transform .12s,background .2s}
[data-theme=tent] .btn{color:var(--amber);border-color:var(--amber)}
.btn:active{transform:scale(.97)}.btn svg{width:20px;height:20px}
.btn.primary{background:var(--forest);color:var(--on-forest)}[data-theme=tent] .btn.primary{background:var(--forest);color:#150808;border-color:var(--forest)}
.btn.ghost{border-color:var(--line-strong);color:var(--ink)}.btn.big{min-height:52px;font-size:1.05rem;width:100%}
.btn.small{min-height:40px;padding:.35rem .8rem;font-size:.9rem;border-radius:12px}.btn.tiny{min-height:32px;padding:.1rem .6rem;font-size:.8rem;border-radius:9px;border-color:var(--line-strong);color:var(--ink)}
.btn.danger{border-color:var(--danger);color:var(--danger)}.btn.danger.ghost{background:transparent}.btn:disabled{opacity:.6}
.btn.w{border-color:var(--water);color:var(--water)}.btn.p{border-color:var(--amber);color:var(--amber-ink)}.btn.h{border-color:var(--forest-line);color:var(--forest)}[data-theme=tent] .btn.h{color:var(--ink)}
.btn-row{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.7rem}
.field{display:flex;flex-direction:column;gap:.3rem;margin:.65rem 0;font-weight:600;font-size:.9rem}
.field>span{color:var(--muted);font-size:.8rem;font-weight:600}.field small{font-weight:400;color:var(--muted);font-size:.78rem}
input:not([type=checkbox]):not([type=radio]),select,textarea{width:100%;min-height:48px;padding:.6rem .8rem;border-radius:12px;border:1.5px solid var(--line-strong);background:var(--bg);color:var(--ink);font:inherit;font-weight:500}
textarea{resize:vertical}input:focus,select:focus,textarea:focus{outline:3px solid var(--amber);outline-offset:0;border-color:var(--amber)}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:.6rem}.row3{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}
.seg-ctl{display:flex;background:var(--surface-2);border-radius:14px;padding:3px;gap:3px}
.seg-ctl>button,.seg-opt span{flex:1;display:grid;place-items:center;min-height:42px;border:0;background:transparent;border-radius:11px;font-weight:700;font-size:.88rem;padding:0 .5rem;text-align:center;color:var(--muted);transition:background .2s,color .2s}
.seg-ctl>button[aria-selected=true],.seg-ctl>button[aria-checked=true],.seg-opt input:checked+span{background:var(--surface);color:var(--forest);box-shadow:0 1px 4px rgba(0,0,0,.15)}
[data-theme=tent] .seg-ctl>button[aria-checked=true],[data-theme=tent] .seg-opt input:checked+span,[data-theme=tent] .seg-ctl>button[aria-selected=true]{color:var(--amber)}
.seg-opt{flex:1;display:flex;position:relative}.seg-opt input{position:absolute;opacity:0;pointer-events:none}.seg-opt span{width:100%}.seg-opt input:focus-visible+span{outline:3px solid var(--amber)}
.error{color:var(--danger);font-weight:600;min-height:1.2em;font-size:.88rem;margin:.3rem 0}
.note{background:var(--amber-soft);color:var(--ink);padding:.6rem .8rem;border-radius:12px;font-size:.9rem}
.banner{background:var(--amber-soft);border:1px dashed var(--amber);border-radius:12px;padding:.6rem .8rem;font-size:.88rem}

/* checkbox */
.chk{position:relative;display:inline-grid;place-items:center;width:44px;height:44px;flex:none;cursor:pointer}
.chk input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer}
.chk .box{width:26px;height:26px;border-radius:9px;border:2px solid var(--line-strong);display:grid;place-items:center;color:transparent;background:var(--bg);transition:background .2s,border-color .2s,transform .25s cubic-bezier(.3,1.8,.5,1)}
.chk .tick{stroke-dasharray:24;stroke-dashoffset:24;transition:stroke-dashoffset .3s .08s ease}
.chk input:checked+.box{background:var(--forest);border-color:var(--forest);color:var(--on-forest);transform:scale(1.12)}
[data-theme=tent] .chk input:checked+.box{color:#150808}
.chk input:checked+.box .tick{stroke-dashoffset:0}.chk input:active+.box{transform:scale(.88)}.chk input:focus-visible+.box{outline:3px solid var(--amber);outline-offset:2px}
.check-line{display:flex;gap:.6rem;align-items:center;margin:1rem 0 0;font-weight:600}.check-line input{width:22px;height:22px;accent-color:var(--forest)}

/* auth & wizard */
.screen-auth{display:flex;flex-direction:column;justify-content:center}
.auth{max-width:440px;margin:0 auto;padding:calc(env(safe-area-inset-top) + 1.5rem) 1rem 2rem;width:100%}
.auth-hero{text-align:center;color:var(--ink);margin-bottom:1.2rem}.auth-hero h1{font-size:2.6rem;color:var(--forest)}[data-theme=tent] .auth-hero h1{color:var(--amber)}.auth-hero p{color:var(--muted);max-width:30ch;margin:.3rem auto}
.logo{width:76px;height:76px;margin:0 auto .6rem;border-radius:24px;background:var(--forest-deep);color:var(--amber);display:grid;place-items:center;box-shadow:var(--shadow)}.logo svg{width:44px;height:44px}.logo.sm{width:60px;height:60px}.splash{display:grid;place-items:center;min-height:100dvh}
.auth-card .seg-ctl{margin-bottom:.6rem}.or{display:flex;align-items:center;gap:.8rem;color:var(--muted);font-size:.85rem;margin:.9rem 0}.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}
.wizard{padding:1.1rem}.wiz-head h2{font-size:1.6rem;margin:.2rem 0 .8rem}.steps{display:flex;gap:.4rem;list-style:none;padding:0;margin:0 0 1rem}
.steps li{flex:1;text-align:center;font-size:.78rem;font-weight:700;color:var(--muted);padding-top:.5rem;border-top:4px solid var(--line)}.steps li.on{color:var(--forest);border-color:var(--amber)}.steps li.done{border-color:var(--forest)}
[data-theme=tent] .steps li.on{color:var(--amber)}
.type-pick,.tpl-pick{display:grid;grid-template-columns:1fr 1fr;gap:.6rem}.tpl-pick{grid-template-columns:1fr}
.type,.tpl{display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;text-align:left;border:2px solid var(--line);background:var(--bg);border-radius:16px;padding:.9rem;transition:border-color .2s,transform .15s,background .2s}
.type svg{width:30px;height:30px;color:var(--forest)}.type span,.tpl span{font-size:.8rem;color:var(--muted)}.type.on,.tpl.on{border-color:var(--amber);background:var(--amber-soft)}.type:active,.tpl:active{transform:scale(.98)}
.wiz-nav{display:flex;justify-content:space-between;gap:.6rem;margin-top:1.2rem}.wiz-nav .btn{min-width:120px}
.crew-in{display:flex;align-items:center;gap:.5rem;margin:.5rem 0}
.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:800;flex:none;font-family:var(--serif)}.avatar.xs{width:24px;height:24px;font-size:.75rem}
.empty{text-align:center;display:flex;flex-direction:column;gap:.7rem;align-items:center;padding:1.6rem 1rem}

/* trips tab */
.hero{position:relative;overflow:hidden;background:linear-gradient(160deg,var(--surface),var(--surface-2))}
.hero::before{content:"";position:absolute;right:-120px;top:-100px;width:420px;height:420px;background:var(--contour);-webkit-mask:url(/img/topo.svg) 40% 10%/1000px;mask:url(/img/topo.svg) 40% 10%/1000px;opacity:2;pointer-events:none}
.hero>*{position:relative}.hero h2{font-size:1.75rem;line-height:1.15;margin:.5rem 0 .2rem}.hero-top{display:flex;gap:.4rem;align-items:center}
.badge{display:inline-flex;align-items:center;gap:.35rem;font-size:.78rem;font-weight:700;background:var(--forest);color:var(--on-forest);padding:.25rem .7rem;border-radius:99px}[data-theme=tent] .badge{color:#150808}.badge svg{width:15px;height:15px}.badge.soft{background:var(--amber-soft);color:var(--amber-ink)}
.count{display:flex;align-items:baseline;gap:.6rem;margin:.9rem 0 .4rem}.count b{font:700 3.6rem/1 var(--serif);color:var(--forest)}[data-theme=tent] .count b{color:var(--amber)}.count span{color:var(--muted);font-weight:600}.count.live b{font-size:2.6rem;color:var(--amber-ink)}
.ribbon{width:100%;height:auto;margin:.5rem 0;overflow:visible}.rb-label{font:700 10px var(--sans);fill:var(--muted)}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(70px,1fr));gap:.5rem}.stat{background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:.5rem .6rem;display:flex;flex-direction:column;min-width:0}
.stat b{font:700 1.05rem var(--serif)}.stat span{font-size:.72rem;color:var(--muted);font-weight:600}.stat em{font-size:.7rem;font-style:normal;color:var(--amber-ink)}
.totals{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem;padding:.7rem}.totals .stat{background:transparent;border:0;padding:.1rem .3rem}
.legend{display:flex;flex-wrap:wrap;gap:.4rem .9rem;font-size:.75rem;color:var(--muted);margin-top:.7rem;font-weight:600}.legend span{display:inline-flex;align-items:center;gap:.35rem}.legend svg{color:var(--amber)}
.lg{width:16px;height:6px;border-radius:3px;display:inline-block}.lg.w{background:var(--water)}.lg.p{background:repeating-linear-gradient(90deg,var(--amber) 0 4px,transparent 4px 7px)}.lg.h{background:repeating-linear-gradient(90deg,var(--forest-line) 0 2px,transparent 2px 5px)}
.lg.personal{background:var(--seg-personal)}.lg.group{background:var(--seg-group)}.lg.food{background:var(--seg-food)}
.wx{list-style:none;margin:.3rem 0;padding:0}.wx li{display:grid;grid-template-columns:1fr 34px 82px 96px;align-items:center;gap:.4rem;padding:.45rem 0;border-bottom:1px solid var(--line);font-size:.85rem}.wx li:last-child{border:0}
.wx-i{font-size:1.4rem;text-align:center}.wx-t small{color:var(--muted)}.wx-p{color:var(--muted);font-size:.78rem;text-align:right}
.todo{list-style:none;margin:0;padding:0}.todo li{display:flex;align-items:center;gap:.2rem;border-bottom:1px solid var(--line)}.todo-t{flex:1;padding:.4rem 0;transition:color .3s}.todo li.done .todo-t{color:var(--muted);text-decoration:line-through}.todo-t a,.todo-t .link{font-size:.82rem;white-space:nowrap}
.inline-add{display:flex;gap:.5rem;margin-top:.6rem}
.trip-list{display:flex;flex-direction:column;gap:.5rem}.trip-card{display:flex;align-items:center;justify-content:space-between;text-align:left;background:var(--surface);border:1.5px solid var(--line);border-radius:14px;padding:.8rem 1rem;min-height:64px}
.trip-card small{display:block;color:var(--muted);font-size:.78rem}.trip-card.on{border-color:var(--amber);box-shadow:inset 4px 0 0 var(--amber)}.trip-card svg{color:var(--muted)}

/* route */
.pace summary{font-weight:700;cursor:pointer;min-height:28px}.pace[open] summary{margin-bottom:.4rem}
.day header{display:flex;flex-direction:column;gap:.5rem;margin-bottom:.4rem}.day h3{display:flex;align-items:baseline;gap:.6rem;font-size:1.35rem}.dn{color:var(--amber-ink)}.day h3 small{font:600 .85rem var(--sans);color:var(--muted)}
.day.lvl1{border-color:var(--amber)}.day.lvl2{border-color:var(--danger)}
.chips{display:flex;flex-wrap:wrap;gap:.35rem}.chip{font-size:.74rem;font-weight:700;border-radius:99px;padding:.2rem .6rem;background:var(--surface-2)}
.chip.w{background:var(--water-soft);color:var(--water)}.chip.p{background:var(--amber-soft);color:var(--amber-ink)}.chip.h{background:var(--surface-2);color:var(--forest)}[data-theme=tent] .chip.h{color:var(--ink)}
.warn{display:flex;gap:.5rem;align-items:flex-start;background:var(--amber-soft);border-left:4px solid var(--amber);padding:.5rem .7rem;border-radius:10px;font-size:.84rem;font-weight:600;margin:.3rem 0}.warn svg{width:20px;height:20px;flex:none;color:var(--amber-ink)}
.lvl2 .warn{border-color:var(--danger)}.lvl2 .warn svg{color:var(--danger)}
.timeline{display:flex;flex-direction:column;margin:.3rem 0}
.tl-row{display:flex;align-items:center;gap:.3rem;width:100%;text-align:left;background:none;border:0;padding:0;color:inherit}.tl-row svg{flex:none;overflow:visible}
.tl-leg{height:84px;border-radius:12px}.tl-leg:active,.tl-camp:active{background:var(--surface-2)}.tl-camp{border-radius:12px;min-height:76px}
.tl-text{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1;font-size:.9rem}.tl-text strong{font-size:.98rem;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.tl-kind,.tl-sub{font-size:.68rem;text-transform:uppercase;letter-spacing:.09em;font-weight:700;color:var(--muted)}.tl-leg.k-paddle .tl-kind{color:var(--water)}.tl-leg.k-portage .tl-kind{color:var(--amber-ink)}.tl-leg.k-hike .tl-kind{color:var(--forest)}[data-theme=tent] .tl-leg.k-hike .tl-kind{color:var(--ink)}
.tl-meta{font-size:.82rem;color:var(--muted);font-weight:600}.tl-edit{color:var(--line-strong);font-size:1.6rem;padding-right:.4rem}
.tl-node{height:40px}.tl-empty{min-height:56px}
@media(prefers-reduced-motion:no-preference){.w-flow{stroke-dasharray:none}.tent{transform-box:fill-box;transform-origin:center bottom}}
.add-row{display:flex;gap:.4rem;flex-wrap:wrap}.add-row .btn{flex:1}

/* gear */
.weight.over{border-color:var(--danger)}.who{display:flex;gap:.4rem;overflow-x:auto;padding-bottom:.4rem;margin:-.2rem -.2rem .4rem;scrollbar-width:none}
.who-chip{display:inline-flex;align-items:center;gap:.4rem;border:1.5px solid var(--line-strong);background:var(--bg);border-radius:99px;padding:.3rem .8rem .3rem .35rem;min-height:40px;font-weight:700;font-size:.85rem;white-space:nowrap}.who-chip.on{background:var(--forest);color:var(--on-forest);border-color:var(--forest)}[data-theme=tent] .who-chip.on{color:#150808}
.wt-big{display:flex;flex-direction:column;margin:.3rem 0 .6rem}.wt-big b{font:700 2.5rem/1 var(--serif)}.wt-big span{font-size:.85rem;color:var(--muted);font-weight:600;margin-top:.2rem}.bad{color:var(--danger);font-style:normal;font-weight:800}
.wbar{position:relative;height:26px;border-radius:13px;background:var(--surface-2);border:1px solid var(--line);overflow:hidden}
.wbar-fill{display:flex;height:100%}.seg{display:block;height:100%;width:0;transition:width .7s cubic-bezier(.22,1,.36,1);min-width:0}
.seg.personal{background:var(--seg-personal)}.seg.group{background:var(--seg-group)}.seg.food{background:var(--seg-food)}.seg+.seg{border-left:2px solid var(--surface)}
.wbar-end{position:absolute;top:0;bottom:0;width:3px;background:var(--ink);opacity:.5}.over .wbar{border-color:var(--danger)}
.heavy{list-style:none;margin:0;padding:0}.heavy li{display:flex;align-items:center;gap:.6rem;padding:.4rem 0;border-bottom:1px solid var(--line)}.heavy li span{flex:1;font-weight:600}
.tips{margin:.6rem 0 0;padding-left:1.1rem;color:var(--muted);font-size:.88rem}.tips li{margin:.25rem 0}
.list-head{display:flex;justify-content:space-between;align-items:center;margin-top:.4rem}
.cat{padding:.7rem .8rem}.cat h4,.slot h4{display:flex;justify-content:space-between;align-items:baseline;font-size:1.1rem;margin-bottom:.2rem}.cat h4 small,.slot h4 small{font:600 .78rem var(--sans);color:var(--muted)}
.item{display:flex;align-items:center;gap:.1rem;border-top:1px solid var(--line);transition:opacity .3s}.item-main{flex:1;min-width:0;background:none;border:0;text-align:left;padding:.45rem .2rem;display:flex;flex-direction:column}
.item .nm,.meal .nm{font-weight:600;transition:color .3s}.item .sub,.meal .sub{font-size:.78rem;color:var(--muted)}.item.done .nm{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--amber)}
.wt{font:700 .85rem var(--sans);min-width:56px;text-align:right;padding-right:.2rem}
.claim{width:32px;height:32px;border-radius:50%;border:2px solid transparent;color:#fff;font-weight:800;font-size:.8rem;margin-right:.3rem;flex:none;display:grid;place-items:center;transition:transform .2s,background .2s;padding:0}
.claim.none{background:transparent;color:var(--muted);border:2px dashed var(--line-strong)}.claim.ghost{border:0;pointer-events:none}.claim:active{transform:scale(.88)}

/* meals */
.day-chips{display:flex;gap:.35rem;overflow-x:auto;margin-bottom:.6rem;padding-bottom:.2rem}.dchip{position:relative;flex:1;min-width:46px;height:58px;border:1.5px solid var(--line-strong);background:var(--bg);border-radius:12px;overflow:hidden;display:flex;align-items:flex-start;justify-content:center;padding-top:.3rem}
.dchip b{position:relative;z-index:1;font-size:.82rem}.dchip i{position:absolute;left:0;right:0;bottom:0;background:var(--amber-soft);transition:height .5s}.dchip.on{border-color:var(--amber);background:var(--amber-soft)}.dchip.on i{background:var(--amber);opacity:.45}
.kcal-row{display:flex;align-items:baseline;gap:.5rem}.kcal-row b{font:700 1.7rem var(--serif)}.kcal-row span{color:var(--muted);font-size:.85rem}
.kbar{position:relative;height:14px;border-radius:7px;background:var(--surface-2);margin:.4rem 0;overflow:visible}.kbar i{display:block;height:100%;border-radius:7px;background:var(--ok);transition:width .6s cubic-bezier(.22,1,.36,1)}
.kcal.low .kbar i{background:var(--water)}.kcal.high .kbar i{background:var(--amber)}.kbar u{position:absolute;top:-4px;bottom:-4px;width:2px;background:var(--ink);opacity:.5;text-decoration:none}.kcal p{font-size:.85rem;font-weight:600;color:var(--muted)}
.meal{display:flex;flex-direction:column;width:100%;text-align:left;background:none;border:0;border-top:1px solid var(--line);padding:.5rem .1rem}
.ideas{display:flex;gap:.4rem;overflow-x:auto;padding:.5rem 0 .1rem;scrollbar-width:none}.idea{flex:none;border:1.5px dashed var(--line-strong);background:transparent;border-radius:99px;padding:.3rem .8rem;font-size:.8rem;font-weight:600;min-height:36px;white-space:nowrap}.idea.custom{border-style:solid;color:var(--forest)}[data-theme=tent] .idea.custom{color:var(--amber)}.idea:active{background:var(--amber-soft)}

/* crew */
.crew-row{display:flex;align-items:center;gap:.8rem;width:100%;background:none;border:0;border-top:1px solid var(--line);padding:.6rem 0;text-align:left;min-height:60px}.crew-n{flex:1;display:flex;flex-direction:column}.crew-n small{color:var(--muted)}.crew-row svg{color:var(--muted)}
.invite{background:var(--amber-soft);border-radius:14px;padding:.8rem 1rem;margin:.7rem 0;display:flex;flex-direction:column;gap:.2rem}.invite span{font-size:.75rem;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.08em}.invite b{font:700 1.9rem var(--serif);letter-spacing:.12em}
.kv{display:grid;grid-template-columns:max-content 1fr;gap:.3rem .9rem;margin:.3rem 0}.kv dt{color:var(--muted);font-size:.85rem}.kv dd{margin:0;font-weight:600}.danger.card{border-color:var(--danger);background:transparent;box-shadow:none}

/* sheet */
.sheet-wrap{position:fixed;inset:0;z-index:100;background:rgba(10,20,15,0);display:flex;align-items:flex-end;justify-content:center;transition:background .25s}
.sheet-wrap[hidden]{display:none}.sheet-wrap.open{background:rgba(10,20,15,.55)}
.sheet-card{width:100%;max-width:640px;max-height:92dvh;display:flex;flex-direction:column;background:var(--surface);border-radius:24px 24px 0 0;transform:translateY(100%);transition:transform .3s cubic-bezier(.22,1,.36,1);box-shadow:0 -10px 40px rgba(0,0,0,.35)}
.sheet-wrap.open .sheet-card{transform:none}.sheet-form{display:flex;flex-direction:column;min-height:0;max-height:92dvh}
.sheet-h{display:flex;align-items:center;justify-content:space-between;padding:.6rem .6rem .3rem 1.1rem;position:relative}.sheet-h::before{content:"";position:absolute;top:6px;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:var(--line-strong)}.sheet-h h2{font-size:1.35rem;margin-top:.5rem}
.sheet-b{overflow-y:auto;padding:0 1.1rem 1rem;flex:1}.sheet-f{display:flex;gap:.5rem;padding:.7rem 1.1rem calc(env(safe-area-inset-bottom) + .8rem);border-top:1px solid var(--line);align-items:center}.sheet-f .primary{flex:1}
.plan-preview{background:var(--bg);border:1px solid var(--line);border-radius:14px;padding:1rem;margin:.8rem 0}.plan-edit summary{font-weight:700;padding:.4rem 0;cursor:pointer}.plan-link input{margin:.5rem 0}
.toast{position:fixed;left:50%;bottom:calc(var(--tab-h) + env(safe-area-inset-bottom) + 1rem);transform:translate(-50%,30px);opacity:0;z-index:200;background:var(--forest-deep);color:var(--on-forest);padding:.7rem 1rem;border-radius:14px;display:flex;gap:1rem;align-items:center;font-weight:600;font-size:.9rem;box-shadow:0 8px 24px rgba(0,0,0,.35);pointer-events:none;transition:.3s;max-width:92vw}
.toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}.toast button{background:none;border:0;color:var(--amber);font-weight:800;padding:.4rem;min-height:36px}[data-theme=tent] .toast{background:#3a1512;border:1px solid var(--line-strong)}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition-duration:.01ms!important}}
@media print{
  body.printing-plan #app,body.printing-plan .toast,body.printing-plan .sheet-h,body.printing-plan .sheet-f,body.printing-plan .plan-edit,body.printing-plan .plan-link,body.printing-plan .btn-row{display:none!important}
  body.printing-plan::before{display:none}body.printing-plan .sheet-wrap,body.printing-plan .sheet-card{position:static;background:none;box-shadow:none;max-height:none;transform:none}
  body.printing-plan .plan-preview{border:0;padding:0;background:#fff}body{background:#fff}
}
