:root {
  --bg: #fbf6f8; --card: #ffffff; --ink: #2c1d2e; --muted: #7d6a7f; --line: #eee1e8;
  --rose: #d6457a; --rose-2: #f7d9e5; --plum: #6b3a78; --plum-2: #efe3f3; --gold: #c9973b; --gold-2: #fbf0da;
  --ok: #2f9e6e; --ok-2: #ddf3e8; --warn: #c9582a; --warn-2: #fde8dd; --water: #3d8fd6; --water-2: #e1eefa;
  --r: 20px; --shadow: 0 6px 22px rgba(107, 58, 120, .09);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Cairo', system-ui, sans-serif; font-size: 16px; line-height: 1.6; }
body { min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 110px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; } .grow { flex: 1; } .gap { height: 14px; }
.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: linear-gradient(135deg, var(--rose), var(--plum)); color: #fff; font-weight: 700; font-size: 16px; box-shadow: 0 6px 16px rgba(214, 69, 122, .3); }
.btn.block { width: 100%; } .btn.ghost { background: var(--plum-2); color: var(--plum); box-shadow: none; } .btn.small { padding: 7px 14px; font-size: 14px; }
.btn.ok { background: var(--ok); box-shadow: none; } .btn:disabled { opacity: .45; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--plum-2); color: var(--plum); font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip.on { background: var(--plum); color: #fff; } .chip.gold { background: var(--gold-2); color: #8a6420; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
input[type=text], input[type=number], input[type=time], input[type=search], input[type=tel], select { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-size: 16px; outline: none; }
input:focus, select:focus { border-color: var(--rose); }
label.f { display: block; font-weight: 700; margin: 12px 0 6px; font-size: 15px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 13px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; margin-bottom: 9px; }
.opt.on { border-color: var(--rose); background: #fff5f9; } .opt b { display: block; } .opt .e { font-size: 24px; }

/* الهيدر */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.top h1 { font-size: 22px; } .top .sub { color: var(--muted); font-size: 14px; }
.coach { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-2), var(--rose-2)); display: grid; place-items: center; font-size: 28px; flex: none; overflow: hidden; border: 2px solid #fff; box-shadow: var(--shadow); }
.coach img { width: 100%; height: 100%; object-fit: cover; }
.bubble { background: linear-gradient(135deg, #fff, #fff6fa); border: 1.5px solid var(--rose-2); border-radius: 18px 18px 4px 18px; padding: 12px 14px; font-size: 15px; }
.coachline { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 14px; }

/* دايرة السعرات */
.ring { position: relative; width: 170px; height: 170px; margin: 0 auto; }
.ring svg { transform: rotate(-90deg); } .ring .in { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .big { font-size: 34px; font-weight: 800; line-height: 1; } .ring .lbl { font-size: 13px; color: var(--muted); }
.stats { display: flex; justify-content: space-around; text-align: center; margin-top: 10px; } .stats b { display: block; font-size: 18px; } .stats span { font-size: 13px; color: var(--muted); }
.bar { height: 9px; border-radius: 9px; background: var(--line); overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--plum)); border-radius: 9px; }

/* الوجبات */
.meal { border-top: 1px solid var(--line); padding: 12px 0 4px; } .meal:first-of-type { border-top: 0; padding-top: 0; }
.meal .hd { display: flex; align-items: center; gap: 8px; } .meal .hd b { flex: 1; } .meal .hd .kc { color: var(--muted); font-size: 14px; }
.item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 15px; } .item .n { flex: 1; } .item .k { color: var(--muted); font-size: 14px; }
.x { width: 28px; height: 28px; border-radius: 50%; background: #f5eef2; color: var(--muted); font-size: 15px; flex: none; }
.add { color: var(--rose); font-weight: 700; font-size: 14px; padding: 6px 0; text-decoration: none; display: inline-block; }

/* الميّه */
.cups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cup { width: 38px; height: 46px; border-radius: 6px 6px 12px 12px; border: 2px solid var(--water); background: #fff; position: relative; overflow: hidden; }
.cup.on::after { content: ''; position: absolute; inset: 30% 0 0; background: var(--water); opacity: .75; }

/* قايمة الأكل */
.food { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--line); width: 100%; text-align: start; }
.food .n { flex: 1; } .food .k { font-weight: 700; color: var(--plum); font-size: 14px; white-space: nowrap; }
.plus { width: 32px; height: 32px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 22px; line-height: 1; flex: none; display: grid; place-items: center; padding: 0 0 3px; }
.qty { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 14px 0; }
.qty button { width: 44px; height: 44px; border-radius: 50%; background: var(--plum-2); color: var(--plum); font-size: 24px; font-weight: 800; }
.qty b { font-size: 28px; min-width: 60px; text-align: center; }

/* الروتين */
.tl { position: relative; padding-inline-start: 22px; }
.tl::before { content: ''; position: absolute; inset-inline-start: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--rose-2); }
.tl .s { position: relative; margin-bottom: 14px; }
.tl .s::before { content: ''; position: absolute; inset-inline-start: -21px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--rose); }
.tl .s.done::before { background: var(--ok); border-color: var(--ok); }
.tl .t { font-size: 13px; color: var(--rose); font-weight: 700; } .tl .s b { display: block; }

/* تمارين */
.ex { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); } .ex .e { font-size: 28px; width: 44px; text-align: center; }
.timer { text-align: center; padding: 10px 0; } .timer .e { font-size: 70px; } .timer .sec { font-size: 72px; font-weight: 800; line-height: 1; color: var(--rose); }
.timer.rest .sec { color: var(--ok); }

