/* Sufra demo: styles for screens-more.js (recipes, browse, search, add/import, plan, list, vote, gathering,
   profile, install, onboarding). Built only from the tokens in app.css; a few local tokens below have dark values. */
:root { --m-wa-bg: #E7F6DC; --m-wa-ink: #18211D; --m-wa-paper: #EFE9E0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --m-wa-bg: #144D37; --m-wa-ink: #E6F2EA; --m-wa-paper: #0D1512; } }
:root[data-theme="dark"] { --m-wa-bg: #144D37; --m-wa-ink: #E6F2EA; --m-wa-paper: #0D1512; }

/* ---------- shared ---------- */
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; }
.m-searchbar { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; margin-top: 14px; padding: 0 16px; border-radius: 16px;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--faint); text-align: start; font-size: 15px; }
.m-searchbar.m-live { margin-top: 4px; color: var(--muted); }
.m-searchbar.m-live:focus-within { box-shadow: inset 0 0 0 2px var(--saffron); }
.m-searchbar input { flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; outline: none; font-size: 16px; color: var(--ink); }
.m-seg { margin-top: 12px; }
.m-shelf { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px 4px; scroll-snap-type: x proximity; scroll-padding-inline: 20px; }
.m-shelf::-webkit-scrollbar { display: none; }
.m-card { flex: 0 0 148px; display: flex; flex-direction: column; gap: 2px; text-align: start; scroll-snap-align: start; }
.m-card img { width: 148px; height: 120px; border-radius: 16px; margin-bottom: 6px; }
.m-card .t { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.m-card .s { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-nudge { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--saffron-soft); color: var(--ink); font-weight: 500; text-align: start; min-height: 50px; }
.m-nudge > .i:first-child { color: var(--zaatar); }
.m-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 22px 18px; border-radius: var(--r);
  background: var(--card-2); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); font-size: 14px; }
.m-empty > .i { color: var(--faint); }
.m-empty b { color: var(--ink); font-size: 15.5px; }
.m-empty .btn { margin-top: 8px; }
.m-arname { font-size: 13px; opacity: .85; margin-inline-start: 4px; }
.m-disc { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--mint-ink); flex: 0 0 auto; }
.m-disc-s { background: var(--saffron-soft); color: var(--ink); }
.m-avs { width: 24px; height: 24px; font-size: 11px; }

