:root { --bg:#fff; --bg-soft:#fff7ec; --panel:#fff; --text:#2b1d10; --muted:#7d6a58; --line:#f0e2d0; --accent:#f2711c; --accent-d:#d95a0b; --danger:#d93a35; --ok:#b8560a; --ink:#f2711c; --dark:#2b1d10; --sun:#ffc93c; --sun-soft:#fff6d6; --orange-soft:#ffeddc; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 "DM Sans", system-ui, -apple-system, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

header.top { padding: 26px 0 16px; background: #fff; }
header.top h1 { margin: 0; font-size: 2rem; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
header.top p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.badge { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 99px; font-size: .85rem; font-weight: 600; background: var(--bg-soft); }
.badge.open { background: var(--orange-soft); color: var(--ok); }
.badge.closed { background: #fdecea; color: var(--danger); }
.notice { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--sun-soft); font-size: .95rem; }
.notice.error { background: #fdecea; color: #8a1f1b; }

nav.cats { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 12px -8px rgba(43,29,16,.18); }
nav.cats .mtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); white-space: nowrap; }
nav.cats .mtabs::-webkit-scrollbar { display: none; }
nav.cats .mtabs[hidden] { display: none; }
nav.cats .mtabs button { flex: 0 0 auto; border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted, #6b6b6b); border-bottom: 3px solid transparent; cursor: pointer; }
nav.cats .mtabs button.active { color: var(--ink); border-bottom-color: var(--ink); }
/* Phones: the menu tabs (e.g. Evergreen Thai / VegeDelight) share the width and wrap instead of being cut off. */
@media (max-width: 600px) { nav.cats .mtabs button { flex: 1 1 0; min-width: 0; padding: 10px 6px; white-space: normal; line-height: 1.25; text-align: center; } }
/* The chip row is its own horizontal scroller; edge fades show there is more to swipe. */
.catrow { display: flex; align-items: center; gap: 6px; padding-top: 8px; padding-bottom: 8px; padding-right: 10px; }
.catscroll { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain; touch-action: pan-x pan-y; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding: 0 24px; }
.catscroll::-webkit-scrollbar { display: none; }
.catscroll.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.catscroll.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.catscroll.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
nav.cats a { flex: 0 0 auto; padding: 9px 16px; border-radius: 99px; color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 500; }
nav.cats a:hover { background: var(--bg-soft); }
.catall { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.05rem; line-height: 1; display: grid; place-items: center; }
.catall:hover { background: var(--bg-soft); }
.catlist { display: grid; gap: 2px; padding-bottom: 8px; }
.catlist a { display: flex; justify-content: space-between; padding: 13px 6px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 500; }
.catlist a span { color: var(--muted); font-weight: 400; }
.catlist a.active { color: var(--ink); font-weight: 700; }
nav.cats a.active { background: var(--ink); color: #fff; font-weight: 600; }

.layout { display: grid; grid-template-columns: 1fr; gap: 28px; padding-bottom: 110px; }
@media (min-width: 900px) { .layout { grid-template-columns: 1fr 360px; padding-bottom: 40px; } }
section.cat { padding-top: 28px; scroll-margin-top: 62px; }
section.cat h2 { margin: 0 0 2px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
section.cat > p { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
section.cat > p.cathours { display: inline-block; margin-top: -6px; padding: 3px 10px; border-radius: 999px; background: #e7f3ec; color: #145434; font-size: .85rem; font-weight: 600; }
.items { display: grid; gap: 14px; margin-top: 12px; }
@media (min-width: 640px) { .items { grid-template-columns: 1fr 1fr; } }
/* iPad landscape / small laptops: the cart sidebar takes 360px, so one dish per row reads better than two cramped ones. */
@media (min-width: 900px) and (max-width: 1099px) { .items { grid-template-columns: 1fr; } }
.item { position: relative; display: flex; gap: 12px; justify-content: space-between; align-items: stretch; width: 100%; min-height: 128px; text-align: left; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: box-shadow .15s, border-color .15s; }
.item:hover:not(:disabled) { box-shadow: 0 4px 16px rgba(0,0,0,.09); border-color: #d2d2d2; }
.item:disabled { opacity: .55; cursor: not-allowed; }
.item .info { display: flex; flex-direction: column; flex: 1; min-width: 0; padding-right: 4px; }
.item .name { font-weight: 600; font-size: 1.02rem; }
.item .price { margin-top: 2px; font-size: .95rem; color: var(--text); }
.item .desc { color: var(--muted); font-size: .88rem; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item .side { position: relative; flex: 0 0 auto; width: 104px; }
.item .side .noimg { width: 104px; height: 104px; border-radius: 10px; display: grid; place-items: center; font-size: 2rem; font-weight: 700; }
.item .side img { width: 104px; height: 104px; object-fit: cover; border-radius: 10px; }
.item .plus { position: absolute; right: 0; bottom: 0; width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); display: grid; place-items: center; font-size: 1.4rem; line-height: 1; font-weight: 500; }
.item:hover:not(:disabled) .plus, .item .plus { color: var(--ink); }
.item:hover:not(:disabled) .plus { background: var(--ink); color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag { font-size: .72rem; padding: 2px 8px; border-radius: 6px; background: var(--bg-soft); color: #5a4634; font-weight: 500; }
.tag.popular, .tag.chef { background: var(--sun); color: #5a3a00; font-weight: 600; }
.tag.spicy { background: #fdece3; color: #b5450d; }
.tag.vegan, .tag.vegetarian { background: #e6f2e8; color: #22603a; }
.name .code, .dlgname .code { color: var(--muted); font-weight: 500; font-size: .85em; margin-right: 6px; }
.name .zh, .dlgname .zh { display: block; font-weight: 500; font-size: .92em; color: var(--muted); margin-top: 1px; }
.soldout { color: var(--danger); font-size: .82rem; font-weight: 700; margin-top: 6px; }
.allergy { margin-top: 30px; padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); color: var(--muted); font-size: .9rem; }

aside.cart { display: none; }
@media (min-width: 900px) { aside.cart { display: block; position: sticky; top: 68px; align-self: start; margin-top: 28px; } }
.cart-box { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 2px 14px rgba(0,0,0,.06); }
.cart-box h3 { margin: 0 0 10px; font-size: 1.2rem; }
.cart-empty { color: var(--muted); font-size: .95rem; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.line:first-of-type { border-top: 0; }
.line .opts { color: var(--muted); font-size: .84rem; grid-column: 1 / 2; }
.line .qty { display: inline-flex; align-items: center; gap: 10px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--bg-soft); line-height: 1; font-size: 1.1rem; }
.qty button:hover { background: #e6e6e6; }
.totals { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.totals div { display: flex; justify-content: space-between; padding: 2px 0; color: var(--muted); font-size: .93rem; }
.totals div.total { color: var(--text); font-weight: 700; font-size: 1.1rem; }

.btn { display: block; width: 100%; padding: 15px 16px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; font-size: 1rem; text-align: center; }
.btn:hover:not(:disabled) { background: #333; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: var(--bg-soft); border: 0; color: var(--text); font-weight: 500; }
.btn.ghost:hover:not(:disabled) { background: #ececec; }
.linkbtn { background: none; border: 0; color: var(--text); padding: 0; text-decoration: underline; font-size: .85rem; }

.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 20px rgba(0,0,0,.1); }
@media (min-width: 900px) { .cartbar { display: none; } }

dialog { width: min(560px, 100%); max-height: 92vh; padding: 0; border: 0; border-radius: 20px; background: #fff; color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0,0,0,.5); }
@media (max-width: 600px) { dialog { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 94vh; border-radius: 20px 20px 0 0; } }
.dlg { display: flex; flex-direction: column; max-height: 92vh; }
.dlg header { padding: 22px 22px 8px; }
.dlg header h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.01em; }
.dlg header p { margin: 6px 0 0; color: var(--muted); font-size: .93rem; }
.dlg .body { padding: 4px 22px 14px; overflow-y: auto; }
.dlg footer { padding: 14px 22px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 8px; }
fieldset { border: 0; margin: 18px 0 0; padding: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 8px; font-size: 1.05rem; }
legend small { color: var(--muted); font-weight: 500; margin-left: 8px; font-size: .8rem; background: var(--bg-soft); border-radius: 6px; padding: 2px 8px; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.choice:has(input:checked) { font-weight: 600; }
.choice input { accent-color: var(--ink); margin-right: 10px; width: 18px; height: 18px; }
.choice span:first-child { display: flex; align-items: center; }
.field { margin-top: 14px; }
.field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 5px; }
.field input, .field select, .field textarea, dialog textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); }
.field input:focus, .field select:focus, .field textarea:focus, dialog textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; background: #fff; }
.field .err { color: var(--danger); font-size: .85rem; margin-top: 3px; }
.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tips button { padding: 11px 4px; border-radius: 10px; border: 0; background: var(--bg-soft); }
.tips button.on { background: var(--ink); color: #fff; font-weight: 600; }
.daypick { display: flex; gap: 8px; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.daypick button { flex: 0 0 auto; padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-weight: 500; }
.daypick button.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formerr { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: #8a1f1b; }

.menudesc { color: var(--muted, #6b6b6b); margin: 14px 0 0; }

.rewards{display:grid;gap:8px;padding:12px;border:1px solid #e5e7eb;border-radius:12px;background:#f8faf8;margin:4px 0}
.rewards .check{display:flex;gap:10px;align-items:flex-start;cursor:pointer;font-size:14px}
.rewards .check input{margin-top:3px;width:18px;height:18px;flex:none}
.rewards small{display:block;color:#6b7280;font-weight:400}

header.top { background: linear-gradient(180deg, var(--sun-soft), #fff); border-bottom: 3px solid var(--sun); }
.btn:active { background: var(--accent-d); }
.totals div.disc { color: #145434; }
