.app { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--fb-bg); position: relative; padding-bottom: 84px; }
.app.no-nav { padding-bottom: 0; }

/* ---- Login ---- */
.login { min-height: 100vh; display: flex; flex-direction: column; background: var(--fb-yellow); }
.login-hero { padding: 28px 24px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; position: relative; overflow: hidden; }
.login-hero::before { content: ''; position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(circle at 50% 60%, #FFE45C 0, transparent 60%); }
.login-hero img { width: min(68vw, 280px); height: auto; position: relative; filter: drop-shadow(0 10px 18px rgba(19,18,19,.18)); }
.login-hero p { position: relative; font-weight: 800; color: var(--fb-black); }
.login-card { background: #fff; border-radius: 28px 28px 0 0; padding: 26px 22px 30px; flex: 1; box-shadow: 0 -8px 30px rgba(19,18,19,.12); }
.login-card h2 { margin-bottom: 6px; }
.dev-hint { background: var(--fb-yellow-wash); border: 1.5px dashed var(--fb-amber); border-radius: var(--fb-r); padding: 10px 12px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trust { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--fb-ink-3); margin-top: 18px; }
.trust .icon { color: var(--fb-green); width: 18px; height: 18px; }

/* ---- Top bar ---- */
.topbar { background: var(--fb-yellow); padding: 14px 16px 16px; position: sticky; top: 0; z-index: 20; border-radius: 0 0 22px 22px; box-shadow: 0 4px 0 var(--fb-amber); }
.addr-btn { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: start; min-width: 0; }
.addr-btn .k { font-size: 12px; font-weight: 800; color: rgba(19,18,19,.65); }
.addr-btn .v { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 2px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--fb-black); color: var(--fb-yellow); display: grid; place-items: center; font-weight: 800; font-family: var(--fb-font-display); border: 0; cursor: pointer; font-size: 17px; flex: none; }
.search { margin-top: 12px; position: relative; }
.search .icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--fb-ink-3); }
.search input { padding-inline-start: 44px; border: 2px solid var(--fb-black); box-shadow: 0 3px 0 var(--fb-black); }
.page { padding: 16px; }

/* ---- Categories ---- */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 18px; }
.cat { background: #fff; border: 2px solid transparent; border-radius: 18px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-weight: 800; font-size: 12.5px; box-shadow: var(--fb-shadow-1); }
.cat.active { border-color: var(--fb-black); background: var(--fb-yellow-wash); box-shadow: 0 3px 0 var(--fb-black); }

/* ---- Offer banner ---- */
.offer { background: var(--fb-black); color: #fff; border-radius: 22px; padding: 18px 18px 18px; display: flex; align-items: center; gap: 12px; position: relative; overflow: hidden; margin-bottom: 22px; min-height: 128px; }
.offer::after { content: ''; position: absolute; inset-inline-end: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; background: var(--fb-yellow); opacity: .95; }
.offer .txt { position: relative; z-index: 1; flex: 1; }
.offer h3 { color: var(--fb-yellow); font-size: 20px; }
.offer img { position: relative; z-index: 1; width: 104px; height: auto; margin: -6px -6px -18px 0; }
.offer .rush-stripe { font-size: 13px; margin-top: 10px; }

/* ---- Restaurant cards ---- */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 12px; }
.rest-card { display: block; background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid var(--fb-line); box-shadow: var(--fb-shadow-1); text-decoration: none; margin-bottom: 14px; transition: transform .15s var(--fb-ease), box-shadow .15s; cursor: pointer; }
.rest-card:hover { transform: translateY(-2px); box-shadow: var(--fb-shadow-2); }
.rest-cover { height: 118px; display: grid; place-items: center; font-size: 62px; position: relative; }
.rest-cover .badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.rest-cover .eta { position: absolute; bottom: 10px; inset-inline-end: 10px; background: #fff; border-radius: var(--fb-r-pill); padding: 3px 10px; font-weight: 800; font-size: 12.5px; box-shadow: var(--fb-shadow-1); }
.rest-card.closed .rest-cover { filter: grayscale(.9); opacity: .7; }
.rest-body { padding: 12px 14px 14px; }
.rest-body h3 { font-size: 17px; }
.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--fb-ink-3); margin-top: 3px; }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--fb-ink-4); }
.rating { display: inline-flex; align-items: center; gap: 2px; color: var(--fb-black); font-weight: 800; }
.rating .icon { color: var(--fb-amber); width: 15px; height: 15px; }

