/* DXB Menus · guest app. Three looks (paper, dark, minimal) plus each venue's accent colour. */
:root{
  --accent:#C2124F; --on-accent:#FFFFFF;
  --bg:#2B2420; --page:#FBF8F4; --ink:#1C1A1F; --mute:#5E5862; --line:#E5DCD1; --chip:#F1E7DC; --card:#FFFFFF;
  --chrome:#FBF8F4; --chrome-mute:#CFC3B6; --chrome-chip:#3D3430;
  --serif:"Fraunces", Georgia, serif; --sans:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --ar:"Noto Kufi Arabic", "Plus Jakarta Sans", sans-serif;
  color-scheme:light;
}
html[data-style="dark"]{--bg:#0E0D12; --page:#17151D; --ink:#F3F0F8; --mute:#B3ACC2; --line:#2C2836; --chip:#24212C; --card:#1D1A25; --chrome:#F3F0F8; --chrome-mute:#9A93AB; --chrome-chip:#24212C; color-scheme:dark}
html[data-style="minimal"]{--bg:#F2F2F0; --page:#FFFFFF; --ink:#151515; --mute:#5C5C5C; --line:#E6E6E3; --chip:#F2F2F0; --card:#FFFFFF; --chrome:#151515; --chrome-mute:#5C5C5C; --chrome-chip:#E6E6E3}
*{box-sizing:border-box;margin:0;padding:0}
html,body{min-height:100%;background:var(--bg);color:var(--ink);font-family:var(--sans);-webkit-font-smoothing:antialiased}
body{padding-bottom:env(safe-area-inset-bottom)}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
[dir="rtl"]{font-family:var(--ar)}
.app{max-width:560px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
.loading,.fatal{padding:80px 24px;text-align:center;color:var(--chrome-mute);font-size:16px;line-height:1.6}
.fatal h1{font-family:var(--serif);color:var(--chrome);font-size:28px;margin-bottom:10px}

/* header */
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 10px;color:var(--chrome)}
.brand{display:flex;align-items:center;gap:10px;min-width:0}
.brand img,.brand .mono{width:40px;height:40px;border-radius:12px;object-fit:cover;flex:none;background:var(--page);color:var(--ink);display:grid;place-items:center;font:700 14px var(--sans)}
.brand b{font-family:var(--serif);font-size:19px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.who{font-size:13px;font-weight:700;padding:8px 12px;border-radius:999px;background:var(--chrome-chip);color:var(--chrome);white-space:nowrap}
.preview{margin:0 16px 8px;padding:8px 12px;border-radius:10px;background:#FFF4CC;color:#5A4300;font-size:13px;font-weight:600}

/* welcome */
.welcome{flex:1;background:var(--page);margin:6px 12px 12px;border-radius:26px;padding:26px 22px;display:flex;flex-direction:column;gap:18px}
.welcome h1{font-family:var(--serif);font-size:30px;line-height:1.1}
.welcome p{color:var(--mute);line-height:1.55}
.hero{height:200px;border-radius:20px;background:linear-gradient(140deg,var(--accent),#2B2420);display:grid;place-items:center;color:#fff;font-family:var(--serif);font-size:42px;overflow:hidden}
.hero img{width:100%;height:100%;object-fit:cover}
.field{display:flex;flex-direction:column;gap:8px}
.field label{font-weight:700;font-size:14px}
.field input,.field textarea{padding:15px 16px;border-radius:14px;border:2px solid var(--line);background:var(--card);font-size:17px}
.field input:focus,.field textarea:focus{border-color:var(--ink);outline:none}
.err{color:#B42318;font-size:14px;font-weight:600}
html[data-style="dark"] .err{color:#FF8A80}
.others{display:flex;flex-wrap:wrap;gap:8px}
.others span{font-size:14px;padding:8px 12px;border-radius:999px;background:var(--chip)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:0;border-radius:16px;padding:16px 20px;font-weight:700;font-size:16px;background:var(--accent);color:var(--on-accent);text-decoration:none;min-height:52px}
.btn.wide{width:100%}
.btn.ghost{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--ink)}
.btn.soft{background:var(--chip);color:var(--ink)}
.btn:disabled{opacity:.55;cursor:default}
.lang{display:flex;justify-content:center;gap:8px}
.lang button{border:0;background:transparent;padding:8px 12px;border-radius:999px;font-size:14px;color:var(--mute)}
.lang button[aria-pressed="true"]{background:var(--chip);color:var(--ink);font-weight:700}

/* menu controls */
.bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 16px 10px}
.seg{display:flex;gap:4px;background:var(--chrome-chip);border-radius:999px;padding:4px}
.seg button{border:0;background:transparent;color:var(--chrome-mute);font-size:13px;font-weight:600;padding:8px 12px;border-radius:999px}
.seg button[aria-pressed="true"]{background:var(--page);color:var(--ink);font-weight:700}
.cats{display:flex;gap:8px;overflow-x:auto;padding:0 16px 12px;scrollbar-width:none}
.cats::-webkit-scrollbar{display:none}
.cats button{flex:none;border:0;border-radius:999px;padding:9px 14px;font-size:14px;background:var(--chrome-chip);color:var(--chrome);white-space:nowrap}
.cats button[aria-pressed="true"]{background:var(--accent);color:var(--on-accent);font-weight:700}

/* the flipbook */
.book{position:relative;flex:1;margin:0 12px;perspective:1800px;min-height:520px}
.page{position:absolute;inset:0;background:var(--page);border-radius:6px 20px 20px 6px;padding:22px 20px 56px;overflow:hidden;
  box-shadow:-5px 0 0 color-mix(in srgb,var(--page) 82%,#000),-10px 0 0 color-mix(in srgb,var(--page) 68%,#000),0 22px 50px rgba(0,0,0,.35);
  transform-origin:left center;transform-style:preserve-3d;backface-visibility:hidden;will-change:transform}
.page.under{z-index:1}
.page.top{z-index:2}
.page.turn{transition:transform .65s cubic-bezier(.3,.6,.2,1),box-shadow .65s ease;transform:rotateY(-172deg);box-shadow:none}
.page.in{transform:rotateY(-172deg)}
.page.in.go{transition:transform .65s cubic-bezier(.3,.6,.2,1);transform:rotateY(0)}
@media (prefers-reduced-motion:reduce){.page.turn,.page.in.go{transition:none}}
.page::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(0,0,0,.08),transparent 9%)}
.page-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:14px}
.page-head h2{font-family:var(--serif);font-size:26px;line-height:1.1}
.page-head span{font-size:13px;color:var(--mute);white-space:nowrap}
.cover{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:14px;height:100%}
.cover .logo{width:84px;height:84px;border-radius:24px;object-fit:cover;background:var(--accent);color:#fff;display:grid;place-items:center;font:700 26px var(--sans)}
.cover h2{font-family:var(--serif);font-size:38px;line-height:1.05}
.cover p{color:var(--mute);line-height:1.5;max-width:30ch}
.cover ol{list-style:none;display:flex;flex-direction:column;gap:6px;margin-top:10px;width:100%;max-width:280px}
.cover li button{width:100%;display:flex;justify-content:space-between;border:0;border-bottom:1px dashed var(--line);background:transparent;padding:10px 2px;font-size:16px;font-weight:600;color:var(--ink)}
.feature{height:150px;border-radius:14px;overflow:hidden;margin-bottom:12px;background:var(--chip)}
.feature img{width:100%;height:100%;object-fit:cover;display:block}
.dish{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;border:0;background:transparent;padding:12px 0;border-bottom:1px dashed var(--line);color:var(--ink)}
.dish:last-child{border-bottom:0}
.dish .t{display:flex;flex-direction:column;gap:3px;min-width:0}
.dish .t b{font-size:16px}
.dish .t small{font-size:13px;color:var(--mute);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dish .ar{font-family:var(--ar);font-size:14px;color:var(--mute)}
.dish .p{display:flex;align-items:center;gap:10px;flex:none}
.dish .p b{font-size:15px;white-space:nowrap}
.plus{width:34px;height:34px;border-radius:10px;background:var(--ink);color:var(--page);display:grid;place-items:center;font-size:20px;line-height:1}
.dish.off{opacity:.5}
.badge{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--accent);margin-left:6px}
.thumb{width:58px;height:58px;border-radius:12px;object-fit:cover;flex:none;background:var(--chip)}
.corner{position:absolute;right:0;bottom:0;width:62px;height:62px;border:0;border-radius:0 0 20px 0;background:linear-gradient(135deg,transparent 50%,color-mix(in srgb,var(--page) 80%,#000) 50%);z-index:3}
.corner.prev{left:0;right:auto;border-radius:0 0 0 6px;background:linear-gradient(225deg,transparent 50%,color-mix(in srgb,var(--page) 85%,#000) 50%)}
.pageno{position:absolute;left:0;right:0;bottom:18px;text-align:center;font-size:12px;color:var(--mute)}
.hint{text-align:center;font-size:13px;color:var(--chrome-mute);padding:10px 16px}

/* list view */
.list{margin:0 12px;background:var(--page);border-radius:20px;padding:6px 18px 12px}
.list h2{font-family:var(--serif);font-size:22px;padding:16px 0 4px}
.list .dish{gap:12px}

/* basket bar + nav */
.dock{position:sticky;bottom:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:8px;background:linear-gradient(transparent,var(--bg) 30%)}
.basketbar{display:flex;justify-content:space-between;align-items:center;border:0;border-radius:16px;padding:15px 18px;background:var(--accent);color:var(--on-accent);font-weight:700;font-size:16px;min-height:54px}
.tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;background:var(--chrome-chip);border-radius:16px;padding:5px}
.tabs button{border:0;background:transparent;color:var(--chrome-mute);border-radius:12px;padding:11px 6px;font-weight:600;font-size:14px;position:relative}
.tabs button[aria-current="page"]{background:var(--page);color:var(--ink);font-weight:800}
.tabs .dot{position:absolute;top:6px;right:14px;width:8px;height:8px;border-radius:50%;background:var(--accent)}

/* table + bill panels */
.panel{margin:4px 12px 12px;background:var(--page);border-radius:24px;padding:22px 18px;display:flex;flex-direction:column;gap:14px;flex:1}
.panel h1{font-family:var(--serif);font-size:26px;line-height:1.1}
.panel .lead{color:var(--mute);font-size:14px;line-height:1.5;margin-top:-6px}
.person{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:15px;display:flex;flex-direction:column;gap:8px}
.person.me{border:2px solid var(--ink)}
.person .h{display:flex;justify-content:space-between;align-items:center;gap:8px}
.person .h b{font-size:16px}
.line{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;font-size:14px}
.line small{display:block;color:var(--mute);font-size:12px}
.st{align-self:flex-start;flex:none;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;padding:4px 8px;border-radius:999px;background:var(--chip);color:var(--mute);white-space:nowrap}
.st.preparing{background:#FFF1D6;color:#7A4B00}.st.ready{background:#DDF3E6;color:#145A36}.st.served{background:var(--chip);color:var(--mute)}.st.new{background:#E7E5FF;color:#3A2D99}
.paidtag{font-size:12px;font-weight:800;padding:5px 9px;border-radius:999px;background:#DDF3E6;color:#145A36}
.total{display:flex;justify-content:space-between;font-size:15px;padding:0 4px}
.status{display:flex;gap:10px;align-items:center;padding:13px 14px;border-radius:14px;background:var(--chip);font-size:14px;font-weight:600}
.row2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.receipt{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:10px}
.receipt hr{border:0;border-top:1px solid var(--line)}
.receipt .sum{display:flex;justify-content:space-between;align-items:baseline}
.receipt .sum b:last-child{font-family:var(--serif);font-size:26px}
.receipt .sm{font-size:14px;color:var(--mute)}
.tips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tips button{border:1px solid var(--line);background:var(--card);border-radius:12px;padding:12px 0;font-size:14px;color:var(--ink)}
.tips button[aria-pressed="true"]{background:var(--ink);color:var(--page);border-color:var(--ink);font-weight:700}
.thanks{text-align:center;padding:22px;border-radius:18px;background:#DDF3E6;color:#145A36;font-weight:700;line-height:1.5}
.empty{color:var(--mute);font-size:14px;text-align:center;padding:16px}

/* bottom sheet */
.sheet{position:fixed;inset:0;z-index:20;background:rgba(10,8,12,.55);display:flex;align-items:flex-end;justify-content:center}
.sheet[hidden]{display:none}
.sheet .box{width:100%;max-width:560px;max-height:92vh;max-height:92dvh;overflow-y:auto;background:var(--page);color:var(--ink);border-radius:26px 26px 0 0;padding-bottom:env(safe-area-inset-bottom);animation:up .28s ease}
@keyframes up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.sheet .box{animation:none}}
.sheet .photo{height:240px;background:var(--chip);position:relative}
.sheet .photo img{width:100%;height:100%;object-fit:cover;display:block}
.sheet .x{position:absolute;right:14px;top:14px;width:44px;height:44px;border-radius:14px;border:0;background:var(--page);color:var(--ink);font-size:22px}
.sheet .x.flat{position:static}
.sheet .in{padding:20px 20px 24px;display:flex;flex-direction:column;gap:16px}
.sheet h2{font-family:var(--serif);font-size:26px;line-height:1.1}
.sheet .row{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.sheet .desc{color:var(--mute);line-height:1.5;font-size:15px}
.opt legend{font-weight:700;font-size:14px;margin-bottom:8px}
.opt .req{font-weight:600;color:var(--mute);font-size:12px;margin-left:6px}
.opt{border:0;display:flex;flex-direction:column;gap:8px}
.opt label{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 14px;border-radius:14px;border:1px solid var(--line);background:var(--card);font-size:15px}
.opt label:has(input:checked){border:2px solid var(--ink);font-weight:700}
.opt input{width:18px;height:18px;accent-color:var(--accent);margin-right:8px}
.qty{display:flex;align-items:center;gap:14px;border:1px solid var(--line);border-radius:14px;padding:5px;background:var(--card)}
.qty button{width:44px;height:44px;border:0;border-radius:10px;background:var(--chip);font-size:20px}
.qty b{min-width:20px;text-align:center}
.foot{display:flex;gap:10px;align-items:center}
.foot .btn{flex:1}
.bline{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.bline small{display:block;color:var(--mute);font-size:13px}
.toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%);z-index:30;background:#1C1A1F;color:#fff;padding:12px 18px;border-radius:14px;font-weight:600;font-size:14px;max-width:90vw;box-shadow:0 10px 30px rgba(0,0,0,.3)}