/* ---------- search ---------- */
.m-hit { position: relative; }
.m-why { position: absolute; inset-inline-end: 44px; top: 12px; font-size: 11.5px; font-weight: 600; color: var(--mint-ink); background: var(--mint); border-radius: 8px; padding: 2px 8px; pointer-events: none; max-width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- add / import ---------- */
.m-way { background: var(--card); border-radius: var(--r-l); padding: 16px; box-shadow: 0 0 0 1px var(--line-2); }
.m-way-h { display: flex; gap: 12px; align-items: flex-start; }
.m-way-h .badge { vertical-align: 2px; margin-inline-start: 4px; }
.m-tips { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.m-tips > div, .m-aside { display: flex; gap: 8px; align-items: flex-start; }
.m-tips .i, .m-aside .i { margin-top: 2px; }
.m-aside { margin: 10px 0 0; }
.m-sample { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 8px; border-radius: 16px; background: var(--card-2); box-shadow: inset 0 0 0 1.5px var(--saffron-line); text-align: start; }
.m-sample img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.m-sample b { display: block; }
.m-num { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.m-num .field { width: 66px; padding-inline: 10px; }
.m-way select.field { min-width: 0; }
.m-importing { display: flex; flex-direction: column; padding-top: 40px; }
.m-imp-photo { width: 150px; height: 150px; }
.m-ic { width: 34px; height: 34px; flex: 0 0 auto; }
.m-ic-blank { display: grid; place-items: center; border-radius: 50%; background: var(--line-2); color: var(--faint); }
.m-ings { gap: 6px; }
.m-ings .iline { padding: 4px 0; }
.m-ings .flag { align-items: center; font-size: 14.5px; }
.m-ings .flag .btn { flex: 0 0 auto; min-height: 36px; }
.m-src { display: flex; gap: 14px; align-items: flex-start; }
.m-src .small .i { vertical-align: -3px; }
.m-reel { position: relative; width: 112px; height: 140px; flex: 0 0 auto; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.m-reel img { width: 100%; height: 100%; object-fit: cover; }
.m-play { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.9); color: #18211D; }
.m-artitle { font-size: 20px; color: var(--muted); margin-top: 2px; text-align: start; }
.m-cardtext { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line-2); }
.m-pair .ar { font-size: 18px; line-height: 1.6; text-align: start; }
.m-pair .small { color: var(--muted); }
.m-pair + .m-pair { padding-top: 10px; border-top: 1px solid var(--line-2); }
.m-swapq { text-align: center; }
.m-swapq .plate { width: 92px; height: 92px; margin: 4px auto 12px; }

/* ---------- plan ---------- */
.m-week { display: flex; align-items: center; justify-content: space-between; margin: 6px -8px 14px; }
.m-week .icon-btn[disabled] { opacity: .3; pointer-events: none; }
.m-days { overflow: hidden; }
.m-day { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; position: relative; }
.m-day + .m-day { border-top: 1px solid var(--line-2); }
.m-day.today { background: var(--saffron-soft); }
.m-dlab { width: 46px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; font-size: 12.5px; color: var(--muted); }
.m-dlab b { font-size: 15px; color: var(--ink); }
.m-dlab .today-tag { margin-top: 3px; }
.m-dmain { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: start; min-height: 56px; color: var(--faint); }
.m-dmain[disabled] { cursor: default; }
.m-thumb { width: 56px; height: 56px; border-radius: 14px; flex: 0 0 auto; }
.m-open { display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line); border: 0; background: transparent; color: var(--faint); background-image: none; }
.m-dname { display: block; font-weight: 600; font-size: 15.5px; color: var(--ink); line-height: 1.25; }
.m-dsub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.m-dmain .check { width: 28px; height: 28px; }
.m-swapbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--faint); flex: 0 0 auto; }
.m-dinner { flex-basis: 100%; margin-inline-start: 58px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); text-align: start; padding: 2px 0; }
.m-vmini { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.m-vm { display: flex; align-items: center; gap: 8px; }
.m-vm .plate { width: 28px; height: 28px; box-shadow: 0 0 0 2px var(--card); }
.m-vm b { font-size: 13px; color: var(--ink); width: 12px; }
.m-vbar { flex: 1; height: 8px; border-radius: 9px; background: var(--line-2); overflow: hidden; display: block; }
.m-vbar i { display: block; height: 100%; border-radius: 9px; background: var(--saffron); min-width: 0; }
.m-vbar.l { height: 10px; margin-top: 8px; }
.m-vbar.l i { background: var(--mint-strong); }
.m-vbar.l.lead i { background: var(--saffron); }
.m-remind { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--sky); color: var(--ink); font-size: 14.5px; }
.m-remind > .i { color: var(--sky-ink); margin-top: 1px; }
.m-listcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: start; }

/* ---------- list ---------- */
.m-shared { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--mint); color: var(--ink); }
.m-shared .small { color: var(--mint-ink); }
.m-bar { height: 6px; border-radius: 9px; background: var(--line-2); overflow: hidden; }
.m-bar i { display: block; height: 100%; background: var(--mint-strong); transition: width .25s ease; }
.m-sec { padding: 6px 12px 8px; }
.m-sec-h { display: flex; align-items: center; gap: 8px; padding: 8px 2px 6px; color: var(--muted); }
.m-sec-h b { flex: 1; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.m-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 2px; text-align: start; }
.m-item + .m-item { border-top: 1px solid var(--line-2); }
.m-item img, .m-noimg { width: 30px; height: 30px; flex: 0 0 auto; }
.m-item .nm { font-weight: 500; }
.m-item .qt { color: var(--muted); font-size: 14px; }
.m-item.on .nm, .m-item.on .qt { text-decoration: line-through; color: var(--faint); }
.m-item.on img { opacity: .5; }

/* ---------- vote ---------- */
.m-win { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--saffron-soft); }
.m-win .plate { width: 70px; height: 70px; }
.m-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line-2); text-align: start; }
.m-opt .plate { width: 64px; height: 64px; }
.m-opt.on { box-shadow: 0 0 0 2.5px var(--saffron); }
.m-opt.won { box-shadow: 0 0 0 2.5px var(--mint-strong); }
.m-opt[disabled] { cursor: default; }

/* ---------- gathering ---------- */
.m-gdish { display: flex; align-items: center; gap: 4px; padding: 8px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line-2); }
.m-gmain { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; text-align: start; }
.m-gmain img { width: 64px; height: 64px; border-radius: 12px; flex: 0 0 auto; }
.m-tl { position: relative; display: flex; flex-direction: column; }
.m-tli { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; font-size: 14.5px; position: relative; }
.m-tlt { width: 46px; flex: 0 0 auto; font-weight: 600; }
.m-tld { width: 12px; height: 12px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2.5px var(--saffron); margin-top: 4px; flex: 0 0 auto; position: relative; z-index: 1; }
.m-tli:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 63px; top: 22px; bottom: -8px; width: 2px; background: var(--line); }
.m-tli.end { font-weight: 600; }
.m-tli.end .m-tld { background: var(--saffron); }