/* ---- Restaurant page ---- */
.rest-hero { padding: 12px 16px 18px; position: relative; }
.rest-hero .back { position: absolute; top: 12px; inset-inline-start: 12px; background: #fff; box-shadow: var(--fb-shadow-2); z-index: 2; }
.rest-hero .emoji { height: 140px; border-radius: 22px; display: grid; place-items: center; font-size: 76px; margin-bottom: 14px; }
.menu-tabs { position: sticky; top: 0; z-index: 15; background: var(--fb-bg); padding: 10px 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--fb-line); }
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-section { padding: 18px 16px 4px; scroll-margin-top: 60px; }
.menu-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--fb-line); align-items: center; }
.menu-item:last-child { border-bottom: 0; }
.menu-item .name { font-weight: 800; }
.menu-item .desc { font-size: 13px; color: var(--fb-ink-3); margin-top: 2px; }
.menu-item .price { font-weight: 800; margin-top: 6px; }
.menu-item.off { opacity: .5; }

/* ---- Sticky bars ---- */
.cart-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; width: min(528px, calc(100% - 32px)); z-index: 30; background: var(--fb-black); color: #fff; border-radius: 18px; padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--fb-shadow-3); border: 0; cursor: pointer; text-align: start; animation: fbtoast .25s var(--fb-ease); }
.cart-bar .count { background: var(--fb-yellow); color: var(--fb-black); min-width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; }
.cart-bar .go { background: var(--fb-yellow); color: var(--fb-black); border-radius: 12px; padding: 9px 14px; font-weight: 800; font-family: var(--fb-font-display); }
.app.no-nav .cart-bar { bottom: 16px; }
.bottom-cta { position: sticky; bottom: 0; background: linear-gradient(to top, var(--fb-bg) 70%, rgba(250,248,244,0)); padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); z-index: 10; }
.active-banner { display: flex; align-items: center; gap: 12px; background: var(--fb-red); color: #fff; padding: 12px 14px; border-radius: 18px; margin-bottom: 16px; cursor: pointer; border: 0; width: 100%; text-align: start; box-shadow: 0 4px 0 #A80100; }
.active-banner img { width: 44px; height: 44px; border-radius: 50%; background: var(--fb-yellow); object-fit: cover; }

/* ---- Bottom nav ---- */
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; background: #fff; border-top: 1px solid var(--fb-line); display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 40; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: 12px; font-weight: 800; color: var(--fb-ink-3); padding: 6px 0; border-radius: 14px; position: relative; }
.nav a.active { color: var(--fb-black); }
.nav a.active .icon-wrap { background: var(--fb-yellow); }
.nav .icon-wrap { width: 56px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s; }
.nav .badge-dot { position: absolute; top: 4px; inset-inline-end: calc(50% - 24px); width: 9px; height: 9px; border-radius: 50%; background: var(--fb-red); border: 2px solid #fff; }

/* ---- Cart & checkout ---- */
.pagebar { display: flex; align-items: center; gap: 8px; padding: 10px 8px; background: var(--fb-bg); position: sticky; top: 0; z-index: 15; }
.pagebar h2 { font-size: 20px; }
.box { background: #fff; border-radius: 18px; border: 1px solid var(--fb-line); padding: 14px 16px; margin-bottom: 12px; }
.box > h4 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.line { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.line.total { border-top: 1.5px dashed var(--fb-line-2); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 17px; }
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--fb-line-2); border-radius: 14px; cursor: pointer; margin-bottom: 8px; }
.pay-opt.sel { border-color: var(--fb-black); background: var(--fb-yellow-wash); box-shadow: 0 2px 0 var(--fb-black); }
.pay-opt.dis { opacity: .5; cursor: not-allowed; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--fb-line-2); flex: none; display: grid; place-items: center; }
.sel .radio { border-color: var(--fb-black); }
.sel .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--fb-black); }
.addr-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1.5px solid var(--fb-line-2); cursor: pointer; margin-bottom: 8px; width: 100%; background: #fff; text-align: start; }
.addr-opt.sel { border-color: var(--fb-black); background: var(--fb-yellow-wash); }

