:root {
  --green: #58CC02; --green-d: #46A302;
  --blue: #1CB0F6; --blue-d: #1592CC;
  --red: #FF4B4B; --red-d: #D33131;
  --orange: #FF9600; --orange-d: #D47D00;
  --yellow: #FFC800; --yellow-d: #E0A800;
  --purple: #A560E8; --purple-d: #8447C2;
  --pink: #FF5FB4;
  --ink: #3C3C3C; --ink-2: #777; --ink-3: #AFAFAF;
  --line: #E5E5E5; --bg: #FFFFFF; --bg-2: #F7F7F7; --page: #EAF7DE;
  --r: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  color: var(--ink); background: var(--page);
  background-image: radial-gradient(circle at 10% 10%, #fff6 0 60px, transparent 61px),
    radial-gradient(circle at 90% 30%, #fff5 0 90px, transparent 91px),
    radial-gradient(circle at 20% 80%, #fff5 0 70px, transparent 71px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; padding: 0; }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; box-shadow: 0 0 0 1px #0000000a, 0 10px 40px #0000000f; }
#main { padding: 0 16px calc(170px + var(--safe-b)); display: flow-root; }
#main.flow { padding-bottom: 40px; }
.enter { animation: enter .28s cubic-bezier(.2,.9,.3,1.2); }
.enter-back { animation: enterBack .28s cubic-bezier(.2,.9,.3,1.2); }
@keyframes enter { from { opacity: 0; transform: translateX(40px); } }
@keyframes enterBack { from { opacity: 0; transform: translateX(-40px); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 6px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.stat { display: flex; align-items: center; gap: 5px; font-weight: 900; font-size: 18px; padding: 6px 8px; border-radius: 12px; }
.stat .ico { font-size: 22px; }
.stat.fire { color: var(--orange); }
.stat.fire.off { color: var(--ink-3); filter: grayscale(1); }
.stat.gem { color: var(--blue); }
.stat.lvl { color: var(--yellow-d); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.icon-btn:active { background: var(--bg-2); }

.daterow { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 4px; }
.daterow h1 { font-size: 22px; font-weight: 900; margin: 0; min-width: 140px; text-align: center; }
.arrow { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); border-bottom-width: 3px; font-weight: 900; color: var(--ink-2); font-size: 18px; }
.arrow:disabled { opacity: .3; }

/* ---------- hero ring ---------- */
.hero { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; }
.ring { position: relative; width: 190px; height: 190px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--line); }
.ring .bar { transition: stroke-dashoffset 1s cubic-bezier(.3,1.2,.4,1), stroke .4s; }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-num { font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.ring-of { font-size: 13px; color: var(--ink-2); font-weight: 800; margin-top: 2px; }
.ring-left { margin-top: 6px; font-size: 13px; font-weight: 900; padding: 3px 10px; border-radius: 99px; background: #E9F8DA; color: var(--green-d); display: inline-block; }
.ring-left.over { background: #FFE5E5; color: var(--red-d); }
.buddy { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bubble { position: relative; background: var(--bg); border: 2px solid var(--line); border-radius: 16px; padding: 10px 12px; font-weight: 800; font-size: 14px; line-height: 1.25; margin-bottom: 8px; text-align: center; animation: pop .4s; }
.bubble::after { content: ''; position: absolute; bottom: -9px; left: 50%; width: 14px; height: 14px; background: var(--bg); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: translateX(-50%) rotate(45deg); }

/* ---------- mascot ---------- */
.mascot { width: 96px; height: 96px; overflow: visible; }
.mascot .m-body { transform-origin: 60px 112px; animation: bob 2.4s ease-in-out infinite; }
.mascot .m-eyes { transform-origin: 60px 58px; animation: blink 4.5s infinite; }
.mascot .m-mouth { transform-origin: 60px 86px; }
.mascot.chew .m-mouth { animation: chew .18s 6 alternate; }
.mascot.dance .m-body { animation: dance .5s ease-in-out infinite alternate; }
@keyframes bob { 0%,100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-4px) scale(1.02, .98); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes chew { to { transform: scaleY(.3); } }
@keyframes dance { from { transform: rotate(-8deg) translateY(0); } to { transform: rotate(8deg) translateY(-8px); } }

/* ---------- cards ---------- */
.card { border: 2px solid var(--line); border-bottom-width: 4px; border-radius: var(--r); padding: 14px; margin-bottom: 12px; background: var(--bg); }
.card-title { font-weight: 900; font-size: 17px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-title .sub { margin-left: auto; color: var(--ink-3); font-size: 13px; font-weight: 800; }

.quest { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.quest + .quest { border-top: 2px solid var(--bg-2); }
.quest-e { font-size: 26px; width: 36px; text-align: center; }
.quest-body { flex: 1; min-width: 0; }
.quest-n { font-weight: 800; font-size: 14px; margin-bottom: 5px; }
.pbar { height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; position: relative; }
.pbar > div { height: 100%; border-radius: 99px; background: var(--yellow); position: relative; transition: width .6s cubic-bezier(.3,1.3,.4,1); min-width: 14px; }
.pbar > div::after { content: ''; position: absolute; left: 6px; right: 6px; top: 3px; height: 4px; border-radius: 9px; background: #ffffff66; }
.pbar.green > div { background: var(--green); }
.pbar.blue > div { background: var(--blue); }
.pbar.zero > div { min-width: 0; }
.quest-chest { font-size: 24px; width: 32px; text-align: center; }
.quest.done .quest-chest { animation: pop .5s; }
.quest-count { font-size: 12px; color: var(--ink-3); font-weight: 900; margin-left: 4px; }

.water { display: flex; gap: 4px; justify-content: space-between; }
.drop { flex: 1; height: 46px; border-radius: 12px; font-size: 24px; display: grid; place-items: center; background: var(--bg-2); filter: grayscale(1); opacity: .45; transition: transform .15s; }
.drop.on { filter: none; opacity: 1; background: #DDF4FF; animation: pop .35s; }
.drop:active { transform: scale(.85); }

/* ---------- meals ---------- */
.meal { --c: var(--green); --cd: var(--green-d); }
.meal-head { display: flex; align-items: center; gap: 12px; }
.meal-e { width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--c) 18%, white); display: grid; place-items: center; font-size: 28px; flex: none; }
.meal-n { font-weight: 900; font-size: 18px; }
.meal-k { color: var(--ink-2); font-weight: 800; font-size: 14px; }
.plus { margin-left: auto; width: 48px; height: 48px; border-radius: 14px; background: var(--c); color: #fff; font-size: 30px; font-weight: 900; box-shadow: 0 4px 0 var(--cd); line-height: 1; flex: none; }
.plus:active { transform: translateY(4px); box-shadow: none; }
.meal-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.meal-items:empty { display: none; }
.chip { display: flex; align-items: center; gap: 4px; padding: 4px 10px 4px 6px; border-radius: 99px; background: var(--bg-2); border: 2px solid var(--line); font-weight: 800; font-size: 13px; color: var(--ink-2); animation: pop .3s; }
.chip .ce { font-size: 22px; line-height: 1; position: relative; }
.chip:active { transform: scale(.92); }

/* ---------- buttons ---------- */
.btn { --c: var(--green); --cd: var(--green-d); display: block; width: 100%; padding: 15px 16px; border-radius: 16px; background: var(--c); color: #fff; font-weight: 900; font-size: 16px; letter-spacing: .8px; text-transform: uppercase; box-shadow: 0 4px 0 var(--cd); transition: transform .06s; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--cd); }
.btn.white { background: #fff; color: var(--green-d); --cd: #D7D7D7; border: 2px solid var(--line); }
.btn.red { --c: var(--red); --cd: var(--red-d); }
.btn.blue { --c: var(--blue); --cd: var(--blue-d); }
.btn.ghost { background: none; color: var(--ink-2); box-shadow: none; }
.btn-row { display: flex; gap: 10px; }

.fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-b)); width: min(488px, calc(100% - 32px)); z-index: 6; }
.fab .btn { font-size: 18px; padding: 17px; box-shadow: 0 5px 0 var(--green-d), 0 10px 24px #58cc0255; }
.fab .btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--green-d); }

/* ---------- nav ---------- */
#nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; display: flex; background: var(--bg); border-top: 2px solid var(--line); padding: 6px 8px calc(6px + var(--safe-b)); z-index: 7; }
#nav:empty { display: none; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; border-radius: 14px; border: 2px solid transparent; font-size: 11px; font-weight: 900; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; }
.tab .ti { font-size: 26px; filter: grayscale(1); opacity: .6; transition: transform .2s; }
.tab.on { background: #DDF4FF; border-color: #84D8FF; color: var(--blue-d); }
.tab.on .ti { filter: none; opacity: 1; transform: scale(1.1); }

/* ---------- add flow ---------- */
.flow-head { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.flow-head .icon-btn { color: var(--ink-3); font-weight: 900; font-size: 26px; }
.flow-head .pbar { flex: 1; height: 16px; }
.flow-head .pbar > div { background: var(--green); }
.meal-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.meal-tabs::-webkit-scrollbar { display: none; }
.mtab { flex: none; padding: 7px 12px; border-radius: 99px; border: 2px solid var(--line); border-bottom-width: 3px; font-weight: 800; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.mtab.on { background: color-mix(in srgb, var(--c) 18%, white); border-color: var(--c); color: var(--ink); }
.flow h2 { font-size: 26px; font-weight: 900; margin: 8px 0 14px; line-height: 1.15; }
.sec-label { font-weight: 900; font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 1px; margin: 4px 0 8px; }

.recent-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px 8px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.recent-row::-webkit-scrollbar { display: none; }
.recent { flex: none; width: 92px; padding: 8px 6px; border-radius: 16px; border: 2px solid var(--line); border-bottom-width: 4px; text-align: center; }
.recent .re { font-size: 32px; position: relative; display: inline-block; }
.recent .rn { font-size: 11px; font-weight: 800; color: var(--ink-2); line-height: 1.2; margin-top: 2px; height: 27px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.recent .rk { font-size: 12px; font-weight: 900; color: var(--orange); }
.recent:active, .tile:active, .portion:active, .cat:active { transform: translateY(3px); border-bottom-width: 2px; margin-top: 2px; }

.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat { --c: var(--green); --cd: var(--green-d); background: var(--c); border-radius: 20px; padding: 16px 12px 12px; color: #fff; text-align: left; box-shadow: 0 5px 0 var(--cd); position: relative; overflow: hidden; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; animation: pop .35s backwards; }
.cat:active { transform: translateY(5px); box-shadow: none; margin: 0; border: 0; }
.cat .ce { font-size: 52px; line-height: 1; filter: drop-shadow(0 3px 0 #0002); }
.cat .cn { font-weight: 900; font-size: 17px; line-height: 1.1; text-shadow: 0 2px 0 #0002; }
.cat::before { content: ''; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: #ffffff22; }

.food-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { --c: var(--green); border-radius: 18px; border: 2px solid color-mix(in srgb, var(--c) 35%, white); border-bottom-width: 4px; background: color-mix(in srgb, var(--c) 9%, white); padding: 12px 4px 8px; text-align: center; animation: pop .3s backwards; }
.tile .te { font-size: 44px; line-height: 1.1; position: relative; display: inline-block; }
.tile .tn { font-size: 13px; font-weight: 800; line-height: 1.15; margin-top: 4px; min-height: 30px; display: flex; align-items: center; justify-content: center; }
.badge-e { position: absolute; right: -10px; bottom: -4px; font-size: .45em; background: #fff; border-radius: 50%; width: 1.5em; height: 1.5em; display: grid; place-items: center; box-shadow: 0 1px 3px #0003; }

.food-hero { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.food-hero .fe { font-size: 56px; position: relative; display: inline-block; }
.food-hero h2 { margin: 0; }
.food-hero .fsub { color: var(--ink-2); font-weight: 800; font-size: 14px; }
.portion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.portion { --c: var(--green); border-radius: 20px; border: 2px solid var(--line); border-bottom-width: 4px; padding: 10px 8px 12px; text-align: center; animation: pop .35s backwards; display: flex; flex-direction: column; align-items: center; }
.portion:hover { border-color: color-mix(in srgb, var(--c) 50%, white); }
.plate { width: 100%; height: 118px; border-radius: 16px; background: radial-gradient(ellipse at 50% 78%, color-mix(in srgb, var(--c) 18%, white) 0 45%, transparent 46%), color-mix(in srgb, var(--c) 6%, white); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; overflow: hidden; }
.pile { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pile .prow { display: flex; justify-content: center; }
.pile .prow + .prow { margin-top: -0.38em; }
.pile span { display: inline-block; margin: 0 -0.12em; filter: drop-shadow(0 2px 1px #0002); }
.portion .pn { font-weight: 900; font-size: 16px; margin-top: 8px; }
.portion .ph { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 1px; }
.portion .pk { margin-top: 8px; background: var(--c); color: #fff; font-weight: 900; font-size: 14px; padding: 4px 12px; border-radius: 99px; }

/* ---------- sheet (bottom banner) ---------- */
#sheet:empty, #modal:empty { display: none; }
.scrim { position: fixed; inset: 0; background: #0006; z-index: 20; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.banner { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 520px; background: #D7FFB8; padding: 18px 16px calc(18px + var(--safe-b)); z-index: 21; border-radius: 24px 24px 0 0; animation: slideUp .35s cubic-bezier(.2,1.2,.4,1); }
.banner.red { background: #FFDFE0; }
@keyframes slideUp { from { transform: translate(-50%, 100%); } }
.banner-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.banner .mascot { width: 64px; height: 64px; flex: none; }
.b-title { font-size: 24px; font-weight: 900; color: var(--green-d); }
.banner.red .b-title { color: var(--red-d); }
.b-sub { font-weight: 800; color: #4b8a1a; font-size: 15px; }
.banner.red .b-sub { color: #a33; }
.b-xp { margin-left: auto; text-align: right; font-weight: 900; color: var(--yellow-d); font-size: 20px; flex: none; }
.b-combo { display: block; font-size: 13px; color: var(--orange); animation: pop .5s; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; }
.modal-card { position: relative; background: #fff; border-radius: 28px; padding: 28px 22px 22px; width: 100%; max-width: 380px; text-align: center; animation: pop .45s cubic-bezier(.2,1.4,.4,1); }
.modal-big { font-size: 84px; line-height: 1; margin: 0 auto 6px; width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #FFF3B0, #FFC800); box-shadow: 0 6px 0 #E0A800, inset 0 -6px 0 #0001; animation: spinIn .7s cubic-bezier(.2,1.4,.4,1); }
@keyframes spinIn { from { transform: rotate(-200deg) scale(.2); } }
.modal-kicker { font-weight: 900; color: var(--yellow-d); text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; margin-top: 10px; }
.modal-title { font-weight: 900; font-size: 28px; margin: 2px 0 6px; }
.modal-text { color: var(--ink-2); font-weight: 700; margin-bottom: 20px; line-height: 1.35; }
.rays { position: absolute; left: 50%; top: 98px; width: 320px; height: 320px; margin: -160px 0 0 -160px; background: repeating-conic-gradient(#FFC80022 0 12deg, transparent 12deg 24deg); border-radius: 50%; animation: spin 12s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toasts & floaters ---------- */
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100% - 32px)); pointer-events: none; }
.toast { background: #fff; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; padding: 10px 14px; font-weight: 900; display: flex; align-items: center; gap: 10px; animation: toastIn .4s cubic-bezier(.2,1.4,.4,1); box-shadow: 0 8px 24px #0002; }
.toast .t-e { font-size: 28px; }
.toast .t-x { margin-left: auto; color: var(--yellow-d); }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { transform: translateY(-40px) scale(.8); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-30px); opacity: 0; } }
.floater { position: fixed; z-index: 50; pointer-events: none; font-weight: 900; font-size: 22px; color: var(--yellow-d); text-shadow: 0 2px 0 #fff, 0 0 8px #fff; animation: floatUp 1.1s ease-out forwards; transform: translate(-50%, -50%); }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ---------- week / trophies / settings ---------- */
.page-title { font-size: 28px; font-weight: 900; margin: 18px 0 14px; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; position: relative; padding-top: 10px; }
.chart .goal-line { position: absolute; left: 0; right: 0; border-top: 3px dashed #FFC80099; z-index: 1; }
.chart .goal-line span { position: absolute; right: 0; top: -20px; font-size: 11px; font-weight: 900; color: var(--yellow-d); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-col .bk { font-size: 11px; font-weight: 900; color: var(--ink-2); margin-bottom: 3px; }
.bar-col .b { width: 100%; border-radius: 10px 10px 4px 4px; background: var(--green); box-shadow: inset 0 -4px 0 #0002; min-height: 6px; animation: grow .7s cubic-bezier(.3,1.3,.4,1) backwards; transform-origin: bottom; }
.bar-col .b.over { background: var(--orange); }
.bar-col .b.none { background: var(--line); box-shadow: none; }
.bar-col.today .b { outline: 3px solid #1CB0F655; outline-offset: 2px; }
@keyframes grow { from { transform: scaleY(0); } }
.bar-labels { display: flex; gap: 8px; margin-top: 6px; }
.bar-labels div { flex: 1; text-align: center; font-weight: 900; font-size: 12px; color: var(--ink-3); }
.bar-labels .today { color: var(--blue); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tile-stat { border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; padding: 12px; display: flex; gap: 10px; align-items: center; }
.tile-stat .se { font-size: 28px; }
.tile-stat .sv { font-weight: 900; font-size: 20px; line-height: 1.1; }
.tile-stat .sl { font-size: 12px; font-weight: 800; color: var(--ink-3); }
.favs { display: flex; gap: 8px; flex-wrap: wrap; }
.fav { display: flex; flex-direction: column; align-items: center; width: 62px; }
.fav .fe { font-size: 34px; position: relative; }
.fav .fc { font-size: 12px; font-weight: 900; color: var(--ink-2); }

.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge { border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 18px; padding: 12px 6px 10px; text-align: center; }
.badge .be { font-size: 40px; width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #FFF3B0, #FFC800); box-shadow: 0 4px 0 #E0A800; }
.badge.locked .be { background: var(--bg-2); box-shadow: 0 4px 0 var(--line); filter: grayscale(1); opacity: .5; }
.badge .bn { font-weight: 900; font-size: 13px; line-height: 1.15; }
.badge .bd { font-size: 11px; font-weight: 700; color: var(--ink-2); line-height: 1.2; margin: 3px 0 6px; min-height: 26px; }
.badge .pbar { height: 8px; }
.badge .pbar > div { min-width: 8px; }
.badge .pbar.zero > div { min-width: 0; }

.goal-opts { display: flex; flex-direction: column; gap: 8px; }
.goal-opt { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; text-align: left; }
.goal-opt .ge { font-size: 34px; }
.goal-opt .gn { font-weight: 900; font-size: 16px; }
.goal-opt .gd { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.goal-opt .gk { margin-left: auto; font-weight: 900; color: var(--ink-2); }
.goal-opt.on { background: #DDF4FF; border-color: #84D8FF; }
.goal-opt.on .gk { color: var(--blue-d); }
.stepper { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 14px 0 4px; }
.stepper .num { font-size: 30px; font-weight: 900; min-width: 110px; text-align: center; }
.stepper .arrow { width: 44px; height: 44px; font-size: 22px; }
.row-set { display: flex; align-items: center; justify-content: space-between; font-weight: 900; font-size: 17px; }
.switch { width: 56px; height: 32px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 #0002; transition: left .2s; }
.switch.on { background: var(--green); }
.switch.on::after { left: 27px; }
.muted { color: var(--ink-2); font-weight: 700; font-size: 14px; line-height: 1.4; }

.onboard { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 30px 0; }
.onboard .mascot { width: 170px; height: 170px; margin: 0 auto 10px; }
.onboard h1 { font-size: 34px; font-weight: 900; margin: 6px 0; }
.onboard .tag { font-size: 18px; font-weight: 700; color: var(--ink-2); margin: 0 0 26px; }
.onboard .float-foods { font-size: 34px; letter-spacing: 6px; margin-bottom: 20px; }
.onboard .float-foods span { display: inline-block; animation: bob 2s ease-in-out infinite; }

@media (hover: hover) {
  .tile:hover, .recent:hover, .portion:hover, .goal-opt:hover { background-color: color-mix(in srgb, var(--c, #1CB0F6) 14%, white); }
  .cat:hover { filter: brightness(1.05); }
}
@media (max-width: 370px) {
  .ring { width: 160px; height: 160px; }
  .ring-num { font-size: 32px; }
  .food-grid { gap: 8px; }
  .tile .te { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
