/* ==========================================================================
   Menuvo — Public online menu
   Themes: noir · ivory · emerald · bistro · minimal · rose
   ========================================================================== */

:root {
    --font-body: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Playfair Display", "El Messiri", Georgia, serif;
    --app-w: 560px;
    --radius: 18px;
    --radius-sm: 12px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --nav-h: 62px;
}
[dir="rtl"] { --font-body: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }

/* ---------- Theme tokens ---------- */
.theme-noir {
    --bg: #0b0b0e; --bg-2: #121216; --card: #141418; --card-2: #1a1a20;
    --text: #f4efe5; --text-2: #cfc8bb; --muted: #8f897f; --line: rgba(255, 255, 255, .08);
    --accent: #c6a15b; --accent-2: #e6cc8f; --on-accent: #17120a;
    --side: #060608; --shade: 11, 11, 14; --shadow: 0 20px 50px -25px rgba(0, 0, 0, .9);
    --chip: rgba(255, 255, 255, .06); --tab-active: var(--accent);
    --placeholder: linear-gradient(135deg, #1d1d24, #121216);
}
.theme-ivory {
    --bg: #f6f0e4; --bg-2: #efe6d4; --card: #fffaf0; --card-2: #f3ead8;
    --text: #1f1a12; --text-2: #4a4031; --muted: #8a7c66; --line: #e2d5bd;
    --accent: #8b6a35; --accent-2: #b48d4f; --on-accent: #fffaf0;
    --side: #e9dfcb; --shade: 246, 240, 228; --shadow: 0 20px 50px -28px rgba(80, 60, 20, .35);
    --chip: rgba(139, 106, 53, .08); --tab-active: var(--text);
    --placeholder: linear-gradient(135deg, #efe4cf, #e3d4b7);
}
.theme-emerald {
    --bg: #0d241d; --bg-2: #0f2a22; --card: #12302760; --card-2: #173a2f;
    --text: #eef3ee; --text-2: #c6d6cc; --muted: #8fa99c; --line: rgba(214, 178, 110, .16);
    --accent: #d6b26e; --accent-2: #ecd39c; --on-accent: #0d241d;
    --side: #07160f; --shade: 13, 36, 29; --shadow: 0 20px 50px -25px rgba(0, 0, 0, .8);
    --chip: rgba(214, 178, 110, .08); --tab-active: var(--accent);
    --placeholder: linear-gradient(135deg, #1a4234, #0f2a22);
}
.theme-emerald { --card: #12302a; }
.theme-bistro {
    --bg: #fff8ef; --bg-2: #fdeedd; --card: #ffffff; --card-2: #fff3e6;
    --text: #2a1a12; --text-2: #5a4337; --muted: #9a8172; --line: #f1e1cf;
    --accent: #e2552d; --accent-2: #f08a4b; --on-accent: #ffffff;
    --side: #f7e6d2; --shade: 255, 248, 239; --shadow: 0 18px 40px -22px rgba(120, 50, 20, .35);
    --chip: rgba(226, 85, 45, .08); --tab-active: var(--accent);
    --placeholder: linear-gradient(135deg, #ffd9bf, #ffb48a);
    --radius: 22px;
}
.theme-minimal {
    --bg: #ffffff; --bg-2: #f6f6f6; --card: #ffffff; --card-2: #f4f4f4;
    --text: #111111; --text-2: #3b3b3b; --muted: #8a8a8a; --line: #ececec;
    --accent: #111111; --accent-2: #444444; --on-accent: #ffffff;
    --side: #f2f2f2; --shade: 255, 255, 255; --shadow: 0 16px 40px -24px rgba(0, 0, 0, .25);
    --chip: #f3f3f3; --tab-active: var(--accent);
    --placeholder: linear-gradient(135deg, #f1f1f1, #e2e2e2);
    --font-display: var(--font-body);
    --radius: 14px;
}
.theme-rose {
    --bg: #fbf1ef; --bg-2: #f6e3e0; --card: #ffffff; --card-2: #fbeae7;
    --text: #3a2427; --text-2: #5f4245; --muted: #a0807f; --line: #f0d9d6;
    --accent: #b65a63; --accent-2: #d98a92; --on-accent: #ffffff;
    --side: #f3dcd8; --shade: 251, 241, 239; --shadow: 0 18px 44px -24px rgba(120, 50, 60, .35);
    --chip: rgba(182, 90, 99, .08); --tab-active: var(--accent);
    --placeholder: linear-gradient(135deg, #f7d9d6, #ecbcbc);
    --radius: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--side); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
img { display: block; max-width: 100%; }
.icon { flex-shrink: 0; }
bdi { unicode-bidi: isolate; }
.is-dark { color-scheme: dark; }

/* Desktop backdrop */
.m-backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--side); }
.m-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(40px) saturate(1.1); transform: scale(1.15); opacity: .35; }
.m-backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 40%, transparent, var(--side) 95%); }

.m-app { position: relative; z-index: 1; max-width: var(--app-w); margin: 0 auto; min-height: 100vh; background: var(--bg); box-shadow: 0 0 80px rgba(0, 0, 0, .25); overflow-x: clip; }
.theme-ivory .m-app { background-color: var(--bg); background-image: radial-gradient(rgba(139, 106, 53, .05) 1px, transparent 1px); background-size: 4px 4px; }

/* Owner bar */
.m-owner { position: relative; z-index: 6; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 16px; font-size: 12.5px; font-weight: 600; background: #17161a; color: #e9e4da; }
.m-owner span, .m-owner a { display: inline-flex; align-items: center; gap: 6px; }
.m-owner a { color: #e3c88f; }
.m-owner.is-warning { background: linear-gradient(135deg, #e3c88f, #c6a15b); color: #1d1608; }
.m-owner.is-warning a { color: #1d1608; text-decoration: underline; }

/* ---------- Image with graceful fallback ---------- */
.m-img { position: relative; overflow: hidden; background: var(--placeholder); isolation: isolate; }
.m-img::before { content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 2.2em; font-weight: 600; color: var(--accent); opacity: .55; z-index: 0; }
.m-img::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .12) 50%, transparent 70%); background-size: 250% 100%; animation: shimmer 1.6s infinite; }
.m-img.is-loaded::after, .m-img.is-failed::after { display: none; }
.m-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease), transform .8s var(--ease); z-index: 1; }
.m-img.is-loaded img { opacity: 1; }
.m-img.is-loaded::before { opacity: 0; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }

/* ---------- Hero ---------- */
.m-hero { position: relative; text-align: center; }
.m-cover { position: relative; height: 250px; overflow: hidden; background: var(--placeholder); }
.m-cover::before { content: ""; position: absolute; inset: 0; background:
    radial-gradient(80% 90% at 80% 0%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 60%); }
.m-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1s var(--ease), transform 6s var(--ease); }
.m-cover img.is-loaded { opacity: 1; transform: scale(1); }
.m-cover video.m-cover-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .01; transition: opacity 1.2s var(--ease); }
.m-cover video.m-cover-video.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .m-cover video.m-cover-video { display: none; } }
.m-cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 35%, rgba(var(--shade), .55) 72%, rgb(var(--shade)) 100%); }
.m-topbar { position: absolute; top: 0; inset-inline: 0; display: flex; justify-content: space-between; align-items: center; padding: max(14px, env(safe-area-inset-top)) 16px 0; z-index: 3; }
.m-round { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 15, 18, .38); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .18); }
.m-lang { display: inline-flex; padding: 3px; border-radius: 30px; background: rgba(15, 15, 18, .38); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .18); }
.m-lang a { min-width: 38px; height: 32px; display: grid; place-items: center; border-radius: 30px; color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 700; padding: 0 10px; }
.m-lang a.active { background: #fff; color: #111; }

.m-identity { position: relative; z-index: 2; margin-top: -70px; padding: 0 22px 8px; display: flex; flex-direction: column; align-items: center; }
.m-logo { width: 96px; height: 96px; border-radius: 28px; position: relative; overflow: hidden; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow), 0 0 0 4px var(--bg), 0 0 0 5px color-mix(in srgb, var(--accent) 55%, transparent); }
.m-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; background: var(--card); }
.m-logo span { font-family: var(--font-display); font-size: 40px; font-weight: 600; color: var(--accent); }
.m-name { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -.01em; margin-top: 18px; }
.theme-minimal .m-name { font-weight: 700; letter-spacing: -.03em; }
.m-tagline { color: var(--muted); margin-top: 6px; font-size: 15px; }
.theme-ivory .m-tagline, .theme-noir .m-tagline, .theme-emerald .m-tagline { font-style: italic; }
[dir="rtl"] .m-tagline { font-style: normal; }
.m-ornament { display: flex; align-items: center; gap: 10px; color: var(--accent); margin: 14px 0 4px; }
.m-ornament i { width: 44px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.m-ornament i:last-child { background: linear-gradient(270deg, transparent, var(--accent)); }
.theme-minimal .m-ornament, .theme-bistro .m-ornament { display: none; }
.m-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; color: var(--text-2); font-size: 13px; margin-top: 10px; }
.m-meta span { display: inline-flex; align-items: center; gap: 6px; }
.m-meta .icon { color: var(--accent); }
.m-actions { display: flex; justify-content: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.m-action { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 56px; }
.m-action span { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: var(--card); color: var(--accent); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .25s var(--ease), background .25s; }
.m-action:active span { transform: scale(.92); }
.m-action:hover span { background: var(--accent); color: var(--on-accent); }
.m-action small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.theme-minimal .m-action span { border-radius: 50%; box-shadow: none; background: var(--bg-2); color: var(--text); border: 0; }

/* ---------- Sticky nav ---------- */
.m-nav { position: sticky; top: 0; z-index: 20; margin-top: 22px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.m-nav.is-stuck { box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .5); }
.m-nav-inner { display: flex; align-items: center; gap: 6px; height: var(--nav-h); padding-inline-start: 12px; }
.m-search-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--chip); color: var(--text); transition: .2s; }
.m-search-btn.active { background: var(--accent); color: var(--on-accent); }
.m-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 8px; flex: 1; scroll-behavior: smooth; mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 24px), transparent); }
[dir="rtl"] .m-tabs { mask-image: linear-gradient(270deg, transparent 0, #000 10px, #000 calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 10px, #000 calc(100% - 24px), transparent); }
.m-tabs::-webkit-scrollbar { display: none; }
.m-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 30px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .25s, background .25s, box-shadow .25s; }
.m-tab-ico { font-size: 15px; }
.m-tab.active { color: var(--on-accent); background: var(--accent); box-shadow: 0 8px 20px -10px var(--accent); }
.theme-noir .m-tab.active, .theme-emerald .m-tab.active { background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.theme-ivory .m-tab { border-radius: 0; padding: 0 12px; background: none; box-shadow: none; font-family: var(--font-display); font-size: 15px; }
.theme-ivory .m-tab.active { color: var(--text); background: none; box-shadow: inset 0 -2px 0 var(--accent); }
.m-search { display: none; align-items: center; gap: 10px; margin: 0 14px 12px; padding: 0 6px 0 14px; height: 46px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
[dir="rtl"] .m-search { padding: 0 14px 0 6px; }
.m-nav.searching .m-search { display: flex; animation: drop .3s var(--ease); }
.m-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; color: var(--text); font-size: 16px; }
.m-search input::-webkit-search-cancel-button { display: none; }
.m-search button { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Main ---------- */
.m-main { padding: 6px 0 20px; }
.m-section-label { display: flex; align-items: center; gap: 12px; padding: 0 20px; margin: 22px 0 14px; color: var(--accent); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
[dir="rtl"] .m-section-label { letter-spacing: 0; font-size: 14px; }
.m-section-label span { display: inline-flex; align-items: center; gap: 7px; }
.m-section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Promos */
.m-promos { padding-top: 18px; }
.m-promo-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px; scrollbar-width: none; }
.m-promo-track::-webkit-scrollbar { display: none; }
.m-promo { position: relative; flex: 0 0 88%; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; scroll-snap-align: center; box-shadow: var(--shadow); color: #fff; }
.m-promos .m-promo:only-child { flex-basis: 100%; }
.m-promo-img { position: absolute; inset: 0; }
.m-promo-img::before, .m-cat-banner::before { content: ""; background: radial-gradient(70% 90% at 85% 10%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 65%), repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 14px); opacity: 1; }
.m-promo::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, .78) 100%); }
.m-promo-body { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; padding: 18px 20px; }
.m-promo-kicker { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-2); }
[dir="rtl"] .m-promo-kicker { letter-spacing: 0; font-size: 12px; }
.theme-minimal .m-promo-kicker, .theme-bistro .m-promo-kicker, .theme-rose .m-promo-kicker { color: #fff; opacity: .85; }
.m-promo h3 { font-family: var(--font-display); font-size: 23px; font-weight: 600; margin-top: 4px; }
.m-promo p { font-size: 13.5px; opacity: .85; margin-top: 4px; max-width: 90%; }
.m-promo-price { display: inline-flex; margin-top: 12px; padding: 7px 14px; border-radius: 30px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5); }
.m-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.m-dots i { width: 6px; height: 6px; border-radius: 6px; background: var(--line); transition: .3s var(--ease); }
.m-dots i.active { width: 20px; background: var(--accent); }