/* ---------- profile ---------- */
.m-person { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; }
.m-person + .m-person { border-top: 1px solid var(--line-2); }
.m-set { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: start; }
.m-set.col { align-items: flex-start; }
.m-set > .i:first-child { color: var(--zaatar); margin-top: 1px; }
.m-set + .m-set { border-top: 1px solid var(--line-2); }
.m-mini { flex: 0 0 auto; }
.m-mini button { height: 32px; padding: 0 12px; font-size: 13px; }
.m-mini button[lang="ar"] { font-family: var(--f-ar); }
.m-switch { width: 50px; height: 30px; border-radius: 99px; background: var(--line); position: relative; flex: 0 0 auto; transition: background .15s ease; }
.m-switch i { position: absolute; inset-inline-start: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease; }
.m-switch.on { background: var(--mint-strong); }
.m-switch.on i { transform: translateX(20px); }
[dir="rtl"] .m-switch.on i { transform: translateX(-20px); }
.m-notif { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.m-notif + .m-notif { border-top: 1px solid var(--line-2); }
.chip.m-sm { height: 32px; padding: 0 11px; font-size: 13px; }
.m-planfam { box-shadow: inset 0 0 0 1.5px var(--saffron-line); }

/* ---------- install ---------- */
.m-benefits { display: flex; flex-direction: column; gap: 10px; }
.m-benefits > div { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.m-benefits .i { color: var(--zaatar); margin-top: 1px; }
.m-isteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: s; }
.m-isteps li { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2); font-size: 15px; }
.m-iicon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; background: var(--sky); color: var(--sky-ink); }
.m-iicon .i { width: 24px; height: 24px; }
.m-appicon { background: var(--saffron); color: var(--saffron-ink); }

/* ---------- onboarding ---------- */
.m-welcome { display: flex; flex-direction: column; min-height: 100%; }
.m-wimg { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; margin: 34px auto 26px; box-shadow: var(--shadow-lg); }
.m-welcome .sticky-cta { margin-top: auto; }
.m-pchip { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); text-align: start; }
.m-pchip.on { background: var(--mint); box-shadow: inset 0 0 0 2px var(--mint-strong); }
.m-pchip[disabled] { cursor: default; }
.m-padd { color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); border: 0; background: transparent; justify-content: flex-start; }
.m-padd { outline: 1.5px dashed var(--line); outline-offset: -1.5px; box-shadow: none; }
.tile .lab .ar { font-size: 13px; }
label.chip input { accent-color: var(--saffron); margin: 0; }

/* ---------- sheets ---------- */
.m-sopt { display: flex; align-items: center; gap: 12px; width: 100%; padding-block: 8px; padding-inline: 8px 10px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2); text-align: start; min-height: 60px; }
.m-sopt img { width: 52px; height: 52px; border-radius: 12px; flex: 0 0 auto; }
.m-sopt.on { box-shadow: 0 0 0 2px var(--saffron); }
.m-sopt > .i:last-child { color: var(--faint); }
.m-wa { border-radius: 18px; background: var(--m-wa-paper); padding: 12px; }
.m-wa-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.m-bub { margin-inline-start: auto; max-width: 88%; width: fit-content; padding: 9px 12px 7px; border-radius: 14px; border-end-end-radius: 4px; background: var(--m-wa-bg); color: var(--m-wa-ink); font-size: 14.5px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
.m-wa-t { display: block; text-align: end; font-size: 11px; opacity: .6; margin-top: 2px; }
.m-wa-link { color: var(--sky-ink); text-decoration: underline; }

@media (max-width: 370px) {
  .m-num .field { width: 56px; }
  .m-dlab { width: 40px; }
  .m-thumb { width: 48px; height: 48px; }
  .m-reel { width: 92px; height: 116px; }
}

.m-skip { display: block; margin: 8px auto 0; padding: 8px 12px; font-size: 14px; color: var(--muted); }

/* language switch on the welcome screen; Arabic day labels are wider */
.m-wlang { display: flex; justify-content: center; padding-top: 14px; }
.m-wimg { margin-top: 22px; }
.lang-ar .m-dlab { width: 64px; }
.lang-ar .m-tlt { width: 46px; }
.m-set .langsw { flex: 0 0 auto; }
