/* Inter (SIL Open Font License), latin subset, self-hosted: the app font's stand-in outside Safari. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/inter-latin.woff2") format("woff2"); }

/* The app screens inside the zoomed phone, in the app's own points (402 wide). Values from app/src: theme/tokens.ts
   (colors, type 12/13/15/17/22/28/48, radii 8/12/16/24/32), components/Splash.tsx, app/(tabs)/index.tsx,
   components/HeaderChips.tsx, MacroBar.tsx, CallyTip.tsx, ChatInput.tsx, TypingDots.tsx, app/meal-sheet.tsx. */

.app-canvas { font-family: ui-rounded, "SF Pro Rounded", "Inter", sans-serif; /* the app draws SF Pro Rounded on iOS (Text.tsx). Safari reaches it through ui-rounded; Apple does not license it for hosting, so other browsers get Inter (Georgina, 27 Nov 2026): a neutral sans close to SF Pro, with true 400, 500, 600 and 700 weights */ color: #000; background: #fff; overflow: hidden; -webkit-font-smoothing: antialiased; }
.app-canvas * { box-sizing: border-box; }
.app-canvas.dark { background: #000; }
.app-canvas .ic { display: block; flex: none; }
/* iPhone chrome over every screen: the status bar (time, signal, wifi, battery) and the home line. The island is in the
   hand photo. White on the dark screens, black on the sheet. */
.a-status { position: absolute; z-index: 6; left: 0; right: 0; top: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 46px; color: #fff; font-family: -apple-system, "SF Pro Text", "Inter", sans-serif; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; pointer-events: none; }
.a-status-icons { display: flex; align-items: center; gap: 6px; }
.a-status svg { display: block; fill: currentColor; }
.a-homeline { position: absolute; z-index: 6; left: 50%; bottom: 8px; width: 134px; height: 5px; translate: -50% 0; border-radius: 3px; background: #000; pointer-events: none; }
.app-canvas.dark .a-homeline { background: #fff; }

/* Splash: black, logo 180 wide, fades and scales in over 600 ms, holds 500 ms, fades out over 300 ms. */
.a-splash { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: #000; animation: a-splash-out 0.3s ease-in-out 1.1s forwards; }
.a-splash img { width: 180px; height: auto; animation: a-logo-in 0.6s cubic-bezier(0.33, 1, 0.68, 1) both; }
@keyframes a-logo-in { from { opacity: 0; scale: 0.92; } }
@keyframes a-splash-out { to { opacity: 0; } }

/* Home: white with the dot grid (one #ececec dot of r 1.5 every 24). */
.a-home { position: absolute; inset: 0; background-color: #fff; background-image: radial-gradient(#ececec 1.5px, transparent 1.6px); background-size: 24px 24px; }
.a-hero { position: relative; z-index: 2; background: #000; border-radius: 0 0 32px 32px; overflow: visible; color: #fff; padding-bottom: 22px; } /* tighter than the app (38) so the landing shows more below the hero (Georgina, 27 Nov 2026) */
.a-water { position: absolute; inset: 0; border-radius: 0 0 32px 32px; overflow: hidden; }
.a-water i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--water); transition: height 0.7s cubic-bezier(0.33, 1, 0.68, 1); }
.a-home.in .a-water i { height: calc(var(--lvl) * 100%); }
/* After a meal: script drives the level frame by frame (Liquid.tsx: 700 ms), so no CSS easing on top. */
.a-home.live .a-water i { transition: none; }
.a-hero-text { position: relative; }
/* The ink copy of the hero text, clipped to the water: dark over the yellow and orange (heroText.ts), white otherwise. */
.a-ink { position: absolute; inset: 0; color: var(--ink); pointer-events: none; clip-path: inset(calc((1 - var(--lvl)) * 100%) 0 0 0); }
.a-home:not(.live) .a-ink { visibility: hidden; } /* identical to the white text until the level moves */
.a-ink .a-logo, .a-ink .a-chips, .a-ink .a-percent { visibility: hidden; }
.a-cally { transition: scale 0.14s ease; }
.a-cally.dip { scale: 0.94; transition-duration: 0.09s; }
/* TappableMascot's bubble: white, radius 16, 15 pt semibold, a 12 pt tail, at Cally's top right (left 0.68 and bottom
   0.9 of Cally). In over 200 ms from 85% and 6 pt lower; out over 250 ms. */
.a-bubble { position: absolute; z-index: 3; left: calc(50% - 76.5px + 104px); bottom: calc(-17px + 84px); min-height: 36px; display: flex; align-items: center; padding: 6px 12px; border-radius: 16px; background: #fff; color: #000; font-size: 15px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); opacity: 0; scale: 0.85; translate: 0 6px; transition: opacity 0.25s ease, scale 0.25s ease, translate 0.25s ease; }
.a-bubble::after { content: ""; position: absolute; left: 14px; bottom: -5px; width: 12px; height: 12px; border-radius: 2px; background: #fff; rotate: 45deg; }
.a-bubble.on { opacity: 1; scale: 1; translate: 0 0; transition-duration: 0.2s; }
.a-header { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 62px 16px 4px; }
.a-logo { width: 87px; height: 67px; }
.a-chips { display: flex; gap: 4px; }
.a-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 999px; background: #2c2c2c; border: 1px solid #1f1f1f; color: #fff; font-size: 15px; font-weight: 600; }
.a-chip-round { padding: 0; justify-content: center; width: 44px; }
.a-percent { position: relative; width: max-content; margin: 0 auto; padding: 4px 12px; border-radius: 999px; background: #fff; color: #000; font-size: 15px; font-weight: 500; }
.a-kcal { position: relative; text-align: center; font-size: 48px; font-weight: 600; margin: 2px 0 12px; letter-spacing: -0.01em; }
.a-band { position: relative; display: flex; align-items: flex-end; padding: 0 32px; gap: 153px; }
.a-band div { flex: 1; display: grid; justify-items: center; gap: 2px; }
.a-band div > span { font-size: 13px; font-weight: 500; }
.a-band b { font-size: 22px; font-weight: 600; }
.a-cally { position: absolute; left: 50%; bottom: -22px; width: 153px; height: auto; translate: -50% 0; }
.a-list { padding: 0 16px; }
.a-macros { display: flex; gap: 16px; margin: 40px 0 20px; }
.a-macro { flex: 1; display: grid; gap: 8px; }
.a-macro-label { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #757575; }
.a-macro-label img { height: 20px; width: auto; }
.a-track { height: 8px; border-radius: 4px; background: #eee; overflow: hidden; }
.a-fill { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 0.7s cubic-bezier(0.33, 1, 0.68, 1) 0.2s; }
.a-home.live .a-fill { transition: width 0.7s cubic-bezier(0.45, 0, 0.55, 1); } /* MacroBar.tsx: 700 ms, ease in and out */
.a-home.in .a-fill { width: calc(var(--f) * 100%); }
.a-fill-protein { background: #f45143; } .a-fill-carbs { background: #dd7219; } .a-fill-fat { background: #738819; }
.a-macro-value b { font-size: 17px; font-weight: 700; }
.a-macro-value span { font-size: 17px; font-weight: 600; color: #757575; }
.a-tip { background: #daebfe; border-radius: 24px; padding: 16px; display: grid; gap: 8px; }
.a-tip-head { display: flex; align-items: center; gap: 6px; color: #0b6fd0; font-size: 15px; font-weight: 500; }
.a-tip p { margin: 0; font-size: 17px; font-weight: 500; line-height: 24px; }
.a-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 133px; background: linear-gradient(rgba(255, 255, 255, 0), #fff 61%); }
.a-input { position: absolute; left: 20px; right: 20px; bottom: 96px; display: flex; align-items: center; gap: 8px; padding: 8px; background: #fff; border: 1px solid #e1e1e1; border-radius: 32px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2); }
.a-plus, .a-send { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.a-plus { background: #fff; border: 1px solid #e1e1e1; }
.a-send { background: #eee; }
.a-placeholder { flex: 1; font-size: 17px; color: #757575; }
/* The tab bar is native iOS (tint #0088ff, icons from assets/tabs); its exact metrics are not in the app code. */
.a-tabs { position: absolute; left: 16px; right: 16px; bottom: 22px; height: 62px; display: flex; justify-content: space-around; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); font-size: 10px; font-weight: 600; color: #000; }
.a-tabs span { display: grid; justify-items: center; gap: 2px; }
.a-tabs img { width: 26px; height: 26px; }
.a-tabs .on { color: #0088ff; }
.a-tabs .on img { filter: invert(36%) sepia(98%) saturate(2400%) hue-rotate(196deg) brightness(102%); }

/* Meal sheet: white, top radius 28, over a 25% dim, slides up over 320 ms; full height for a new meal. */
.a-sheet-wrap { position: absolute; inset: 0; z-index: 3; }
.a-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.25); opacity: 0; transition: opacity 0.32s ease; }
.a-sheet { position: absolute; left: 0; right: 0; bottom: 0; top: 54px; background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.2); translate: 0 100%; transition: translate 0.32s cubic-bezier(0.33, 1, 0.68, 1); display: flex; flex-direction: column; }
.a-sheet-wrap.in .a-dim { opacity: 1; }
.a-sheet-wrap.in .a-sheet { translate: 0 0; }
.a-grabber { width: 36px; height: 5px; border-radius: 3px; background: #dfdfdf; margin: 8px auto 21px; }
.a-sheet-head { display: flex; align-items: flex-start; gap: 8px; padding: 17px 16px 8px; }
.a-titles { flex: 1; min-width: 0; }
.a-title { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.15; }
.a-stamp { margin: 4px 0 0; font-size: 15px; color: #5c5c5c; }
.a-round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #e1e1e1; background: #fff; }
.a-done { position: relative; padding: 0; font: inherit; transition: background-color 0.3s ease, border-color 0.3s ease, scale 0.14s ease; }
.a-done > span { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 0.3s ease; }
.a-done .a-check { opacity: 0; }
/* Ready: blue with the white check (colors.blueStrong), then a light sweep across it and a soft ring, landing page only,
   so it is plain that the next step is to tap it. */
.a-done.ready { background: #2f92e8; border-color: #2f92e8; cursor: pointer; animation: a-ring 2s ease-out 0.4s infinite; }
.a-done.ready .a-x { opacity: 0; }
.a-done.ready .a-check { opacity: 1; overflow: hidden; border-radius: 50%; }
.a-done.ready .a-check::after { content: ""; position: absolute; inset: -20%; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%); translate: -100% 0; animation: a-shimmer 2s ease-in-out 0.4s infinite; }
.a-done:disabled .a-check::after { animation: none; }
@keyframes a-shimmer { 0% { translate: -100% 0; } 45%, 100% { translate: 100% 0; } }
@keyframes a-ring { 0% { box-shadow: 0 0 0 0 rgba(47, 146, 232, 0.5); } 70%, 100% { box-shadow: 0 0 0 12px rgba(47, 146, 232, 0); } }
.a-done:disabled { animation: none; }
.a-done.press { scale: 0.94; transition-duration: 0.09s; }
.a-chat { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.a-chat > * { flex: none; }
/* Several photos: the app's PhotoCarousel at rest. A 476 by 340 stage scaled to the carousel width; 206 by 292 cards
   with corner 20 on a ring (orbit 138); the back of the ring smaller and higher; each card tilted its own way and
   drifting gently (PhotoCarousel.tsx). Right aligned, flush with the chat's right edge (app-screens.js pulls the stage right). */
.a-carousel { position: relative; align-self: flex-end; width: var(--cw); height: calc(var(--cw) * 340 / 476); margin-top: 8px; }
.a-card { position: absolute; left: calc(var(--k) * 135px); top: calc(var(--k) * 24px); width: calc(var(--k) * 206px); height: calc(var(--k) * 292px); }
.a-card > div { position: absolute; inset: 0; animation: a-bob var(--period) ease-in-out infinite alternate; }
.a-card img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--k) * 20px); background: #fff; box-shadow: 0 10px 14px rgba(0, 0, 0, 0.28); }
@keyframes a-bob { from { translate: 0 calc(var(--k) * -2.4px); rotate: -0.21deg; } to { translate: 0 calc(var(--k) * 2.4px); rotate: 0.21deg; } }
.a-coach { position: relative; margin-top: 52px; background: #daebfe; border-radius: 12px; padding: 28px 16px 16px; display: grid; gap: 16px; }
.a-coach-cally { position: absolute; left: 16px; top: -48px; width: 72px; height: auto; }
.a-say { position: absolute; left: 96px; top: -26px; min-height: 36px; padding: 8px 12px; border-radius: 16px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); font-size: 15px; font-weight: 600; opacity: 0; transition: opacity 0.25s ease 0.15s; }
.a-sheet-wrap.in .a-say { opacity: 1; }
.a-working { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.a-working b { font-weight: 600; }
.a-dots { display: flex; gap: 6px; height: 24px; align-items: center; }
.a-dots i { width: 8px; height: 8px; border-radius: 50%; background: #5c5c5c; animation: a-dot 0.8s infinite; }
.a-dots i:nth-child(2) { animation-delay: 0.16s; } .a-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes a-dot { 0%, 100% { opacity: 0.3; } 37.5% { opacity: 1; } 75% { opacity: 0.3; } }
.a-skeleton { display: grid; gap: 4px; }
.a-skeleton i { display: block; height: 48px; border-radius: 12px; background: linear-gradient(90deg, #fff 40px, transparent 40px) left center / 100% 40px no-repeat, #fff; opacity: 0.45; animation: a-pulse 0.7s ease-in-out infinite alternate; }
.a-skeleton i { background: #fff; }
.a-skeleton i:nth-child(2) { animation-delay: 0.14s; } .a-skeleton i:nth-child(3) { animation-delay: 0.28s; }
@keyframes a-pulse { to { opacity: 1; } }
.a-reply, .a-rows, .a-leave, .a-summary { display: none; }
.a-sheet-wrap.done .a-leave { display: block; margin: 0; font-size: 17px; line-height: 24px; animation: a-in 0.3s ease 0.15s both; }
.a-sheet-wrap.done .a-working, .a-sheet-wrap.done .a-skeleton { display: none; }
.a-sheet-wrap.done .a-reply { display: block; margin: 0; font-size: 17px; line-height: 24px; animation: a-in 0.25s ease both; }
.a-sheet-wrap.done .a-rows { display: grid; gap: 4px; }
.a-row { display: flex; align-items: center; gap: 12px; min-height: 48px; animation: a-up 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(0.35s + var(--i) * 0.12s); }
.a-food { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.a-food img { width: 72%; height: 72%; object-fit: contain; }
.a-name { flex: 1; font-size: 17px; font-weight: 500; }
.a-qty { font-size: 15px; color: #5c5c5c; }
.a-kc { min-width: 76px; text-align: right; font-size: 15px; font-weight: 600; }
.a-sheet-wrap.done .a-summary { position: relative; display: flex; align-items: center; gap: 16px; margin-top: -8px; min-height: 73px; padding: 8px 84px 8px 16px; border-radius: 12px; background: #000; color: #fff; animation: a-in 0.3s ease 0.45s both; }
.a-summary > div:first-child { display: grid; gap: 4px; }
.a-summary span { font-size: 13px; font-weight: 500; }
.a-summary b { font-size: 22px; font-weight: 600; }
.a-macros-s { display: flex; gap: 16px; }
.a-macros-s div { display: grid; gap: 4px; }
.a-macros-s b { font-size: 17px; }
.a-summary-cally { position: absolute; right: -4px; bottom: -7px; width: 84px; height: auto; }
.a-input-sheet { position: static; margin: 0 16px 16px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2); }
@keyframes a-in { from { opacity: 0; } }
@keyframes a-up { from { opacity: 0; translate: 0 8px; } }
@media (prefers-reduced-motion: reduce) { .app-canvas *, .app-canvas *::before { animation: none !important; transition: none !important; } }

.a-single { align-self: flex-end; width: 190px; height: 190px; object-fit: cover; border-radius: 10px; rotate: -6deg; margin-top: 8px; box-shadow: 0 4px 7px rgba(0, 0, 0, 0.13); }

/* The Meals tab (app/(tabs)/meals.tsx, ScreenHeader.tsx, HeaderChips.tsx, MealRow.tsx, PhotoStack.tsx, PhotoTile.tsx). */
.a-meals { position: absolute; inset: 0; z-index: 2; background-color: #fff; background-image: radial-gradient(#ececec 1.5px, transparent 1.6px); background-size: 24px 24px; }
.a-mhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; padding: 62px 16px 12px; box-sizing: content-box; }
.a-mhead h3 { margin: 0; font-size: 28px; font-weight: 600; }
.a-chips-light .a-chip { background: rgba(255, 255, 255, 0.58); border-color: #e0e0e0; color: #000; box-shadow: 0 4px 4.5px rgba(0, 0, 0, 0.06); }
.a-mband-wrap { position: relative; z-index: 1; margin: 0 16px; }
.a-mband { display: flex; align-items: center; column-gap: 4px; min-height: 73px; padding: 8px 84px 8px 16px; border-radius: 12px; transition: color 0.3s ease; }
.a-mk { display: grid; gap: 1px; }
.a-mm { display: flex; column-gap: 12px; margin-left: auto; }
.a-mm div { display: grid; gap: 1px; }
.a-mband span:not([data-k]) { font-size: 13px; font-weight: 500; line-height: 1.15; }
.a-mband { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); } /* white on orange is thin on contrast: a soft shadow keeps it readable */
.a-mk b { font-size: 22px; font-weight: 600; line-height: 1.15; }
.a-mm b { font-size: 17px; font-weight: 600; line-height: 1.15; }
.a-mband-cally { position: absolute; right: -4px; bottom: -10px; width: 84px; height: auto; }
.a-mlist { display: grid; gap: 12px; padding: 16px; }
.a-row-meal { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 110px; }
.a-row-meal.enter { animation: a-in 0.25s ease both; }
.a-row-text { display: grid; gap: 8px; min-width: 0; }
.a-row-title { margin: 0; font-size: 17px; font-weight: 500; line-height: 24px; }
.a-row-stats { display: flex; align-items: center; gap: 4px; color: #0b6fd0; font-size: 15px; font-weight: 500; }
.a-row-photo { flex: none; width: 95px; height: 95px; display: grid; place-items: center; }
.a-stack { position: relative; width: 89px; height: 89px; }
.a-stack span { position: absolute; inset: 0; }
.a-stack img { width: 89px; height: 89px; object-fit: cover; border-radius: 10px; background: #fff; box-shadow: 0 4px 7px rgba(0, 0, 0, 0.13); }
.a-tabs-top { z-index: 5; } /* the tab bar stays put while the screens swipe under it */

/* The still sheet on the page: already in place, nothing moves. */
.a-sheet-wrap.still .a-dim, .a-sheet-wrap.still .a-sheet { transition: none; }
.a-sheet-wrap.still * { animation: none !important; }
.a-sheet-wrap.still.done .a-leave { display: none; } /* the still has room for the photos and the portions, so it leaves out the skip line */
.a-sheet-wrap.still .a-chat { scroll-behavior: auto; gap: 12px; padding-top: 8px; }
/* The still is a real iPhone (402 by 874), so the photo shrinks to fit the portions and the totals under it. */
.a-sheet-wrap.still .a-single { width: 110px; height: 110px; margin-top: 4px; }
.a-sheet-wrap.still .a-coach { margin-top: 48px; }
.a-sheet-wrap.still .a-coach-2 { margin-top: 0; }
.a-sheet-wrap.still .a-grabber { margin-bottom: 12px; }
.a-sheet-wrap.still .a-sheet-head { padding-top: 8px; }
.a-total { white-space: nowrap; }

/* Your message in the correction still: cream, right aligned, like the typed meal in the app. */
.a-you { display: flex; justify-content: flex-end; }
.a-you p { margin: 0; padding: 10px 16px; border-radius: 22px; background: #fef1da; font-size: 17px; line-height: 24px; max-width: 80%; }
.a-coach-2 { padding-top: 16px; }
.a-coach-2 .a-coach-cally { display: none; }

/* The check is the only way on in the demo and draws small on a phone: give it a bigger invisible hit area (the dots button beside it keeps its own). */
.a-done::before { content: ""; position: absolute; inset: -16px -14px -16px -4px; }

.a-home.no-ease .a-water i, .a-home.no-ease .a-fill { transition: none; } /* Home starts already filled in, no animation */