/* Featured */
.m-featured-track { display: flex; gap: 12px; overflow-x: auto; padding: 0 20px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.m-featured-track::-webkit-scrollbar { display: none; }
.m-feat { flex: 0 0 148px; text-align: start; scroll-snap-align: start; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: transform .25s var(--ease); }
.m-feat:active { transform: scale(.97); }
.m-feat-img { aspect-ratio: 1; }
.m-feat-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.m-feat-body strong { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.m-feat-body em { font-style: normal; color: var(--accent); font-weight: 700; font-size: 14px; }

/* Categories */
.m-cat { padding: 10px 0 8px; scroll-margin-top: calc(var(--nav-h) + 8px); }
.m-cat-head { margin: 22px 20px 6px; position: relative; }
.m-cat-title { position: relative; z-index: 2; }
.m-cat-icon { font-size: 22px; display: block; margin-bottom: 6px; }
.m-cat-head h2 { font-family: var(--font-display); font-size: 27px; font-weight: 600; letter-spacing: -.01em; }
.theme-minimal .m-cat-head h2 { font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.m-cat-head p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.m-cat-count { display: inline-block; margin-top: 8px; font-size: 11.5px; font-weight: 600; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
[dir="rtl"] .m-cat-count { letter-spacing: 0; }
.m-cat-head.has-banner { height: 150px; border-radius: var(--radius); overflow: hidden; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.m-cat-head.has-banner .m-cat-banner { position: absolute; inset: 0; }
.m-cat-head.has-banner::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 15%, rgba(0, 0, 0, .78)); }
.m-cat-head.has-banner .m-cat-title { padding: 16px 18px; color: #fff; }
.m-cat-head.has-banner p { color: rgba(255, 255, 255, .82); }
.m-cat-head.has-banner .m-cat-count { color: var(--accent-2); }
.theme-minimal .m-cat-head.has-banner .m-cat-count, .theme-bistro .m-cat-head.has-banner .m-cat-count, .theme-rose .m-cat-head.has-banner .m-cat-count { color: #fff; opacity: .8; }
.theme-ivory .m-cat-head:not(.has-banner) { text-align: center; padding-bottom: 6px; }
.theme-ivory .m-cat-head:not(.has-banner)::after { content: ""; display: block; width: 60px; height: 1px; background: var(--accent); margin: 12px auto 0; }

/* ---------- Items: list layout ---------- */
.m-items { padding: 6px 20px 0; }
.layout-list .m-item { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: opacity .3s; }
.layout-list .m-item:last-child { border-bottom: 0; }
.layout-list .m-item-media { order: 2; flex: 0 0 104px; position: relative; }
.layout-list .m-item-img { width: 104px; height: 104px; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.layout-list .m-item-img::before { font-size: 30px; }
.layout-list .m-item-body { flex: 1; min-width: 0; }
.m-item-top { display: flex; align-items: baseline; gap: 10px; }
.m-item-top h3 { font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.theme-noir .m-item-top h3, .theme-ivory .m-item-top h3, .theme-emerald .m-item-top h3, .theme-rose .m-item-top h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.m-leader { flex: 1; min-width: 12px; border-bottom: 1.5px dotted color-mix(in srgb, var(--muted) 55%, transparent); transform: translateY(-4px); }
.m-price { display: inline-flex; align-items: baseline; gap: 7px; font-weight: 700; color: var(--accent); white-space: nowrap; font-size: 16px; }
.m-price del { color: var(--muted); font-weight: 500; font-size: 13px; }
.has-img .m-leader { display: none; }
.has-img .m-item-top { flex-direction: column; gap: 4px; }
.m-desc { color: var(--muted); font-size: 13.5px; margin-top: 6px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.layout-list .has-img .m-desc { margin-top: 2px; }
.m-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.m-badge, .m-kcal { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 30px; font-size: 11.5px; font-weight: 600; background: var(--chip); color: var(--text-2); }
.m-kcal { background: none; padding: 0 2px; color: var(--muted); font-weight: 500; }
.m-badge.b-new { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.m-badge.b-popular { background: rgba(232, 160, 40, .14); color: #d18a13; }
.m-badge.b-chef { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.m-badge.b-spicy { background: rgba(225, 72, 52, .13); color: #e0482f; }
.m-badge.b-vegan, .m-badge.b-vegetarian, .m-badge.b-healthy { background: rgba(46, 158, 98, .13); color: #2b9a5e; }
.m-badge.b-gluten_free { background: rgba(170, 120, 40, .13); color: #b07a24; }
.is-dark .m-badge.b-popular { color: #f2b544; }
.is-dark .m-badge.b-vegan, .is-dark .m-badge.b-vegetarian, .is-dark .m-badge.b-healthy { color: #5ccf8f; }
.is-dark .m-badge.b-spicy { color: #ff7a63; }
.m-badge.is-soldout { background: var(--text); color: var(--bg); }
.m-item.is-soldout .m-item-img img { filter: grayscale(1); opacity: .55; }
.m-item.is-soldout h3, .m-item.is-soldout .m-price { opacity: .55; }
.m-item.is-soldout .m-price bdi { text-decoration: line-through; }
.m-soldout-tag { position: absolute; z-index: 3; inset-inline: 6px; bottom: 6px; text-align: center; font-size: 10.5px; font-weight: 700; padding: 3px 6px; border-radius: 8px; background: rgba(0, 0, 0, .7); color: #fff; }
.m-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

/* Bistro list: big rounded cards */
.theme-bistro.layout-list .m-item, .theme-rose.layout-list .m-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; box-shadow: 0 10px 30px -24px rgba(90, 40, 20, .5); }
.theme-bistro.layout-list .m-item-img, .theme-rose.layout-list .m-item-img { border-radius: calc(var(--radius) - 8px); box-shadow: none; }
.theme-bistro.layout-list .m-item-body, .theme-rose.layout-list .m-item-body { padding: 4px 4px 2px; }
.theme-bistro.layout-list .m-item.no-img .m-item-body, .theme-rose.layout-list .m-item.no-img .m-item-body { padding: 6px 8px; }
.theme-bistro .m-item-top h3 { font-weight: 700; }

/* ---------- Items: grid layout ---------- */
.layout-grid .m-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.layout-grid .m-item { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: 0 12px 30px -26px rgba(0, 0, 0, .6); transition: transform .25s var(--ease); }
.layout-grid .m-item:active { transform: scale(.98); }
.layout-grid .m-item-media { position: relative; }
.layout-grid .m-item-img { aspect-ratio: 1; }
.layout-grid .m-item-body { padding: 12px 13px 14px; display: flex; flex-direction: column; flex: 1; }
.layout-grid .m-item-top { flex-direction: column; gap: 4px; }
.layout-grid .m-item-top h3 { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.layout-grid .m-leader { display: none; }
.layout-grid .m-price { order: 3; margin-top: auto; font-size: 15px; }
.layout-grid .m-desc { font-size: 12.5px; -webkit-line-clamp: 2; margin-top: 4px; }
.layout-grid .m-tags { margin-top: 8px; gap: 4px; }
.layout-grid .m-tags .m-badge:nth-child(n+3), .layout-grid .m-kcal { display: none; }
.layout-grid .m-item.no-img .m-item-body { padding-top: 16px; }

/* No images mode */
.no-images .m-item-media { display: none !important; }

/* ---------- Empty ---------- */
.m-empty { text-align: center; padding: 50px 30px; color: var(--muted); }
.m-empty.is-full { padding: 70px 30px 90px; }
.m-empty-icon { width: 70px; height: 70px; border-radius: 22px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--chip); color: var(--accent); }
.m-empty h3 { color: var(--text); font-family: var(--font-display); font-size: 21px; margin-bottom: 6px; }
.m-hidden { display: none !important; }

/* ---------- Footer ---------- */
.m-footer { text-align: center; padding: 34px 26px calc(40px + env(safe-area-inset-bottom)); margin-top: 20px; background: var(--bg-2); border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; }
.m-footer h4 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-top: 6px; }
.m-footer-desc { color: var(--muted); font-size: 13.5px; max-width: 380px; margin-top: 8px; }
.m-footer-info { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.m-footer-info li { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.m-footer-info .icon { color: var(--accent); }
.m-socials { display: flex; gap: 10px; margin-top: 20px; }
.m-socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text-2); transition: .2s; }
.m-socials a:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.m-note { color: var(--muted); font-size: 11.5px; margin-top: 22px; opacity: .8; }
.m-powered { margin-top: 14px; font-size: 11.5px; color: var(--muted); display: inline-flex; gap: 4px; padding: 6px 12px; border-radius: 30px; border: 1px solid var(--line); }
.m-powered strong { color: var(--accent); font-weight: 700; }

/* ---------- Back to top ---------- */
.m-top { position: fixed; z-index: 30; bottom: calc(20px + env(safe-area-inset-bottom)); inset-inline-end: max(20px, calc(50% - var(--app-w) / 2 + 20px)); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .55); opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: .3s var(--ease); }
.m-top .icon { transform: rotate(180deg); }
.m-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Bottom sheets ---------- */
.m-sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 5, 8, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s; }
.m-sheet.open { opacity: 1; visibility: visible; }
.m-sheet-panel { position: relative; width: 100%; max-width: var(--app-w); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); color: var(--text); border-radius: 28px 28px 0 0; transform: translateY(100%); transition: transform .45s var(--ease); padding-bottom: env(safe-area-inset-bottom); scrollbar-width: none; }
.m-sheet.open .m-sheet-panel { transform: none; }
.m-grabber { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 42px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .7); z-index: 4; }
.m-sheet-small .m-grabber { background: var(--line); }
.m-sheet-close { position: absolute; top: 16px; inset-inline-end: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 15, 18, .45); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.m-sheet-small .m-sheet-close { background: var(--chip); color: var(--text); }
.m-sheet-media .m-img { aspect-ratio: 4 / 3.2; }
.m-sheet-media .m-img::before { font-size: 90px; }
.m-sheet-media.is-empty { height: 64px; }
.m-sheet-body { padding: 22px 24px 30px; }
.m-sheet-body .m-tags { margin: 0 0 12px; }
.m-sheet-cat { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }
[dir="rtl"] .m-sheet-cat { letter-spacing: 0; font-size: 13px; }
.m-sheet-body h2 { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin-top: 4px; }
.m-sheet-price { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; font-size: 22px; font-weight: 700; color: var(--accent); }
.m-sheet-price del { font-size: 15px; color: var(--muted); font-weight: 500; }
.m-sheet-desc { color: var(--text-2); margin-top: 14px; font-size: 15px; line-height: 1.7; }
.m-sheet-options { margin-top: 22px; }
.m-sheet-options h4 { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
[dir="rtl"] .m-sheet-options h4 { letter-spacing: 0; }
.m-sheet-options ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.m-sheet-options li { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 500; }
.m-sheet-options li:last-child { border-bottom: 0; }
.m-sheet-options li b { color: var(--accent); }
.m-sheet-facts { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.m-fact { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.m-fact strong { display: block; color: var(--text); font-size: 15px; }
.m-fact .icon { color: var(--accent); }
.m-sheet-soldout { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--chip); color: var(--text-2); font-weight: 600; font-size: 14px; }
.m-sheet-soldout[hidden], .m-sheet-options[hidden] { display: none; }

/* Wi-Fi */
.m-wifi { text-align: center; padding-top: 40px; }
.m-wifi-icon { width: 72px; height: 72px; border-radius: 24px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--chip); color: var(--accent); }
.m-wifi h2 { font-size: 24px; }
.m-wifi dl { margin: 22px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: start; }
.m-wifi dl div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.m-wifi dl div:last-child { border-bottom: 0; }
.m-wifi dt { color: var(--muted); font-size: 13.5px; }
.m-wifi dd { margin: 0; font-weight: 700; word-break: break-all; }
.m-btn { width: 100%; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; }

/* Toast */
.m-toast { position: fixed; z-index: 200; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); padding: 11px 18px; border-radius: 30px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: .3s var(--ease); }
.m-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Entrance animation */
.js .m-item, .js .m-cat-head { opacity: 0; transform: translateY(14px); }
.js .m-item.in, .js .m-cat-head.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .layout-grid .m-item.in { transition: opacity .6s var(--ease), transform .6s var(--ease); }

/* Embedded preview (dashboard phone frame) */
.is-embed .m-app { box-shadow: none; }
.is-embed .m-top { display: none; }
.is-embed .m-topbar { padding-top: 44px; }

/* ---------- Desktop ---------- */
@media (min-width: 700px) {
    :root { --app-w: 600px; }
    .m-app { margin: 28px auto; min-height: calc(100vh - 56px); border-radius: 30px; overflow: hidden; }
    .m-owner { border-radius: 0; }
    .m-cover { height: 290px; }
    .m-sheet { align-items: center; padding: 24px; }
    .m-sheet-panel { border-radius: 28px; transform: translateY(30px) scale(.97); max-height: 88vh; }
    .m-grabber { display: none; }
    .layout-grid .m-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .m-nav { border-radius: 0; }
}
@media (min-width: 700px) {
    .is-embed .m-app { margin: 0 auto; border-radius: 0; min-height: 100vh; }
}
@media (max-width: 360px) {
    .layout-list .m-item-media { flex-basis: 88px; }
    .layout-list .m-item-img { width: 88px; height: 88px; }
    .m-action span { width: 46px; height: 46px; }
    .m-actions { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .js .m-item, .js .m-cat-head { opacity: 1; transform: none; }
}

/* Videos (promo banners & dish sheet) */
.m-img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-has-video::after { content: "▶"; position: absolute; bottom: 8px; inset-inline-end: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; background: rgba(0, 0, 0, .55); color: #fff; z-index: 3; }
.m-img video { z-index: 1; }

/* ---------- Daily specials ("Today's special") ---------- */
.m-specials { margin: 18px 0 6px; }
.m-special-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 20px 8px; scrollbar-width: none; }
.m-special-track::-webkit-scrollbar { display: none; }
.m-special { position: relative; flex: 0 0 90%; display: grid; grid-template-columns: 42% 1fr; align-items: stretch; min-height: 168px; padding: 0; border: 0; text-align: start; font: inherit; color: #fff8ec; cursor: pointer; scroll-snap-align: center; border-radius: calc(var(--radius) + 4px); overflow: hidden; isolation: isolate;
    background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 55%, #000) 0%, #120d07 55%), #120d07;
    box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .75), inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.m-specials .m-special:only-child { flex-basis: 100%; }
.m-special::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--m-sp-a, 0deg), transparent 0 70%, var(--accent-2) 80%, transparent 90%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: mSpSpin 5s linear infinite; }
@property --m-sp-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes mSpSpin { to { --m-sp-a: 360deg; } }
.m-special-glow { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 235, 190, .14) 50%, transparent 65%); transform: translateX(-120%); animation: mSpShine 5.5s ease-in-out infinite; }
@keyframes mSpShine { 55%, 100% { transform: translateX(120%); } }
.m-special-media { position: relative; overflow: hidden; }
.m-special-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: mSpZoom 14s ease-in-out infinite alternate; }
.m-special-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, #120d07); }
[dir="rtl"] .m-special-media::after { background: linear-gradient(270deg, transparent 55%, #120d07); }
.m-special.is-art .m-special-media { background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%); }
.m-special.is-art .m-special-media img { object-fit: contain; padding: 12%; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); animation: mSpFloat 4.5s ease-in-out infinite; }
.m-special.is-art .m-special-media::after { display: none; }
@keyframes mSpZoom { to { transform: scale(1.12); } }
@keyframes mSpFloat { 50% { transform: translateY(-6px) rotate(-3deg); } }
.m-special-body { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 16px 16px 16px 6px; min-width: 0; }
[dir="rtl"] .m-special-body { padding: 16px 6px 16px 16px; }
.m-special-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
[dir="rtl"] .m-special-kicker { letter-spacing: 0; font-size: 12px; }
.m-live { width: 7px; height: 7px; border-radius: 50%; background: #ff5a3c; flex: 0 0 auto; box-shadow: 0 0 0 0 rgba(255, 90, 60, .6); animation: mSpPulse 1.6s infinite; }
@keyframes mSpPulse { 70% { box-shadow: 0 0 0 8px rgba(255, 90, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 60, 0); } }
.m-special-name { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1.15; }
.m-special-note { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: rgba(255, 248, 236, .78); line-height: 1.4; }
.m-special-note.is-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-special-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; margin-top: 4px; }
.m-special-price b { font-size: 19px; padding: 4px 12px; border-radius: 30px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.m-special-price del { font-size: 13px; color: rgba(255, 248, 236, .55); }
.m-special-price em { font-style: normal; font-size: 11px; font-weight: 700; color: #ffb27a; }
.m-specials .m-dots { margin-top: 6px; }
.m-badge.b-special { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--on-accent); }
.m-item.is-special .m-item-top h3::after { content: "✦"; color: var(--accent); font-size: .7em; margin-inline-start: 6px; vertical-align: super; }
.m-sheet-special { font-size: 11.5px; font-weight: 700; color: var(--on-accent); background: var(--accent); padding: 3px 9px; border-radius: 20px; align-self: center; }
@media (min-width: 720px) { .m-special { flex-basis: 70%; min-height: 200px; } .m-special-name { font-size: 25px; } }
@media (prefers-reduced-motion: reduce) { .m-special::before, .m-special-glow, .m-special-media img { animation: none !important; } }

/* Owner-only: sample dishes in the live preview, and the note on the owner's own public link */
.m-item.is-sample { position: relative; }
.m-sample-tag { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3; padding: 3px 9px; border-radius: 30px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    background: #f5b301; color: #1b1408; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .4); pointer-events: none; }
[dir="rtl"] .m-sample-tag { letter-spacing: 0; text-transform: none; }
.m-owner-note { display: flex; align-items: center; gap: 10px; margin: 14px 16px 0; padding: 12px 14px; border-radius: 14px; background: #fff6dc; color: #4a3608; font-size: 13.5px; font-weight: 600; text-decoration: none; border: 1px solid #f0d58a; }
.m-owner-note span { flex: 1; }
.m-soon .m-soon-orn { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--accent); margin-bottom: 18px; }
.m-soon .m-soon-orn i { width: 46px; height: 1px; background: currentColor; opacity: .5; }
/* ---------- Ads (free / paid channels, admin-managed) ----------
   Built only from the template's own variables, so every template styles them; always labelled. */
.m-ad { position: relative; margin: 26px 20px 10px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 14px 34px -28px rgba(0, 0, 0, .7); }
.m-ad-tag { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; padding: 3px 9px; border-radius: 30px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text); background: color-mix(in srgb, var(--bg) 78%, transparent); border: 1px solid var(--line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.is-rtl .m-ad-tag, [dir="rtl"] .m-ad-tag { letter-spacing: 0; }
.m-ad-link { display: block; color: inherit; text-decoration: none; }
.m-ad-visual { display: block; position: relative; aspect-ratio: 16 / 7; background: var(--card-2, var(--bg-2)); }
.m-ad-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.m-ad-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; font-weight: 600; font-size: 14.5px; color: var(--text); }
.m-ad-caption i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.m-ad-link:hover .m-ad-caption i, .m-ad-link:focus-visible .m-ad-caption i { transform: translateX(2px); }
.m-ad-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.m-ad-code { padding: 34px 10px 12px; display: flex; justify-content: center; }
.m-ad-frame { display: block; width: 100%; max-width: 336px; height: 280px; border: 0; background: transparent; }
.m-ad-note { display: flex; align-items: center; gap: 6px; padding: 9px 14px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); text-decoration: none; }
.m-ad-note:hover { color: var(--accent); }

/* Sticky bar: small, dismissible, above the safe area; never covers the header */
.m-ad-sticky { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); margin: 0 auto; max-width: 520px;
    display: flex; align-items: center; gap: 10px; padding: 8px 40px 8px 8px; border-radius: 16px;
    transform: translateY(140%); opacity: 0; transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
[dir="rtl"] .m-ad-sticky { padding: 8px 8px 8px 40px; }
.m-ad-sticky.is-in { transform: none; opacity: 1; }
.m-ad-sticky .m-ad-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.m-ad-thumb { position: relative; flex: none; width: 74px; height: 50px; border-radius: 10px; overflow: hidden; background: var(--card-2, var(--bg-2)); }
.m-ad-thumb .m-ad-frame { width: 74px; height: 50px; }
.m-ad-text { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-ad-sticky .m-ad-tag { position: static; flex: none; }
.m-ad-close { position: absolute; top: 50%; inset-inline-end: 8px; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: var(--text); background: var(--chip, rgba(127, 127, 127, .14)); }
body:has(.m-ad-sticky.is-in) #m-top { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: reduce) { .m-ad-sticky { transition: none; } }
.tpl-cafe .m-ad { margin-inline: 14px; }
/* Bottom bar with an ad network's code: a standard 320 × 50 mobile banner instead of a thumbnail */
.m-ad-sticky.m-ad-code-bar { padding-top: 10px; padding-bottom: 8px; justify-content: center; overflow: visible; }
/* Same colour scheme as the ad page inside, so the frame stays transparent on dark menus */
.m-ad-frame { color-scheme: light; }
.m-ad-sticky .m-ad-thumb.is-banner { flex: 1; width: auto; max-width: 320px; height: 50px; margin-inline: auto; background: transparent; border-radius: 6px; }
.m-ad-sticky .m-ad-thumb.is-banner .m-ad-frame { width: 100%; max-width: 320px; height: 50px; }
.m-ad-sticky.m-ad-code-bar .m-ad-tag { position: absolute; top: -10px; inset-inline-start: 12px; }
