/* 🏜️ لوحة أثر — زجاج داكن فوق صحراء حيّة عند الغروب */
@font-face { font-family: 'Cairo'; src: url('/fonts/Cairo.ttf'); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: 'Kufi'; src: url('/fonts/ReemKufi.ttf'); font-display: swap; }
@font-face { font-family: 'AmiriQuran'; src: url('/fonts/AmiriQuran-Regular.ttf'); font-display: swap; }

:root {
  --night: #120C07;
  --glass: rgba(26, 17, 10, .64);
  --glass-hi: rgba(40, 27, 16, .82);
  --tint: rgba(255, 232, 196, .055);
  --tint-2: rgba(255, 232, 196, .1);
  --line: rgba(255, 224, 178, .13);
  --line-2: rgba(255, 224, 178, .24);
  --text: #F6EAD7;
  --muted: #BCA78B;
  --faint: #8C7A63;
  --sand: #EBCB96;
  --amber: #F2A54A;
  --amber-2: #FFC277;
  --ember: #E8703A;
  --oasis: #84C89A;
  --r-xl: 26px; --r-l: 18px; --r-m: 13px; --r-s: 9px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fs-xs: .78rem; --fs-s: .9rem; --fs-m: 1rem; --fs-l: 1.25rem; --fs-xl: 1.75rem; --fs-xxl: 2.6rem;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; font-family: 'Cairo', system-ui, sans-serif; color: var(--text); background: var(--night); line-height: 1.7; font-size: var(--fs-m); }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: rgba(242, 165, 74, .4); }

