:root{
  --ink:#18241e; --muted:#6b7a70; --paper:#f6f3ea; --card:#fffdf8;
  --line:#e4dfd2; --green:#0e5a43; --green-2:#147a58; --mint:#d9f99d;
  --lime:#b8f26d; --orange:#f97316; --red:#dc4b3e; --blue:#2b6cb0;
  --shadow:0 16px 45px rgba(28,45,35,.10); --radius:22px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; color:var(--ink); background:
    radial-gradient(1200px 500px at 85% -10%, #e9f7c8 0%, transparent 55%),
    radial-gradient(900px 550px at -10% 15%, #ffe5cf 0%, transparent 50%),
    var(--paper);
  font-family:"Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing:antialiased; padding-bottom:90px;
}
a{color:var(--green); text-decoration:none}
h1,h2,h3{font-family:Georgia, "Iowan Old Style", serif; letter-spacing:-.02em; margin:0 0 8px}
h1{font-size:clamp(2rem,5vw,3.25rem); line-height:1.02}
h2{font-size:clamp(1.35rem,2.8vw,1.9rem)}
p{line-height:1.55}
.muted{color:var(--muted)}
.tiny{font-size:.78rem; color:var(--muted); line-height:1.5}
.topbar{
  position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between;
  padding:14px clamp(16px,4vw,34px); backdrop-filter:blur(16px);
  background:rgba(246,243,234,.82); border-bottom:1px solid rgba(228,223,210,.7)
}
.brand{display:flex; align-items:center; gap:9px; font-weight:750; letter-spacing:-.02em; color:var(--ink)}
.brand em{font-style:normal; color:var(--green)}
.brand-mark{display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--green); color:var(--mint); font-size:15px}
.logout{font-size:.82rem; font-weight:700; color:var(--muted); border:1px solid var(--line); padding:7px 11px; border-radius:999px; background:rgba(255,255,255,.5)}
.shell{max-width:1080px; margin:0 auto; padding:clamp(18px,3vw,34px)}
.eyebrow{font-size:.72rem; letter-spacing:.16em; text-transform:uppercase; color:var(--green-2); font-weight:800; margin-bottom:7px}
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:clamp(18px,3vw,26px)}
.card-kicker{font-size:.7rem; letter-spacing:.15em; text-transform:uppercase; color:var(--green-2); font-weight:800; margin-bottom:10px}
.grid{display:grid; gap:16px}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.hello{display:flex; justify-content:space-between; align-items:center; gap:14px; padding:clamp(16px,3vw,30px) 0 18px}
.hello p{max-width:530px; margin:8px 0 0}
.wave{display:inline-block; animation:wave 2.8s ease-in-out infinite; transform-origin:70% 70%}
.score-orb{
  flex:0 0 auto; min-width:112px; min-height:112px; border-radius:50%; display:grid; place-content:center; text-align:center;
  background:linear-gradient(140deg,var(--green),#063828); color:#fff; box-shadow:0 14px 34px rgba(14,90,67,.35);
  border:5px solid rgba(255,255,255,.6); animation:bob 5s ease-in-out infinite;
}
.score-orb strong{display:block; font-size:1.85rem; line-height:1; font-family:Georgia,serif}
.score-orb span{font-size:.66rem; text-transform:uppercase; letter-spacing:.12em; opacity:.8; margin-top:5px}
.goal-line{display:flex; justify-content:space-between; align-items:center; gap:16px; margin:4px 0 14px}
.big-number{font:700 2.6rem/1 Georgia,serif}
.big-number small{font:600 .9rem/1 "Avenir Next",sans-serif; color:var(--muted)}
.ring{
  width:82px; height:82px; border-radius:50%; display:grid; place-items:center; flex:0 0 auto;
  background:conic-gradient(var(--green) var(--p), #e9eee6 0); position:relative;
}
.ring:after{content:""; position:absolute; inset:8px; border-radius:50%; background:var(--card)}
.ring span{position:relative; z-index:1; font-weight:800; font-size:.92rem}
.goal-track{display:flex; justify-content:space-between; font-size:.78rem; color:var(--muted); margin-bottom:7px}
.progress{height:12px; background:#e9eee6; border-radius:999px; overflow:hidden}
.progress i{display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,var(--green-2),var(--lime)); transition:width .8s ease}
.progress.small{height:7px; margin-top:8px}
.goal-edit{margin-top:14px; border-top:1px dashed var(--line); padding-top:12px}
summary{cursor:pointer; font-weight:700; font-size:.85rem; color:var(--green)}
.forecast-rate{font:700 2rem/1 Georgia,serif; color:var(--green); margin-top:2px}
.forecast-rate small{font:600 .82rem/1.2 "Avenir Next",sans-serif; color:var(--muted)}
.forecast-status{margin:8px 0 12px; font-weight:700}
.mini-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.mini-grid div{background:#f1f5ed; border-radius:14px; padding:10px 12px}
.mini-grid span{display:block; font-size:.7rem; color:var(--muted); text-transform:uppercase; letter-spacing:.08em}
.mini-grid strong{font-size:.95rem}
.forecast-empty{text-align:center; padding:15px 5px}
.big-emoji{display:block; font-size:2.3rem; margin-bottom:5px}
.stack{display:grid; gap:13px}
.row{display:grid; grid-template-columns:1fr 1fr; gap:11px}
label{display:grid; gap:6px; font-size:.78rem; font-weight:750; color:#3c4a40}
input,textarea,select{
  width:100%; border:1px solid var(--line); border-radius:14px; padding:12px 13px; font:inherit; font-size:16px;
  background:#fff; color:var(--ink); outline:none; transition:border .2s, box-shadow .2s
}
input:focus,textarea:focus{border-color:var(--green-2); box-shadow:0 0 0 3px rgba(20,122,88,.12)}
textarea{resize:vertical}
.btn{border:0; border-radius:999px; padding:13px 17px; font:800 .9rem/1 "Avenir Next",sans-serif; cursor:pointer; display:inline-flex; justify-content:center; align-items:center; gap:6px}
.btn.primary{background:var(--green); color:#fff; box-shadow:0 10px 22px rgba(14,90,67,.22)}
.btn.primary:active{transform:scale(.98)}
.btn.small{padding:9px 13px; font-size:.8rem; background:#e8f1e4; color:var(--green)}
.camera-label{position:relative}
.camera-label input{position:absolute; opacity:0; width:1px; height:1px}
.camera-btn{display:flex; align-items:center; justify-content:center; min-height:45px; border:1.5px dashed #abc5a8; border-radius:14px; background:#f5f9ee; color:var(--green); padding:10px; font-weight:800; cursor:pointer}
.preview-wrap{position:relative; border-radius:18px; overflow:hidden; background:#eef1e8; min-height:80px}
.preview-wrap img{width:100%; max-height:300px; object-fit:cover; display:block}
.link-btn{position:absolute; right:9px; bottom:9px; border:0; border-radius:999px; padding:6px 10px; background:rgba(0,0,0,.62); color:#fff; font:700 .75rem/1 sans-serif}
.team-card{margin-top:16px}
.leaderboard{display:grid; gap:10px; margin-top:13px}
.member{display:flex; gap:12px; align-items:center; padding:11px; border-radius:17px; border:1px solid var(--line); background:#fcfbf5}
.member.is-you{border-color:#b9d99a; background:#f4faeb}
.avatar{width:40px; height:40px; border-radius:50%; background:#e3efdb; color:var(--green); display:grid; place-items:center; font-weight:900; font-size:.78rem; flex:0 0 auto; border:2px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,.08)}
.avatar.small{width:32px; height:32px; font-size:.65rem}
.member-main{flex:1; min-width:0}
.member-top{display:flex; justify-content:space-between; gap:8px; align-items:center}
.member-score{font-weight:900; color:var(--green)}
.member-meta{display:flex; gap:9px; flex-wrap:wrap; color:var(--muted); font-size:.7rem; margin-top:3px}
.you{font-size:.58rem; text-transform:uppercase; letter-spacing:.1em; color:#fff; background:var(--green-2); border-radius:999px; padding:3px 6px; vertical-align:middle}
.journal-section{margin-top:24px}
.section-head{display:flex; justify-content:space-between; align-items:end; gap:10px; margin-bottom:10px}
.entry{background:var(--card); border:1px solid var(--line); border-radius:20px; box-shadow:var(--shadow); padding:14px; margin-bottom:12px; animation:rise .45s ease both}
.entry-head{display:flex; gap:9px; align-items:center}
.entry-by{display:grid; flex:1; min-width:0}
.entry-by strong{font-size:.9rem}
.entry-by span{font-size:.72rem; color:var(--muted)}
.pts{font-weight:900; color:var(--green); background:#eaf5d9; border-radius:999px; padding:6px 9px; font-size:.78rem}
.meal-img{width:100%; max-height:330px; object-fit:cover; border-radius:15px; margin:11px 0 8px; display:block; background:#eef1e8}
.entry-note{margin:8px 0; font-size:.92rem}
.analysis{border-top:1px dashed var(--line); margin-top:10px; padding-top:10px}
.pill{display:inline-block; font-size:.67rem; font-weight:850; letter-spacing:.03em; text-transform:uppercase; padding:4px 8px; border-radius:999px; margin:0 4px 6px 0}
.quality-excellent{background:#d9f99d; color:#2b4a0d}.quality-good{background:#d1fae5;color:#065f46}
.quality-fair{background:#fef3c7;color:#92400e}.quality-poor,.bad{background:#fee2e2;color:#991b1b}
.quantity-light{background:#dbeafe;color:#1e40af}.quantity-heavy{background:#ffedd5;color:#9a3412}.neutral{background:#eef1e8;color:#4b5a50}
.analysis-text{font-size:.86rem; color:var(--muted)}
.food-items{font-size:.78rem; font-weight:750; color:#526055; margin:3px 0}
.encourage{margin:6px 0 0; font-weight:700; color:var(--green); font-size:.9rem}
.humor{margin:5px 0 0; font-style:italic; color:#8a5a16; font-size:.84rem}
.entry-foot{display:flex; gap:9px; flex-wrap:wrap; color:var(--muted); font-size:.7rem; border-top:1px solid #efebe1; margin-top:10px; padding-top:8px}
.empty{text-align:center; padding:30px 20px}
.bottom-nav{
  position:fixed; left:50%; transform:translateX(-50%); bottom:calc(12px + env(safe-area-inset-bottom)); z-index:30;
  width:min(440px,calc(100% - 24px)); display:flex; justify-content:space-around; align-items:center;
  background:rgba(15,42,33,.93); color:#fff; border-radius:999px; padding:8px 7px; box-shadow:0 14px 35px rgba(0,0,0,.22); backdrop-filter:blur(14px)
}
.nav-item{display:grid; justify-items:center; gap:1px; color:#d7e8d1; min-width:58px; padding:5px 7px; border-radius:999px; font-size:1.08rem; line-height:1}
.nav-item span{font-size:.62rem; font-weight:800; letter-spacing:.04em}
.nav-item:active{background:rgba(255,255,255,.13)}
.flash-stack{display:grid; gap:8px; margin-bottom:12px}
.flash{padding:12px 14px; border-radius:15px; font-weight:750; font-size:.88rem; border:1px solid transparent; animation:pop .35s ease both}
.flash-success{background:#e4f7d5;color:#215c1e;border-color:#c4e9a9}
.flash-error{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.flash-funny{background:#fff2cc;color:#7a4a08;border-color:#f3d08a}
.login-wrap{min-height:calc(100vh - 70px); display:grid; grid-template-columns:1.1fr .9fr; gap:28px; align-items:center; padding:18px 0 40px}
.login-copy h1{margin-top:10px}
.login-copy p{max-width:460px; color:var(--muted); font-size:1.02rem}
.login-card{max-width:420px; width:100%}
.login-card h2{margin-bottom:4px}
.orbit{display:flex; gap:10px; font-size:1.4rem; margin-top:20px}
.orbit span{animation:bob 4s ease-in-out infinite; background:#fff; border:1px solid var(--line); border-radius:50%; width:42px; height:42px; display:grid; place-items:center; box-shadow:var(--shadow)}
.orbit span:nth-child(2){animation-delay:.4s}.orbit span:nth-child(3){animation-delay:.8s}.orbit span:nth-child(4){animation-delay:1.2s}
.footer-note{max-width:720px; margin:20px auto 0; text-align:center; color:var(--muted); font-size:.72rem}
#celebration{position:fixed; inset:0; pointer-events:none; z-index:99; overflow:hidden}
.confetti{position:absolute; top:-40px; font-size:24px; animation:confetti 2.4s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes confetti{to{transform:translate3d(var(--dx), 105vh, 0) rotate(var(--rot)); opacity:.8}}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes wave{0%,100%{transform:rotate(0)}30%{transform:rotate(16deg)}60%{transform:rotate(-8deg)}}
@keyframes pop{from{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes rise{from{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}
@media (max-width:720px){
  body{padding-bottom:100px}
  .grid.two,.login-wrap{grid-template-columns:1fr}
  .login-wrap{padding-top:10px}
  .login-copy{order:2}.login-card{order:1}
  .hello{align-items:flex-start}
  .score-orb{min-width:86px;min-height:86px;border-width:4px}
  .score-orb strong{font-size:1.45rem}
  .row{grid-template-columns:1fr}
  .mini-grid{grid-template-columns:1fr 1fr}
  .shell{padding:14px}
  .card{border-radius:18px}
  h1{font-size:2.2rem}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important; scroll-behavior:auto!important; transition:none!important}}

/* ---- 2026-11 compact entry, menus, charts, invites ---- */
.top-actions{display:flex;align-items:center;gap:8px}
.settings-link{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#fff;border:1px solid var(--line);font-size:1.05rem;color:var(--green)}
.nav-item.active{background:rgba(217,249,157,.16);color:#eaffc8}
.hello.compact{padding:10px 0 12px}
.hello.compact h1{font-size:clamp(1.65rem,8vw,2.35rem)}
.hello.compact p{font-size:.82rem;margin-top:5px}
.small-orb{min-width:78px;min-height:78px;border-width:4px;text-decoration:none}
.small-orb strong{font-size:1.25rem}
.small-orb span{font-size:.55rem}
.entry-card{padding:16px}
.card-topline{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.card-topline h2{margin:0 0 6px}
.entry-card .stack{gap:9px;margin-top:9px}
.entry-main-row{display:grid;grid-template-columns:1fr 1.1fr;gap:9px;align-items:end}
.weight-field input{font-size:20px;font-weight:800;padding:10px 12px}
.optional{font-weight:500;color:#9aa79d;font-size:.66rem}
.camera-label .camera-btn{min-height:44px;font-size:.8rem}
.note-field textarea{min-height:58px;padding:10px 12px}
.big-btn{min-height:49px;font-size:1rem;margin-top:2px}
.extra-details{border:1px dashed #cdd9c4;border-radius:14px;background:#f8fbf4;padding:0 11px}
.extra-details summary{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:11px 0;list-style:none;color:var(--green);font-size:.82rem}
.extra-details summary::-webkit-details-marker{display:none}
.extra-details summary small{font-weight:500;color:var(--muted);font-size:.66rem;text-align:right}
.extra-details[open]{padding-bottom:11px}
.extra-grid{display:grid;grid-template-columns:1.4fr .6fr;gap:8px;margin-bottom:8px}
.extra-grid label{font-size:.72rem;gap:4px}
.extra-grid input{padding:9px 10px}
.mini-cards{margin-top:12px}
.mini-card{display:block;padding:14px;color:var(--ink);text-decoration:none}
.mini-value{font:800 1.55rem/1.1 Georgia,serif;color:var(--green)}
.mini-value small{font:700 .7rem/1 sans-serif;color:var(--muted)}
.mini-label{font-size:.76rem;color:var(--muted);margin:5px 0 7px;line-height:1.35}
.mini-foot{font-size:.66rem;color:var(--muted);margin-top:5px}
.mini-link{display:inline-block;font-size:.7rem;font-weight:850;color:var(--green);margin-top:7px}
.quick-links{display:flex;justify-content:space-between;gap:6px;padding:15px 2px 0;font-size:.73rem;font-weight:800}
.quick-links a{background:#fff;border:1px solid var(--line);border-radius:999px;padding:8px 9px;text-align:center;flex:1}
.page-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0 18px}
.page-head h1{font-size:clamp(2rem,7vw,3rem)}
.page-head .btn{white-space:nowrap}
.chart-bars{display:flex;gap:5px;align-items:flex-end;height:150px;padding:12px 4px 0;border-bottom:1px solid var(--line);margin-top:10px}
.bar-col{display:flex;flex:1;height:100%;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;min-width:0}
.bar{width:100%;max-width:24px;background:linear-gradient(180deg,var(--green-2),var(--lime));border-radius:6px 6px 2px 2px;min-height:2px;transition:height .5s}
.bar-col span{font-size:.58rem;color:var(--muted);white-space:nowrap}
.chart-bars.week{height:125px}
.stat-row{display:flex;gap:22px;margin:4px 0 8px}
.stat-row div{display:grid}
.stat-row strong{font:800 1.8rem/1 Georgia,serif;color:var(--green)}
.stat-row span{font-size:.66rem;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.grid.four{grid-template-columns:repeat(4,1fr);gap:8px;margin:9px 0 0}
.small-stats div{background:#f1f5ed;border-radius:12px;padding:9px}
.small-stats strong{display:block;font-size:1.05rem;color:var(--green)}
.small-stats span{font-size:.62rem;color:var(--muted)}
.big-points{font:800 3rem/1 Georgia,serif;color:var(--green);margin-top:3px}
.big-points small{font:600 .85rem/1 sans-serif;color:var(--muted)}
.extra-badges{margin:7px 0 0}
.pill.activity{background:#e0f2fe;color:#075985}
.invite-nudge{margin-top:14px}
.invite-list{display:grid;gap:8px;margin-top:10px}
.invite-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--line);border-radius:13px;padding:9px 10px;background:#fcfbf5}
.invite-url{font:600 .72rem/1.35 ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all;color:#3b5143}
.inline-form{display:flex;gap:8px}
.inline-logout{display:inline-block;margin-top:8px;border:1px solid var(--line);border-radius:999px;padding:8px 12px;font-size:.78rem;font-weight:800;color:var(--muted)}
.join-wrap{align-items:start;padding-top:25px}
.join-empty{text-align:center;max-width:600px;margin:7vh auto}
@media(max-width:720px){
  .shell{padding:10px 11px}
  .hello.compact{padding:4px 0 10px}
  .hello.compact h1{font-size:1.7rem;max-width:240px}
  .hello.compact p{max-width:240px}
  .entry-card{padding:13px}
  .entry-card h2{font-size:1.25rem}
  .entry-card .tiny{font-size:.67rem}
  .entry-main-row{grid-template-columns:1fr 1.15fr;gap:7px}
  .extra-grid{grid-template-columns:1.4fr .6fr}
  .mini-cards{grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}
  .mini-card{padding:11px}
  .mini-value{font-size:1.25rem}
  .mini-label{font-size:.67rem}
  .quick-links{font-size:.65rem;gap:4px;padding-top:10px}
  .quick-links a{padding:7px 5px}
  .page-head{align-items:flex-start;flex-direction:column}
  .page-head h1{font-size:2rem}
  .chart-bars{height:125px}
  .grid.four{grid-template-columns:repeat(2,1fr)}
  .invite-row{align-items:flex-start}
}
.inline-form input{flex:1; min-width:0}
.checkbox-row{display:flex;align-items:center;gap:8px;font-size:.8rem;font-weight:700;color:var(--ink);background:#f4f8ef;border:1px solid var(--line);border-radius:12px;padding:9px 11px;cursor:pointer}
.checkbox-row input{width:18px;height:18px;accent-color:var(--green);flex:none}
.bmi-line{display:flex;align-items:center;gap:6px;margin-top:7px;font-size:.72rem;color:var(--muted)}
.bmi-line strong{font:800 1rem/1 Georgia,serif;color:var(--green)}
.bmi-line em{font-style:normal;font-weight:800;padding:2px 6px;border-radius:999px;font-size:.6rem}
.muted-line em{font-weight:600;color:#9aa79d}
.bmi-underweight{background:#e0f2fe;color:#075985}
.bmi-healthy{background:#dcfce7;color:#166534}
.bmi-overweight{background:#fef3c7;color:#92400e}
.bmi-obese{background:#fee2e2;color:#991b1b}
.bmi-pill{white-space:nowrap}
