/* كنز الكلمة — سما وسحاب ونجيلة، كروت كريمي بحواف تخينة، زراير «بتتداس» */
:root {
  --sky1: #5ec8f8; --sky2: #bfe9ff; --grass1: #7fd36e; --grass2: #5cbf55;
  --card: #fffaf0; --card-bd: #f1e2c2; --ink: #2b2350; --muted: #7a7398;
  --yellow: #ffcf33; --yellow-d: #e3a700; --purple: #8b6cf6; --purple-l: #efe9ff; --purple-d: #6a4ee0;
  --green: #31c48d; --green-l: #dcf8ec; --red: #ff6b6b; --red-l: #ffe5e5; --orange: #ff9f43;
  --r: 22px; --font: 'Baloo Bhaijaan 2', system-ui, sans-serif; --verse: 'Noto Naskh Arabic', 'Baloo Bhaijaan 2', serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--sky1); }
body { margin: 0; font-family: var(--font); color: var(--ink); min-height: 100vh; background: linear-gradient(#5ec8f8 0%, #8fd8fb 45%, #d9f2ff 100%) fixed; overflow-x: hidden; }
a { color: var(--purple-d); font-weight: 700; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- المنظر ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sun { position: absolute; top: 34px; left: 7%; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle, #fff6b0 0, #ffd93b 55%, #ffc21a 100%); box-shadow: 0 0 0 14px rgba(255, 221, 80, .25), 0 0 60px 20px rgba(255, 214, 60, .35); animation: sunpulse 5s ease-in-out infinite; }
.cloud { position: absolute; height: 34px; background: #fff; border-radius: 40px; opacity: .95; animation: drift 60s linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 46px; height: 46px; top: -22px; right: 18px; }
.cloud::after { width: 34px; height: 34px; top: -14px; right: 54px; }
.c1 { width: 120px; top: 120px; right: -140px; animation-duration: 70s; }
.c2 { width: 90px; top: 60px; right: -120px; animation-duration: 95s; animation-delay: -40s; transform: scale(.8); }
.c3 { width: 140px; top: 220px; right: -160px; animation-duration: 110s; animation-delay: -75s; opacity: .8; }
.hill { position: absolute; border-radius: 50%; }
.h1 { width: 140vw; height: 46vh; left: -30vw; bottom: -30vh; background: var(--grass1); }
.h2 { width: 110vw; height: 40vh; right: -40vw; bottom: -28vh; background: var(--grass2); }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-130vw); } }
@keyframes sunpulse { 50% { box-shadow: 0 0 0 20px rgba(255, 221, 80, .18), 0 0 70px 26px rgba(255, 214, 60, .3); } }

.wrap { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 14px 16px 110px; }
body.day .wrap, body.welcome .wrap { padding-bottom: 40px; }

/* ---------- كروت ---------- */
.card { background: var(--card); border: 3px solid var(--card-bd); border-radius: var(--r); padding: 18px; margin: 14px 0; box-shadow: 0 6px 0 rgba(120, 90, 30, .12), 0 14px 30px rgba(30, 60, 120, .12); }
.card-hd { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px dashed var(--card-bd); }
.card-hd h2 { font-size: 1.3rem; }
.muted { color: var(--muted); margin: 2px 0; }
.small { font-size: .9rem; }
.center { text-align: center; }
.sec { font-size: 1.15rem; margin-bottom: 8px; }
.mascot { display: block; width: 150px; margin: 0 auto 6px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.12)); animation: bob 3s ease-in-out infinite; }
.mascot-sm { width: 58px; flex: none; filter: drop-shadow(0 4px 5px rgba(0,0,0,.1)); }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- زراير ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 800 1.1rem var(--font); color: var(--ink); background: var(--yellow); border: 0; border-radius: 18px; padding: 12px 20px; box-shadow: 0 5px 0 var(--yellow-d); cursor: pointer; transition: transform .08s, box-shadow .08s; text-align: center; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--yellow-d); }
.btn:disabled { background: #e9e4d6; box-shadow: 0 5px 0 #cfc8b4; color: #9a93ad; cursor: default; }
.btn.big { width: 100%; font-size: 1.3rem; padding: 15px; margin-top: 12px; }
.btn.ghost { background: #fff; box-shadow: 0 4px 0 var(--card-bd); border: 2px solid var(--card-bd); }
.btn.sm { font-size: .95rem; padding: 8px 14px; }
.btn.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.03); } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.row2 .btn { width: 100%; }