/* ---- Tracking ---- */
.track-hero { background: var(--fb-yellow); padding: 8px 18px 22px; border-radius: 0 0 28px 28px; box-shadow: 0 4px 0 var(--fb-amber); position: relative; overflow: hidden; }
.track-hero .mascot { position: absolute; inset-inline-end: -8px; bottom: -6px; width: 118px; }
.track-hero .bigstatus { font-family: var(--fb-font-display); font-size: 26px; font-weight: 800; line-height: 1.1; max-width: 70%; }
.eta-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--fb-black); color: var(--fb-yellow); border-radius: var(--fb-r-pill); padding: 6px 12px; font-weight: 800; margin-top: 10px; }
.progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 16px; max-width: 70%; }
.progress span { height: 6px; border-radius: 3px; background: rgba(19,18,19,.18); }
.progress span.on { background: var(--fb-black); }
.progress span.now { background: var(--fb-black); animation: fbpulse 1.4s infinite; }
.pin-card { background: var(--fb-black); color: #fff; border-radius: 20px; padding: 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pin-digits { display: flex; gap: 6px; direction: ltr; }
.pin-digits span { width: 40px; height: 50px; border-radius: 10px; background: var(--fb-yellow); color: var(--fb-black); display: grid; place-items: center; font-family: var(--fb-font-display); font-weight: 800; font-size: 28px; }
.stars { display: flex; gap: 6px; justify-content: center; margin: 10px 0; direction: ltr; }
.stars button { background: none; border: 0; cursor: pointer; color: var(--fb-line-2); padding: 2px; }
.stars button.on { color: var(--fb-amber); }
.stars .icon { width: 38px; height: 38px; }

.order-card { background: #fff; border: 1px solid var(--fb-line); border-radius: 18px; padding: 14px; margin-bottom: 12px; cursor: pointer; display: block; width: 100%; text-align: start; }
.order-card .em { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--fb-yellow-wash); flex: none; }

.lang-toggle { display: inline-flex; background: #F1EEE9; border-radius: var(--fb-r-pill); padding: 3px; }
.lang-toggle button { border: 0; background: none; padding: 6px 14px; border-radius: var(--fb-r-pill); font-weight: 800; cursor: pointer; }
.lang-toggle button.on { background: var(--fb-black); color: var(--fb-yellow); }

/* Photos */
.rest-cover.has-img { padding: 0; }
.rest-cover img, .rest-hero .emoji img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rest-cover .badges, .rest-cover .eta { z-index: 1; }
.rest-hero .emoji { position: relative; overflow: hidden; }
.rest-hero .emoji.has-img { height: 190px; }
.dish { position: relative; width: 104px; flex: none; padding-bottom: 14px; }
.dish img { width: 104px; height: 104px; object-fit: cover; border-radius: 16px; display: block; background: #F1EEE9; }
.dish-ctl { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); }
.dish-ctl .add-btn, .dish-ctl .qty { box-shadow: 0 2px 0 var(--fb-black), 0 4px 10px rgba(0,0,0,.18); }
.order-card .em { overflow: hidden; }
.order-card .em img { width: 100%; height: 100%; object-fit: cover; }
