/* ===== Shared structure for the «ریل» family =====
   A landing page (cover, logo, category buttons, contact icons) and a menu
   page with a category rail on the left edge, one category at a time.
   Each palette file (menu-rail-*.css) only sets the variables below and a
   few shape overrides. */
:root {
  --page: #FFFFFF; --text: #222; --muted: #7B7B7B; --line: #E8E8E8;
  --bar: #5E4B8B; --bar-ink: #FFFFFF;
  --rail: #FFFFFF; --rail-ink: #444; --rail-on: #F1ECF8; --rail-on-ink: #5E4B8B; --rail-w: 66px;
  --card: #FFFFFF; --card-line: #E7E3EE; --card-ink: #222; --price: #222; --img-r: 10px; --card-r: 12px; --cols: 1;
  --btn: #FFFFFF; --btn-ink: #222; --btn-line: #CFCFCF;
  --land: #FFFFFF; --land-ink: #222; --land-btn: #5E4B8B; --land-btn-ink: #fff;
  --accent: var(--bar); --bg: var(--page); --chip: #F2F2F2; --shadow: none; --radius: 14px;
}
html { background: var(--page); }
body { margin: 0 auto; max-width: 600px; min-height: 100vh; background: var(--page); color: var(--text); font-family: "Vazirmatn", Tahoma, sans-serif; font-size: 13.5px; line-height: 1.75; padding-bottom: 26px; }
@media (min-width: 640px) { html { background: #DADADA; } }
a { color: inherit; }

/* Landing */
.rl-land { display: flex; flex-direction: column; background: var(--land); color: var(--land-ink); }
.rl-cover { flex: none; height: 0; overflow: hidden; }
.rl-land.has-cov .rl-cover { height: 42%; }
.rl-cover img { width: 100%; height: 100%; object-fit: cover; }
.rl-land-in { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 22px 22px 18px; text-align: center; }
.rl-logo { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: transparent; }
.rl-land.has-cov .rl-logo { width: 110px; height: 110px; }
.rl-logo img { width: 100%; height: 100%; object-fit: contain; }
.rl-logo span { font-size: 56px; font-weight: 700; color: var(--land-btn); }
.rl-name { margin: -4px 0 0; font-size: 20px; font-weight: 700; line-height: 1.5; }
.rl-tag { margin: -10px 0 0; font-size: 12.5px; opacity: .85; max-width: 26em; }
.rl-table { font-size: 12.5px; font-weight: 700; }
.rl-btns { display: grid; gap: 12px; width: 100%; max-width: 260px; }
.rl-btn { display: flex; align-items: center; gap: 10px; font: inherit; font-size: 14px; font-weight: 700; color: var(--land-btn-ink); background: var(--land-btn); border: 0; border-radius: 99px; padding: 6px 18px 6px 6px; cursor: pointer; }
.rl-btn i { order: 2; margin-inline-start: auto; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-style: normal; font-size: 20px; background: rgba(255,255,255,.9); }
.rl-btn i img { width: 100%; height: 100%; object-fit: cover; }
.rl-go { display: none; font: inherit; cursor: pointer; }
.rl-icons { display: flex; gap: 10px; justify-content: center; }
.rl-icons a, .rl-icons button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--land-btn); color: var(--land-btn-ink); cursor: pointer; padding: 0; }
.rl-icons svg { width: 17px; height: 17px; }
.rl-contact { display: none; align-items: center; gap: 6px; position: absolute; bottom: 12px; right: 0; font: inherit; font-size: 11.5px; font-weight: 600; border: 0; border-radius: 99px 0 0 99px; padding: 4px 12px 4px 14px; background: var(--land-btn); color: var(--land-btn-ink); cursor: pointer; }
.rl-contact svg { width: 15px; height: 15px; }
.rl-strip { flex: none; height: 26px; display: grid; place-items: center; font-size: 11px; background: var(--bar); color: var(--bar-ink); direction: ltr; opacity: .95; }
.rl-strip-fixed { position: fixed; z-index: 41; bottom: 0; left: 0; right: 0; max-width: 600px; margin: 0 auto; }

