:root {
  --bg: #f7f4ef;
  --card: #ffffff;
  --card2: #1e4f9a;
  --gold: #e8b423;
  --gold2: #f0c75e;
  --ink: #2a1b14;
  --cream: #2a1b14;
  --muted: #7a6a5c;
  --line: #eadfcd;
  --red: #d31e2b;
  --blue: #1e5aaa;
  --ok: #3d9a6a;
  --safe: #2f6b4f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--ink); font-family: "Segoe UI", "Noto Naskh Arabic", "Geeza Pro", Tahoma, system-ui, sans-serif; }
html[dir="rtl"] .tag { letter-spacing: 0; }
html[dir="rtl"] .bubble { border-radius: 14px 14px 4px 14px; }
html[dir="rtl"] .bubble.me { border-radius: 14px 14px 14px 4px; }
html[dir="rtl"] .mini { margin-left: 0; margin-right: auto; }
body { max-width: 480px; margin: 0 auto; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }

.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px 8px;
}
.brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-left { display: flex; align-items: center; gap: 8px; }
.star { width: 36px; height: 36px; object-fit: contain; }
.word { font-weight: 800; font-size: 18px; letter-spacing: -0.03em; }
.word b { color: var(--red); }
.tag { display: block; font-size: 9px; letter-spacing: .14em; color: var(--red); font-weight: 600; }
.badge { font-size: 11px; color: var(--blue); border: 1px solid var(--blue); border-radius: 99px; padding: 3px 8px; }
.langbtn { font-size: 11px; font-weight: 800; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 9px; color: var(--blue); white-space: nowrap; }

.tabs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 99px; padding: 6px 12px; white-space: nowrap; font-size: 13px;
}
.chip.on { background: var(--red); color: #fff; border-color: var(--red); font-weight: 700; }

.feed { padding: 12px 12px 88px; display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.row { display: flex; gap: 10px; align-items: center; padding: 12px; }
.av {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--blue));
  display: grid; place-items: center; font-weight: 800; color: #fff; flex-shrink: 0;
}
.who { font-weight: 700; font-size: 14px; }
button.who.link { background: none; border: 0; padding: 0; color: inherit; }
.meta { color: var(--muted); font-size: 12px; }
.body { padding: 0 12px 12px; font-size: 15px; line-height: 1.45; }
.media { background: #000; min-height: 180px; }
.media img, .media video { width: 100%; height: 220px; object-fit: cover; cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: #000e; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 12px; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 88dvh; width: auto; height: auto; object-fit: contain; }
.lightbox .x { position: absolute; top: 14px; right: 16px; color: #fff; font-size: 32px; background: none; border: 0; }
.actions { display: flex; justify-content: space-around; border-top: 1px solid var(--line); padding: 8px; color: var(--muted); font-size: 13px; }
.actions button { background: none; border: 0; color: inherit; }

.nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(480px, 100%); background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 0 14px;
}
.nav button { background: none; border: 0; color: var(--muted); font-size: 11px; padding: 6px 0; }
.nav button.on { color: var(--red); }
.nav .ico { font-size: 18px; display: block; }

.auth {
  min-height: 100dvh; padding: 28px 22px 40px;
  background: #fff;
  text-align: center;
}
.auth-logo { width: min(260px, 80%); margin: 10px auto 8px; }
.auth h1 { font-size: 28px; margin: 4px 0 2px; }
.auth .sub { font-size: 11px; letter-spacing: .16em; color: var(--red); font-weight: 700; margin-bottom: 16px; }
.auth p { color: var(--muted); margin-bottom: 22px; text-align: left; }
.field { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; color: var(--ink); }
.btn {
  width: 100%; border: 0; border-radius: 12px; padding: 14px; font-weight: 800;
  background: linear-gradient(90deg, var(--red), #9b1420); color: #fff; margin-top: 8px;
}
.btn.ghost { background: transparent; color: var(--blue); border: 1px solid var(--line); }
.fab { background: var(--red); color: #fff; }
.safe { margin-top: 18px; font-size: 13px; color: var(--muted); border: 1px dashed var(--safe); border-radius: 12px; padding: 12px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 12px 88px; }
.mcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mcard .ph { height: 110px; background: linear-gradient(135deg, #1e5aaa22, #d31e2b22); display: grid; place-items: center; font-size: 28px; }
.mcard .info { padding: 10px; }
.price { color: var(--red); font-weight: 800; }
.city { color: var(--muted); font-size: 12px; }

.reels { height: calc(100dvh - 200px); overflow-y: auto; scroll-snap-type: y mandatory; background: #000; }
.reel { min-height: calc(100dvh - 200px); scroll-snap-align: start; position: relative; display: flex; align-items: center; justify-content: center; background: #000; }
.reel video, .reel img { width: 100%; height: 100%; object-fit: contain; }
.reel-ui { position: absolute; left: 12px; right: 16px; bottom: 28px; color: #fff; text-shadow: 0 1px 4px #000; }
.reel h3 { font-size: 18px; color: #fff; }
.reel .meta { color: #f0c75e; }
.empty-reel { color: #fff; padding: 24px; display: block; }

.msg { padding: 12px 12px 88px; }
.thread { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 8px; display: flex; gap: 10px; }

.fab {
  position: fixed; right: calc(50% - 220px); bottom: 78px;
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--red); color: #fff; font-size: 28px; font-weight: 800;
}
@media (max-width: 480px) { .fab { right: 16px; } }

.modal {
  position: fixed; inset: 0; background: #000a; display: flex; align-items: flex-end; z-index: 40;
}
.sheet { width: min(480px, 100%); margin: 0 auto; background: var(--card); border-radius: 20px 20px 0 0; padding: 16px 16px 28px; }
.sheet h3 { margin-bottom: 10px; }
textarea.field { min-height: 90px; resize: vertical; }

.verify { display: inline-block; font-size: 11px; color: #1a0f0a; background: var(--gold2); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.empty { color: var(--muted); text-align: center; padding: 40px 16px; }
.search { width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; background: var(--bg); }
.mini { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 11px; }
.newsband { border-left: 4px solid var(--gold); }
.mcard { text-align: left; width: 100%; color: inherit; }
.mcard .ph img { width: 100%; height: 110px; object-fit: cover; }
.av.big { width: 56px; height: 56px; font-size: 22px; }
.filebtn { display: block; text-align: center; border: 1px dashed var(--blue); border-radius: 12px; padding: 12px; margin: 8px 0; color: var(--blue); font-weight: 700; }
.chat { padding: 8px 12px 88px; }
.back { background: none; border: 0; font-weight: 800; margin-bottom: 8px; }
.bubbles { display: flex; flex-direction: column; gap: 8px; min-height: 40vh; }
.bubble { background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; max-width: 80%; }
.bubble.me { align-self: flex-end; background: var(--red); color: #fff; border-color: var(--red); border-radius: 14px 14px 4px 14px; }
.composer { display: flex; gap: 8px; align-items: center; }
.composer .field { margin: 0; }
.btn.send { width: auto; padding: 12px 16px; margin: 0; }
.thread { width: 100%; text-align: left; color: inherit; }