/* ═════════ صفحة الدخول ═════════ */
.landing { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; display: grid; place-items: center; padding: 24px 16px; background: #c99a62; color: #2B1E12; }
.landing canvas { position: fixed; inset: 0; width: 100%; height: 100%; }
.landing #grains { pointer-events: none; }
.landing .hint { position: fixed; bottom: 18px; inset-inline: 0; text-align: center; color: rgba(255, 244, 222, .85); text-shadow: 0 1px 3px rgba(60, 35, 12, .6); font-size: var(--fs-xs); pointer-events: none; }
.gate { position: relative; width: min(430px, 100%); text-align: center; pointer-events: none; }
.gate > * { pointer-events: auto; }
.brand-mark { font-family: 'Kufi'; font-size: clamp(6rem, 22vw, 11rem); line-height: 1; color: transparent;
  background: linear-gradient(180deg, #7a5530 0%, #4a3018 60%, #2e1d0d 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 0 rgba(255, 240, 210, .65)) drop-shadow(0 8px 24px rgba(255, 236, 200, .55)); pointer-events: none; }
.gate .tag { margin: 6px 0 26px; font-size: var(--fs-l); font-weight: 700; pointer-events: none; text-shadow: 0 1px 12px rgba(255, 240, 215, .9); }
.slab { background: rgba(24, 16, 9, .55); color: var(--text); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border: 1px solid rgba(255, 230, 190, .22); border-radius: var(--r-xl); padding: 22px; box-shadow: 0 30px 60px -30px rgba(30, 15, 5, .8); }
.server { display: flex; align-items: center; gap: 12px; text-align: start; margin-bottom: 16px; }
.server img { width: 52px; height: 52px; border-radius: 16px; background: var(--tint-2); object-fit: cover; }
.server b { display: block; font-size: var(--fs-l); }
.server small { color: var(--muted); }
.discord-btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; padding: 14px 18px; border: 0; border-radius: var(--r-m);
  background: linear-gradient(135deg, var(--amber-2), var(--amber)); color: #2a1606; font-weight: 800; cursor: pointer; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; box-shadow: 0 10px 30px -10px rgba(242, 165, 74, .8); }
.discord-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(242, 165, 74, .9); }
.discord-btn svg { width: 22px; height: 22px; fill: currentColor; }
.note { margin: 12px 0 0; font-size: var(--fs-s); color: var(--muted); }
.alert { margin-bottom: 14px; padding: 10px 14px; border-radius: var(--r-s); background: rgba(232, 112, 58, .16); color: #FFD0B8; border: 1px solid rgba(232, 112, 58, .4); font-size: var(--fs-s); text-align: start; }
.verse { font-family: 'AmiriQuran', serif; font-size: 1.35rem; color: #FFF4DE; margin-top: 22px; pointer-events: none; text-shadow: 0 1px 6px rgba(50, 28, 8, .7); }

/* ═════════ التطبيق ═════════ */
.bg { position: fixed; inset: 0; z-index: 0; background: linear-gradient(#1a1430, #6b3a20 55%, #3a2414); }
.bg canvas { width: 100%; height: 100%; display: block; }
.bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 12, 7, .25) 0%, rgba(18, 12, 7, .66) 40%, rgba(18, 12, 7, .88) 100%); }
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; min-height: 100vh; padding: 18px; }

.rail { position: sticky; top: 18px; height: calc(100vh - 36px); display: flex; flex-direction: column; border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); overflow: hidden; }
.rail .logo { display: flex; align-items: center; gap: 12px; padding: 20px 20px 14px; }
.rail .logo b { font-family: 'Kufi'; font-weight: 400; font-size: 2.3rem; line-height: 1; background: linear-gradient(180deg, var(--amber-2), var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rail .logo small { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
.search-btn { margin: 0 14px 10px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--tint); color: var(--muted); cursor: pointer; font-size: var(--fs-s); text-align: start; }
.search-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.search-btn kbd { margin-inline-start: auto; font-family: 'Cairo'; font-size: .7rem; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); direction: ltr; }
.nav { list-style: none; margin: 0; padding: 0 10px; flex: 1; overflow: auto; scrollbar-width: thin; }
.nav .nsec { padding: 14px 12px 4px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.nav .nsec::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.nav .nsec:first-child { padding-top: 4px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: var(--r-m); text-decoration: none; color: var(--muted); font-weight: 600; font-size: var(--fs-s); transition: background .2s, color .2s; }
.nav a:hover { background: var(--tint); color: var(--text); }
.nav a[aria-current="page"] { background: linear-gradient(270deg, rgba(242, 165, 74, .2), transparent); color: var(--amber-2); }
.nav a[aria-current="page"]::before { content: ''; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--amber); }
.nav svg { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav .soon { margin-inline-start: auto; font-size: .65rem; padding: 0 7px; border-radius: 99px; background: var(--tint-2); color: var(--muted); }
.nav .live { margin-inline-start: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--oasis); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(132, 200, 154, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(132, 200, 154, 0); } }
.me { display: flex; align-items: center; gap: 10px; margin: 10px; padding: 10px; border-radius: var(--r-l); background: var(--tint); border: 1px solid var(--line); }
.me img { width: 36px; height: 36px; border-radius: 50%; background: var(--tint-2); }
.me div { flex: 1; min-width: 0; line-height: 1.35; }
.me b { display: block; font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: var(--fs-xs); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--tint); cursor: pointer; color: var(--muted); transition: color .2s, background .2s, transform .15s; padding: 0; }
.icon-btn:hover { color: var(--text); background: var(--tint-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 8px 4px 18px; flex-wrap: wrap; }
.topbar h1 { font-family: 'Kufi'; font-weight: 400; word-spacing: .18em; font-size: clamp(1.7rem, 3vw, 2.4rem); flex: 1; }
.clock { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: var(--fs-s); }
.clock b { font-variant-numeric: tabular-nums; color: var(--amber-2); font-weight: 800; }
.clock small { color: var(--muted); }
.clock .sep { width: 1px; height: 16px; background: var(--line-2); }
.menu-btn { display: none; }
.page { animation: page-in .45s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
.lead { color: var(--muted); max-width: 72ch; margin: -6px 0 20px; }

.grid { display: grid; gap: 16px; align-items: start; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }
.box { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px 22px; backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); min-width: 0; }
.box h2 { font-size: var(--fs-l); display: flex; align-items: center; gap: 10px; }
.box h2 .chip { margin-inline-start: auto; }
.box > .sub { margin: 2px 0 16px; color: var(--muted); font-size: var(--fs-s); }
.reveal > * { animation: rise-in .55s var(--ease) both; }
.reveal > *:nth-child(2) { animation-delay: .06s; } .reveal > *:nth-child(3) { animation-delay: .12s; } .reveal > *:nth-child(4) { animation-delay: .18s; } .reveal > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
.chip { font-size: var(--fs-xs); font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--tint-2); color: var(--muted); white-space: nowrap; }
.chip.on { background: rgba(132, 200, 154, .16); color: var(--oasis); }
.chip.gold { background: rgba(242, 165, 74, .16); color: var(--amber-2); }

/* الرئيسية */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.greet h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.greet p { color: var(--muted); margin: 0; }
.greet .quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.countdown .big { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; direction: ltr; text-align: end; background: linear-gradient(180deg, var(--amber-2), var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.countdown .lbl { color: var(--muted); }
.day-track { position: relative; height: 60px; margin-top: 14px; }
.day-track .line { position: absolute; inset-inline: 0; top: 24px; height: 2px; background: var(--line-2); border-radius: 2px; }
.day-track .fill { position: absolute; right: 0; top: 24px; height: 2px; background: linear-gradient(270deg, rgba(242, 165, 74, .25), var(--amber)); border-radius: 2px; }
.day-track .dot { position: absolute; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: #1b120b; border: 2px solid var(--line-2); transform: translateX(50%); }
.day-track .dot.past { border-color: var(--amber); background: var(--amber); }
.day-track .dot.next { border-color: var(--amber-2); box-shadow: 0 0 0 5px rgba(242, 165, 74, .22); }
.day-track .dot span { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--muted); white-space: nowrap; line-height: 1.3; text-align: center; }
.day-track .sun { position: absolute; top: 13px; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle, #FFE3A6, var(--amber) 60%); box-shadow: 0 0 22px 6px rgba(242, 165, 74, .5); transform: translateX(50%); }
.day-track .sun.moon { background: radial-gradient(circle at 35% 40%, #FFF6E2, #D9C9A8 70%); box-shadow: 0 0 18px 4px rgba(255, 246, 226, .25); }

.kpi { padding: 16px 18px; }
.kpi b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: var(--fs-s); }
.kpi .ic { position: absolute; inset-inline-end: 16px; top: 16px; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--tint-2); color: var(--amber-2); }
.kpi .ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.bars { display: flex; align-items: flex-end; gap: 5px; height: 130px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--amber-2), rgba(242, 165, 74, .3)); min-height: 3px; transform-origin: bottom; animation: grow .8s var(--ease) both; }
.bars div.today i { background: linear-gradient(180deg, #fff1d4, var(--amber)); }
@keyframes grow { from { transform: scaleY(0); } }
.bars small { font-size: .62rem; color: var(--faint); white-space: nowrap; }

.feat { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.feat li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-m); background: var(--tint); font-size: var(--fs-s); }
.feat li i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.feat li.on i { background: var(--oasis); box-shadow: 0 0 10px var(--oasis); }
.feat li a { margin-inline-start: auto; color: var(--amber-2); text-decoration: none; font-size: var(--fs-xs); font-weight: 700; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border: 0; }
.people img, .people .ph { width: 34px; height: 34px; border-radius: 50%; background: var(--tint-2); flex: none; }
.people .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .p { color: var(--amber-2); font-weight: 800; font-variant-numeric: tabular-nums; }
.people .rank { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: var(--fs-xs); background: var(--tint-2); color: var(--muted); flex: none; }
.people li:first-child .rank { background: linear-gradient(135deg, #FFD98A, #D99A2B); color: #2a1606; }
.log { list-style: none; margin: 0; padding: 0; font-size: var(--fs-s); }
.log li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.log li:last-child { border: 0; }
.log li span { color: var(--faint); margin-inline-start: auto; white-space: nowrap; font-size: var(--fs-xs); }

/* المشغّل */
.player { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; }
.disc { width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, #2a1c10 0 22%, transparent 23%), repeating-radial-gradient(circle, #1b120a 0 2px, #261a10 3px 5px); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -20px #000, inset 0 0 0 8px rgba(242, 165, 74, .08); display: grid; place-items: center; }
.disc span { font-family: 'Kufi'; color: var(--amber-2); font-size: 1.3rem; }
.disc.spin { animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; vertical-align: middle; }
.eq i { width: 3px; height: 4px; background: var(--amber); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; } .eq i:nth-child(4) { animation-delay: .1s; }
.eq.off i { animation: none; opacity: .5; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }
.now h3 { font-size: var(--fs-xl); font-family: 'Kufi'; font-weight: 400; word-spacing: .18em; margin: 6px 0 2px; }
.now p { margin: 0; color: var(--muted); }
.controls { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.controls .icon-btn { width: 46px; height: 46px; border-radius: 15px; }
.controls .icon-btn.main-btn { background: linear-gradient(135deg, var(--amber-2), var(--amber)); color: #2a1606; border: 0; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 700; font-size: var(--fs-s); }
.tabs button[aria-selected="true"] { background: var(--tint-2); color: var(--text); }

/* النماذج */
.form { display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
label.f { display: grid; gap: 5px; font-size: var(--fs-s); color: var(--muted); align-content: start; }
label.f > span { font-weight: 700; color: var(--text); }
label.f small { color: var(--faint); font-size: var(--fs-xs); }
input[type=text], input[type=number], input[type=time], input[type=date], input[type=search], input[type=url], select, textarea { width: 100%; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: rgba(10, 6, 3, .45); transition: border-color .2s, box-shadow .2s; }
select option, select optgroup { background: #1d140c; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(242, 165, 74, .2); }
textarea { min-height: 90px; resize: vertical; line-height: 1.7; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs-s); }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--tint-2); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background .25s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: inset-inline-start .25s var(--ease); }
.switch input:checked { background: var(--oasis); border-color: var(--oasis); }
.switch input:checked::after { inset-inline-start: 20px; background: #fff; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; white-space: nowrap; border-radius: var(--r-m); border: 1px solid transparent; font-weight: 800; cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, var(--amber-2), var(--amber)); color: #2a1606; transition: transform .15s var(--ease), box-shadow .2s, opacity .2s; box-shadow: 0 8px 22px -12px rgba(242, 165, 74, .9); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -12px rgba(242, 165, 74, 1); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--tint); color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--tint-2); }
.btn.danger { background: transparent; color: #FFB08A; border-color: rgba(232, 112, 58, .45); box-shadow: none; }
.btn.danger:hover { background: rgba(232, 112, 58, .12); }
.btn.sm { padding: 5px 12px; font-size: var(--fs-s); }
.btn[disabled] { opacity: .5; cursor: progress; transform: none; }
.preview { border-radius: var(--r-l); overflow: hidden; background: var(--tint); border: 1px solid var(--line); min-height: 160px; display: grid; place-items: center; color: var(--muted); font-size: var(--fs-s); }
.preview img { width: 100%; display: block; animation: fade .4s ease; }
@keyframes fade { from { opacity: 0; } }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-l); background: var(--tint); border: 1px solid var(--line); transition: background .2s; }
.item:hover { background: var(--tint-2); }
.item .em { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-2); font-size: 1.2rem; flex: none; }
.item .body { flex: 1; min-width: 0; line-height: 1.55; }
.item .body b { display: block; }
.item .body small { display: block; color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line-2); border-radius: var(--r-l); }

.cells { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; margin-top: 8px; max-width: 420px; }
.cells.half { grid-template-columns: repeat(20, 1fr); }
.cells i { aspect-ratio: 1; border-radius: 3px; background: var(--tint-2); }
.cells i.reserved { background: var(--amber); }
.cells i.done { background: var(--oasis); }
.bar { height: 6px; border-radius: 99px; background: var(--tint-2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(270deg, var(--amber), var(--amber-2)); border-radius: inherit; }

.levels { display: grid; gap: 10px; }
.level { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; }
.level b { font-family: 'Kufi'; font-weight: 400; font-size: var(--fs-l); color: var(--sand); }
.level small { display: block; color: var(--muted); font-size: var(--fs-xs); line-height: 1.2; }

.table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.table th { text-align: start; font-weight: 700; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
.table tr:hover td { background: var(--tint); }
.table td.num { font-weight: 800; color: var(--amber-2); font-variant-numeric: tabular-nums; }
.table img { width: 28px; height: 28px; border-radius: 50%; vertical-align: middle; margin-inline-end: 8px; background: var(--tint-2); }

.cmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.cmd { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--tint); border: 1px solid var(--line); transition: opacity .2s; }
.cmd.off { opacity: .5; }
.cmd .body { flex: 1; min-width: 0; line-height: 1.4; }
.cmd .body b { display: block; font-size: var(--fs-s); }
.cmd .body small { color: var(--faint); font-size: var(--fs-xs); display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cmd .uses { font-size: var(--fs-xs); color: var(--amber-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-title { margin: 18px 0 8px; font-size: var(--fs-s); color: var(--muted); font-weight: 700; }
.statuses { display: grid; gap: 8px; }
.statuses .s { display: flex; gap: 8px; }
.result { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-m); background: var(--tint); cursor: pointer; border: 1px solid transparent; }
.result:hover, .result.sel { border-color: var(--amber); }
.result img { width: 30px; height: 30px; border-radius: 50%; }
.result span { margin-inline-start: auto; color: var(--amber-2); font-weight: 700; }

.soon-page { text-align: center; padding: 56px 20px; }
.soon-page h2 { font-size: var(--fs-xxl); font-family: 'Kufi'; font-weight: 400; word-spacing: .18em; justify-content: center; margin-bottom: 12px; }
.soon-page p { max-width: 56ch; margin: 0 auto 8px; color: var(--muted); }

/* البحث السريع */
.palette { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding-top: 12vh; background: rgba(8, 5, 2, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s; }
.palette[hidden] { display: none; }
.palette .pbox { width: min(560px, calc(100% - 32px)); border-radius: var(--r-xl); background: var(--glass-hi); border: 1px solid var(--line-2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); overflow: hidden; box-shadow: 0 30px 80px -20px #000; animation: rise-in .3s var(--ease); }
.palette input { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: transparent !important; padding: 16px 18px !important; font-size: var(--fs-l); box-shadow: none !important; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-m); cursor: pointer; color: var(--muted); }
.palette li[aria-selected="true"] { background: var(--tint-2); color: var(--text); }
.palette li svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.palette li small { margin-inline-start: auto; font-size: var(--fs-xs); color: var(--faint); }

/* الإشعارات */
.toasts { position: fixed; bottom: 18px; inset-inline-start: 18px; display: grid; gap: 8px; z-index: 70; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--glass-hi); border: 1px solid var(--line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 10px 16px; border-radius: var(--r-m); box-shadow: 0 16px 40px -14px #000; animation: toast-in .35s var(--ease); max-width: 380px; font-size: var(--fs-s); }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--oasis); flex: none; }
.toast.err::before { background: var(--ember); }
@keyframes toast-in { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.skeleton { background: linear-gradient(90deg, var(--tint), var(--tint-2), var(--tint)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r-xl); }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; padding: 12px; }
  .rail { position: fixed; top: 10px; bottom: 10px; height: auto; inset-inline-start: 10px; width: 260px; z-index: 40; transform: translateX(calc(100% + 20px)); transition: transform .35s var(--ease); }
  .rail.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 4px 0 14px; }
  .clock { order: 3; width: 100%; justify-content: space-between; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi b { font-size: 1.5rem; }
  .kpi .ic { display: none; }
  .search-btn kbd { display: none; }
  .span2 { grid-column: auto; }
  .player { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .controls { justify-content: center; }
  .level { grid-template-columns: 1fr; gap: 4px; }
  .day-track .dot span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.sm svg { width: 15px; height: 15px; }

/* التقويم */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head h2 { flex: 1; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .wd { text-align: center; font-size: var(--fs-xs); color: var(--faint); padding-bottom: 2px; }
.cal .d { min-height: 92px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); padding: 6px 8px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; transition: border-color .2s, background .2s; overflow: hidden; }
.cal .d:hover { border-color: var(--amber); }
.cal .d.today { border-color: var(--amber); background: rgba(242, 165, 74, .1); }
.cal .d.fast { box-shadow: inset 0 -3px 0 rgba(132, 200, 154, .55); }
.cal .d .n { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-variant-numeric: tabular-nums; }
.cal .d .n small { font-weight: 600; color: var(--muted); font-size: .7rem; }
.cal .d i { font-style: normal; font-size: .68rem; line-height: 1.35; padding: 1px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .d i.o { background: rgba(242, 165, 74, .18); color: var(--amber-2); }
.cal .d i.e { background: rgba(146, 184, 236, .18); color: #BCD3F5; }
.cal .d i.f { color: var(--oasis); padding: 0; }
.cal .blank { background: transparent; border: 0; cursor: default; }
@media (max-width: 820px) { .cal .d { min-height: 58px; padding: 4px; } .cal .d i { display: none; } .cal .d.has-e::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #BCD3F5; } }

/* محرر سلّم رتب فريق الإدارة على الجوال */
@media (max-width: 760px) {
  .rk { grid-template-columns: 1fr 1fr !important; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-l); }
  .rk-head { display: none !important; }
}

/* ═════════ v3: السيرفرات والأنظمة ═════════ */
input[type=password] { width: 100%; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: rgba(10, 6, 3, .45); }
.gswitch { display: flex; align-items: center; gap: 10px; margin: 0 14px 12px; padding: 9px 12px; border-radius: var(--r-l); background: linear-gradient(135deg, rgba(242, 165, 74, .14), rgba(242, 165, 74, .04)); border: 1px solid rgba(242, 165, 74, .28); text-decoration: none; transition: background .2s, transform .2s var(--ease); }
.gswitch:hover { background: linear-gradient(135deg, rgba(242, 165, 74, .22), rgba(242, 165, 74, .08)); transform: translateY(-1px); }
.gswitch img, .gswitch .gph { width: 36px; height: 36px; border-radius: 12px; flex: none; object-fit: cover; }
.gswitch > span:not(.gph) { flex: 1; min-width: 0; line-height: 1.35; }
.gswitch b { display: block; font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gswitch small { color: var(--amber-2); font-size: var(--fs-xs); }
.gswitch svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; flex: none; }
.gph { display: grid; place-items: center; background: linear-gradient(135deg, var(--amber-2), var(--ember)); color: #2a1606; font-weight: 800; font-size: 1.1rem; }

.sec-t { font-size: var(--fs-s); color: var(--muted); font-weight: 700; margin: 20px 4px 10px; letter-spacing: .02em; }
.guilds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.gcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 16px 16px; border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; overflow: hidden; }
.gcard::before { content: ''; position: absolute; inset: 0 0 auto; height: 70px; background: radial-gradient(120% 100% at 50% 0%, rgba(242, 165, 74, .22), transparent 70%); pointer-events: none; }
.gcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .8); }
.gcard.cur { border-color: rgba(242, 165, 74, .55); box-shadow: 0 0 0 1px rgba(242, 165, 74, .3) inset; }
.gcard img, .gcard .gph { position: relative; width: 68px; height: 68px; border-radius: 22px; object-fit: cover; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .8); }
.gcard .gph { font-size: 1.7rem; }
.gcard b { margin-top: 6px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard small { color: var(--muted); font-size: var(--fs-xs); min-height: 1.4em; }
.gcard .btn { margin-top: 6px; width: 100%; justify-content: center; }
body.pick .topbar .clock { display: none; }

.syshead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.switch.big { padding: 6px 14px 6px 8px; border-radius: 99px; background: var(--tint); border: 1px solid var(--line); font-weight: 700; }
.switch.big input { width: 50px; height: 28px; }
.switch.big input::after { width: 22px; height: 22px; }
.switch.big input:checked::after { inset-inline-start: 24px; }
.switch.big:has(input:checked) { background: rgba(132, 200, 154, .12); border-color: rgba(132, 200, 154, .4); color: var(--oasis); }

.multi { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow-y: auto; padding: 8px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: rgba(10, 6, 3, .35); }
.multi label { cursor: pointer; }
.multi input { position: absolute; opacity: 0; pointer-events: none; }
.multi span { display: inline-block; padding: 4px 11px; border-radius: 99px; background: var(--tint-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; border: 1px solid transparent; transition: all .15s; }
.multi label:hover span { color: var(--text); }
.multi input:checked + span { background: rgba(242, 165, 74, .18); color: var(--amber-2); border-color: rgba(242, 165, 74, .45); }
.multi input:focus-visible + span { outline: 2px solid var(--amber); }

.vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.vars .chip { border: 1px dashed var(--line-2); cursor: pointer; font-family: inherit; direction: ltr; unicode-bidi: plaintext; transition: background .15s, color .15s; }
.vars .chip small { color: var(--faint); font-weight: 400; margin-inline-start: 4px; }
.vars .chip:hover { background: rgba(242, 165, 74, .16); color: var(--amber-2); }

.wprev { display: grid; gap: 10px; }
.wprev img { width: 100%; height: auto; min-height: 120px; display: block; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--tint) linear-gradient(90deg, transparent, rgba(255, 232, 196, .06), transparent) 0 0 / 200% 100%; animation: shimmer 1.6s linear infinite; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .9); }
@keyframes shimmer { to { background-position: -200% 0; } }
.wtools { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.rules { display: grid; gap: 8px; }
.rule { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(130px, .8fr) minmax(0, 1.5fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-l); background: var(--tint); border: 1px solid var(--line); transition: border-color .2s; }
.rule:has(input[data-k=on]:checked) { border-color: rgba(132, 200, 154, .35); }
.rule .rx { display: flex; gap: 8px; align-items: center; min-width: 0; }
.rule .rx input { max-width: 110px; }
.rrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.rrow > input[type=number] { width: 96px; flex: none; }
.rrow > select, .rrow > input[type=text]:not([style]) { flex: 1; min-width: 0; }
.chips-sw { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 8px 0 4px; }

.sticky-save { position: sticky; bottom: 14px; z-index: 5; justify-content: flex-end; padding: 10px 14px; border-radius: var(--r-l); background: var(--glass-hi); border: 1px solid var(--line-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .9); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { position: relative; overflow: hidden; padding: 18px 20px; border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.stat::after { content: ''; position: absolute; inset-inline-end: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 165, 74, .18), transparent 70%); }
.stat small { color: var(--muted); font-size: var(--fs-s); }
.stat b { display: block; font-size: 2.1rem; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, var(--text), var(--sand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat em { font-style: normal; color: var(--faint); font-size: var(--fs-xs); }

.pfx-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; align-content: end; }
.pfx-demo small { width: 100%; color: var(--muted); }
.pfx-demo code, .dc code { direction: ltr; unicode-bidi: isolate; padding: 3px 10px; border-radius: 8px; background: #1e1f22; color: #dbdee1; font-family: inherit; font-size: var(--fs-s); }

/* معاينة على طريقة ديسكورد */
.dc { padding: 16px; border-radius: var(--r-l); background: #313338; color: #dbdee1; font-size: .95rem; line-height: 1.45; }
.dc-embed { position: relative; display: grid; gap: 8px; max-width: 520px; padding: 12px 16px 14px; border-radius: 4px; background: #2b2d31; border-inline-start: 4px solid #C8A97E; min-height: 60px; }
.dc-embed .t { font-weight: 700; color: #f2f3f5; }
.dc-embed .d { white-space: normal; word-break: break-word; }
.dc-embed .d a { color: #00a8fc; }
.dc-embed .q { display: block; border-inline-start: 4px solid #4e5058; padding-inline-start: 10px; }
.dc-embed .th { position: absolute; top: 12px; inset-inline-end: 16px; width: 72px; height: 72px; border-radius: 4px; object-fit: cover; }
.dc-embed:has(.th) .t, .dc-embed:has(.th) .d { margin-inline-end: 86px; }
.dc-embed .im { width: 100%; border-radius: 4px; }
.dc-embed .f { font-size: .78rem; color: #b5bac1; }
.dc-embed .b { justify-self: start; padding: 4px 14px; border-radius: 4px; background: #4e5058; color: #fff; font-size: .85rem; }

@media (max-width: 820px) {
  .rule { grid-template-columns: 1fr 1fr; }
  .rule .rx { grid-column: 1 / -1; }
  .guilds { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.rrow > select { flex: 1 1 170px; min-width: 150px; }
input[type=color] { width: 54px; height: 40px; padding: 4px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: rgba(10, 6, 3, .45); cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } input[type=color]::-webkit-color-swatch { border: 0; border-radius: 8px; }
.feats { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.feats li { padding: 3px 10px; border-radius: 99px; background: rgba(255, 232, 196, .09); border: 1px solid rgba(255, 230, 190, .16); font-size: var(--fs-xs); font-weight: 700; color: var(--sand); }
.discord-btn + .discord-btn { margin-top: 10px; }
.discord-btn.alt { background: rgba(255, 232, 196, .1); color: var(--text); border: 1px solid rgba(255, 230, 190, .25); box-shadow: none; }
.discord-btn.alt:hover { background: rgba(255, 232, 196, .16); box-shadow: none; }
.note a { color: var(--amber-2); }
.lockbox { border-color: rgba(232, 112, 58, .35); background: linear-gradient(135deg, rgba(232, 112, 58, .12), var(--glass)); }
.lockbox.on { border-color: rgba(232, 112, 58, .8); box-shadow: 0 0 0 1px rgba(232, 112, 58, .4) inset, 0 0 40px -10px rgba(232, 112, 58, .5); }
fieldset.box { margin: 0; min-inline-size: 0; }
fieldset.nuke { border-color: rgba(232, 112, 58, .28); }
fieldset[disabled] > :not(h2) { opacity: .55; }
.lockbox .btn.danger { background: linear-gradient(135deg, #E8703A, #B5471B); color: #fff; }
.boostbox { border-color: rgba(242, 165, 74, .3); background: linear-gradient(135deg, rgba(242, 165, 74, .1), var(--glass)); }
.boostbox.on { border-color: rgba(242, 165, 74, .75); box-shadow: 0 0 40px -12px rgba(242, 165, 74, .55); }
.boostbox.on h2 { color: var(--amber-2); }
.ttype { display: grid; gap: 6px; padding: 10px; margin-bottom: 8px; border-radius: var(--r-l); background: var(--tint); border: 1px solid var(--line); }
.ttype .rrow { margin: 0; }
.secs { display: grid; gap: 8px; }
details.sec { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--tint); padding: 4px 12px; transition: opacity .2s; }
details.sec > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; padding: 8px 0; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary .em { font-size: 1.5em; }
details.sec > summary .body { flex: 1; min-width: 0; display: grid; }
details.sec > summary .body small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.sec.off > summary .body, .sec.off > summary .em { opacity: .5; }
details.sec[open] { padding-bottom: 12px; }
details.sec .cmds { margin-top: 6px; }
details.ttype { display: block; }
details.ttype[open] { display: grid; }
details.ttype > summary { cursor: pointer; list-style: none; padding: 4px 2px; }
details.ttype > summary::-webkit-details-marker { display: none; }
details.ttype > summary::before { content: '▸'; display: inline-block; margin-inline-end: 8px; color: var(--muted); transition: transform .15s; }
details.ttype[open] > summary::before { transform: rotate(90deg); }
details.ttype .btn.danger { justify-self: start; }
.ttype textarea { min-height: 54px; font-size: var(--fs-s); }
.stars { color: var(--amber-2); letter-spacing: 1px; white-space: nowrap; }
.stars i { font-style: normal; color: var(--faint); opacity: .5; }
.verifybox { border-color: rgba(132, 200, 154, .3); }
.steps { padding: 10px 14px; border-radius: var(--r-m); background: var(--tint); border: 1px dashed var(--line-2); font-size: var(--fs-s); color: var(--muted); }
.steps b { color: var(--text); }
.rrow > small { color: var(--muted); white-space: nowrap; }
.sc-build { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.sc-build > .f { flex: 1; min-width: 140px; }
.pfx-in { display: flex; align-items: center; border-radius: var(--r-m); border: 1px solid var(--line-2); background: rgba(10, 6, 3, .45); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.pfx-in:focus-within { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(242, 165, 74, .2); }
.pfx-in b { padding: 0 10px; color: var(--amber-2); font-family: monospace; font-size: 1.1em; }
.pfx-in input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding-inline-start: 0 !important; }
.arrow { color: var(--amber-2); font-weight: 800; }
.arrow.big { font-size: 1.5rem; padding-bottom: 8px; }
.sc-live { padding: 10px 14px; border-radius: var(--r-m); background: rgba(132, 200, 154, .1); border: 1px solid rgba(132, 200, 154, .3); color: var(--text); font-size: var(--fs-s); animation: rise-in .3s var(--ease); }
.sclist { display: grid; gap: 8px; }
.sc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-l); background: var(--tint); border: 1px solid var(--line); transition: transform .2s var(--ease), background .2s; }
.sc:hover { background: var(--tint-2); transform: translateX(-3px); }
.sc code, .sc-live code, .box code { direction: ltr; unicode-bidi: isolate; padding: 2px 8px; border-radius: 7px; background: #1e1f22; color: #dbdee1; font-family: inherit; }
.sc code.k { color: var(--amber-2); font-weight: 800; }
.sc .icon-btn { margin-inline-start: auto; }
.chip.sug { cursor: pointer; border: 1px dashed var(--line-2); font-family: inherit; transition: all .15s; }
.chip.sug:hover { background: rgba(242, 165, 74, .18); color: var(--amber-2); transform: translateY(-1px); }
/* الحماية */
.shield { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); margin-bottom: 14px; }
.shield.on { border-color: rgba(132, 200, 154, .45); background: linear-gradient(135deg, rgba(132, 200, 154, .14), var(--glass) 60%); }
.shield .sh-ic { font-size: 2.4rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: var(--tint-2); flex: none; }
.shield.on .sh-ic { animation: pulse-ok 2.6s ease-in-out infinite; }
@keyframes pulse-ok { 0%, 100% { box-shadow: 0 0 0 0 rgba(132, 200, 154, .35); } 50% { box-shadow: 0 0 0 12px rgba(132, 200, 154, 0); } }
.shield .sh-t { flex: 1; } .shield h2 { font-size: var(--fs-l); } .shield p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-s); }
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lvl { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; padding: 16px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--glass); color: var(--text); cursor: pointer; font: inherit; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, background .2s; }
.lvl:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .9); }
.lvl .i { font-size: 1.4rem; letter-spacing: -6px; }
.lvl b { font-size: var(--fs-l); } .lvl small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.6; }
.lvl.cur { border-color: rgba(242, 165, 74, .7); background: linear-gradient(160deg, rgba(242, 165, 74, .16), var(--glass)); box-shadow: 0 0 0 1px rgba(242, 165, 74, .35) inset; }
.lvl em { position: absolute; top: 12px; inset-inline-end: 12px; font-style: normal; font-size: var(--fs-xs); font-weight: 800; color: var(--amber-2); }
.lvl:disabled { opacity: .6; cursor: wait; }
details.adv { margin-top: 18px; }
details.adv > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-radius: var(--r-xl); background: var(--glass); border: 1px dashed var(--line-2); transition: background .2s; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary:hover { background: var(--glass-hi); }
details.adv > summary small { color: var(--muted); }
details.adv[open] > summary { margin-bottom: 14px; border-style: solid; }
.bk-state { padding: 12px 14px; border-radius: var(--r-m); font-size: var(--fs-s); }
.bk-state.ok { background: rgba(132, 200, 154, .1); border: 1px solid rgba(132, 200, 154, .3); }
.bk-state.warn { background: rgba(232, 112, 58, .12); border: 1px solid rgba(232, 112, 58, .4); }
.bk-state small { color: var(--muted); }
@media (max-width: 1100px) { .levels { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .levels { grid-template-columns: 1fr; } }

/* ═════════ مصمم البطاقات ═════════ */
@font-face { font-family: 'DAmiri'; src: url('/fonts/Amiri-Bold.ttf'); font-display: swap; }
@font-face { font-family: 'DNaskh'; src: url('/fonts/NotoNaskhArabic.ttf'); font-display: swap; }
@font-face { font-family: 'DTajawal'; src: url('/fonts/Tajawal-Bold.ttf'); font-display: swap; }
.dz-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.dz-tabs .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--oasis); vertical-align: middle; margin-inline-start: 4px; }
.dz { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.dz-main { min-width: 0; padding: 16px; border-radius: var(--r-xl); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.dz-bar, .dz-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dz-bar { margin-bottom: 12px; } .dz-foot { margin-top: 12px; }
.dz-add { display: flex; gap: 6px; flex-wrap: wrap; }
.sp { flex: 1; }
.stage { position: relative; width: 100%; border-radius: 16px; overflow: hidden; background: repeating-conic-gradient(#2a1d12 0 25%, #1e150d 0 50%) 0 0 / 22px 22px; box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .95), 0 0 0 1px var(--line-2); user-select: none; touch-action: none; }
.cv { position: absolute; top: 0; left: 0; direction: ltr; transform-origin: 0 0; background-size: 100% 100%; background-repeat: no-repeat; }
.el { position: absolute; cursor: move; white-space: nowrap; line-height: 1.15; direction: rtl; }
.el::after { content: ''; position: absolute; inset: -6px; border: 2px dashed transparent; border-radius: 8px; pointer-events: none; transition: border-color .15s; }
.el:hover::after { border-color: rgba(255, 255, 255, .35); }
.el.sel::after { border: 2px solid #4fa3ff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0); }
.el img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; pointer-events: none; }
.el-avatar { background: #E6D2AC; overflow: visible; }
.el-bar b { position: absolute; top: 0; bottom: 0; }
.el-star svg { width: 100%; height: 100%; }
.el .ph-t { opacity: .5; font-style: italic; }
.hdl { position: absolute; width: 22px; height: 22px; right: -15px; bottom: -15px; border-radius: 50%; background: #4fa3ff; border: 3px solid #fff; cursor: nwse-resize; display: none; z-index: 2; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.el.sel .hdl { display: block; }
.guide { position: absolute; background: #ff4fd8; z-index: 5; pointer-events: none; }
.guide.v { top: 0; bottom: 0; left: 50%; width: 2px; } .guide.h { left: 0; right: 0; top: 50%; height: 2px; }
.dz-loading { position: absolute; bottom: 10px; left: 10px; padding: 4px 12px; border-radius: 99px; background: rgba(0, 0, 0, .6); font-size: var(--fs-xs); color: #fff; }
.dz-hint { margin: 10px 2px 0; color: var(--faint); font-size: var(--fs-xs); }
.dirty { color: var(--amber-2); font-size: var(--fs-s); font-weight: 700; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.dz-side { display: grid; gap: 12px; position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow-y: auto; padding-inline-end: 2px; }
.dz-sec { padding: 14px; border-radius: var(--r-l); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: grid; gap: 10px; animation: rise-in .25s var(--ease); }
.dz-sec.sel { border-color: rgba(79, 163, 255, .5); }
.dz-sec h3 { display: flex; align-items: center; gap: 6px; font-size: var(--fs-m); margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.rng { display: flex; align-items: center; gap: 8px; }
.rng input { flex: 1; accent-color: var(--amber); }
.rng output { min-width: 42px; text-align: center; font-size: var(--fs-xs); color: var(--amber-2); font-variant-numeric: tabular-nums; }
.seg { display: flex; border-radius: var(--r-m); border: 1px solid var(--line-2); overflow: hidden; }
.seg button { flex: 1; padding: 8px 6px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: var(--fs-s); transition: background .15s; }
.seg button.on { background: rgba(242, 165, 74, .2); color: var(--amber-2); font-weight: 800; }
.bgpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bgpick button, .tpls button { padding: 9px 6px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--tint); color: var(--text); cursor: pointer; font: inherit; font-size: var(--fs-s); transition: all .15s; }
.bgpick button:hover, .tpls button:hover { background: var(--tint-2); transform: translateY(-1px); }
.bgpick button.on { border-color: var(--amber); background: rgba(242, 165, 74, .16); color: var(--amber-2); font-weight: 800; }
.tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.upl { display: grid; place-items: center; gap: 2px; padding: 16px; border-radius: var(--r-l); border: 2px dashed var(--line-2); cursor: pointer; text-align: center; transition: border-color .2s, background .2s; }
.upl:hover { border-color: var(--amber); background: rgba(242, 165, 74, .06); }
.upl small { color: var(--faint); font-size: var(--fs-xs); }
.gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gal button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 16 / 10; background: #000; }
.gal button.on { border-color: var(--amber); }
.gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.layers li { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; cursor: pointer; font-size: var(--fs-s); color: var(--muted); transition: background .15s; }
.layers li:hover { background: var(--tint); color: var(--text); }
.layers li.on { background: rgba(79, 163, 255, .15); color: var(--text); }
.layers li span { width: 22px; text-align: center; }
.dz-dlg { border: 0; padding: 16px; border-radius: var(--r-xl); background: var(--glass-hi); color: var(--text); max-width: min(1100px, 94vw); box-shadow: 0 30px 80px -20px #000; }
.dz-dlg::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); }
.dz-dlg img { width: 100%; border-radius: 12px; display: block; margin-bottom: 12px; }
@media (max-width: 1100px) { .dz { grid-template-columns: 1fr; } .dz-side { position: static; max-height: none; } }
.dz-side { overflow-x: hidden; }
.dz-sec, .dz-sec > *, .row2 > * { min-width: 0; }
.rng input { min-width: 0; }
.dz-sec .vars .chip { white-space: nowrap; }

/* ═════════ تفاعلات ═════════ */
.toast::before { display: none; }
.toast { position: relative; overflow: hidden; padding-inline-start: 12px; }
.toast > b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(132, 200, 154, .2); color: var(--oasis); font-size: .85rem; }
.toast.err > b { background: rgba(232, 112, 58, .2); color: var(--ember); }
.toast.err { animation: toast-in .35s var(--ease), shake .4s .1s; }
.toast > i { position: absolute; bottom: 0; inset-inline: 0; height: 3px; background: var(--oasis); transform-origin: right; animation: toast-life 4s linear forwards; opacity: .7; }
.toast.err > i { background: var(--ember); }
@keyframes toast-life { to { transform: scaleX(0); } }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.box, .gcard, .lvl, .stat { --mx: -300px; --my: -300px; }
.box::before, .gcard::after, .lvl::before, .stat::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 214, 160, .07), transparent 45%); opacity: 0; transition: opacity .3s; }
.box:hover::before, .gcard:hover::after, .lvl:hover::before, .stat:hover::before { opacity: 1; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.ghost.busy::after { border-color: rgba(242, 165, 74, .3); border-top-color: var(--amber); }
@keyframes spin { to { transform: rotate(360deg); } }
.sticky-save.dirty { border-color: rgba(242, 165, 74, .7); box-shadow: 0 0 0 1px rgba(242, 165, 74, .3) inset, 0 18px 40px -16px rgba(242, 165, 74, .45); }
.sticky-save.dirty::before { content: '● لديك تغييرات غير محفوظة'; margin-inline-end: auto; color: var(--amber-2); font-weight: 700; font-size: var(--fs-s); animation: blink 1.6s ease-in-out infinite; }
.sticky-save.dirty .btn { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(242, 165, 74, 1); } }
.guide-box { border-color: rgba(242, 165, 74, .45); background: linear-gradient(135deg, rgba(242, 165, 74, .12), var(--glass) 55%); }
.gprog { height: 8px; border-radius: 99px; background: var(--tint-2); margin: 14px 0; overflow: hidden; }
.gprog i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--amber-2), var(--amber)); transition: width .8s var(--ease); }
.gsteps { display: flex; flex-wrap: wrap; gap: 8px; }
.gstep { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--tint); border: 1px solid var(--line); text-decoration: none; font-size: var(--fs-s); font-weight: 700; transition: transform .2s var(--ease), background .2s, border-color .2s; }
.gstep:hover { transform: translateY(-2px); background: var(--tint-2); border-color: var(--line-2); }
.gstep span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-2); font-size: .85rem; }
.gstep.done { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(132, 200, 154, .5); }
.gstep.done span { background: rgba(132, 200, 154, .25); color: var(--oasis); }
.nav a { position: relative; }
.nav-more { width: 100%; margin-top: 8px; padding: 8px 12px; border-radius: var(--r-m); border: 1px dashed var(--line-2); background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-s); font-weight: 700; cursor: pointer; text-align: start; transition: background .2s, color .2s; }
.nav-more:hover { background: var(--tint); color: var(--text); }
.nav-more small { color: var(--faint); }
.nav a[aria-current="page"]::after { content: ''; position: absolute; inset-inline-start: -14px; top: 22%; bottom: 22%; width: 4px; border-radius: 4px; background: var(--amber); animation: grow .35s var(--ease); }
@keyframes grow { from { transform: scaleY(0); } }
.switch input { transition: background .25s, transform .15s; }
.switch input:active { transform: scale(.92); }
.chip, .icon-btn { transition: transform .15s var(--ease), background .2s; }
.icon-btn:active { transform: scale(.9); }
@media (prefers-reduced-motion: reduce) { .box::before, .gcard::after { display: none; } }
.steps-n { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; color: var(--muted); font-size: var(--fs-s); }
.steps-n b { color: var(--text); } .steps-n a { color: var(--amber-2); }
.addbot { border-color: rgba(242, 165, 74, .35); }

/* ═════════ الإحصائيات ═════════ */
.kpi .dl { display: inline-block; margin-inline-start: 8px; font-size: var(--fs-xs); font-weight: 800; padding: 0 8px; border-radius: 99px; background: var(--tint-2); color: var(--muted); }
.dl.up { color: var(--oasis); background: rgba(132, 200, 154, .12); }
.dl.down { color: var(--ember); background: rgba(232, 112, 58, .12); }
.dl.new { color: var(--amber-2); }
.facts .dl { font-size: .7rem; padding: 0 6px; border-radius: 99px; }
.box h2 .tabs { margin-inline-start: auto; }
.tabs.sm button { padding: 2px 10px; font-size: var(--fs-xs); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-s); }
.facts li:last-child { border: 0; }
.facts span { color: var(--muted); }
.facts b { font-variant-numeric: tabular-nums; }
.facts small { color: var(--faint); font-weight: 600; }
.chart { margin-top: 14px; }
.cwrap { position: relative; height: 190px; touch-action: pan-y; cursor: crosshair; }
.cwrap svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cwrap .ln { fill: none; stroke: var(--amber-2); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.cwrap .gl { stroke: var(--line); stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.cwrap .cur { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); pointer-events: none; }
.cwrap .dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--amber-2); box-shadow: 0 0 0 4px rgba(255, 194, 119, .22); pointer-events: none; }
.cwrap .tip { position: absolute; top: -8px; transform: translate(-50%, -100%); background: var(--glass-hi); border: 1px solid var(--line-2); border-radius: 10px; padding: 4px 10px; font-size: var(--fs-xs); white-space: nowrap; pointer-events: none; text-align: center; }
.cwrap .tip b { font-size: var(--fs-s); }
.cwrap .tip small { display: block; color: var(--faint); }
.cwrap .ymax { position: absolute; top: -4px; inset-inline-end: 0; font-size: .65rem; color: var(--faint); }
.cx { display: flex; margin-top: 6px; }
.cx small { flex: 1; text-align: center; font-size: .62rem; color: var(--faint); white-space: nowrap; min-width: 0; overflow: visible; }
.dbars { display: flex; gap: 3px; height: 190px; }
.dbars div { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; min-width: 0; }
.dbars div::after { content: ''; position: absolute; inset-inline: 0; top: 50%; height: 1px; background: var(--line); }
.dbars i { display: block; width: 100%; min-height: 0; }
.dbars .in { margin-top: auto; border-radius: 4px 4px 0 0; background: var(--oasis); }
.dbars .out { margin-bottom: auto; border-radius: 0 0 4px 4px; background: var(--ember); }
.dbars div > i.in { margin-top: auto; } .dbars div > i.out { margin-bottom: auto; }
.legend { margin: 8px 0 0; font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.legend span { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .in { background: var(--oasis); } .legend .out { background: var(--ember); margin-inline-start: 10px; }
.heat { display: grid; grid-template-columns: auto repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat .hl { font-size: .7rem; color: var(--muted); padding-inline-end: 8px; white-space: nowrap; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--tint); position: relative; }
.heat i::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--amber); opacity: var(--a); }
.heat small { font-size: .58rem; color: var(--faint); text-align: center; white-space: nowrap; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: var(--fs-s); }
.hbars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.hbars b { font-variant-numeric: tabular-nums; }
.hbars i { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--amber), var(--amber-2)); justify-self: start; min-width: 4px; animation: grow-x .8s var(--ease) both; transform-origin: right; }
@keyframes grow-x { from { transform: scaleX(0); } }
.faith { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.faith div { padding: 14px; border-radius: var(--r-l); background: var(--tint); border: 1px solid var(--line); }
.faith b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--sand); font-variant-numeric: tabular-nums; }
.faith span { color: var(--muted); font-size: var(--fs-s); }
@media (max-width: 820px) { .heat { gap: 2px; } .heat .hl { font-size: .6rem; padding-inline-end: 4px; } .heat small { font-size: .5rem; } .box h2:has(.tabs) { flex-wrap: wrap; } }

/* 💎 قفل البريميام */
.premium-lock { max-width: 640px; margin: 24px auto; text-align: center; padding: 34px 28px; }
.premium-lock .gem { width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; font-size: 2.2rem; background: linear-gradient(135deg, rgba(255, 194, 119, .25), rgba(242, 165, 74, .08)); border: 1px solid var(--line-2); box-shadow: 0 10px 40px rgba(242, 165, 74, .18); }
.premium-lock h2 { justify-content: center; font-family: 'Kufi'; font-weight: 400; font-size: var(--fs-xl); color: var(--sand); }
.premium-lock .sub { margin: 10px auto 18px; max-width: 48ch; }
.feat-list { list-style: none; margin: 0 auto 8px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: start; max-width: 520px; }
.feat-list li { padding: 10px 14px; border-radius: var(--r-m); background: var(--tint); border: 1px solid var(--line); font-size: var(--fs-s); }
@media (max-width: 560px) { .feat-list { grid-template-columns: 1fr; } }

/* ═════════ سياسة الخصوصية وشروط الاستخدام ═════════ */
.legal-links { margin: 14px 0 0; font-size: var(--fs-xs); pointer-events: auto; }
.legal-links a { color: #FFF4DE; opacity: .85; text-shadow: 0 1px 4px rgba(50, 28, 8, .7); }
.legal-page { background: radial-gradient(1200px 500px at 85% -10%, rgba(242, 165, 74, .14), transparent 60%), var(--night); min-height: 100vh; }
.legal-top { max-width: 820px; margin: 0 auto; padding: 22px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legal-brand { font-family: 'Kufi'; font-size: 1.9rem; color: var(--sand); text-decoration: none; }
.legal-top nav { display: flex; gap: 6px; flex-wrap: wrap; }
.legal-top nav a { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--tint); color: var(--muted); text-decoration: none; font-size: var(--fs-s); font-weight: 700; }
.legal-top nav a[aria-current="page"] { color: var(--text); background: var(--tint-2); border-color: var(--line-2); }
.legal { max-width: 820px; margin: 18px auto 0; padding: 30px 16px 40px; }
.legal h1 { font-family: 'Kufi'; font-weight: 400; font-size: var(--fs-xxl); color: var(--sand); }
.legal-meta { color: var(--faint); font-size: var(--fs-s); margin: 6px 0 18px; }
.legal-lead { font-size: 1.08rem; padding: 16px 18px; border-radius: var(--r-l); background: var(--glass); border: 1px solid var(--line); }
.legal h2 { font-size: var(--fs-l); margin: 30px 0 10px; color: var(--amber-2); }
.legal p, .legal li { color: #E9DAC2; max-width: 72ch; }
.legal ul { padding-inline-start: 22px; display: grid; gap: 6px; }
.legal b { color: var(--text); }
.legal a { color: var(--amber-2); }
.legal code { font-family: inherit; font-weight: 700; color: var(--sand); background: var(--tint-2); padding: 1px 8px; border-radius: 6px; font-size: .95em; unicode-bidi: isolate; }
.legal-en code { font-family: ui-monospace, Consolas, monospace; font-weight: 400; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0 32px; }
.legal-en { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.legal-en h1 { font-family: inherit; font-weight: 800; font-size: var(--fs-xl); }
.legal-foot { text-align: center; padding: 26px 16px 40px; color: var(--faint); font-size: var(--fs-s); border-top: 1px solid var(--line); max-width: 820px; margin: 0 auto; }
.legal-foot a { color: var(--muted); }
@media (max-width: 600px) { .legal h1 { font-size: var(--fs-xl); } .legal { padding-top: 16px; } }
.gal .gi { position: relative; }
.gal .gi > button[data-media] { width: 100%; }
.gal .gx { position: absolute; top: 4px; inset-inline-start: 4px; width: 22px; height: 22px; border-radius: 7px; border: 0; padding: 0; display: grid; place-items: center; font-size: 11px; line-height: 1; cursor: pointer; background: rgba(18, 12, 7, .78); color: #fff; opacity: 0; transition: opacity .15s; }
.gal .gi:hover .gx, .gal .gx:focus-visible { opacity: 1; }
@media (hover: none) { .gal .gx { opacity: .9; } }
.quota { display: block; margin-top: 8px; color: var(--muted); font-size: var(--fs-xs); }
.quota i { display: block; height: 4px; margin-top: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--amber), var(--amber-2)); max-width: 100%; }

/* 〰️ الخط التلقائي */
.al-h { font-size: var(--fs-m); margin: 14px 0 8px; color: var(--muted); }
.lines-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.lp { cursor: pointer; }
.lp input { position: absolute; opacity: 0; pointer-events: none; }
.lp span { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-l); border: 1.5px solid var(--line); background: #1e1f22; transition: border-color .15s, background .15s; height: 100%; }
.lp img { width: 100%; height: 44px; object-fit: contain; display: block; }
.lp b { font-size: var(--fs-s); color: var(--text); font-weight: 700; }
.lp:hover span { border-color: var(--line-2); }
.lp input:checked + span { border-color: var(--amber); background: #26221c; box-shadow: 0 0 0 3px rgba(242, 165, 74, .15); }
.lp input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.lp .al-up { display: grid; place-items: center; height: 34px; font-style: normal; color: var(--muted); font-size: var(--fs-s); border: 1px dashed var(--line-2); border-radius: 8px; }

/* 🧹 الحذف التلقائي */
.chips-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line); background: var(--tint); color: var(--muted); padding: 4px 12px; border-radius: 99px; font-size: var(--fs-s); font-weight: 700; cursor: pointer; }
.chip-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--tint-2); }

/* ═════════ الصفحة الرئيسية (التعريف بأثر) ═════════ */
.home { background: var(--night); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: 10px; background: var(--amber); color: #2a1606; font-weight: 800; }
.skip:focus { top: 12px; }
.home .landing { isolation: isolate; }
.home .landing canvas { position: absolute; }
.home .landing .hint { position: absolute; }
.home .landing::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--night)); pointer-events: none; }
.gate h1.tag { margin: 6px 0 22px; font-size: var(--fs-xl); line-height: 1.35; }
.gate h1.tag span { display: block; font-size: var(--fs-m); font-weight: 600; opacity: .85; margin-top: 4px; }
.scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 18px; color: #FFF4DE; text-decoration: none; font-weight: 700; font-size: var(--fs-s); text-shadow: 0 1px 6px rgba(50, 28, 8, .7); position: relative; z-index: 2; }
.scroll-cue span { animation: bob 1.8s ease-in-out infinite; font-size: 1.2rem; }
@keyframes bob { 50% { transform: translateY(5px); } }
.discord-btn.alt { margin-top: 10px; background: rgba(255, 240, 215, .1); color: var(--text); border: 1px solid rgba(255, 230, 190, .28); box-shadow: none; }
.discord-btn.alt:hover { background: rgba(255, 240, 215, .16); box-shadow: none; }

.home-main { position: relative; z-index: 1; }
.hs { max-width: 1100px; margin: 0 auto; padding: 84px 20px; text-align: center; }
.hs.alt { max-width: none; background: linear-gradient(180deg, rgba(255, 232, 196, .035), rgba(255, 232, 196, .06)); border-block: 1px solid var(--line); }
.hs.alt > * { max-width: 1100px; margin-inline: auto; }
.kicker { margin: 0 0 8px; color: var(--amber-2); font-weight: 800; font-size: var(--fs-s); letter-spacing: .02em; }
.hs h2 { font-family: 'Kufi'; font-weight: 400; font-size: clamp(1.9rem, 4.5vw, 2.8rem); color: var(--sand); }
.lead-c { color: var(--muted); max-width: 62ch; margin: 12px auto 36px; font-size: 1.05rem; }
.fgrid, .trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; text-align: start; }
.fgrid article, .trust article { padding: 20px; border-radius: var(--r-l); background: var(--glass); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .25s; }
.fgrid article:hover, .trust article:hover { transform: translateY(-3px); border-color: var(--line-2); }
.fgrid span, .trust span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--tint-2); font-size: 1.4rem; }
.fgrid h3, .trust h3 { margin: 14px 0 6px; font-size: var(--fs-m); color: var(--text); }
.fgrid p, .trust p { margin: 0; color: var(--muted); font-size: var(--fs-s); line-height: 1.75; }
.trust { margin-top: 32px; }
.trust code, .steps3 code, .faq code { background: var(--tint-2); padding: 0 6px; border-radius: 6px; color: var(--sand); font-family: inherit; }
.gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; text-align: start; scrollbar-width: thin; }
.gallery figure { flex: 0 0 min(340px, 78vw); margin: 0; scroll-snap-align: center; }
.gallery img { width: 100%; height: 260px; object-fit: cover; object-position: top; border-radius: var(--r-l); border: 1px solid var(--line); background: #1e1f22; display: block; box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .8); }
.gallery figcaption { margin-top: 10px; color: var(--muted); font-size: var(--fs-s); font-weight: 700; text-align: center; }
.steps3 { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 36px 0 0; text-align: start; }
.steps3 li { counter-increment: s; position: relative; padding: 24px 20px 20px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--glass); }
.steps3 li::before { content: counter(s, arabic-indic); position: absolute; top: -16px; inset-inline-start: 18px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--amber-2), var(--amber)); color: #2a1606; font-weight: 800; }
.steps3 b { display: block; font-size: var(--fs-l); color: var(--text); margin-bottom: 6px; }
.steps3 span { color: var(--muted); font-size: var(--fs-s); }
.center { text-align: center; }
.text-link { color: var(--amber-2); font-weight: 700; text-decoration: none; display: inline-block; margin-top: 24px; }
.text-link:hover { text-decoration: underline; }
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.numbers div { padding: 22px 12px; border-radius: var(--r-l); background: var(--glass); border: 1px solid var(--line); }
.numbers b { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--sand); font-variant-numeric: tabular-nums; }
.numbers span { color: var(--muted); font-size: var(--fs-s); }
.faq { max-width: 760px; margin: 28px auto 0; display: grid; gap: 10px; text-align: start; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--glass); padding: 0 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--amber-2); font-size: 1.3rem; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 16px; color: var(--muted); }
.cta { text-align: center; padding: 96px 20px; background: radial-gradient(700px 300px at 50% 0%, rgba(242, 165, 74, .16), transparent 70%); }
.verse-big { font-family: 'AmiriQuran', serif; font-size: clamp(1.4rem, 3.5vw, 2rem); color: #FFF4DE; margin: 0 0 14px; }
.cta h2 { font-family: 'Kufi'; font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--sand); }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.cta-btns .discord-btn { width: auto; min-width: 220px; }
.cta-btns .discord-btn.alt { margin-top: 0; }
.home-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 1100px; margin: 0 auto; padding: 26px 20px 34px; border-top: 1px solid var(--line); color: var(--faint); font-size: var(--fs-s); }
.home-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.home-foot a { color: var(--muted); text-decoration: none; }
.home-foot a:hover { color: var(--text); }
.pre.in { animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@media (max-width: 980px) { .fgrid, .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hs { padding: 60px 16px; } .fgrid, .trust, .steps3 { grid-template-columns: 1fr; } .steps3 { gap: 26px; } .gate h1.tag { font-size: var(--fs-l); } .home-foot { justify-content: center; text-align: center; } }
.home code { direction: rtl; unicode-bidi: isolate; }
.linkish { border: 0; background: none; padding: 0; color: var(--amber-2); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ═════════ 📰 نافذة الأخبار ═════════ */
html.nw-lock { overflow: hidden; }
.nw-back { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(10, 6, 3, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s var(--ease); }
.nw-back.on { opacity: 1; }
.nw { position: relative; width: min(560px, 100%); max-height: min(88vh, 860px); max-height: min(88dvh, 860px); display: flex; flex-direction: column; color: var(--text);
  background: linear-gradient(180deg, rgba(48, 32, 19, .97), rgba(24, 16, 9, .98)); border: 1px solid var(--line-2); border-radius: var(--r-xl); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 230, 190, .08); transform: translateY(14px) scale(.98); transition: transform .28s var(--ease); outline: none; }
.nw-back.on .nw { transform: none; }
.nw-x { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(18, 12, 7, .7); color: var(--text); cursor: pointer; font-size: 15px; backdrop-filter: blur(8px); }
.nw-x:hover { background: rgba(242, 165, 74, .25); }
.nw-scroll { overflow-y: auto; overscroll-behavior: contain; }
.nw-media { position: relative; overflow: hidden; background: #0c0805; aspect-ratio: 16 / 10; }
.nw-track { display: flex; height: 100%; transition: transform .35s var(--ease); touch-action: pan-y; }
.nw-slide { flex: 0 0 100%; margin: 0; height: 100%; display: grid; place-items: center; }
.nw-slide img, .nw-slide video, .nw-slide iframe { width: 100%; height: 100%; object-fit: contain; border: 0; display: block; background: #0c0805; }
.nw-slide img { object-fit: cover; }
.nw-yt { width: 100%; height: 100%; border: 0; cursor: pointer; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--text);
  background: radial-gradient(circle at 50% 45%, rgba(242, 165, 74, .22), transparent 60%), #140d07; }
.nw-yt .pl { width: 68px; height: 48px; border-radius: 14px; background: #e33; position: relative; margin-bottom: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.nw-yt .pl::after { content: ''; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; transform: translateX(2px); }
.nw-yt small { color: var(--muted); font-size: var(--fs-xs); }
.nw-arr { position: absolute; top: 50%; translate: 0 -50%; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(18, 12, 7, .65); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); }
.nw-arr.r { right: 10px; } .nw-arr.l { left: 10px; }
.nw-dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.nw-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .45); cursor: pointer; transition: width .2s; }
.nw-dots button[aria-current="true"] { width: 22px; background: var(--amber-2); }
.nw-body { padding: 18px 22px 8px; }
.nw-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--faint); font-size: var(--fs-xs); margin-bottom: 6px; }
.nw-tag { padding: 2px 10px; border-radius: 99px; background: rgba(242, 165, 74, .16); color: var(--amber-2); font-weight: 800; }
.nw-tag.pin { background: var(--tint-2); color: var(--sand); }
.nw-body h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 8px; }
.nw-text { color: #E9DAC2; line-height: 1.95; overflow-wrap: anywhere; }
.nw-text a { color: var(--amber-2); }
.nw-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: rgba(14, 9, 5, .5); }
.nw-count { flex: 1; text-align: center; color: var(--muted); font-size: var(--fs-xs); }
.nw-nav { border: 0; background: none; color: var(--muted); cursor: pointer; font-weight: 700; padding: 6px 4px; font-size: var(--fs-s); }
.nw-nav:disabled { opacity: .35; cursor: default; }
.nw-ok { border: 0; border-radius: var(--r-m); padding: 9px 22px; font-weight: 800; cursor: pointer; color: #2B1A08; background: linear-gradient(180deg, var(--amber-2), var(--amber)); }
.nw-media:not([hidden]) + .nw-body { padding-top: 16px; }
@media (max-width: 560px) { .nw-back { padding: 0; place-items: end center; } .nw { border-radius: 22px 22px 0 0; max-height: 92dvh; } .nw-body h2 { font-size: 1.2rem; } }
@media (prefers-reduced-motion: reduce) { .nw-back, .nw, .nw-track { transition: none; } }

/* زر الأخبار */
.news-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--glass); color: var(--text); border-radius: 99px; padding: 6px 14px; font-weight: 800; font-size: var(--fs-s); cursor: pointer; backdrop-filter: blur(10px); }
.news-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.news-btn .nb { display: none; }
.news-btn.has-new .nb { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--ember); color: #fff; font-size: 11px; font-weight: 900; }
.news-btn.has-new { border-color: rgba(242, 165, 74, .6); box-shadow: 0 0 0 4px rgba(242, 165, 74, .12); }
.home .news-btn { position: fixed; top: 14px; inset-inline-start: 14px; z-index: 50; background: rgba(28, 18, 10, .72); }
.topbar .news-btn { margin-inline-start: auto; }
.topbar .news-btn + .clock { margin-inline-start: 0; }
.maint-banner { position: relative; z-index: 60; text-align: center; padding: 9px 16px; font-weight: 800; background: linear-gradient(90deg, #8a4b1c, #b5651d, #8a4b1c); color: #fff; border-radius: var(--r-m); margin-bottom: 12px; }
.home .maint-banner { position: fixed; top: 0; inset-inline: 0; border-radius: 0; margin: 0; z-index: 70; }

/* ═════════ 👑 لوحة المالك ═════════ */
.otabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.otabs a { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 7px 13px; border-radius: 99px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: var(--fs-s); background: var(--tint); border: 1px solid var(--line); }
.otabs a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.otabs a:hover { color: var(--text); background: var(--tint-2); }
.otabs a[aria-current="page"] { color: #2B1A08; background: linear-gradient(180deg, var(--amber-2), var(--amber)); border-color: transparent; }
.otiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.otile { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-l); text-decoration: none; background: var(--glass); border: 1px solid var(--line); transition: transform .2s var(--ease), border-color .2s; }
.otile:hover { transform: translateY(-2px); border-color: var(--line-2); }
.otile svg { width: 22px; height: 22px; fill: none; stroke: var(--amber-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.otile b { font-size: 1.5rem; font-weight: 900; line-height: 1.2; }
.otile span { color: var(--muted); font-size: var(--fs-s); }
.otile.hot { border-color: rgba(232, 112, 58, .55); background: linear-gradient(180deg, rgba(232, 112, 58, .16), var(--glass)); }
.chip.warn { background: rgba(232, 112, 58, .2); color: #FFB28A; }
.muted { color: var(--muted); }
/* الأخبار */
.nitem { align-items: flex-start; flex-wrap: wrap; }
.nitem .nth { width: 64px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; background: var(--tint-2); }
.nitem .body small .chip { margin-inline-end: 2px; }
.nact { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; padding-inline-start: 78px; }
.nact .btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.nmedia { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.nm { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--tint-2); display: grid; place-items: center; border: 1px solid var(--line); }
.nm img { width: 100%; height: 100%; object-fit: cover; }
.nm > span { font-size: 1.6rem; }
.nm em { position: absolute; bottom: 4px; inset-inline-start: 4px; font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: rgba(0, 0, 0, .65); }
.nm-x, .nm-up { position: absolute; top: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; font-size: 12px; }
.nm-x { inset-inline-end: 4px; } .nm-up { inset-inline-start: 4px; }
.nm-first { position: absolute; top: 4px; inset-inline-start: 4px; font-size: 10px; padding: 1px 7px; border-radius: 99px; background: var(--amber); color: #2B1A08; }
.drop { display: grid; gap: 2px; place-items: center; text-align: center; padding: 18px; border-radius: var(--r-l); border: 1.5px dashed var(--line-2); background: var(--tint); cursor: pointer; transition: background .2s, border-color .2s; }
.drop:hover, .drop.over { background: rgba(242, 165, 74, .1); border-color: var(--amber); }
.drop small { color: var(--muted); line-height: 1.7; }
.nprog { display: grid; gap: 4px; } .nprog i { display: block; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--amber), var(--amber-2)); width: 0; transition: width .2s; }
.nprog span { font-size: var(--fs-xs); color: var(--muted); }
.nopts { display: grid; gap: 6px; }
/* الرسائل */
.msgs .msg { padding: 14px; border-radius: var(--r-l); background: var(--tint); border: 1px solid var(--line); }
.msgs .msg.new { border-color: rgba(242, 165, 74, .45); }
.mh { display: flex; align-items: center; gap: 10px; }
.mh > div { flex: 1; min-width: 0; } .mh b { display: block; } .mh small { color: var(--muted); }
.mh .em { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--tint-2); flex: none; }
.mt { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mr { padding: 8px 12px; border-inline-start: 3px solid var(--oasis); background: rgba(132, 200, 154, .08); border-radius: 8px; margin-bottom: 8px; white-space: pre-wrap; }
.mr small { display: block; color: var(--oasis); font-weight: 700; }
.mrf { display: grid; gap: 8px; margin-bottom: 8px; } .mrf textarea { width: 100%; }
/* الأخطاء */
.item.err { align-items: flex-start; } .item.err.done { opacity: .6; }
.item.err b { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .88em; }
.item.err details { margin-top: 6px; } .item.err summary { cursor: pointer; color: var(--muted); font-size: var(--fs-xs); }
.item.err pre { margin: 6px 0 0; padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .35); font-size: 12px; overflow-x: auto; white-space: pre; }
.maint-on { border-color: rgba(232, 112, 58, .6); }
.item .av { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--tint-2); }
.tips { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; color: #E2D2BA; }
/* المساحة */
.gprog.big { height: 12px; }
.dparts { display: grid; gap: 8px; margin-top: 8px; }
.dpart { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: var(--fs-s); }
.dpart i { grid-column: 1 / -1; height: 8px; border-radius: 99px; order: 3; min-width: 4px; }
.dpart i.a { background: #F2A54A; } .dpart i.b { background: #84C89A; } .dpart i.c { background: #8FB4E8; } .dpart i.d { background: #D79BE0; }
.qbar { width: 120px; height: 6px; border-radius: 99px; background: var(--tint-2); overflow: hidden; } .qbar i { display: block; height: 100%; background: var(--amber); }
.bcjob { display: grid; gap: 8px; } .bcjob small { color: var(--muted); }
@media (max-width: 700px) { .nact { padding-inline-start: 0; } }
.nw-arr { display: grid; place-items: center; }
.nw-arr svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.lead code, .sub code { font-family: inherit; font-weight: 800; color: var(--sand); background: var(--tint-2); padding: 0 6px; border-radius: 6px; direction: rtl; unicode-bidi: isolate; }
.verse-big .vref { font-family: "Cairo", sans-serif; font-size: .38em; opacity: .7; white-space: nowrap; vertical-align: middle; }
.chk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 220px; overflow-y: auto; padding: 8px; border-radius: var(--r-m); background: var(--tint); border: 1px solid var(--line); }
.chk { display: flex; align-items: center; gap: 6px; font-size: var(--fs-s); cursor: pointer; padding: 4px 6px; border-radius: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chk:hover { background: var(--tint-2); }
.chk input { accent-color: var(--amber); }
.chips-pick code { direction: rtl; unicode-bidi: isolate; }

.wheelprev { display: flex; gap: 6px; margin: -4px 0 10px; }
.wheelprev i { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); }
.tprev { width: 100%; max-width: 480px; border-radius: 14px; display: block; margin: 0 0 12px; }
.box p code { white-space: nowrap; display: inline-block; }
.gprev { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 8px 0 12px; align-items: start; }
.gprev img { width: 100%; border-radius: 12px; display: block; background: var(--tint); min-height: 60px; }
/* الجوال: لا يتمدد أي عمود أعرض من الشاشة */
.main, .page, .grid > *, .stats > *, .row > * { min-width: 0; }
.otabs { max-width: 100%; }
.cal-head { flex-wrap: wrap; }
.list > * { min-width: 0; }
@media (max-width: 520px) { .item { flex-wrap: wrap; } .item .body { flex-basis: calc(100% - 60px); } }

/* ── الأوامر وإعداداتها ── */
.rsum { display: block; font-size: var(--fs-xs); color: var(--amber-2); margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cmd .gear { flex: none; opacity: .75; }
.cmd .gear:hover, .cmd .gear.on, [data-edit].on { opacity: 1; color: var(--amber-2); }
.cmd .gear svg { width: 18px; height: 18px; }
.sec-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.sec-tools [data-edit] { margin-inline-start: auto; }
.sec-tools .btn svg { width: 15px; height: 15px; vertical-align: -3px; }
.cedit { grid-column: 1 / -1; display: grid; gap: 12px; padding: 14px; border-radius: var(--r-l); border: 1px solid rgba(242, 165, 74, .45); background: rgba(242, 165, 74, .06); margin: 2px 0 8px; animation: rise-in .25s ease; min-width: 0; }
.cedit .grid.tight { gap: 10px; }
.cedit .f > span { font-weight: 800; }
.cedit .actions { margin: 0; }
.als { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.al { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; background: var(--tint-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.al.mine { background: rgba(242, 165, 74, .18); color: var(--amber-2); border: 1px solid rgba(242, 165, 74, .45); }
.al small { opacity: .8; font-weight: 600; }
.al button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 2px; font: inherit; }
.al-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.al-add .pfx-in { flex: 1 1 180px; min-width: 0; }
.modcmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.modcmds > div { padding: 9px 12px; border-radius: var(--r-m); background: var(--tint); border: 1px solid var(--line); min-width: 0; }
.modcmds code { font-weight: 800; }
.modcmds small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 3px; }
.modcmds small.al-l { color: var(--faint); direction: ltr; text-align: right; unicode-bidi: plaintext; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#rtabs { flex-wrap: wrap; }
[data-rpane] .rrow > input[type=text] { flex: 2 1 180px; }
[data-esc] .sub { white-space: nowrap; }
[data-esc] { flex-wrap: wrap; }
@media (max-width: 640px) { .cedit .grid.g2 { grid-template-columns: 1fr; } .box h2:has(#rtabs) { flex-wrap: wrap; } }

/* أي أيقونة داخل نص عادي ما تكبر */
.lead svg, .sub svg, p svg { width: 1em; height: 1em; vertical-align: -.15em; }

/* أغلفة لوحات الدخول */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cov { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--tint); overflow: hidden; transition: transform .2s, border-color .2s, opacity .2s; min-width: 0; }
.cov:hover { transform: translateY(-3px); border-color: rgba(242, 165, 74, .45); }
.cov.busy { opacity: .55; pointer-events: none; }
.cov-img { aspect-ratio: 960 / 560; background: rgba(10, 6, 3, .35); display: grid; place-items: center; overflow: hidden; }
.cov-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cov-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; }
.cov-bar b { font-size: var(--fs-s); }
.cov-act { margin-inline-start: auto; display: flex; gap: 6px; }

/* الألعاب التلقائية والبطولة */
.times { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tchip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px; border-radius: 12px; background: var(--tint-2); border: 1px solid var(--line); }
.tchip input[type=time] { width: auto; border: 0; background: transparent; padding: 6px 4px; min-height: 0; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.day input { position: absolute; opacity: 0; pointer-events: none; }
.day span { display: inline-block; padding: 6px 12px; border-radius: 99px; background: var(--tint-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: all .15s; }
.day input:checked + span { background: rgba(242, 165, 74, .18); color: var(--amber-2); border-color: rgba(242, 165, 74, .45); }
.day input:focus-visible + span { outline: 2px solid var(--amber); }
.tour-now > b { display: block; margin-bottom: 4px; }
.tour-now { padding: 10px 12px; border-radius: var(--r-m); background: var(--tint); border: 1px solid var(--line); }
.tour-now ol { margin: 8px 0 0; padding: 0 18px 0 0; display: grid; gap: 4px; }
.tour-now li { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-s); }
.tour-now li b { color: var(--amber-2); }

/* ═════════ شريط التغييرات غير المحفوظة ═════════ */
.ubar { position: fixed; z-index: 60; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 99px;
  background: var(--glass-hi); border: 1px solid rgba(242, 165, 74, .55); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 18px 50px -14px rgba(0, 0, 0, .85), 0 0 0 4px rgba(242, 165, 74, .08); animation: ubar-in .35s var(--ease); max-width: calc(100vw - 24px); }
.ubar .t { font-weight: 700; font-size: var(--fs-s); white-space: nowrap; }
.ubar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(242, 165, 74, .6); animation: ubar-dot 1.6s infinite; flex: none; }
@keyframes ubar-in { from { opacity: 0; transform: translate(-50%, 24px); } }
@keyframes ubar-dot { 70% { box-shadow: 0 0 0 9px rgba(242, 165, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 165, 74, 0); } }
.sticky-save.dirty::before { content: '● عندك تغييرات ما حفظتها'; margin-inline-end: auto; color: var(--amber-2); font-weight: 700; font-size: var(--fs-s); align-self: center; }
@media (max-width: 520px) { .ubar { bottom: 82px; gap: 6px; padding: 8px 10px; } .ubar .t { font-size: var(--fs-xs); } .sticky-save.dirty::before { content: '●'; } }

/* ═════════ المظهر الفاتح (رملي نهاري) ═════════ */
html[data-theme="light"] {
  color-scheme: light;
  --night: #F4EBDD;
  --glass: rgba(255, 251, 244, .78);
  --glass-hi: rgba(255, 252, 247, .94);
  --tint: rgba(120, 80, 30, .055);
  --tint-2: rgba(120, 80, 30, .1);
  --line: rgba(120, 80, 30, .15);
  --line-2: rgba(120, 80, 30, .27);
  --text: #2B1E12;
  --muted: #6B5741;
  --faint: #93806B;
  --sand: #8A6338;
  --amber: #D07E24;
  --amber-2: #A85A12;
  --ember: #C2532A;
  --oasis: #3A8A52;
}
html[data-theme="light"] body { background: var(--night); }
html[data-theme="light"] .bg { background: linear-gradient(#bfd6ee, #ead4a6 55%, #d9b47c); }
html[data-theme="light"] .bg::after { background: linear-gradient(180deg, rgba(244, 235, 221, .15) 0%, rgba(244, 235, 221, .7) 40%, rgba(244, 235, 221, .92) 100%); }
html[data-theme="light"] input[type=text], html[data-theme="light"] input[type=number], html[data-theme="light"] input[type=time], html[data-theme="light"] input[type=date],
html[data-theme="light"] input[type=search], html[data-theme="light"] input[type=url], html[data-theme="light"] input[type=password], html[data-theme="light"] input[type=color],
html[data-theme="light"] select, html[data-theme="light"] textarea, html[data-theme="light"] .multi, html[data-theme="light"] .pfx-in, html[data-theme="light"] .cov-img { background: rgba(255, 255, 255, .72); }
html[data-theme="light"] select option { background: #FFF8EE; color: #2B1E12; }
html[data-theme="light"] .btn.danger { color: #A8401A; border-color: rgba(194, 83, 42, .45); }
html[data-theme="light"] .chip.warn { color: #A8401A; }
html[data-theme="light"] .alert { color: #7A3210; }
html[data-theme="light"] .rail.open { box-shadow: 0 0 0 100vmax rgba(60, 40, 20, .35); }
html[data-theme="light"] .nw-back { background: rgba(60, 40, 20, .45); }
html[data-theme="light"] .nw { background: linear-gradient(180deg, #FFFBF4, #F6EBDA); }
html[data-theme="light"] .gcard:hover, html[data-theme="light"] .lvl:hover { box-shadow: 0 18px 40px -22px rgba(90, 60, 25, .45); }
html[data-theme="light"] .ubar, html[data-theme="light"] .sticky-save { box-shadow: 0 18px 50px -18px rgba(90, 60, 25, .5); }
html[data-theme="light"] .skeleton { background: linear-gradient(90deg, rgba(120, 80, 30, .06), rgba(120, 80, 30, .13), rgba(120, 80, 30, .06)); background-size: 200% 100%; }
.theme-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 700; font-size: var(--fs-s); }
.seg button[aria-pressed="true"] { background: var(--tint-2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset; }

/* ═════════ تفاعل: شريط التحميل والهيكل المؤقت ═════════ */
.topload { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 300; pointer-events: none; transform-origin: right; transform: scaleX(0); opacity: 0;
  background: linear-gradient(270deg, var(--amber-2), var(--amber), var(--ember)); box-shadow: 0 0 12px rgba(242, 165, 74, .7); }
.topload.on { opacity: 1; transform: scaleX(.75); transition: transform 2.5s cubic-bezier(.1, .7, .2, 1); }
.topload.done { opacity: 0; transform: scaleX(1); transition: transform .25s ease, opacity .4s ease .2s; }
.skel-page { display: grid; gap: 16px; }
.btn:active, .icon-btn:active, .chip.sug:active, .seg button:active { transform: scale(.97); }
.icon-btn { transition: background .2s, color .2s, transform .15s; }
.box { transition: border-color .25s, box-shadow .25s; }
.box:focus-within { border-color: var(--line-2); }

/* ═════════ الرئيسية: آخر الأحداث وصفحاتك ═════════ */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.feed a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-m); text-decoration: none; transition: background .2s, transform .2s var(--ease); }
.feed a:hover { background: var(--tint); transform: translateX(-3px); }
.feed .fi { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--tint-2); font-size: 1.05rem; }
.feed .ft { flex: 1; min-width: 0; font-size: var(--fs-s); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .ft b { color: var(--text); font-weight: 700; }
.feed .ft small { color: var(--faint); }
.feed time { font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; }
.qnav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qnav a { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border-radius: var(--r-l); background: var(--tint); border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: var(--fs-s); transition: border-color .2s, transform .2s var(--ease), background .2s; min-width: 0; }
.qnav a:hover { border-color: rgba(242, 165, 74, .45); transform: translateY(-2px); background: var(--tint-2); }
.qnav svg { width: 22px; height: 22px; stroke: var(--amber-2); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.qnav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ═════════ شريط الجوال السفلي ═════════ */
.bnav { display: none; }
@media (max-width: 820px) {
  .bnav { position: fixed; z-index: 50; bottom: 0; inset-inline: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--glass-hi); border-top: 1px solid var(--line); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); }
  .bnav[hidden] { display: none; }
  .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; border-radius: 12px; color: var(--muted); text-decoration: none; font: inherit; font-size: .68rem; font-weight: 700; cursor: pointer; min-width: 0; }
  .bnav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bnav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .bnav a[aria-current="page"] { color: var(--amber-2); background: var(--tint-2); }
  .shell { padding-bottom: 86px; }
  body:not(.pick) .rail { bottom: 78px; }
  .toasts { bottom: 84px; }
}
html[data-theme="light"] .nw { box-shadow: 0 30px 80px rgba(60, 40, 20, .35); }
html[data-theme="light"] .nw-text { color: var(--text); }
html[data-theme="light"] .nw-foot { background: rgba(120, 80, 30, .06); }
html[data-theme="light"] .nw-x { background: rgba(255, 250, 242, .85); }
html[data-theme="light"] .nw-arr { background: rgba(43, 30, 18, .55); }
html[data-theme="light"] .nw-yt { background: radial-gradient(circle at 50% 45%, rgba(208, 126, 36, .22), transparent 60%), #F1E4CE; }

/* ═════════ المظهر الفاتح: الأزرار والعناصر التفاعلية ═════════ */
html[data-theme="light"] .btn:not(.ghost):not(.danger), html[data-theme="light"] .nw-ok, html[data-theme="light"] .otabs a[aria-current="page"],
html[data-theme="light"] .controls .icon-btn.main-btn, html[data-theme="light"] .landing .btn {
  background: linear-gradient(135deg, #E59A44, #C9701C); color: #fff; border-color: rgba(150, 80, 15, .25);
  text-shadow: 0 1px 1px rgba(110, 55, 5, .35); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 20px -10px rgba(185, 100, 25, .75); }
html[data-theme="light"] .btn:not(.ghost):not(.danger):hover { background: linear-gradient(135deg, #EBA453, #D17A24); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 12px 26px -10px rgba(185, 100, 25, .85); }
html[data-theme="light"] .btn.busy::after { border-color: rgba(255, 255, 255, .45); border-top-color: #fff; }
html[data-theme="light"] .btn.ghost { background: rgba(255, 255, 255, .7); color: var(--text); border-color: rgba(120, 80, 30, .22); box-shadow: 0 1px 2px rgba(90, 60, 25, .08); }
html[data-theme="light"] .btn.ghost:hover { background: #fff; border-color: rgba(120, 80, 30, .35); }
html[data-theme="light"] .btn.ghost.busy::after { border-color: rgba(208, 126, 36, .3); border-top-color: var(--amber); }
html[data-theme="light"] .btn.danger { background: rgba(255, 255, 255, .6); color: #B23A12; border-color: rgba(194, 83, 42, .4); }
html[data-theme="light"] .btn.danger:hover { background: #FCE9E0; border-color: rgba(194, 83, 42, .6); }
html[data-theme="light"] .lockbox .btn.danger { background: linear-gradient(135deg, #E0663A, #B5441B); color: #fff; border-color: transparent; }
html[data-theme="light"] .icon-btn, html[data-theme="light"] .theme-btn { background: rgba(255, 255, 255, .7); border-color: rgba(120, 80, 30, .2); color: #6B5741; box-shadow: 0 1px 2px rgba(90, 60, 25, .08); }
html[data-theme="light"] .icon-btn:hover, html[data-theme="light"] .theme-btn:hover { background: #fff; color: var(--amber-2); }
html[data-theme="light"] .chip-btn { background: rgba(255, 255, 255, .65); border-color: rgba(120, 80, 30, .2); color: #5A4632; }
html[data-theme="light"] .chip-btn:hover { background: #fff; color: var(--amber-2); }
html[data-theme="light"] .tabs, html[data-theme="light"] .seg { background: rgba(120, 80, 30, .07); border-color: rgba(120, 80, 30, .14); }
html[data-theme="light"] .tabs button[aria-selected="true"], html[data-theme="light"] .seg button[aria-pressed="true"], html[data-theme="light"] .seg button.on {
  background: #fff; color: var(--amber-2); box-shadow: 0 1px 3px rgba(90, 60, 25, .18); }
html[data-theme="light"] .switch input { background: rgba(120, 80, 30, .16); border-color: rgba(120, 80, 30, .25); }
html[data-theme="light"] .switch input::after { background: #fff; box-shadow: 0 1px 3px rgba(60, 40, 20, .35); }
html[data-theme="light"] .switch input:checked { background: #3A9A5B; border-color: #3A9A5B; }
html[data-theme="light"] input[type=checkbox], html[data-theme="light"] input[type=radio], html[data-theme="light"] input[type=range] { accent-color: #C9701C; }
html[data-theme="light"] .chip.on { background: rgba(58, 138, 82, .14); color: #2E7A46; }
html[data-theme="light"] .chip.gold { background: rgba(208, 126, 36, .15); color: #9A5210; }
html[data-theme="light"] .chip.sug:hover { background: rgba(208, 126, 36, .14); color: #9A5210; }
html[data-theme="light"] .pfx-demo code, html[data-theme="light"] .dc code:not(.dc-embed code), html[data-theme="light"] .sc code, html[data-theme="light"] .sc-live code, html[data-theme="light"] .box code {
  background: rgba(120, 80, 30, .1); color: #5A3A18; border: 1px solid rgba(120, 80, 30, .14); }
html[data-theme="light"] .gph, html[data-theme="light"] .people li:first-child .rank, html[data-theme="light"] .skip, html[data-theme="light"] .nm-first { color: #fff; }
html[data-theme="light"] .day-track .dot { background: #FFF8EE; }
html[data-theme="light"] .lp span { background: rgba(255, 255, 255, .7); }
html[data-theme="light"] .lp input:checked + span { background: #FFF3E2; box-shadow: 0 0 0 3px rgba(208, 126, 36, .18); }
html[data-theme="light"] .gallery img { background: #EFE3D0; }
html[data-theme="light"] .item.err pre { background: rgba(120, 80, 30, .08); }
html[data-theme="light"] .nw-dots button { background: rgba(120, 80, 30, .3); }
html[data-theme="light"] :focus-visible { outline-color: #C9701C; }
html[data-theme="light"] .nw-dots button[aria-current="true"] { background: #C9701C; }
html[data-theme="light"] .skeleton { background: linear-gradient(90deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, .7), rgba(255, 255, 255, .35)); background-size: 200% 100%; border: 1px solid rgba(120, 80, 30, .08); }