/* Menu page */
.rl-app { display: flex; align-items: flex-start; }
.rl-main { flex: 1; min-width: 0; padding: 0 10px 0 8px; }
.rl-top { padding-top: 10px; }
.rl-brand { display: none; justify-content: center; align-items: center; gap: 8px; padding: 6px 0 2px; }
.rl-brand img { height: 46px; width: auto; max-width: 140px; object-fit: contain; }
.rl-brand b { font-size: 15px; }
.rl-brand img + b { display: none; }
.notice { margin: 6px 0 4px; }
.rl-sec { display: none; }
.rl-sec.on, html.searching .rl-sec { display: block; }
.rl-h { display: flex; justify-content: center; margin: 4px 0 12px; }
.rl-h span { min-width: 60%; text-align: center; font-size: 15px; font-weight: 700; padding: 8px 18px; border-radius: 0 0 14px 14px; background: var(--bar); color: var(--bar-ink); }
.rl-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 12px; }
.rl-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--card-r); overflow: hidden; cursor: pointer; color: var(--card-ink); }
.rl-img { position: relative; margin: 8px 8px 0; aspect-ratio: 4 / 3; border-radius: var(--img-r); overflow: hidden; background: rgba(127,127,127,.12); display: grid; place-items: center; font-size: 42px; }
.rl-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rl-pct { position: absolute; top: 6px; right: 6px; }
.rl-b { flex: 1; padding: 8px 10px 4px; }
.rl-card h3 { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.6; }
.rl-card p { margin: 2px 0 0; font-size: 11px; line-height: 1.8; color: var(--muted); }
.rl-card .price { margin-top: 4px; color: var(--price); font-size: 13.5px; }
.rl-card .price small { color: var(--price); opacity: .8; }
.rl-add { display: none; margin: 4px 8px 8px; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--btn-ink); background: var(--btn); border: 1px solid var(--btn-line); border-radius: 6px; padding: 4px; cursor: pointer; }
.rl-add em { display: none; font-style: normal; min-width: 18px; border-radius: 99px; background: var(--bar); color: var(--bar-ink); font-size: 11px; line-height: 18px; }
.rl-add.has em { display: inline-block; }
body.ordering .rl-add { display: flex; }
.rl-card.off .rl-img img { filter: grayscale(1); opacity: .6; }
.rl-card.off h3, .rl-card.off .price { opacity: .5; }
.rl-end { text-align: center; color: var(--muted); font-size: 11px; padding: 18px 0 20px; }
body.has-dock .rl-end { padding-bottom: 150px; }

/* Rail on the left edge */
.rl-rail { position: sticky; top: 0; flex: none; width: var(--rail-w); height: 100vh; height: 100dvh; padding-bottom: 26px; display: flex; flex-direction: column; align-items: stretch; background: var(--rail); color: var(--rail-ink); border-inline-start: 1px solid var(--line); }
.rl-back { flex: none; font: inherit; font-size: 11px; color: var(--rail-ink); background: none; border: 0; padding: 12px 2px 8px; cursor: pointer; }
.rl-rail .tabs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 6px; scrollbar-width: none; }
.rl-rail .tabs::-webkit-scrollbar { display: none; }
.tab { display: grid; justify-items: center; gap: 3px; padding: 7px 2px; border-radius: 10px; text-decoration: none; text-align: center; color: var(--rail-ink); }
.tab i { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-style: normal; font-size: 20px; background: var(--page); box-shadow: 0 0 0 1.5px var(--rail-on-ink); }
.tab i img { width: 100%; height: 100%; object-fit: cover; }
.tab span { font-size: 9.5px; font-weight: 600; line-height: 1.4; }
.tab.active { background: var(--rail-on); color: var(--rail-on-ink); }
.rl-sbtn { flex: none; width: 36px; height: 36px; margin: 4px auto; border-radius: 50%; border: 0; background: transparent; color: var(--rail-ink); display: grid; place-items: center; cursor: pointer; }
.rl-sbtn svg { width: 18px; height: 18px; }

/* Shared parts in the family */
html.welcomed #welcome { transform: translateX(100%); }
.dock { bottom: 26px; max-width: 600px; }
.cart-bar { background: var(--bar); color: var(--bar-ink); border-radius: 12px; }
.primary-btn { background: var(--bar); color: var(--bar-ink); }
.s-var.on { border-color: var(--bar); }
.search-overlay { max-width: 600px; }