/* الوزن */
.chart { width: 100%; height: auto; display: block; }
.big-num { font-size: 32px; font-weight: 800; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }

.note { background: var(--gold-2); border-radius: 16px; padding: 12px 14px; font-size: 14px; color: #6d4f16; margin-bottom: 14px; }
.note.warn { background: var(--warn-2); color: #7a3515; }

/* الناف بار */
nav.bottom { position: fixed; bottom: 0; inset-inline: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: flex; justify-content: center; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
nav.bottom .in { display: flex; width: 100%; max-width: 560px; }
nav.bottom a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; padding: 4px 0; border-radius: 12px; }
nav.bottom a i { display: block; font-style: normal; font-size: 22px; line-height: 1.2; filter: grayscale(1); opacity: .7; }
nav.bottom a.on { color: var(--rose); } nav.bottom a.on i { filter: none; opacity: 1; }

/* شيت من تحت */
.sheet-bg { position: fixed; inset: 0; background: rgba(44, 29, 46, .4); z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; animation: up .2s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 20; animation: up .2s ease; white-space: nowrap; }

/* البداية */
.hero { text-align: center; padding: 30px 0 10px; } .hero .shoe { font-size: 64px; } .hero h1 { font-size: 30px; color: var(--plum); }
.steps { display: flex; gap: 6px; margin-bottom: 18px; } .steps i { flex: 1; height: 5px; border-radius: 5px; background: var(--line); } .steps i.on { background: var(--rose); }
.res { text-align: center; } .res .num { font-size: 52px; font-weight: 800; color: var(--rose); line-height: 1.1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .mini { background: var(--plum-2); border-radius: 16px; padding: 12px; text-align: center; } .mini b { display: block; font-size: 20px; color: var(--plum); } .mini span { font-size: 13px; color: var(--muted); }

/* ---------- لمسات الـ UX ---------- */
#app.enter > .wrap { animation: fade .25s ease; } @keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.arc { transition: stroke-dashoffset 1s cubic-bezier(.3, .8, .3, 1); }
button, .btn, .opt, .chip, .food, .cup { transition: transform .12s ease, background .15s ease; }
button:active, .btn:active, .opt:active, .food:active, .chip:active, .cup:active { transform: scale(.96); }
.grab { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: -6px auto 14px; }
.sheet { transition: transform .2s ease; } .sheet-bg { transition: opacity .2s ease; }
.coach.talk { animation: talk .5s ease-in-out infinite alternate; box-shadow: 0 0 0 4px var(--rose-2), var(--shadow); } @keyframes talk { to { transform: scale(1.07); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 9px; height: 14px; border-radius: 2px; animation: fall var(--d) ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(var(--r)); } }
.donebar { position: fixed; bottom: calc(64px + env(safe-area-inset-bottom)); inset-inline: 0; z-index: 4; display: flex; justify-content: center; padding: 0 12px 8px; pointer-events: none; }
.donebar .in { pointer-events: auto; width: 100%; max-width: 536px; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 12px 10px 10px; box-shadow: 0 10px 24px rgba(44, 29, 46, .25); font-size: 14px; }
nav.bottom a { position: relative; } nav.bottom a.on::before { content: ''; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 3px; background: var(--rose); }
.meal .add { background: #fff5f9; border: 1.5px dashed var(--rose-2); border-radius: 12px; padding: 6px 12px; margin: 4px 0 6px; }
input[type=number] { font-size: 20px; font-weight: 700; text-align: center; }
.hero-img { width: 190px; height: 190px; margin: 0 auto 10px; border-radius: 50%; overflow: hidden; background: var(--rose-2); border: 5px solid #fff; box-shadow: 0 12px 30px rgba(214, 69, 122, .25); font-size: 90px; display: grid; place-items: center; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.hero h1 span { font-size: 26px; }
.hello { background: linear-gradient(135deg, #e2578a, #6b3a78); color: #fff; border-radius: 24px; padding: 16px; margin-bottom: 14px; box-shadow: 0 10px 26px rgba(107, 58, 120, .25); }
.hello h1 { font-size: 20px; } .hello .sub { color: rgba(255, 255, 255, .8); font-size: 13px; }
.hello .coach { border-color: rgba(255, 255, 255, .7); }
.hello .tip { background: rgba(255, 255, 255, .16); border-radius: 16px; padding: 10px 12px; margin-top: 12px; font-size: 14px; line-height: 1.7; }
.hello .tip b { display: block; font-size: 12px; opacity: .85; }

/* ---------- الشريط اللي فوق (زرار رجوع ثابت) ---------- */
.topbar { position: sticky; top: 0; z-index: 6; background: rgba(251, 246, 248, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar .in { max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.topbar h1 { font-size: 19px; } .topbar .sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.topbar .back, .tb-btn { border: 0; cursor: pointer; width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); color: var(--plum); font-size: 22px; font-weight: 800; text-decoration: none; }
.tb-btn { font-size: 19px; } .tb-btn.light { background: rgba(255, 255, 255, .2); box-shadow: none; }
.topbar + .wrap { padding-top: 14px; }
a.opt { text-decoration: none; color: inherit; }
.opt.tight { padding: 10px; margin: 0; font-size: 14px; } .opt.tight .e { font-size: 20px; }
.wrapchips { flex-wrap: wrap; overflow: visible; }
.hero.intro { padding-top: 40px; } .hero-img.big { width: 240px; height: 240px; }
.ideal { margin-top: 12px; background: linear-gradient(135deg, #fff, var(--gold-2)); } .ideal .e { font-size: 30px; } .ideal .big-num { font-size: 26px; color: #8a6420; }
.dmcard { background: linear-gradient(135deg, #fff, #e8f3fb); }
.linkcard { display: block; text-decoration: none; color: inherit; } .linkcard .e { font-size: 30px; width: 40px; text-align: center; }
.reco { border: 1.5px solid var(--rose-2); } .reco .small { margin-bottom: 4px; }
h3.sec { font-size: 16px; margin: 16px 2px 10px; color: var(--plum); }
.article p { margin: 0 0 12px; } .li { position: relative; padding: 8px 18px 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.li::before { content: ''; position: absolute; right: 2px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); }
.article .note { margin: 12px 0 0; } .tipb { margin-top: 12px; }
.okchip { background: var(--ok-2); color: var(--ok); } .delta { width: 60px; text-align: left; }
.tag.gold { background: var(--gold-2); color: #8a6420; }
.seg { display: flex; background: var(--plum-2); border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.seg a { flex: 1; text-align: center; padding: 8px 4px; border-radius: 10px; text-decoration: none; color: var(--plum); font-weight: 700; font-size: 14px; }
.seg a.on { background: #fff; box-shadow: 0 2px 8px rgba(107, 58, 120, .15); }
/* كلام دكتورة ولاء مكتوب وهي بتتكلم */
.caption { position: fixed; top: calc(70px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 536px; z-index: 25; display: flex; gap: 10px; align-items: center;
  background: #fff; border: 1.5px solid var(--rose-2); border-radius: 20px; padding: 10px 12px; box-shadow: 0 12px 30px rgba(107, 58, 120, .2); font-size: 14.5px; animation: up .25s ease; }
.tutcard { width: 100%; text-align: start; background: linear-gradient(135deg, #fff, var(--rose-2)); }
.caption .coach { width: 44px; height: 44px; } .caption b { font-size: 12px; color: var(--rose); }

/* ---------- المميزات الإضافية ---------- */
.shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.shortcuts a { background: #fff; border-radius: 18px; padding: 12px 6px; text-align: center; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.shortcuts .e { font-size: 28px; } .shortcuts b { font-size: 13.5px; } .shortcuts span:last-child { font-size: 11.5px; color: var(--muted); }
.addtools { margin-bottom: 12px; } .addtools .btn { padding: 11px 8px; font-size: 15px; }
.lock { background: linear-gradient(135deg, #fff, var(--plum-2)); }
.sw { width: 44px; height: 26px; border-radius: 26px; background: var(--line); position: relative; flex: none; margin-inline-start: auto; transition: background .2s; }
.sw::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); transition: right .2s; }
.sw.on { background: var(--ok); } .sw.on::after { right: 21px; }
.cal30 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cal30 .cell { aspect-ratio: 1; border-radius: 12px; background: #f5eef2; display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 15px; }
.cal30 .ok { background: linear-gradient(135deg, var(--rose), var(--plum)); color: #fff; } .cal30 .miss { background: #fbe4e4; color: #c9582a; } .cal30 .now { border: 2.5px solid var(--rose); color: var(--rose); background: #fff; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge { background: #f7f1f4; border-radius: 16px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: .55; }
.badge span { font-size: 28px; } .badge b { font-size: 12.5px; } .badge small { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.3; }
.badge.has { opacity: 1; background: linear-gradient(135deg, #fff, var(--gold-2)); border: 1.5px solid #f0d9a6; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .cmp figure { margin: 0; } .cmp img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; }
.cmp figcaption { text-align: center; font-size: 12.5px; color: var(--muted); }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .ph { position: relative; } .ph img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; display: block; }
.ph span { position: absolute; bottom: 4px; right: 4px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 8px; }
.ph .x { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; font-size: 12px; background: rgba(255, 255, 255, .85); } .ph.sel img { outline: 3px solid var(--rose); }
.scanbox { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 4/3; } .scanbox video { width: 100%; height: 100%; object-fit: cover; }
.scanbox i { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: #ff4d7e; box-shadow: 0 0 12px #ff4d7e; }
.snapimg { width: 100%; max-height: 240px; object-fit: cover; border-radius: 16px; margin: 10px 0; }
.snapit { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); } .snapit.off { opacity: .45; } .snapit .chk { font-size: 20px; }
.qmini { display: flex; align-items: center; gap: 6px; } .qmini button { width: 28px; height: 28px; border-radius: 50%; background: var(--plum-2); color: var(--plum); font-weight: 800; }
.plan { display: block; width: 100%; text-align: center; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 10px; position: relative; }
.plan.best { border-color: var(--rose); background: #fff7fa; } .plan i { position: absolute; top: -12px; right: 16px; background: var(--rose); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 10px; }
.plan b { display: block; font-size: 17px; } .plan .price { display: block; font-size: 28px; font-weight: 800; color: var(--rose); } .plan small { color: var(--muted); }
.payto { font-size: 30px; font-weight: 800; color: var(--plum); text-align: center; letter-spacing: 2px; margin: 6px 0; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; margin-top: 12px; color: var(--muted); } .agree input { margin-top: 5px; }
.shopi { width: 100%; text-align: start; gap: 10px; } .shopi.got .n { text-decoration: line-through; color: var(--muted); }

/* ---------- لفّة UI/UX تانية ---------- */
nav.bottom a i { filter: none; opacity: 1; height: 26px; display: grid; place-items: center; color: #b3a3b6; transition: color .15s, transform .15s; }
nav.bottom a.on i { color: var(--rose); transform: translateY(-1px); }
nav.bottom a.on::before { top: -6px; left: 34%; right: 34%; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.quick a, .quick button { background: #fff; border-radius: 18px; padding: 10px 2px 8px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-size: 12.5px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.quick span { font-size: 24px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--rose-2); }
.quick > :nth-child(2) span { background: var(--plum-2); } .quick > :nth-child(3) span { background: var(--water-2); } .quick > :nth-child(4) span { background: var(--gold-2); }
.x { width: 34px; height: 34px; }
.hint { background: #fbf6f8; border-radius: 10px; padding: 6px 10px; margin: 4px 0; }
.steplbl { text-align: center; font-size: 12.5px; color: var(--muted); margin: -10px 0 14px; }
.card h3 { letter-spacing: 0; }
body { -webkit-font-smoothing: antialiased; }
.btn { min-height: 46px; } .btn.small { min-height: 36px; }
.hello .tb-btn.light { width: 40px; height: 40px; font-size: 18px; }

.spk { float: left; width: 34px; height: 34px; margin: -4px 8px 2px -4px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(107, 58, 120, .18); font-size: 16px; display: grid; place-items: center; }
.hello .spk { background: rgba(255, 255, 255, .9); }
.bubble.center .spk { float: none; margin: 0 auto 6px; }

.sheet { position: relative; }
.sheet-x { position: absolute; top: 12px; left: 14px; width: 36px; height: 36px; border-radius: 50%; background: #f5eef2; color: var(--muted); font-size: 16px; z-index: 2; }

/* ---------- الترتيب ---------- */
.mine { background: linear-gradient(135deg, #fff, var(--gold-2)); } .mine .e { font-size: 34px; }
.rankbadge { background: var(--plum); color: #fff; font-weight: 800; border-radius: 12px; padding: 4px 10px; }
.avs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; } .av { font-size: 26px; height: 48px; border-radius: 14px; background: #f5eef2; }
.av.on { background: var(--rose-2); outline: 2px solid var(--rose); }
.lbrow { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); border-radius: 12px; }
.lbrow .pos { width: 30px; text-align: center; font-weight: 800; color: var(--muted); font-size: 18px; } .lbrow.top .pos { font-size: 24px; }
.lbrow .av { font-size: 24px; background: none; height: auto; } .lbrow .n { flex: 1; display: flex; flex-direction: column; } .lbrow .pts { color: var(--plum); font-size: 17px; }
.lbrow.me { background: #fff5f9; outline: 1.5px solid var(--rose-2); }

/* ---------- الشات والخطة الذكية ---------- */
.smart { background: linear-gradient(135deg, #fff, #eef6ff); } .smart .e { font-size: 30px; }
.fab { position: fixed; bottom: calc(76px + env(safe-area-inset-bottom)); left: 16px; z-index: 5; display: flex; align-items: center; gap: 6px; background: linear-gradient(135deg, var(--rose), var(--plum)); color: #fff; text-decoration: none; border-radius: 30px; padding: 5px 14px 5px 5px; box-shadow: 0 10px 24px rgba(107, 58, 120, .35); font-weight: 800; font-size: 14px; }
.fab img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.chatwrap { padding-bottom: 170px; } #msgs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.cmsg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.7; }
.cmsg.u { align-self: flex-start; background: linear-gradient(135deg, var(--rose), var(--plum)); color: #fff; border-radius: 18px 18px 18px 4px; }
.cmsg.a { align-self: flex-end; background: #fff; box-shadow: var(--shadow); display: flex; gap: 8px; align-items: flex-start; border-radius: 18px 18px 4px 18px; }
.cmsg.a .coach { width: 34px; height: 34px; flex: none; } .cmsg.typing div:last-child { color: var(--muted); }
.chatbar { position: fixed; bottom: calc(64px + env(safe-area-inset-bottom)); inset-inline: 0; z-index: 4; padding: 8px 12px; background: rgba(251, 246, 248, .96); border-top: 1px solid var(--line); }
.chatbar .in { max-width: 560px; margin: 0 auto; display: flex; gap: 8px; } .chatbar input { font-size: 16px; }

/* صور التمارين والوجبات */
.exa { display: inline-block; position: relative; width: 84px; height: 52px; flex: none; border-radius: 12px; overflow: hidden; background: #f7d9e5; }
.exa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exa img.b { animation: exflip 1.6s steps(1) infinite; } .exa.nob img.b { display: none; }
@keyframes exflip { 0% { opacity: 0; } 50% { opacity: 1; } }
.exa.big { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; border-radius: 22px; margin: 8px 0 12px; }
.mimg { width: 100%; max-width: 260px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; margin: 6px 0; }
.food .mimg, .item .mimg { width: 56px; height: 56px; max-width: none; aspect-ratio: auto; margin: 0; border-radius: 12px; flex: none; }
[hidden] { display: none !important; }
.spk.on { background: var(--rose); color: #fff; box-shadow: 0 0 0 4px rgba(214, 69, 122, .25); }

/* ===== مراجعة UI/UX (2026-09-29) ===== */
:root { color-scheme: light; --rose-ink: #b8356a; --ok-ink: #1f7a52; --gold-ink: #98701f; --warn-ink: #b04a20; }
.btn { background: linear-gradient(135deg, #c23b70, var(--plum)); }
.btn.ghost { background: var(--plum-2); }
.btn.big { min-height: 54px; font-size: 17px; margin: 6px 0 12px; }
.add, .tl .t { color: var(--rose-ink); }
.okchip { color: var(--ok-ink); } .chip.gold, .tag.gold { color: var(--gold-ink); }
.mini span { color: #6b5a6e; }
nav.bottom a i { color: var(--muted); } nav.bottom a.on, nav.bottom a.on i { color: var(--rose-ink); } nav.bottom a.on { font-weight: 800; } nav.bottom a { padding: 6px 0; }
nav.bottom { backdrop-filter: none; }
input::placeholder { font-weight: 400; color: #b3a3b1; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }
input:focus-visible, select:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--rose-2); }
.topbar h1 { font-size: 18px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.topbar .sub { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.toast { white-space: normal; max-width: calc(100% - 32px); width: max-content; text-align: center; bottom: calc(84px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; line-height: 1.5; }
.toast button { background: none; border: 0; color: #f7c3d6; font: inherit; font-weight: 800; padding: 4px 2px; cursor: pointer; white-space: nowrap; }
body:has(.donebar) .toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
.sheet { max-height: 90vh; max-height: 90dvh; overscroll-behavior: contain; }
.x { width: 40px; height: 40px; } .ph .x { width: 36px; height: 36px; }
.agree { min-height: 44px; align-items: center; } .agree input { width: 22px; height: 22px; flex: none; }
.chip { min-height: 40px; }
/* النهارده */
.hello .tip { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ring .lbl2 { font-size: 12px; color: var(--muted); }
.stats small { font-size: 12px; color: var(--muted); font-weight: 600; } .stats .bar { margin-top: 4px; height: 5px; }
.ringline { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink); text-decoration: none; line-height: 1.7; }
button.note, a.note { display: block; width: 100%; text-align: start; border: 0; cursor: pointer; font: inherit; font-size: 14px; text-decoration: none; }
.note.over { background: var(--rose-2); color: #7a2348; }
.note.okn { background: var(--ok-2); color: #1b5e41; }
.trialcard { border: 1.5px solid #f0d9a6; } .trialcard .bar { margin-top: 8px; height: 6px; }
.trialcard.urgent { background: var(--warn-2); color: #7a2e10; border-color: #f3c9b8; }
.hint.sugg { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px dashed #ecc7d6; background: #fff8fb; cursor: pointer; font: inherit; font-size: 13.5px; text-align: start; min-height: 44px; }
.hint.sugg b { color: var(--rose-ink); white-space: nowrap; font-size: 13px; }
.waterct { color: var(--water); font-size: 14px; }
.allfeat { display: block; text-align: center; font-weight: 800; color: var(--rose-ink); text-decoration: none; padding: 10px; margin: -4px 0 8px; }
.wrap:has(+ .fab) { padding-bottom: 150px; }
/* إضافة الأكل */
.food[role=button] { cursor: pointer; } .food .plus { border: 0; cursor: pointer; width: 38px; height: 38px; }
/* روتيني */
.rmeal { display: flex; gap: 10px; align-items: flex-start; margin-top: 4px; } .rmeal .mimg { width: 72px; height: 72px; max-width: none; aspect-ratio: auto; margin: 0; flex: none; }
.rmeal .row { flex-wrap: wrap; gap: 6px; }
.tl .s.now { background: #fff5f9; border-radius: 14px; box-shadow: 0 0 0 2px var(--rose-2); }
/* الاشتراك */
.plan { position: relative; } .plan .radio { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d9c6d8; }
.plan.on { box-shadow: 0 0 0 2.5px var(--rose), var(--shadow); } .plan.on .radio { border-color: var(--rose); background: radial-gradient(circle, var(--rose) 45%, #fff 50%); }
.trust { font-size: 13px; line-height: 1.8; color: #1b5e41; background: var(--ok-2); border-radius: 14px; padding: 10px 12px; margin: 0 0 12px; }
.remrow { width: 100%; border: 0; background: none; font: inherit; text-align: start; cursor: pointer; }
.btn.danger { background: #fff; color: var(--warn-ink); border: 1.5px solid #f3c9b8; box-shadow: none; }
.cal30 .cell.ok.now { box-shadow: 0 0 0 2.5px var(--rose); }
.spk { width: 38px; height: 38px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .confetti { display: none; } }
.splash { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--plum); font-weight: 800; font-size: 22px; }
.splash img { width: 88px; height: 88px; border-radius: 24px; }
.dots { display: flex; gap: 5px; padding: 6px 2px; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dt 1s infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dt { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.btn:disabled { opacity: .55; cursor: default; }
.article p, .article .li { font-size: 16.5px; line-height: 1.85; }
/* السكر الذكي */
.dmres { border-radius: 18px; padding: 14px; text-align: center; margin-bottom: 12px; } .dmres .big { font-size: 20px; font-weight: 800; } .dmres .small { opacity: .85; }
.dmres.ok { background: var(--ok-2); color: #1b5e41; } .dmres.mid { background: var(--gold-2); color: #6d4f16; } .dmres.bad { background: var(--warn-2); color: #7a2e10; }
.bubble .li { margin-top: 6px; }
.inscard { border: 1.5px solid #e6d3ef; } .inscard.done { background: #f3fbf7; border-color: #cdebdc; } .inscard .e { font-size: 28px; }
.cbx { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #d9c6d8; display: grid; place-items: center; flex: none; color: #fff; font-weight: 800; font-size: 15px; } .cbx.on { background: var(--ok); border-color: var(--ok); }
.wimg { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--plum-2), var(--rose-2)); display: grid; place-items: center; flex: none; overflow: hidden; }
.hello .grow { min-width: 0; } .hello h1, .hello .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrchip { display: inline-block; margin-top: 10px; padding: 6px 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 16px; }
.hrbig { font-size: 30px; margin: 6px 0; } .hrbig b { font-size: 44px; }
details.how { border-bottom: 1px solid var(--line); padding: 10px 0; } details.how summary { font-weight: 700; cursor: pointer; } details.how p { margin: 6px 0 0; line-height: 1.8; }
/* صفحة الاشتراك: كارت كبير + شريط في الركن + سعر ضخم + شبكة مميزات */
.plseg { display: flex; background: var(--plum-2); border-radius: 999px; padding: 4px; margin: 4px 0 16px; }
.plseg button { flex: 1; padding: 10px; border-radius: 999px; font-weight: 800; color: var(--plum); }
.plseg button.on { background: #fff; color: var(--rose-ink); box-shadow: var(--shadow); }
.plhero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, #fff7fa 100%); border: 3px solid var(--rose); border-radius: 28px; padding: 26px 14px 14px; margin-bottom: 14px; text-align: center; }
.plhero .rib { position: absolute; top: 24px; left: -42px; white-space: nowrap; transform: rotate(-35deg); background: linear-gradient(90deg, #c23b70, var(--plum)); color: #fff; font-size: 13px; font-weight: 800; padding: 3px 46px; box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.plhero .btn.big { margin: 16px 0 8px; } .plhero .trust { text-align: start; margin: 0; }
.plhero h2 { font-size: 26px; font-weight: 800; }
.plhero .amt { display: flex; align-items: baseline; justify-content: center; gap: 8px; color: var(--rose-ink); line-height: 1.1; margin: 6px 0 4px; }
.plhero .amt b { font-size: 72px; font-weight: 900; } .plhero .amt span { font-size: 22px; font-weight: 800; }
.plhero > p { font-size: 15px; margin: 4px 8px 16px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: start; }
.fcard { background: #fff; border-radius: 18px; padding: 12px; box-shadow: 0 3px 0 #f1e4ea, var(--shadow); display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-content: start; }
.fcard i { font-style: normal; font-size: 28px; line-height: 1.2; grid-row: span 2; }
.fcard b { font-size: 14.5px; line-height: 1.45; } .fcard small { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.subx { text-align: center; font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }
.subx button { font-size: 12.5px; color: var(--muted); text-decoration: underline; padding: 6px 4px; }
.shot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 110px; border: 2px dashed var(--rose); border-radius: 18px; background: #fff7fa; color: var(--rose-ink); font-weight: 800; padding: 14px; cursor: pointer; text-align: center; }
.shot.on { border-style: solid; border-color: var(--ok); background: var(--ok-2); color: var(--ok-ink); }
.shot img { max-height: 220px; max-width: 100%; border-radius: 12px; }
/* سرعة: الصفوف اللي برّه الشاشة مش بتترسم لحد ما البنت توصلها */
#res .food, .shopi { content-visibility: auto; contain-intrinsic-size: auto 56px; }
/* عرض الإطلاق (مؤقت) + السعر في اليوم */
.offerbar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; background: linear-gradient(90deg, #c23b70, var(--plum)); color: #fff; font-weight: 800; border-radius: 18px; padding: 10px 12px; margin: 4px 0 12px; text-align: center; font-size: 15px; }
.cd { display: inline-flex; gap: 6px; } .cd span { background: rgba(255, 255, 255, .18); border-radius: 10px; padding: 2px 8px; min-width: 44px; text-align: center; line-height: 1.25; }
.cd b { display: block; font-size: 18px; } .cd small { display: block; font-size: 10.5px; font-weight: 600; opacity: .9; }
.perday { display: inline-block; background: var(--ok-2); color: var(--ok-ink); font-weight: 800; font-size: 13px; border-radius: 999px; padding: 2px 12px; margin: 2px 0 2px; }
/* صفحة الدفع (١ بياناتك ← ٢ الدفع ← ٣ الصورة) */
.pay2 .p2t { font-size: 24px; color: var(--plum); }
.p2sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.p2amt { font-size: 40px; font-weight: 900; color: var(--rose-ink); line-height: 1.15; } .p2amt span { font-size: 18px; }
.p2side { text-align: end; font-size: 13.5px; color: var(--muted); display: grid; gap: 4px; } .p2side a { color: var(--plum); font-weight: 800; }
.p2card { background: #fff; border-radius: 24px; padding: 18px; box-shadow: var(--shadow); }
.p2h { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; margin: 22px 0 8px; } .p2h:first-child { margin-top: 0; }
.p2h i { font-style: normal; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #c23b70, var(--plum)); color: #fff; font-size: 15px; }
.p2tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p2tile { display: grid; place-items: center; gap: 6px; padding: 16px 8px; border-radius: 18px; border: 2px solid var(--line); background: #fff; font-weight: 800; }
.p2tile.on.vc { border-color: #e60000; background: #fdecec; } .p2tile.on.ip { border-color: #5b2a86; background: #f2ebf8; }
.lg-vc { color: #e60000; font-size: 24px; font-style: italic; display: inline-flex; align-items: center; gap: 4px; } .lg-vc i { font-style: normal; font-size: 26px; transform: rotate(-20deg); }
.lg-ip { color: #5b2a86; font-size: 22px; } .lg-ip i { font-style: normal; color: #f26b21; }
.p2num { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1.5px solid var(--line); border-radius: 18px; padding: 10px 12px; margin-top: 10px; }
.p2num > span .lg-vc, .p2num > span .lg-ip { font-size: 15px; } .p2num > span .lg-vc i { font-size: 16px; }
.p2num b { flex: 1; font-size: 22px; letter-spacing: 1px; color: var(--ink); text-align: start; min-width: 150px; }
.p2dial { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--rose-ink); }
.p2up { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 14px; border: 2px dashed var(--rose); border-radius: 20px; background: #fff7fa; text-align: center; cursor: pointer; }
.p2up .ic { font-size: 34px; } .p2up b { color: var(--plum); font-size: 16px; } .p2up small { color: var(--muted); }
.p2up.on { border-style: solid; border-color: var(--ok); background: var(--ok-2); } .p2up.on b { color: var(--ok-ink); } .p2up img { max-height: 220px; max-width: 100%; border-radius: 12px; margin-top: 8px; }
.p2note { font-size: 14px; font-weight: 700; text-align: center; margin: 16px 0 10px; }
.p2seg { display: inline-flex; background: var(--plum-2); border-radius: 999px; padding: 3px; justify-self: end; } .p2seg button { padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; color: var(--plum); } .p2seg button.on { background: #fff; color: var(--rose-ink); box-shadow: var(--shadow); }
.p2me { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--plum-2); border-radius: 16px; padding: 10px 14px; } .p2me span { color: var(--muted); } .p2me button { margin-inline-start: auto; color: var(--plum); font-weight: 800; text-decoration: underline; }
#num { cursor: copy; }
.p2amt { white-space: nowrap; }
/* شريط «اشتركي دلوقتي» الثابت فوق */
#subbar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: calc(env(safe-area-inset-top) + 6px) 14px 6px; background: linear-gradient(90deg, #c23b70, var(--plum)); color: #fff; text-decoration: none; font-size: 13.5px; font-weight: 700; box-shadow: 0 4px 14px rgba(107, 58, 120, .25); }
#subbar b { flex: none; background: #fff; color: var(--rose-ink); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; font-weight: 900; }
#subbar.hot b { animation: sbpulse 1.6s ease-in-out infinite; }
@keyframes sbpulse { 50% { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) { #subbar.hot b { animation: none; } }
body.has-subbar #app { padding-top: calc(env(safe-area-inset-top) + 42px); }
body.has-subbar .topbar { top: calc(env(safe-area-inset-top) + 42px); padding-top: 0; }
#subbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ownin { display: block; margin: 18px auto 0; color: var(--muted); font-size: 13px; text-decoration: underline; padding: 8px; }
