/* GeneFit interactive prototype. Built from the Figma frames at 414 × 896 and scaled to fit the frame it sits in */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #e9e9e7; -webkit-tap-highlight-color: transparent; }
html:has(.embed), .embed { background: #F9FBFC; }
body { display: grid; place-items: center; font-family: 'Roboto', system-ui, sans-serif; color: #3B4F60; }
button, input { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; outline: 0; }
button { cursor: pointer; text-align: inherit; }
img { display: block; max-width: none; }
p { margin: 0; }

.stage { position: relative; overflow: hidden; }
.app { position: absolute; left: 0; top: 0; width: 414px; height: 896px; overflow: hidden; background: #F9FBFC; transform-origin: 0 0; border-radius: 20px; user-select: none; -webkit-user-select: none; }
.embed .app { border-radius: 0; }
.sb { position: absolute; left: 0; top: 0; width: 414px; height: 33px; z-index: 30; pointer-events: none; }
.sb .t { position: absolute; left: 27.4px; top: 17.2px; }
.sb .r { position: absolute; right: 15.2px; top: 21.3px; }

/* Screens */
.scr { position: absolute; inset: 0; background: #F9FBFC; overflow: hidden; }
.scr.in-r { animation: in-r 360ms cubic-bezier(.2, .7, .2, 1) both; }
.scr.in-l { animation: in-l 360ms cubic-bezier(.2, .7, .2, 1) both; }
.scr.in-f { animation: in-f 240ms ease-out both; }
.scr.out-l { animation: out-l 360ms cubic-bezier(.2, .7, .2, 1) both; pointer-events: none; }
.scr.out-r { animation: out-r 360ms cubic-bezier(.2, .7, .2, 1) both; pointer-events: none; z-index: 2; }
.scr.out-f { animation: out-f 200ms ease-in both; pointer-events: none; }
@keyframes in-r { from { transform: translateX(100%); } }
@keyframes in-l { from { transform: translateX(-28%); } }
@keyframes in-f { from { opacity: 0; } }
@keyframes out-l { to { transform: translateX(-28%); } }
@keyframes out-r { to { transform: translateX(100%); } }
@keyframes out-f { to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Loading */
.loading .bg { position: absolute; inset: 0; }
.loading .box { position: absolute; left: 115px; top: 282px; width: 200px; display: flex; flex-direction: column; align-items: center; gap: 40px; }
.loading .tile { width: 200px; height: 200px; border-radius: 70px; background: #fff; display: grid; place-items: center; animation: pop 700ms cubic-bezier(.3, 1.4, .5, 1) both; }
.loading .tile img { transform: rotate(60deg); }
.loading .tile .dna { animation: twist 2.4s ease-in-out infinite; }
@keyframes twist { 50% { transform: rotate(60deg) scaleX(.82); } }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.loading .word { animation: rise 600ms 200ms both; }

/* Page scaffold: header with the profile, a scrolling body, the tab bar */
.page { position: absolute; left: 0; top: 0; width: 414px; height: 806px; display: flex; flex-direction: column; }
.page.full { height: 896px; }
.head { flex: none; padding: 73px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.who { display: flex; align-items: center; gap: 20px; }
.who img { width: 60px; height: 60px; border-radius: 18px; object-fit: cover; }
.who div { display: flex; flex-direction: column; gap: 5px; white-space: nowrap; }
.who b { font-size: 16px; font-weight: 500; }
.who span { font-size: 24.5px; font-weight: 300; }
.menu { width: 60px; height: 60px; position: relative; }
.menu img { position: absolute; left: -5px; top: -3px; }
.menu:active { transform: scale(.95); }
.body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 30px 20px 20px; display: flex; flex-direction: column; gap: 20px; overscroll-behavior: contain; }
.body::-webkit-scrollbar { display: none; }
.sec { display: flex; align-items: center; gap: 20px; padding: 10px 0; }
.sec .t { flex: 1; font-size: 16px; font-weight: 500; }
.sec .v { font-size: 14px; }
.sec .ic { padding: 6px; margin: -6px; border-radius: 10px; }
.sec .ic:active, .sec .bk:active { background: rgb(59 79 96 / .08); }
.sec .bk { width: 34px; height: 34px; margin: -10px -6px -10px -10px; display: grid; place-items: center; border-radius: 10px; }
.sec .bk img { transform: rotate(-90deg); }
.tabs { position: absolute; left: 0; top: 806px; width: 414px; height: 90px; display: flex; align-items: center; justify-content: space-between; padding: 20px 30px; border-radius: 20px; background: #fff; filter: drop-shadow(0 -10px 25px rgb(0 0 0 / .05)); z-index: 5; }
.tabs.bare { background: transparent; filter: none; }
.tabs button { width: 31px; height: 31px; display: grid; place-items: center; position: relative; }
.tabs button::after { content: ""; position: absolute; inset: -14px; border-radius: 14px; }
.tabs button:active::after { background: rgb(59 79 96 / .06); }
.fab { position: absolute; left: 324px; top: 714px; width: 70px; height: 70px; border-radius: 24px; background: #fff; display: grid; place-items: center; filter: drop-shadow(0 2px 2.5px rgb(0 0 0 / .1)); z-index: 6; transition: transform 160ms; }
.fab:active { transform: scale(.94); }

/* Dashboard */
.meter { position: relative; width: 374px; height: 118px; flex: none; border-radius: 12px; background: #EEF3F8; overflow: hidden; }
.meter .waves { position: absolute; left: 0; top: 0; height: 118px; transform-origin: 0 50%; transition: transform 700ms cubic-bezier(.3, 1.2, .5, 1); }
.meter .waves img { position: absolute; left: 0; top: 0; }
.meter .waves .fl { transform: scaleY(-1); }
.meter .waves.wave img:nth-child(2) { animation: sway 3.2s ease-in-out infinite; }
.meter .waves.wave img:nth-child(3) { animation: sway 4.1s ease-in-out infinite reverse; }
@keyframes sway { 50% { translate: -6px 0; } }
.meter .bub { position: absolute; left: 96px; top: -66px; transform: rotate(90deg); animation: bub 5s linear infinite; }
@keyframes bub { 50% { translate: 4px 0; } }
.meter .lab { position: absolute; left: 0; top: 50%; translate: 0 -50%; padding: 10px; border-radius: 0 10px 10px 0; background: rgb(255 255 255 / .5); font-size: 14px; font-weight: 500; white-space: nowrap; z-index: 2; }
.meter .add { position: absolute; right: 25px; top: 34px; width: 50px; height: 50px; z-index: 2; transition: transform 160ms; }
.meter .add:active { transform: scale(.9); }
.meters { display: flex; flex-direction: column; gap: 15px; }
.cards { flex: 1; display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.prog { flex: 1; width: 374px; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 30px; border-radius: 28px; background: #fff; filter: drop-shadow(0 2px 2.5px rgb(0 0 0 / .1)); text-align: left; transition: transform 160ms; }
.prog:active, .row:active, .cat:active { transform: scale(.985); }
.prog .tt { display: flex; align-items: center; gap: 15px; font-size: 17.5px; font-weight: 500; }
.prog .tt span { flex: 1; }
.prog .n { font-size: 24.5px; font-weight: 300; }
.ne { transform: rotate(45deg); }
.bar { position: relative; height: 40px; margin-top: 4px; }
.bar .rest { position: absolute; left: 0; right: 0; top: 14px; height: 26px; border-radius: 20px; opacity: .5; background: repeating-linear-gradient(-55deg, #3B4F60 0 1px, transparent 1px 7px); box-shadow: inset 0 0 0 1px rgb(59 79 96 / .35); }
.bar .done { position: absolute; left: 0; top: 14px; height: 26px; border-radius: 20px 0 0 20px; background: #3B4F60; transition: width 800ms cubic-bezier(.3, 1.1, .5, 1); }
.bar .tick { position: absolute; top: 0; width: 2px; height: 40px; margin-left: -1px; background: #3B4F60; transition: left 800ms cubic-bezier(.3, 1.1, .5, 1); }

/* Goals chart */
.chart { position: relative; width: 374px; height: 192px; flex: none; touch-action: none; cursor: ew-resize; }
.chart > img { position: absolute; }
.chart .grid { left: 0; top: -1px; }
.chart .lines { left: -1.5px; top: 31.8px; }
.chart .act { top: 0; transition: left 120ms; }
.chart .tip { position: absolute; top: -6px; padding: 6px 10px; border-radius: 10px; background: #3B4F60; color: #fff; font-size: 12.5px; font-weight: 500; white-space: nowrap; translate: -50% -100%; opacity: 0; transition: opacity 200ms; pointer-events: none; }
.chart.on .tip { opacity: 1; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 20px; width: 374px; padding: 20px; border-radius: 28px; background: #fff; filter: drop-shadow(0 2px 2.5px rgb(0 0 0 / .1)); text-align: left; transition: transform 160ms; }
.row > div { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.row .tt { display: flex; align-items: center; justify-content: space-between; font-size: 17.5px; font-weight: 500; }
.row .s { font-size: 14px; transition: color 300ms; }
.row .s.over { color: #FB8627; }
.row.swap .s { animation: rise 300ms both; }

/* Journal */
.cal { display: flex; flex-direction: column; gap: 9px; }
.cal div { height: 40px; border-radius: 50px; background: #EEF3F8; overflow: hidden; }
.cal i { position: relative; display: block; height: 100%; border-radius: 50px; transition: width 900ms cubic-bezier(.3, 1.1, .5, 1); }
.cal span { position: absolute; right: 0; top: 5px; height: 30px; padding: 0 15px 0 10px; display: flex; align-items: center; border-radius: 550px; color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap; font-style: normal; }
.cal .bump { animation: bump 900ms ease; }
@keyframes bump { 30% { filter: brightness(1.15); } }

/* Recipes and restaurants */
.search { display: flex; align-items: center; gap: 20px; padding: 20px; border-radius: 18px; background: #EDEFF3; }
.search input { flex: 1; min-width: 0; font-size: 16px; color: #3B4F60; }
.search input::placeholder { color: rgb(59 79 96 / .5); }
.search .addr { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; opacity: .5; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.cats { display: flex; flex-direction: column; gap: 10px; }
.cat { display: flex; align-items: center; gap: 20px; width: 374px; padding: 20px 30px; border-radius: 18px; background: #fff; filter: drop-shadow(0 2px 2.5px rgb(0 0 0 / .1)); text-align: left; transition: transform 160ms, opacity 200ms; }
.cat > div { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.cat b { font-size: 17.5px; font-weight: 500; }
.cat span { font-size: 14px; }
.cat.hide { display: none; }
.photo { position: relative; width: 374px; height: 300px; flex: none; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 5px rgb(0 0 0 / .1); display: flex; flex-direction: column; justify-content: flex-end; text-align: left; transition: transform 200ms, opacity 300ms, height 300ms, margin 300ms; }
.photo.short { height: 183px; }
.photo > img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo .panel { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 15px 20px; background: rgb(255 255 255 / .92); backdrop-filter: blur(50px); -webkit-backdrop-filter: blur(50px); }
.photo .ln { display: flex; align-items: flex-start; gap: 5px; font-size: 14px; font-weight: 500; }
.photo .ln span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo .ln em { display: flex; align-items: center; gap: 20px; font-style: normal; }
.photo small { font-size: 12.5px; color: rgb(59 79 96 / .5); white-space: pre; }
.photo .veg { position: absolute; right: 10px; top: 10px; }
.photo .rt { display: flex; align-items: center; gap: 10px; }
.photo.gone { opacity: 0; transform: scale(.96); }
.dis { width: 30px; height: 30px; margin: -6px; display: grid; place-items: center; border-radius: 8px; }
.dis.on { background: #FDE7E7; }

/* Recipe and restaurant detail */
.hero { position: relative; width: 414px; height: 300px; flex: none; overflow: hidden; }
.hero > img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .pager { position: absolute; left: 189.5px; bottom: 10px; }
.hero .over { position: absolute; left: 20px; right: 20px; top: 20px; display: flex; align-items: center; gap: 20px; color: #fff; font-size: 14px; font-weight: 500; }
.hero .over .rt { flex: 1; display: flex; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; padding: 10px; border-radius: 18px; background: #EDEFF3; color: #3B4F60; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips span { padding: 5px 15px; border-radius: 20px; background: #EDEFF3; font-size: 12.5px; font-weight: 500; }
.meta { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 500; }
.meta > span:first-child { flex: 1; }
.copy { font-size: 16px; line-height: 28px; display: flex; flex-direction: column; gap: 28px; }
.det .body { padding: 0 0 120px; gap: 20px; }
.det .inner { padding: 0 20px; display: flex; flex-direction: column; gap: 30px; }
.fav.on img { filter: brightness(0) saturate(100%) invert(57%) sepia(88%) saturate(1200%) hue-rotate(345deg) brightness(101%); }
.foot { position: absolute; left: 0; top: 806px; width: 414px; height: 90px; padding: 20px 30px; border-radius: 20px; background: #fff; filter: drop-shadow(0 -10px 25px rgb(0 0 0 / .05)); z-index: 5; }
.cta { width: 100%; height: 50px; border-radius: 50px; background: #3B4F60; color: #fff; font-size: 16px; font-weight: 500; text-align: center; transition: transform 160ms, background-color 300ms; }
.cta:active { transform: scale(.98); }
.cta.done { background: #9DAF66; }
.tabs2 { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.tabs2::-webkit-scrollbar { display: none; }
.tabs2 button { flex: none; padding: 8px 15px; border-radius: 20px; background: #EDEFF3; font-size: 14px; font-weight: 500; transition: background-color 200ms, color 200ms; }
.tabs2 button.on { background: #3B4F60; color: #fff; }
.menu-list { display: flex; flex-direction: column; gap: 20px; }
.empty { padding: 30px 0; text-align: center; color: rgb(59 79 96 / .5); font-size: 14px; }

/* Diet code */
.code-img { position: relative; width: 136px; height: 136px; flex: none; }
.code-img img { position: absolute; }
.code-img .ring { left: 1.55px; top: 1.55px; }
.code-img .av { left: 0; top: 0; width: 136px; height: 136px; border-radius: 80px; }
.dc h2 { margin: 0; font-size: 21px; font-weight: 400; color: #2B2B2B; }
.dc .txt { font-size: 14px; line-height: 24px; color: #2B2B2B; display: flex; flex-direction: column; gap: 24px; }

.toast { position: absolute; left: 50%; top: 48px; z-index: 40; max-width: 360px; padding: 12px 18px; border-radius: 16px; background: #3B4F60; color: #fff; font-size: 14px; font-weight: 500; text-align: center; transform: translateX(-50%); animation: toast 2.6s ease both; pointer-events: none; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -12px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
@media (prefers-reduced-motion: reduce) {
  .scr.in-r, .scr.in-l, .scr.out-l, .scr.out-r { animation-duration: 1ms; }
  .meter .waves img, .meter .bub, .loading .tile .dna { animation: none !important; }
}
