/* ============================================================
   EG — مصر
   风格: 法老金 / 黑 / 红 + 神庙圆拱 (arch, 砂岩底)
   RTL: html[dir="rtl"] 下镜像
   无 @import / 无外链字体
   ============================================================ */

:root {
  --brand: #c9a227;          /* 法老金 */
  --brand2: #a8121c;         /* 埃及红 */
  --brand3: #1a1512;         /* 玄武黑 */
  --bg: #f1e8d2;
  --card: #fff8e7;
  --ink: #2a2118;
}

body {
  font-family: 'Tajawal', 'Cairo', 'Segoe UI', sans-serif;
  background: #e6d9b8;
  color: var(--ink);
}
.app { background: var(--bg); }

/* 国旗色条: 红/白/黑 */
.flagstrip {
  height: 6px;
  background: linear-gradient(to right, #ce1126 0 33.3%, #fff8e7 33.3% 66.6%, #1a1512 66.6% 100%);
}

/* 头部: 黑金沙, 顶部圆拱 */
.appbar {
  background: linear-gradient(135deg, #1a1512 0%, #3a2c14 55%, #c9a227 170%);
  border-radius: 26px 26px 0 0;          /* 神庙拱顶 */
  border-bottom: 2px solid var(--brand);
}
.appbar .brand .logo { border-radius: 50%; background: rgba(201,162,39,.25); border: 1px solid rgba(201,162,39,.5); }
.appbar .iconbtn { border-radius: 50%; }

/* 余额卡: 砂岩金 */
.wallet-card {
  background: rgba(26,21,18,.4);
  border: 1px solid rgba(201,162,39,.5);
  border-radius: 18px 18px 6px 6px;
}
.wallet-card .acts a { color: #1a1512; border-radius: 10px; }

/* 卡片: 拱顶圆角 + 金框 */
.card {
  background: var(--card);
  border-radius: 14px 14px 4px 4px;
  border: 1px solid #e3d3a6;
  box-shadow: 0 2px 10px rgba(42,33,24,.08);
}

/* 按钮: 金红渐变 */
.btn {
  border-radius: 12px;
  background: linear-gradient(135deg, #c9a227, #a8121c);
  box-shadow: 0 4px 14px rgba(168,18,28,.28);
}
.btn.secondary { background: #e6d9b8; color: #2a2118; }

/* 促销横幅: 黑红金 */
.promo {
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(120deg, #1a1512 0%, #a8121c 120%);
  box-shadow: 0 6px 18px rgba(26,21,18,.35);
  border: 1px solid rgba(201,162,39,.5);
}

/* chips */
.chip { border-radius: 10px; border-color: #d8c690; color: var(--brand2); background: var(--card); }

/* 分类宫格 */
.cat {
  background: var(--card);
  border-radius: 12px 12px 4px 4px;
  border: 1px solid #e3d3a6;
}
.cat .nm { color: var(--ink); }

/* stats 条 */
.stats {
  background: linear-gradient(135deg, #1a1512, #c9a227);
  border-radius: 12px 12px 4px 4px;
}

/* badge */
.badge { background: var(--card); border-radius: 10px; border: 1px solid #e3d3a6; }
.badge .b-t { color: var(--ink); }

/* howto 序号: 金圆 */
.howto .n { background: var(--brand); color: #1a1512; }

.price { color: var(--brand2); }

/* Tabbar */
.tabbar { background: var(--card); border-top: 1px solid #e3d3a6; }
.tabbar a.on { color: var(--brand2); }
.tabbar a.on .ic { filter: none; }

/* ============================================================
   RTL 镜像 (EG)
   ============================================================ */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] th, html[dir="rtl"] td { text-align: right; }
html[dir="rtl"] .stats div { border-right: none; border-left: 1px solid rgba(255,255,255,.25); }
html[dir="rtl"] .stats div:last-child { border-left: none; }
html[dir="rtl"] .appbar .row { flex-direction: row-reverse; }
html[dir="rtl"] .wallet-card .acts { flex-direction: row-reverse; }
html[dir="rtl"] .tabbar { flex-direction: row-reverse; }
html[dir="rtl"] .wa-fab { left: auto; right: 50%; transform: translateX(calc(50% - 140px)); }
@media (max-width: 520px) {
  html[dir="rtl"] .wa-fab { right: auto; left: 16px; transform: translateX(-50%); }
}