/* ---------- الدخول ---------- */
.brand { text-align: center; padding: 6px 0 0; }
.brand-logo { width: 110px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.15)); animation: bob 3.4s ease-in-out infinite; }
.brand h1 { font-size: 2.6rem; color: #fff; -webkit-text-stroke: 1px #3a2d8f; text-shadow: 0 4px 0 #3a2d8f, 0 8px 16px rgba(30, 30, 90, .3); letter-spacing: 0; }
.brand .tag { display: inline-block; margin: 6px 0 0; background: #fff8d6; border: 2px solid #ffd76a; border-radius: 999px; padding: 3px 14px; font-weight: 700; font-size: .95rem; }
.step { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 16px 0 8px; font-size: 1.05rem; }
.step i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-size: .9rem; flex: none; }
.inp, .fld input { width: 100%; font: 600 1.1rem var(--font); padding: 12px 14px; border: 2.5px solid #e6dcf7; border-radius: 16px; background: #fff; color: var(--ink); outline: none; }
.inp:focus, .fld input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px var(--purple-l); }
.fld { display: block; margin: 10px 0; }
.fld span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt input, .avopt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 12px; border: 2.5px solid #e6dcf7; border-radius: 16px; background: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 #ece4fb; }
.opt .num { width: 28px; height: 28px; border-radius: 9px; background: #e3f4ff; display: grid; place-items: center; }
.opt input:checked + span { border-color: var(--purple); background: var(--purple-l); box-shadow: 0 4px 0 #cbbcf9; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avopt span { display: grid; place-items: center; aspect-ratio: 1; font-size: 1.8rem; border-radius: 16px; background: #f6f2ff; border: 2.5px solid transparent; cursor: pointer; transition: transform .1s; }
.avopt input:checked + span { background: #fff3c4; border-color: var(--yellow); transform: scale(1.08); box-shadow: 0 4px 0 var(--yellow-d); }
.hint { background: #fff8d6; border: 2px dashed #ffd76a; border-radius: 14px; padding: 8px 12px; font-size: .92rem; margin: 10px 0 0; }
.alert { background: var(--red-l); border: 2px solid #ffb3b3; color: #b3261e; padding: 10px 14px; border-radius: 14px; font-weight: 700; margin-bottom: 10px; }
.flash { position: relative; z-index: 2; background: #fff; border-radius: 16px; padding: 10px 14px; font-weight: 700; margin-bottom: 6px; box-shadow: 0 4px 0 rgba(0,0,0,.08); border: 2px solid var(--green); }
.flash.warn { border-color: var(--orange); }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.player { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 18px; background: #fff; border: 2.5px solid #e6dcf7; box-shadow: 0 4px 0 #ece4fb; color: var(--ink); }
.player .av { font-size: 2.6rem; }
.player small { color: var(--muted); font-weight: 600; }

/* ---------- الرئيسية ---------- */
.hud { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; color: var(--ink); background: rgba(255,255,255,.9); padding: 6px 14px 6px 8px; border-radius: 999px; box-shadow: 0 4px 0 rgba(0,0,0,.08); min-width: 0; }
.me b { display: block; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-weight: 700; display: block; }
.av { font-size: 1.9rem; width: 46px; height: 46px; display: grid; place-items: center; background: #fff3c4; border-radius: 50%; flex: none; }
.pills { display: flex; gap: 6px; flex: none; }
.pill { background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 800; box-shadow: 0 4px 0 rgba(0,0,0,.08); white-space: nowrap; transition: transform .2s; }
.pill.fire { color: #e8590c; } .pill.xp { color: #7a4fe0; }
.pill.bump { transform: scale(1.25); }
.lvbar { position: relative; height: 22px; margin: 12px 4px 0; background: rgba(255,255,255,.6); border-radius: 999px; overflow: hidden; border: 2px solid #fff; }
.lvbar i { position: absolute; inset: 0 0 0 auto; background: linear-gradient(90deg, #ffcf33, #ff9f43); border-radius: 999px; }
.lvbar span { position: relative; display: block; text-align: center; font-size: .78rem; font-weight: 800; line-height: 18px; }
.hero { text-align: center; }
.hero h2 { font-size: 1.5rem; margin: 4px 0; }
.hero-top { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.chip { background: #eef8ff; border: 2px solid #cdeafe; border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .85rem; }
.ref { font-size: 1.25rem; font-weight: 800; color: var(--purple-d); margin: 2px 0; }
.ref small { color: var(--muted); font-weight: 600; font-size: .85rem; }
.hero.friday { background: linear-gradient(#f2fff0, var(--card)); }
.stars { font-size: 2rem; margin: 4px 0; letter-spacing: 4px; }
.big-num { font-size: 3rem; font-weight: 800; margin: 0; color: var(--purple-d); line-height: 1.2; }
.big-num small { font-size: 1.1rem; color: var(--muted); }
.path { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0; margin: 10px 0 4px; position: relative; }
.path::before { content: ''; position: absolute; top: 24px; right: 7%; left: 7%; height: 6px; background: repeating-linear-gradient(90deg, #e6dcf7 0 10px, transparent 10px 16px); border-radius: 3px; }
.node { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.node .dot { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; background: #f1eef8; border: 3px solid #e2dcf0; box-shadow: 0 4px 0 #ddd5ee; line-height: 1; letter-spacing: -6px; }
.node small { font-size: .74rem; font-weight: 700; color: var(--muted); }
.node.done .dot { background: #fff3c4; border-color: var(--yellow); box-shadow: 0 4px 0 var(--yellow-d); font-size: .7rem; }
.node.today .dot { background: var(--purple); border-color: #a48cff; box-shadow: 0 4px 0 var(--purple-d); animation: pulse 1.6s infinite; font-size: 1.4rem; }
.node.catchup .dot { background: #ffe9d1; border-color: var(--orange); box-shadow: 0 4px 0 #e57a13; }
.node.missed .dot { background: #fff; border-style: dashed; }
.node.rest .dot { background: var(--green-l); border-color: #9ee6c4; box-shadow: 0 4px 0 #8fd9b5; }
.node.locked .dot { opacity: .55; font-size: 1rem; }
.legend { font-size: .78rem; color: var(--muted); text-align: center; margin: 6px 0 0; }
.daylist { display: grid; gap: 8px; margin-top: 8px; }
.dayrow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: #fff; border: 2px solid #ece4fb; color: var(--ink); box-shadow: 0 3px 0 #ece4fb; }
.dayrow b { color: var(--purple-d); } .dayrow em { font-style: normal; color: var(--muted); font-size: .85rem; }

/* ---------- شريط التنقل ---------- */
.tabbar { position: fixed; z-index: 5; bottom: 10px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: 24px; padding: 6px; box-shadow: 0 6px 0 rgba(60, 40, 120, .15), 0 10px 30px rgba(0,0,0,.15); padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; font-size: .82rem; color: var(--muted); padding: 4px; border-radius: 18px; }
.tabbar a span { font-size: 1.45rem; line-height: 1.2; }
.tabbar a.on { background: var(--purple-l); color: var(--purple-d); }

/* ---------- اليوم ---------- */
.topline { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: rgba(255,255,255,.92); border-radius: 20px; padding: 8px 12px; box-shadow: 0 4px 0 rgba(0,0,0,.08); }
.back { font-size: 1.4rem; width: 40px; height: 40px; display: grid; place-items: center; background: var(--purple-l); border-radius: 50%; }
.tl-mid b { display: block; font-size: 1rem; } .tl-mid small { color: var(--muted); font-weight: 600; }
.read-hd { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.read-hd h2 { font-size: 1.3rem; }
.verses { background: #fff; border-radius: 18px; padding: 14px 16px; border: 2px solid #f3ead6; }
.book { text-align: center; color: #a0522d; font-size: 1rem; margin-bottom: 6px; }
.verse { font-family: var(--verse); font-size: 1.45rem; line-height: 2.15; margin: 0 0 8px; font-weight: 500; }
.verses[data-size="1"] .verse { font-size: 1.75rem; } .verses[data-size="2"] .verse { font-size: 2.1rem; }
.vn { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 4px; border-radius: 50%; background: var(--yellow); color: var(--ink); font: 800 .95rem var(--font); vertical-align: middle; box-shadow: 0 2px 0 var(--yellow-d); }
.read-tools { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

.qprog { display: flex; align-items: center; gap: 10px; margin: 14px 4px 0; font-weight: 800; }
.qbar { flex: 1; height: 16px; background: rgba(255,255,255,.7); border-radius: 999px; overflow: hidden; border: 2px solid #fff; }
.qbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #31c48d, #7be3b4); border-radius: 999px; transition: width .5s; margin-right: 0; }
.qcard { min-height: 240px; }
.qcard.enter { animation: pop .35s ease-out; }
.qcard.shake { animation: shake .45s; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.qtype { display: inline-block; background: var(--purple-l); color: var(--purple-d); font-weight: 800; font-size: .85rem; border-radius: 999px; padding: 2px 12px; margin-bottom: 8px; }
.qtext { font-size: 1.45rem; margin-bottom: 14px; }
.opts { display: grid; gap: 10px; }
.opt-btn { font: 700 1.25rem var(--font); color: var(--ink); background: #fff; border: 3px solid #e6dcf7; border-radius: 18px; padding: 14px; box-shadow: 0 5px 0 #e6dcf7; cursor: pointer; text-align: center; transition: transform .08s; }
.opt-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #e6dcf7; }
.tf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf-btn { font: 800 1.6rem var(--font); border: 0; border-radius: 22px; padding: 26px 10px; cursor: pointer; color: #fff; transition: transform .08s; }
.tf-btn.yes { background: #31c48d; box-shadow: 0 6px 0 #1f9a6c; } .tf-btn.no { background: #ff6b6b; box-shadow: 0 6px 0 #d94848; }
.tf-btn:active { transform: translateY(4px); }
.right { background: var(--green-l) !important; border-color: var(--green) !important; box-shadow: 0 5px 0 #23a575 !important; color: #0d6b48 !important; }
.wrong { background: var(--red-l) !important; border-color: var(--red) !important; box-shadow: 0 5px 0 #e04b4b !important; color: #a3211b !important; }
.reveal { animation: pop .4s; }
button:disabled { cursor: default; }
.opts .opt-btn:disabled:not(.right):not(.wrong), .tf-btn:disabled:not(.right):not(.wrong) { opacity: .5; }

.fill-hint { color: var(--muted); font-weight: 700; margin: 0 0 8px; font-size: .95rem; }
.fill-sent { font-family: var(--verse); font-size: 1.5rem; line-height: 2.5; background: #fff; border-radius: 18px; padding: 10px 14px; border: 2px solid #f3ead6; margin: 0 0 14px; }
.slot { display: inline-block; min-width: 90px; min-height: 44px; vertical-align: middle; border: 3px dashed #b9a6f7; border-radius: 14px; background: #f6f2ff; margin: 0 4px; padding: 0 10px; font: 800 1.25rem var(--font); line-height: 38px; text-align: center; color: var(--purple-d); cursor: pointer; transition: transform .15s; }
.slot.over { transform: scale(1.1); background: #fff3c4; border-color: var(--yellow); }
.slot.filled { border-style: solid; background: #fff; }
.bank { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 56px; padding: 8px; border-radius: 18px; background: #f6f2ff; }
.chip-w { font: 800 1.25rem var(--font); background: #fff; border: 3px solid #cbbcf9; border-radius: 14px; padding: 6px 16px; box-shadow: 0 4px 0 #cbbcf9; cursor: grab; user-select: none; touch-action: none; }
.chip-w.used { visibility: hidden; }
.chip-w.lifted, .ocard.lifted { opacity: .3; }
.drag-ghost { position: fixed; z-index: 50; pointer-events: none; margin: 0; transform: rotate(-4deg) scale(1.08); box-shadow: 0 12px 24px rgba(0,0,0,.25) !important; list-style: none; }
.off { pointer-events: none; }
.confirm.off { display: none; }
.order { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 10px; }
.ocard { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: #fff; border: 3px solid #e6dcf7; border-radius: 18px; padding: 12px; box-shadow: 0 4px 0 #e6dcf7; font-weight: 700; font-size: 1.15rem; cursor: grab; user-select: none; touch-action: none; transition: transform .12s; }
.ocard .n { width: 32px; height: 32px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-weight: 800; }
.ocard .grip { color: #b9a6f7; font-size: 1.4rem; }
.ocard.over { transform: scale(1.03); border-color: var(--yellow); background: #fff9e0; }
.ocard.picked { border-color: var(--purple); background: var(--purple-l); }

.feedback { position: sticky; bottom: 10px; z-index: 4; display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; background: #fff; border-radius: 22px; padding: 10px 14px; box-shadow: 0 6px 0 rgba(0,0,0,.08), 0 12px 30px rgba(0,0,0,.15); border: 3px solid var(--card-bd); animation: pop .3s; }
.feedback img { width: 70px; }
.feedback b { font-size: 1.25rem; display: block; }
.feedback.good { border-color: var(--green); background: #f0fdf7; }
.feedback.retry { border-color: var(--orange); background: #fff8ef; }
.feedback.bad { border-color: #ffb3b3; background: #fff6f6; }
.feedback .btn { grid-column: 1 / -1; margin-top: 4px; }
.xpb { display: inline-block; margin-top: 2px; background: #f1eaff; color: var(--purple-d); border-radius: 999px; padding: 0 10px; font-weight: 800; }
.peek { text-align: center; margin-top: 10px; }
.sheet { border: 0; border-radius: 22px; padding: 16px; width: min(520px, calc(100% - 24px)); max-height: 80vh; background: var(--card); }
.sheet::backdrop { background: rgba(20, 20, 60, .45); }
.sheet .btn { width: 100%; margin-top: 10px; }
.small-v .verse { font-size: 1.25rem; }

.result { text-align: center; }
.result h2 { font-size: 1.6rem; }
.stars-big { font-size: 3rem; margin: 6px 0 10px; }
.star { display: inline-block; filter: grayscale(1) opacity(.25); transform: scale(.4); animation: starIn .5s forwards; }
.star.on { filter: none; }
@keyframes starIn { to { transform: scale(1); } }
.xplist { list-style: none; padding: 0; margin: 0 0 12px; text-align: start; background: #fff; border-radius: 16px; border: 2px solid #f3ead6; }
.xplist li { display: flex; justify-content: space-between; padding: 8px 14px; border-bottom: 1px dashed #efe6d2; font-weight: 600; }
.xplist li b { color: var(--purple-d); }
.xplist .sum { font-weight: 800; background: #fff8d6; border-bottom: 0; border-radius: 0 0 14px 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpis div { background: #fff; border-radius: 16px; padding: 8px; border: 2px solid #f3ead6; display: flex; flex-direction: column; align-items: center; }
.kpis span { font-size: 1.5rem; } .kpis b { font-size: 1.3rem; } .kpis small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.levelup { margin-top: 10px; background: linear-gradient(90deg, #fff3c4, #ffe0f0); border: 2px solid var(--yellow); border-radius: 16px; padding: 10px; font-weight: 800; animation: pop .5s; }
.xpfloat { position: fixed; z-index: 60; transform: translateX(-50%); font-weight: 800; font-size: 1.4rem; color: var(--purple-d); text-shadow: 0 2px 0 #fff; pointer-events: none; animation: floatUp 1.2s ease-out forwards; }
@keyframes floatUp { to { transform: translate(-50%, -70px); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }

/* ---------- الأبطال ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 4px 0 10px; }
.tabs a { padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--muted); border: 2px solid #ece4fb; font-size: .95rem; }
.tabs a.on { background: var(--purple); color: #fff; border-color: var(--purple); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin: 6px 0 12px; }
.podium .pl { text-align: center; }
.podium .pl .av { margin: 0 auto 4px; width: 56px; height: 56px; font-size: 2.2rem; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,.1); }
.podium .pl b { display: block; font-size: .92rem; line-height: 1.3; }
.podium .pl small { color: var(--purple-d); font-weight: 800; }
.podium .stand { margin-top: 6px; border-radius: 14px 14px 0 0; display: grid; place-items: center; font-size: 1.7rem; font-weight: 800; color: #fff; }
.podium .p1 .stand { height: 96px; background: linear-gradient(#ffd84d, #f2b705); }
.podium .p2 .stand { height: 70px; background: linear-gradient(#d7dde8, #aab4c5); }
.podium .p3 .stand { height: 54px; background: linear-gradient(#f4b183, #d98545); }
.board { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.board li { display: grid; grid-template-columns: 34px 40px 1fr auto; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 6px 10px; border: 2px solid #f3ead6; }
.board li.mine { border-color: var(--purple); background: var(--purple-l); }
.board .rk { font-weight: 800; color: var(--muted); text-align: center; }
.board .av { width: 40px; height: 40px; font-size: 1.5rem; }
.board .nm b { display: block; font-size: 1rem; } .board .nm small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.board .sc { font-weight: 800; color: var(--purple-d); text-align: left; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 10px; }

/* ---------- ملفي ---------- */
.profile { text-align: center; }
.profile .av { width: 90px; height: 90px; font-size: 3.4rem; margin: 0 auto 6px; border: 4px solid #fff; box-shadow: 0 5px 0 rgba(0,0,0,.08); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.badge { text-align: center; background: #fff; border-radius: 16px; padding: 10px 6px; border: 2px solid #f3ead6; }
.badge span { font-size: 2rem; display: block; } .badge b { font-size: .85rem; display: block; line-height: 1.3; } .badge small { color: var(--muted); font-size: .72rem; }
.badge.off { opacity: .4; filter: grayscale(1); }
.hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.hist a, .hist span { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: #f1eef8; color: var(--muted); }
.hist .done { background: #fff3c4; color: #8a6500; } .hist .done.s3 { background: #ffe07a; }
.hist .missed { background: #fff; border: 2px dashed #ddd; } .hist .catchup { background: #ffe9d1; color: #b35a00; } .hist .today { background: var(--purple); color: #fff; }
.settings-list { display: grid; gap: 8px; }

/* ---------- لوحة الخدام ---------- */
.admin .wrap { max-width: 980px; }
.admin table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin th, .admin td { padding: 6px 8px; border-bottom: 1px solid #f0e6d0; text-align: start; vertical-align: top; }
.admin th { color: var(--muted); font-size: .85rem; }
.admin textarea, .admin select, .admin input[type=text], .admin input[type=date], .admin input[type=number], .admin input[type=password] { font: 600 1rem var(--font); padding: 8px 10px; border: 2px solid #e6dcf7; border-radius: 12px; width: 100%; background: #fff; }
.admin .qed { border: 2px solid #ece4fb; border-radius: 16px; padding: 12px; margin: 10px 0; background: #fff; }
.admin .qed h4 { margin: 0 0 6px; }
.admin .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin .stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.admin .stat div { background: #fff; border-radius: 16px; padding: 10px; text-align: center; border: 2px solid #f3ead6; }
.admin .stat b { display: block; font-size: 1.8rem; color: var(--purple-d); }
.tag-src { font-size: .75rem; border-radius: 999px; padding: 1px 8px; background: #eee; }
.tag-src.seed { background: var(--green-l); } .tag-src.admin { background: #fff3c4; } .tag-src.auto { background: #ffe5e5; }

@media (max-width: 380px) {
  .avatars { grid-template-columns: repeat(4, 1fr); }
  .node .dot { width: 42px; height: 42px; }
  .brand h1 { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
