/* The menu feed: "Faseelah table". Each section opens with its own screen, then every dish is served
   onto a dark green table under warm morning light (cut-out photos, steam on hot dishes, dish-tinted light). */
.app { --night: #07140F; --c: #F6EEDD; --g: #E2C28A; --serif: 'Fraunces', Georgia, serif; --top: 118px;
  position: fixed; inset: 0; background: var(--night); color: var(--c); }
.app .backdrop { position: absolute; inset: -10%; background-size: 60% auto; background-position: center; background-repeat: no-repeat; filter: blur(70px) saturate(1.3) brightness(.5); }
.app .phone { position: relative; height: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; background: var(--night); box-shadow: 0 0 80px rgba(0, 0, 0, .6); }

/* Header */
.app .top { position: absolute; inset: 0 0 auto; z-index: 10; padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px; background: linear-gradient(rgba(7, 20, 15, .88), rgba(7, 20, 15, 0)); }
.app .top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app .brand-mini { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--c); }
.app .brand-mini img { width: 16px; height: 27px; filter: brightness(0) invert(1); }
.app .top-actions { display: flex; gap: 8px; }
.app .icon-btn, .app .lang-btn { background: rgba(7, 20, 15, .4); border: 1px solid rgba(246, 238, 221, .22); color: var(--c); backdrop-filter: blur(10px); }
.app .icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.app .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--g); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app .chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px -14px 0; padding: 0 14px 2px; scrollbar-width: none; }
.app .chips::-webkit-scrollbar { display: none; }
.app .chip { flex: none; height: 38px; padding: 0 17px; border-radius: 999px; border: 1px solid rgba(246, 238, 221, .22); background: rgba(7, 20, 15, .35); backdrop-filter: blur(10px); font-size: 14px; font-weight: 500; color: rgba(246, 238, 221, .85); white-space: nowrap; transition: .25s; }
.app .chip.on { background: linear-gradient(180deg, #F3D28E, #D9AE62); color: #2A2216; border-color: transparent; font-weight: 600; }
.at-end .app .chips { visibility: hidden; }

/* Feed */
.app .feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.app .feed::-webkit-scrollbar { display: none; }
/* Only screens near the view are drawn: 86 full-screen scenes at once used so much memory that iPhone Safari reloaded the page. */
.screen { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; isolation: isolate; content-visibility: auto; contain-intrinsic-size: auto 100dvh; }

/* The table */
.table { position: absolute; inset: 0; z-index: -3; background:
  radial-gradient(90% 60% at 50% 42%, color-mix(in srgb, var(--tint, #C9A86A) 26%, transparent) 0%, transparent 60%),
  radial-gradient(140% 90% at 50% 120%, #163828 0%, #0E2219 45%, #07140F 80%); }
.table::after { content: ''; position: absolute; inset: 0; opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.cloth { position: absolute; z-index: -2; left: -50%; right: -50%; top: 38%; height: 120%; transform: perspective(700px) rotateX(62deg); transform-origin: 50% 0; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='4.5'%3E%3Cpath d='M28 14l14 14M42 14L28 28' stroke='%23F6EEDD'/%3E%3Cpath d='M28 36l7 7 7-7' stroke='%23E2C28A'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px; -webkit-mask: linear-gradient(transparent, #000 25%, #000 60%, transparent); mask: linear-gradient(transparent, #000 25%, #000 60%, transparent); }
.beam { position: absolute; z-index: -1; top: -10%; left: 50%; width: 120%; height: 80%; transform: translateX(-50%); pointer-events: none;
  background: conic-gradient(from 180deg at 50% 0%, transparent 160deg, rgba(255, 226, 170, .10) 172deg, rgba(255, 226, 170, .16) 180deg, rgba(255, 226, 170, .10) 188deg, transparent 200deg);
  filter: blur(6px); opacity: 0; transition: opacity 1.2s .2s; }
.screen.in .beam { opacity: 1; }

/* The dish */
.plate { position: absolute; left: 50%; top: calc(var(--top) + 1vh); width: min(88vw, 45vh, 430px); aspect-ratio: 1; transform: translateX(-50%); display: grid; place-items: center; }
.plate::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 4%; height: 14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); filter: blur(8px); z-index: -1; transform: scale(.6); opacity: 0; transition: transform .7s .35s cubic-bezier(.2, .8, .2, 1), opacity .5s .3s; }
.plate img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 26px 28px rgba(0, 0, 0, .55)) saturate(1.08); transform: translateY(-50px) scale(1.08); opacity: 0; }
.screen.in .plate img { animation: serve .9s cubic-bezier(.2, .9, .3, 1.15) forwards; }
.screen.in .plate::after { transform: scale(1); opacity: 1; }
@keyframes serve { 70% { opacity: 1; } to { transform: none; opacity: 1; } }
.screen.in .plate { animation: breathe 7s 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { translate: 0 -5px; } }
.plate.tall img { width: 62%; height: 62%; margin-top: 16%; }
.plate.tall .steam { top: -2%; width: 34%; }
.plate.tall::after { left: 31%; right: 31%; bottom: 2%; }
/* A dish with a normal photo (no cut-out yet) sits in a soft rounded frame; no photo shows the brand mark. */
.plate.photo img { width: 86%; height: 86%; object-fit: cover; border-radius: 28px; }
.plate.empty img { width: 26%; height: 26%; filter: none; }
.screen.in .plate.empty img { animation: serve-dim .9s forwards; }
@keyframes serve-dim { to { transform: none; opacity: .22; } }
.dish.sold .plate img { filter: grayscale(.9) brightness(.7); }

/* Steam */
.steam { position: absolute; z-index: 2; left: 50%; top: -30%; width: 50%; height: 58%; transform: translateX(-50%); pointer-events: none; mix-blend-mode: screen; }
.steam i { position: absolute; bottom: 0; width: 20%; height: 100%; border-radius: 50%; opacity: 0;
  background: radial-gradient(38% 50% at 50% 55%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .14) 60%, rgba(255, 255, 255, 0) 75%); filter: blur(9px); }
.screen.in .steam i:nth-child(1) { left: 8%; animation: steam 4.4s 1s linear infinite; }
.screen.in .steam i:nth-child(2) { left: 36%; animation: steam 5s 2.4s linear infinite; }
.screen.in .steam i:nth-child(3) { left: 62%; animation: steam 4.1s 3.4s linear infinite; }
.screen.in .steam i:nth-child(4) { left: 24%; animation: steam 5.6s 4.2s linear infinite; }
@keyframes steam {
  0% { transform: translate(0, 45%) scale(.35, .3); opacity: 0; }
  20% { opacity: .75; }
  50% { transform: translate(30%, 0) scale(.8, .75) rotate(8deg); opacity: .5; }
  100% { transform: translate(-25%, -60%) scale(1.3, 1.15) rotate(-10deg); opacity: 0; } }
.burst { position: absolute; left: 50%; top: 32%; z-index: 4; font-size: 96px; color: #C8553D; transform: translate(-50%, -50%) scale(.2); opacity: 0; pointer-events: none; }
.burst.go { animation: burst .8s ease forwards; }
@keyframes burst { 30% { transform: translate(-50%, -50%) scale(1.1); opacity: .95; } 100% { transform: translate(-50%, -60%) scale(1); opacity: 0; } }

/* Words over the table */
.dish .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 20px calc(22px + var(--safe-b)); background: linear-gradient(rgba(7, 20, 15, 0), rgba(7, 20, 15, .78) 38%, rgba(7, 20, 15, .95)); }
.dish .info > * { opacity: 0; transform: translateY(14px); }
.screen.in .info > * { animation: up .7s cubic-bezier(.2, .8, .2, 1) forwards; }
.screen.in .info > :nth-child(1) { animation-delay: .25s; } .screen.in .info > :nth-child(2) { animation-delay: .32s; } .screen.in .info > :nth-child(3) { animation-delay: .4s; }
.screen.in .info > :nth-child(4) { animation-delay: .48s; } .screen.in .info > :nth-child(5) { animation-delay: .56s; } .screen.in .info > :nth-child(6) { animation-delay: .64s; }
@keyframes up { to { opacity: 1; transform: none; } }
.kick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag { height: 26px; padding: 0 11px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 12px; background: rgba(246, 238, 221, .12); color: rgba(246, 238, 221, .85); }
.tag.sig { background: rgba(226, 194, 138, .18); color: var(--g); }
.tag.today { background: linear-gradient(180deg, #F3D28E, #D9AE62); color: #2A2216; font-weight: 600; }
.tag.off { background: #C8553D; color: #fff; }
.dish .name { margin: 0; padding-inline-end: 64px; font-family: var(--display); font-weight: 700; font-size: clamp(23px, 6.4vw, 29px); line-height: 1.5; color: var(--c); text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }
.dish .alt { margin: 2px 0 0; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--g); }
html[lang="en"] .dish .alt { font-family: var(--ar); font-style: normal; }
.dish .desc { margin: 8px 0 0; padding-inline-end: 64px; font-size: 14.5px; line-height: 1.85; color: rgba(246, 238, 221, .82); }
.dish .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; color: rgba(246, 238, 221, .7); }
.dish .meta .dot { opacity: .5; }
.dish .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 14px; }
.dish .price { font-size: 32px; line-height: 1; color: var(--c); gap: 7px; }
.dish .price .sar { width: .62em; height: .7em; fill: var(--g); }
.pair { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; background: rgba(246, 238, 221, .08); border: 1px solid rgba(246, 238, 221, .16); font-size: 13px; color: rgba(246, 238, 221, .9); max-width: 64%; }
.pair img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.pair span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair b { color: var(--g); font-weight: 600; }

/* Side actions */
.side { position: absolute; z-index: 3; inset-inline-end: 14px; bottom: calc(150px + var(--safe-b)); display: grid; gap: 16px; justify-items: center; }
.side .act { display: grid; justify-items: center; gap: 4px; font-size: 11.5px; color: rgba(246, 238, 221, .85); }
.side .act .ic { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(7, 20, 15, .62); border: 1px solid rgba(246, 238, 221, .2); transition: .2s; }
.side .act svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side .act.like.on .ic { background: #C8553D; border-color: #C8553D; }
.side .act.like.on svg { fill: #fff; stroke: #fff; }
.side .act.pop .ic { animation: pop .35s; }

/* Section screen */
.sec .glow { position: absolute; inset: -20%; z-index: -2; background-size: 70% auto; background-position: center 40%; background-repeat: no-repeat; filter: blur(46px) saturate(1.3) brightness(.7); opacity: .9; }
.sec .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 0 24px; }
.sec .num { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--g); letter-spacing: .06em; opacity: 0; }
.sec h2 { margin: 10px 0 8px; font-family: var(--display); font-weight: 700; font-size: clamp(34px, 10vw, 50px); line-height: 1.45; color: var(--c); opacity: 0; transform: scale(.94); }
.sec .cnt { font-size: 15px; color: rgba(246, 238, 221, .7); opacity: 0; }
.sec .peek { display: flex; justify-content: center; margin-top: 26px; opacity: 0; }
.sec .peek img { width: 70px; height: 70px; object-fit: contain; margin: 0 -8px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .5)); }
.sec .line { position: absolute; left: 50%; bottom: calc(40px + var(--safe-b)); width: 1.5px; height: 46px; background: linear-gradient(rgba(226, 194, 138, 0), var(--g)); animation: drip 2s infinite; }
.sec .hint { position: absolute; left: 0; right: 0; bottom: calc(96px + var(--safe-b)); text-align: center; font-size: 12px; color: rgba(246, 238, 221, .55); }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.sec.in .num { animation: up .7s .1s forwards; }
.sec.in h2 { animation: pop-in .9s .2s cubic-bezier(.2, .8, .2, 1) forwards; }
.sec.in .cnt { animation: up .7s .45s forwards; }
.sec.in .peek { animation: up .8s .6s forwards; }
@keyframes pop-in { to { opacity: 1; transform: none; } }

/* End of the menu */
.feed-end { display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(var(--top) + 10px) 22px calc(96px + var(--safe-b)); }
.feed-end .wm { width: 120px; filter: brightness(0) invert(.94) sepia(.15); margin-top: 6px; }
.feed-end h3 { font-family: var(--display); font-weight: 700; font-size: 22px; margin: 16px 0 4px; }
.feed-end p { margin: 0; color: rgba(246, 238, 221, .7); }
.feed-end .notes { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: rgba(246, 238, 221, .8); max-width: 360px; }
.feed-end .notes li::before { content: '✦ '; color: var(--g); }
.feed-end .again { margin-top: 26px; color: var(--g); font-family: var(--display); font-weight: 600; padding: 10px 14px; }

/* My list button on the dark table */
.app ~ .mylist-btn, .mylist-btn { background: linear-gradient(180deg, #F3D28E, #D9AE62); color: #2A2216; box-shadow: 0 12px 26px -10px rgba(243, 196, 111, .7); left: 50%; right: auto; inset-inline-end: auto; transform: translateX(-50%); }
.mylist-btn.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: translateX(-50%) scale(1.12); } }
#mylistCount { background: #2A2216; color: #F3D28E; }
.mylist-btn .ml-heart { color: #C8553D; }

@media (prefers-reduced-motion: reduce) {
  .steam { display: none; }
  .plate img, .info > *, .sec .num, .sec h2, .sec .cnt, .sec .peek { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ---------- The dish flies to the tray ---------- */
.flyer { position: fixed; z-index: 60; object-fit: contain; pointer-events: none; filter: drop-shadow(0 18px 20px rgba(0, 0, 0, .5)); will-change: transform; }
.mylist-btn { padding: 0 18px 0 10px; gap: 10px; }
html[dir="rtl"] .mylist-btn { padding: 0 10px 0 18px; }
.mylist-btn.arriving { opacity: 1; }
.ml-stack { position: relative; width: 52px; height: 34px; flex: none; }
.ml-stack img { position: absolute; top: 50%; width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35));
  transform: translateY(-50%) rotate(calc((var(--i) - 1) * 9deg)); inset-inline-start: calc(var(--i) * 9px); animation: land .45s cubic-bezier(.3, 1.6, .5, 1); }
.ml-stack img:last-child { z-index: 2; }
.ml-stack i { font-style: normal; color: #C8553D; display: grid; place-items: center; height: 100%; }
@keyframes land { from { transform: translateY(-120%) scale(.6); opacity: 0; } }

/* ---------- Share sheet (when the phone cannot share a picture directly) ---------- */
.share-sheet .story { display: block; width: min(62vw, 300px); margin: 4px auto 16px; border-radius: 18px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5); }
.share-acts { display: grid; gap: 10px; }
.share-acts .btn { width: 100%; text-decoration: none; }

/* ---------- Filters ---------- */
.app .icon-btn { position: relative; }
.app #filterBtn.on { background: linear-gradient(180deg, #F3D28E, #D9AE62); border-color: transparent; }
.app #filterBtn.on svg { stroke: #2A2216; }
.f-badge { position: absolute; top: -3px; inset-inline-end: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #C8553D; color: #fff; font: 600 11px/18px var(--latin); }
.f-sub { margin: -4px 2px 14px; color: var(--muted); font-size: 13.5px; }
.f-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.f-pill { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); font-size: 14.5px; font-weight: 500; color: var(--green-d); transition: .2s; }
.f-pill span { font-size: 17px; }
.f-pill.on { background: var(--green); border-color: var(--green); color: #fff; }
.f-acts { display: grid; gap: 6px; margin-top: 20px; }
.f-acts .btn { width: 100%; }
.f-acts .btn[disabled] { opacity: .45; }
.f-acts .btn-ghost { justify-self: center; }

/* On phones the menu fills the screen, so the blurred side backdrop is never seen: don't draw it. */
@media (max-width: 520px) { .app .backdrop { display: none; } .app .phone { box-shadow: none; } }
