/* الملف الأسود — نوار داكن، ضوء كهرماني، ملفات بلسان */
:root {
  --ink: #07080a;
  --ink-2: #111114;
  --panel: rgba(17, 16, 20, .78);
  --panel-solid: #151418;
  --line: rgba(237, 228, 208, .10);
  --line-2: rgba(237, 228, 208, .18);
  --paper: #ede4d0;
  --paper-2: #c9bfa8;
  --muted: #8f887a;
  --amber: #e3a33b;
  --amber-2: #f4c76f;
  --blood: #c2412d;
  --teal: #4fb3a9;
  --radius: 16px;
  --font: 'Cairo', 'Tajawal', system-ui, sans-serif;
  --mono: 'Courier Prime', 'Courier New', monospace;
  --top-h: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--ink); color: var(--paper);
  font-family: var(--font); font-size: 16px; line-height: 1.75; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--amber); color: #120d05; }
[hidden] { display: none !important; }

#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
#fx.fallback { background: radial-gradient(ellipse at 30% 0%, rgba(227,163,59,.22), transparent 60%), var(--ink); }
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background: radial-gradient(ellipse at 50% 120%, rgba(0,0,0,.6), transparent 60%);
}
.mono { font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- الهيدر ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 40;
  display: flex; align-items: center; gap: 28px; padding: 0 clamp(16px, 4vw, 40px);
  background: linear-gradient(to bottom, rgba(10,10,12,.92), rgba(10,10,12,.55));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.top.hide { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.logo { width: 34px; height: 34px; }
.nav { display: flex; gap: 6px; margin-inline-start: 8px; }
.nav a { padding: 6px 14px; border-radius: 999px; color: var(--paper-2); font-size: .95rem; transition: .2s; }
.nav a:hover { color: var(--paper); background: rgba(237,228,208,.06); }
.nav a.on { color: var(--amber-2); background: rgba(227,163,59,.10); }
.who { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.who .name { font-weight: 600; color: var(--paper); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .badge { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #221c12; border: 1px solid rgba(227,163,59,.5); color: var(--amber-2); font-weight: 700; }

main { padding-top: var(--top-h); min-height: 100vh; outline: none; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- الأزرار ---------- */
.btn {
  --bg: rgba(237,228,208,.06); --fg: var(--paper); --bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 12px; border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 600; font-size: 1rem;
  transition: transform .2s, background .2s, box-shadow .25s, border-color .2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(237,228,208,.32); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-amber { --bg: linear-gradient(180deg, #f0b44c, #d48f24); --fg: #1a1105; --bd: transparent; box-shadow: 0 10px 30px -10px rgba(227,163,59,.6), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-amber:hover { box-shadow: 0 16px 40px -12px rgba(227,163,59,.8), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-red { --bg: linear-gradient(180deg, #d24a35, #a8321f); --fg: #fff3ee; --bd: transparent; box-shadow: 0 10px 30px -12px rgba(194,65,45,.7); }
.btn-ghost { --bg: rgba(10,10,12,.45); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.btn-block { width: 100%; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- الرئيسية ---------- */
.hero {
  min-height: calc(100vh - var(--top-h)); display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; gap: clamp(24px, 5vw, 70px); padding-block: 40px 60px;
}
.kicker { color: var(--amber); font-size: .78rem; display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ''; width: 34px; height: 1px; background: var(--amber); }
.hero h1 {
  margin: 14px 0 10px; font-size: clamp(3.2rem, 9vw, 7.2rem); line-height: 1.02; font-weight: 700; letter-spacing: -.01em;
}
.hero h1 em { font-style: normal; color: rgba(237,228,208,.07); -webkit-text-stroke: 1.5px var(--paper); position: relative; }
.hero h1 em::after {
  content: ''; position: absolute; inset-inline: -4% -2%; top: 52%; height: .16em; background: var(--blood);
  transform: rotate(-2deg) scaleX(0); transform-origin: right; animation: strike 1s 1.1s cubic-bezier(.7,0,.2,1) forwards;
}
@keyframes strike { to { transform: rotate(-2deg) scaleX(1); } }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--paper-2); max-width: 34ch; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.free {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; color: var(--paper-2); font-size: .92rem;
  padding: 8px 16px; border: 1px dashed rgba(79,179,169,.45); border-radius: 999px; background: rgba(79,179,169,.06);
}
.free i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }

.word { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(6px); animation: wordIn .9s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes wordIn { to { opacity: 1; transform: none; filter: none; } }
.fade-up { opacity: 0; transform: translateY(18px); animation: wordIn .9s cubic-bezier(.2,.7,.2,1) forwards; }

/* كومة الملفات */
.stack { position: relative; height: min(560px, 70vh); perspective: 1400px; }
.stack .folder { position: absolute; inset: 40px 0 0 0; transition: transform 1s cubic-bezier(.2,.7,.2,1), opacity 1s, filter 1s; }
.stack .folder[data-pos="1"]::before, .stack .folder[data-pos="2"]::before { opacity: 0; }
.stack .folder[data-pos="0"] { transform: translate3d(0,0,0) rotate(-1.5deg); z-index: 3; }
.stack .folder[data-pos="1"] { transform: translate3d(30px,-26px,-80px) rotate(4deg); z-index: 2; filter: brightness(.55); }
.stack .folder[data-pos="2"] { transform: translate3d(58px,-50px,-160px) rotate(8deg); z-index: 1; filter: brightness(.35); }
.stack-dots { position: absolute; bottom: -34px; inset-inline: 0; display: flex; justify-content: center; gap: 8px; }
.stack-dots button { width: 34px; height: 28px; border: 0; background: linear-gradient(var(--line-2),var(--line-2)) center/26px 4px no-repeat; padding: 0; transition: .3s; }
.stack-dots button.on { background: linear-gradient(var(--amber),var(--amber)) center/40px 4px no-repeat; width: 44px; }

/* ---------- بطاقة الملف (مجلد بلسان) ---------- */
.folder {
  --h: 38;
  position: relative; display: flex; flex-direction: column; border-radius: 4px 18px 18px 18px;
  background:
    radial-gradient(120% 80% at 80% 0%, hsl(var(--h) 55% 30% / .45), transparent 60%),
    linear-gradient(160deg, hsl(var(--h) 18% 13%), hsl(var(--h) 14% 7%));
  border: 1px solid hsl(var(--h) 40% 50% / .28);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);
  padding: 30px 28px 24px; color: var(--paper); min-height: 340px; isolation: isolate;
}
.folder::before {
  content: attr(data-tab); position: absolute; top: -30px; inset-inline-start: -1px;
  height: 31px; padding: 0 20px; display: flex; align-items: center;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; color: hsl(var(--h) 70% 70%);
  background: hsl(var(--h) 18% 13%); border: 1px solid hsl(var(--h) 40% 50% / .28); border-bottom: 0;
  border-radius: 12px 12px 0 0; direction: ltr;
}
.folder::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: .35;
  background-image: repeating-linear-gradient(0deg, transparent 0 31px, rgba(237,228,208,.05) 31px 32px);
}
.folder .en { padding-left: 120px; min-height: 1.6em; font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; color: var(--muted); direction: ltr; text-align: end; }
.folder h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; margin: 8px 0 10px; font-weight: 700; }
.folder p { color: var(--paper-2); margin: 0 0 18px; }
.folder .meta { display: flex; gap: 18px; margin-top: auto; color: var(--muted); font-size: .88rem; align-items: center; flex-wrap: wrap; }
.folder .meta b { color: var(--paper); font-weight: 600; }
.folder .go { margin-inline-start: auto; color: hsl(var(--h) 75% 65%); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
a.folder { transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .3s; }
a.folder:hover { transform: translateY(-6px) rotate(-.4deg); border-color: hsl(var(--h) 60% 60% / .55); box-shadow: 0 40px 70px -30px hsl(var(--h) 60% 30% / .6); }

.stamp {
  position: absolute; top: 22px; inset-inline-end: 22px; transform: rotate(8deg);
  border: 2px solid currentColor; color: var(--blood); padding: 2px 12px; border-radius: 6px;
  font-weight: 700; font-size: .85rem; letter-spacing: .04em; opacity: .9;
  mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.6));
}
.stamp.ok { color: var(--teal); }
.diff { display: inline-flex; gap: 4px; align-items: center; }
.diff i { width: 7px; height: 14px; border-radius: 2px; background: var(--line-2); }
.diff i.on { background: hsl(var(--h) 70% 58%); }

/* ---------- أقسام ---------- */
.section { padding-block: clamp(60px, 9vw, 120px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin: 6px 0 0; line-height: 1.2; }
.section-head p { color: var(--paper-2); margin: 0; max-width: 48ch; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step {
  position: relative; padding: 30px 26px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); overflow: hidden;
}
.step .num { font-family: var(--mono); font-size: 4.5rem; line-height: 1; color: rgba(237,228,208,.06); position: absolute; inset-inline-end: 14px; bottom: -8px; }
.step h3 { margin: 14px 0 8px; font-size: 1.3rem; }
.step p { margin: 0; color: var(--paper-2); }
.step .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(227,163,59,.1); color: var(--amber); border: 1px solid rgba(227,163,59,.25); }

.feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feat { padding: 34px 30px; background: rgba(12,12,14,.88); }
.feat h3 { margin: 0 0 8px; font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.feat h3::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: var(--blood); transform: rotate(45deg); }
.feat p { margin: 0; color: var(--paper-2); }

.band {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 24px; border: 1px solid rgba(79,179,169,.3);
  background: radial-gradient(80% 120% at 100% 0%, rgba(79,179,169,.16), transparent 60%), var(--panel);
}
.band h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.25; }
.band p { margin: 0; color: var(--paper-2); }
.band .actions { display: flex; flex-direction: column; gap: 10px; }

.foot { padding: 40px 0 60px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 40px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- قائمة القضايا ---------- */
.page-head { padding-block: 50px 30px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 8px 0 6px; line-height: 1.15; }
.page-head p { color: var(--paper-2); margin: 0; max-width: 60ch; }
.grid-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 54px 22px; padding-top: 36px; padding-bottom: 80px; }

/* ---------- ملف القضية ---------- */
.case-layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; padding-bottom: 80px; align-items: start; }
.card { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 18px; }
.card h2 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.card h2 .mono { font-size: .68rem; color: var(--muted); margin-inline-start: auto; }
.card p { margin: 0; color: var(--paper-2); }
.summary { font-size: 1.08rem; color: var(--paper) !important; }
.scene { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.scene li { padding: 10px 14px; border-inline-start: 2px solid var(--blood); background: rgba(194,65,45,.06); border-radius: 0 8px 8px 0; color: var(--paper-2); }
.sus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sus {
  text-align: start; border: 1px solid var(--line); background: rgba(0,0,0,.25); border-radius: 14px; padding: 0; overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.sus:hover { transform: translateY(-3px); border-color: var(--line-2); }
.sus .av { aspect-ratio: 1; }
.sus .info { padding: 10px 12px 12px; }
.sus .info b { display: block; font-size: 1.05rem; }
.sus .info small { color: var(--muted); line-height: 1.4; display: block; }
.case-side { align-self: stretch; }
.sticky { position: sticky; top: calc(var(--top-h) + 18px); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stats div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stats b { display: block; font-size: 1.6rem; line-height: 1.2; }
.stats small { color: var(--muted); }
.side-actions { display: grid; gap: 10px; }
.note { color: var(--muted); font-size: .85rem; margin-top: 12px; line-height: 1.6; }
.ev-list { display: grid; gap: 10px; }
.ev {
  position: relative; padding: 14px 16px 14px 14px; border-radius: 10px; background: #e9dfc8; color: #241c10;
  box-shadow: 0 8px 18px -10px rgba(0,0,0,.8); transform: rotate(var(--rot, 0deg));
}
.ev::before { content: ''; position: absolute; top: -6px; inset-inline-start: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--blood); box-shadow: 0 2px 3px rgba(0,0,0,.5); }
.ev b { display: block; font-size: .98rem; }
.ev span { font-size: .88rem; line-height: 1.55; display: block; color: #4a3d28; }
.ev.new { animation: evIn .8s cubic-bezier(.2,.7,.2,1); }
@keyframes evIn { from { opacity: 0; transform: scale(1.25) rotate(-8deg); } }
.ev-locked { padding: 14px; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--muted); text-align: center; font-size: .9rem; }

/* ---------- الأفاتار ---------- */
.av { position: relative; background: #111; }
.av svg { width: 100%; height: 100%; }

/* ---------- غرفة الاستجواب ---------- */
.play { height: calc(100vh - var(--top-h)); height: calc(100dvh - var(--top-h)); display: grid; grid-template-columns: 270px 1fr 320px; gap: 0; }
.play aside, .play section { min-height: 0; }
.col { display: flex; flex-direction: column; border-inline-end: 1px solid var(--line); background: rgba(10,10,12,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.col:last-child { border-inline-end: 0; }
.col-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.col-head h2 { margin: 0; font-size: 1rem; }
.col-head .mono { font-size: .66rem; color: var(--muted); margin-inline-start: auto; }
.col-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px; overscroll-behavior: contain; }
.sus-list { display: grid; gap: 8px; }
.sus-row {
  display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; text-align: start;
  padding: 8px; border-radius: 12px; border: 1px solid transparent; background: transparent; width: 100%;
}
.sus-row:hover { background: rgba(237,228,208,.04); }
.sus-row.on { border-color: rgba(227,163,59,.45); background: rgba(227,163,59,.07); }
.sus-row .av { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; }
.sus-row b { display: block; font-size: .98rem; line-height: 1.3; }
.sus-row small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { height: 4px; border-radius: 4px; background: rgba(237,228,208,.08); margin-top: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--v, 0%); background: linear-gradient(90deg, var(--teal), var(--amber) 55%, var(--blood)); background-size: 300px 100%; transition: width .8s; }

.chat-head { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.chat-head .av { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none; }
.chat-head b { display: block; font-size: 1.1rem; line-height: 1.3; }
.chat-head small { color: var(--muted); }
.chat-head .tools { margin-inline-start: auto; display: flex; gap: 8px; }
.stress-pill { font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--paper-2); white-space: nowrap; }
.chat { flex: 1; overflow-y: auto; padding: 22px clamp(14px, 3vw, 34px); display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.msg { max-width: min(640px, 86%); padding: 12px 16px; border-radius: 16px; line-height: 1.8; white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-start; background: #1c1a14; border: 1px solid rgba(227,163,59,.25); border-start-start-radius: 4px; }
.msg.them { align-self: flex-end; background: #ede4d0; color: #1d160b; border-start-end-radius: 4px; }
.msg.them .act { color: #7a6a4c; font-style: italic; }
.msg .shown { display: block; font-size: .8rem; color: var(--amber); margin-bottom: 4px; }
.msg.sys { align-self: center; max-width: 92%; background: transparent; border: 1px dashed var(--line-2); color: var(--paper-2); font-size: .9rem; text-align: center; }
.msg.found { align-self: center; background: rgba(79,179,169,.1); border: 1px solid rgba(79,179,169,.4); color: #bfeae5; font-size: .92rem; text-align: center; }
.typing { align-self: flex-end; display: flex; gap: 5px; padding: 14px 18px; background: rgba(237,228,208,.1); border-radius: 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--paper-2); animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }
.empty-chat { margin: auto; text-align: center; color: var(--muted); max-width: 40ch; }
.empty-chat .av { width: 110px; height: 110px; border-radius: 24px; overflow: hidden; margin: 0 auto 14px; }
.empty-chat b { color: var(--paper); font-size: 1.2rem; display: block; }

.composer { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 8px; }
.composer .chip { justify-self: start; display: inline-flex; gap: 8px; align-items: center; font-size: .85rem; padding: 4px 6px 4px 12px; border-radius: 999px; background: rgba(227,163,59,.12); border: 1px solid rgba(227,163,59,.35); color: var(--amber-2); }
.composer .chip button { border: 0; background: transparent; padding: 0 6px; font-size: 1rem; color: inherit; }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea {
  flex: 1; resize: none; min-height: 50px; max-height: 140px; padding: 13px 16px; border-radius: 14px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line-2); outline: none; line-height: 1.6;
}
.composer textarea:focus { border-color: rgba(227,163,59,.55); }
.composer .btn { min-height: 50px; }
.quota { font-size: .76rem; color: var(--muted); text-align: center; }

.room-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(79,179,169,.07); flex-wrap: wrap; font-size: .88rem; }
.room-bar code { font-family: var(--mono); font-size: 1rem; letter-spacing: .2em; color: var(--teal); background: rgba(0,0,0,.35); padding: 2px 10px; border-radius: 8px; direction: ltr; }
.room-bar .online { color: var(--paper-2); }
.room-bar .online i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); margin-inline-end: 6px; box-shadow: 0 0 8px var(--teal); }
.feed { display: grid; gap: 6px; margin-top: 14px; font-size: .82rem; color: var(--muted); }
.feed div { padding: 6px 10px; border-radius: 8px; background: rgba(237,228,208,.03); }

.notes textarea { width: 100%; min-height: 120px; resize: vertical; padding: 12px; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid var(--line); outline: none; line-height: 1.7; }
.notes h3 { font-size: .95rem; margin: 18px 0 8px; color: var(--paper-2); }
.accuse-box { padding: 14px; border-top: 1px solid var(--line); }

.tabs { display: none; }

/* ---------- المودال ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(5,5,7,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } }
.dialog {
  position: relative; width: min(520px, 100%); max-height: calc(100dvh - 36px); overflow-y: auto;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 20px; padding: 28px;
  box-shadow: 0 40px 100px -30px #000; animation: popIn .35s cubic-bezier(.2,.7,.2,1);
}
.dialog.wide { width: min(760px, 100%); }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.dialog h2 { margin: 0 0 6px; font-size: 1.5rem; }
.dialog .sub { color: var(--paper-2); margin: 0 0 20px; }
.x { position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; font-size: 1.2rem; line-height: 1; }
.seg { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.35); margin-bottom: 20px; }
.seg button { border: 0; background: transparent; padding: 10px; border-radius: 9px; color: var(--paper-2); font-weight: 600; }
.seg button.on { background: rgba(227,163,59,.15); color: var(--amber-2); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .9rem; color: var(--paper-2); }
.field input {
  width: 100%; min-width: 0;
  min-height: 50px; padding: 0 16px; border-radius: 12px; background: rgba(0,0,0,.35);
  border: 1px solid var(--line-2); outline: none; font-size: 1rem;
}
.field input:focus { border-color: rgba(227,163,59,.6); }
.err { color: #ff9a88; font-size: .9rem; min-height: 1.4em; margin: 2px 0 10px; }
.fine { color: var(--muted); font-size: .82rem; margin-top: 12px; text-align: center; }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.profile-head .av { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; flex: none; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 18px; }
.pick { border: 2px solid var(--line); background: rgba(0,0,0,.3); border-radius: 14px; padding: 0; overflow: hidden; text-align: center; transition: .2s; }
.pick .av { aspect-ratio: 1; }
.pick b { display: block; padding: 6px 4px 8px; font-size: .92rem; }
.pick.on { border-color: var(--blood); box-shadow: 0 0 0 4px rgba(194,65,45,.2); }
.check-list { display: grid; gap: 8px; margin-bottom: 18px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.check input { margin-top: 6px; accent-color: var(--blood); width: 18px; height: 18px; flex: none; }
.check b { display: block; }
.check small { color: var(--muted); line-height: 1.5; display: block; }
.check:has(input:checked) { border-color: rgba(194,65,45,.6); background: rgba(194,65,45,.07); }
.step-label { font-family: var(--mono); font-size: .7rem; color: var(--amber); letter-spacing: .15em; margin: 0 0 8px; }

.verdict { text-align: center; }
.verdict .big-stamp {
  display: inline-block; margin: 10px auto 18px; padding: 8px 26px; font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 700;
  border: 4px double currentColor; border-radius: 10px; transform: rotate(-6deg); animation: stampIn .6s cubic-bezier(.3,1.6,.5,1);
}
.verdict .big-stamp.ok { color: var(--teal); }
.verdict .big-stamp.no { color: var(--blood); }
@keyframes stampIn { from { transform: rotate(-6deg) scale(2.2); opacity: 0; } }
.verdict .story { text-align: start; background: #ede4d0; color: #241c10; padding: 18px 20px; border-radius: 12px; line-height: 1.9; margin: 10px 0 18px; }
.verdict .score { font-size: 1.1rem; color: var(--amber-2); margin-bottom: 16px; }
.verdict .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- الغرف واللوحة ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-bottom: 80px; }
.case-pick { display: grid; gap: 10px; margin: 14px 0 18px; }
.case-opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); text-align: start; width: 100%; }
.case-opt.on { border-color: rgba(227,163,59,.6); background: rgba(227,163,59,.08); }
.case-opt b { display: block; }
.case-opt small { color: var(--muted); }
.code-input { text-align: center; letter-spacing: .4em; font-family: var(--mono); font-size: 1.5rem !important; text-transform: uppercase; direction: ltr; }
.board { width: 100%; border-collapse: collapse; }
.board th, .board td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--line); }
.board th { color: var(--muted); font-weight: 500; font-size: .85rem; }
.board tr.me td { background: rgba(227,163,59,.07); }
.board .rk { font-family: var(--mono); color: var(--muted); width: 60px; }
.board tr:nth-child(1) .rk { color: var(--amber-2); }
.board .pts { font-weight: 700; color: var(--amber-2); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

.toasts { position: fixed; z-index: 80; top: calc(var(--top-h) + 14px); inset-inline-start: 50%; transform: translateX(50%); display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { padding: 12px 18px; border-radius: 12px; background: #1b1a1e; border: 1px solid var(--line-2); box-shadow: 0 20px 40px -20px #000; animation: popIn .3s; font-size: .95rem; text-align: center; }
.toast.good { border-color: rgba(79,179,169,.6); }
.toast.bad { border-color: rgba(194,65,45,.6); }
.toast.gold { border-color: rgba(227,163,59,.7); color: var(--amber-2); }
.loading { display: grid; place-items: center; min-height: 50vh; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line-2); border-top-color: var(--amber); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { text-align: center; padding: 120px 20px; }
.back { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; color: var(--paper-2); font-size: .92rem; }
.back:hover { color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- الشاشات المتوسطة ---------- */
@media (max-width: 1100px) {
  .play { grid-template-columns: 230px 1fr 280px; }
  .grid-cases { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- الجوال (آخر الملف حتى لا تُلغى) ---------- */
@media (max-width: 860px) {
  :root { --top-h: 58px; }
  .nav { display: none; }
  .top { gap: 12px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 30px; gap: 70px; }
  .stack { height: 420px; margin-inline: 22px 34px; }
  .steps { grid-template-columns: 1fr; }
  .feats { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; }
  .case-layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .case-side { order: -1; }
  .grid-cases { grid-template-columns: 1fr; gap: 50px; }
  .two { grid-template-columns: 1fr; }
  .play { grid-template-columns: 1fr; height: calc(100dvh - var(--top-h)); grid-template-rows: 1fr auto; }
  .play .col { display: none; border: 0; }
  .play .col.show { display: flex; grid-row: 1; }
  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); grid-row: 2; border-top: 1px solid var(--line); background: rgba(10,10,12,.96); padding-bottom: env(safe-area-inset-bottom); }
  .tabs button { border: 0; background: transparent; padding: 10px 4px; color: var(--muted); font-size: .85rem; display: grid; justify-items: center; gap: 2px; position: relative; }
  .tabs button.on { color: var(--amber-2); }
  .tabs button .dot { position: absolute; top: 6px; inset-inline-start: calc(50% + 10px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--blood); color: #fff; font-size: .7rem; display: grid; place-items: center; padding: 0 4px; }
  .msg { max-width: 92%; }
  .dialog { padding: 22px 18px; border-radius: 18px; }
  .folder { padding: 26px 20px 20px; min-height: 300px; }
  .who .name { display: none; }
  .mobile-nav { display: flex !important; }
  .folder .en { display: none; }
  body.in-play .toasts { top: auto; bottom: calc(185px + env(safe-area-inset-bottom)); }
  .pick-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pick b { font-size: .85rem; }
  .stack .folder[data-pos="1"] { transform: translate3d(16px,-18px,-80px) rotate(3deg); }
  .stack .folder[data-pos="2"] { transform: translate3d(30px,-34px,-160px) rotate(6deg); }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 3.1rem; }
  .btn { padding: 0 18px; }
  .cta .btn { flex: 1; }
  .stack { height: 400px; }
}
.mobile-nav { display: none; gap: 4px; padding: 10px 16px 0; overflow-x: auto; }
.mobile-nav a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; color: var(--paper-2); white-space: nowrap; }
.mobile-nav a.on { color: var(--amber-2); border-color: rgba(227,163,59,.4); }

/* ---------- v5: البوابة، المتصلون، المشاهدة، الدردشة، الصوت ---------- */
body.guest .nav, body.guest .who { display: none; }
.gate { min-height: calc(100vh - var(--top-h)); }
.gate-card { padding: 28px; position: relative; }
.gate-card .seg { margin-top: 0; }
.gate-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--paper-2); }
.gate-points li { display: flex; gap: 10px; align-items: center; }
.gate-points li::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--amber); transform: rotate(45deg); flex: none; }

.online-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(79,179,169,.4); background: rgba(79,179,169,.08); color: var(--paper); font-size: .88rem; }
.online-btn i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 2s infinite; }
.online-btn small { color: var(--paper-2); }
@keyframes pulse { 50% { opacity: .4; } }
.online-list { display: grid; gap: 8px; }
.ol-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.22); }
.ol-row .badge { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #221c12; border: 1px solid rgba(227,163,59,.4); color: var(--amber-2); font-weight: 700; flex: none; }
.ol-row .badge.live { border-color: var(--blood); box-shadow: 0 0 0 3px rgba(194,65,45,.18); }
.ol-info { flex: 1; min-width: 0; }
.ol-info b { display: block; line-height: 1.3; }
.ol-info small { color: var(--muted); display: block; line-height: 1.4; }
.live-now .card { padding: 14px; }

/* الدردشة */
.chat-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.cl { padding: 8px 12px; border-radius: 12px; background: rgba(237,228,208,.05); border: 1px solid var(--line); line-height: 1.6; word-wrap: break-word; }
.cl b { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--amber-2); }
.cl.w b { color: var(--teal); }
.cl.mine { background: rgba(227,163,59,.08); border-color: rgba(227,163,59,.25); }
.cl .tag { font-size: .68rem; font-weight: 500; padding: 0 6px; border-radius: 6px; background: rgba(79,179,169,.15); color: var(--teal); }
.cl .tag.p { background: rgba(227,163,59,.15); color: var(--amber-2); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); outline: none; }
.chat-form input:focus { border-color: rgba(227,163,59,.55); }
.chat-form .btn { min-height: 42px; }
.watch-pill { font-size: .78rem; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(79,179,169,.35); color: #bfeae5; white-space: nowrap; }

/* غرفة الاستجواب: عمود الدردشة تحت المشتبهين على الكمبيوتر */
.play { grid-template-rows: minmax(0, 1fr) minmax(0, 300px); }
.play #c-sus { grid-column: 1; grid-row: 1; }
.play #c-room { grid-column: 1; grid-row: 2; border-top: 1px solid var(--line); }
.play #c-chat { grid-column: 2; grid-row: 1 / span 2; }
.play #c-ev { grid-column: 3; grid-row: 1 / span 2; }
.play.watch { grid-template-rows: minmax(0, 1fr); grid-template-columns: 300px 1fr 320px; }
.play.watch #w-info { grid-column: 1; grid-row: 1; }
.play.watch #w-feed { grid-column: 2; grid-row: 1; }
.play.watch #w-chat { grid-column: 3; grid-row: 1; }

/* الصوت */
.mic { min-height: 50px; padding: 0 14px; }
.mic.on { color: #fff; background: var(--blood); border-color: transparent; animation: pulse 1.2s infinite; }
.tts.on { color: var(--teal); border-color: rgba(79,179,169,.5); }

/* المشاهدة */
.watch-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.watch-head b { font-size: 1.1rem; margin-inline-start: 8px; }
.watch-head small { display: block; color: var(--muted); }
.watch-head .tools { margin-inline-start: auto; display: flex; gap: 8px; }
.live-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--blood); color: #fff; }
.who-says { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; color: #5a4526; margin-bottom: 4px; }
.who-says .av { width: 24px; height: 24px; border-radius: 6px; overflow: hidden; }
.verdict-line.ok { border-color: rgba(79,179,169,.6); color: #bfeae5; }
.verdict-line.no { border-color: rgba(194,65,45,.6); color: #ffb3a6; }

@media (max-width: 1100px) {
  .play.watch { grid-template-columns: 240px 1fr 280px; }
}
@media (max-width: 860px) {
  .play, .play.watch { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .play #c-sus, .play #c-room, .play #c-chat, .play #c-ev, .play.watch #w-info, .play.watch #w-feed, .play.watch #w-chat { grid-column: 1; grid-row: 1; border-top: 0; }
  .tabs { grid-template-columns: repeat(4, 1fr); }
  .tabs.tabs-3 { grid-template-columns: repeat(3, 1fr); }
  .gate { gap: 22px; padding-top: 18px; padding-bottom: 30px; }
  .gate .gate-points { display: none; }
  .gate .lead { margin-bottom: 0; font-size: 1rem; }
  .gate h1 { font-size: 2.8rem; margin: 6px 0; }
  .online-btn small { display: none; }
  .online-btn { padding: 0 10px; }
  .mic { padding: 0 12px; }
  .tts { padding: 0 10px; }
}
@media (max-width: 860px) {
  .play, .play.watch { grid-template-columns: minmax(0, 1fr); }
  .chat-head { gap: 10px; padding: 10px 12px; }
  .chat-head > div:nth-child(2) { min-width: 0; }
  .chat-head b, .chat-head small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .chat-head .tools { gap: 6px; flex: none; }
  .tts { font-size: 0; gap: 0; padding: 0 10px; }
  .stress-pill { font-size: .72rem; padding: 2px 8px; }
  .watch-head .tools { margin-inline-start: 0; }
}

.empty-chat .tip { font-size: .88rem; color: var(--amber-2); background: rgba(227,163,59,.08); border: 1px dashed rgba(227,163,59,.35); border-radius: 12px; padding: 10px 14px; margin: 4px auto 14px; max-width: 46ch; }

/* ---------- v8: ملف روم — الفريج المهجور ---------- */
.freej { position: fixed; inset: auto 0 0 0; height: 38vh; z-index: -1; pointer-events: none; opacity: .75; }
.freej svg { width: 100%; height: 100%; display: block; }
body.in-play .freej { opacity: .25; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-txt small { font-size: .62rem; font-weight: 600; color: var(--amber); letter-spacing: .08em; }
.kicker:not(.mono) { font-size: .95rem; font-weight: 700; letter-spacing: .02em; }

.av.portrait { background: #0c0a08; }
.av svg { width: 100%; height: 100%; display: block; }
.sus .av { aspect-ratio: 5 / 6; }
.sus .open-file { display: block; margin-top: 4px; font-size: .78rem; color: var(--amber-2); }
.pick .av { aspect-ratio: 5 / 6; }

/* نافذة الملف */
.dossier { color: var(--paper); }
.dz-top { display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: start; }
.dz-photo { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(227,163,59,.35); box-shadow: 0 20px 40px -20px #000; }
.dz-photo .av { aspect-ratio: 5 / 6; }
.dz-stamp { position: absolute; top: 12px; inset-inline-start: 10px; transform: rotate(-8deg); border: 2px solid var(--blood); color: var(--blood); background: rgba(10,8,6,.55); padding: 1px 10px; border-radius: 6px; font-weight: 700; font-size: .85rem; }
.dz-num { position: absolute; bottom: 0; inset-inline: 0; padding: 6px 10px; font-size: .66rem; color: var(--paper-2); background: linear-gradient(transparent, rgba(0,0,0,.85)); direction: ltr; text-align: center; }
.dz-id h2 { margin: 2px 0 0; font-size: 1.9rem; }
.dz-full { margin: 0 0 12px; color: var(--amber-2); font-weight: 600; }
.dz-table { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dz-row { display: grid; grid-template-columns: 130px 1fr; border-bottom: 1px solid var(--line); }
.dz-row:last-child { border-bottom: 0; }
.dz-row dt { padding: 8px 12px; color: var(--muted); background: rgba(237,228,208,.03); font-size: .88rem; }
.dz-row dd { margin: 0; padding: 8px 12px; font-size: .95rem; }
.dz-look { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(237,228,208,.04); color: var(--paper-2); }
.dz-look b { color: var(--paper); }
.dz-h { margin: 18px 0 8px; font-size: 1rem; color: var(--amber); display: flex; align-items: center; gap: 10px; }
.dz-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.dz-quote { margin: 0; padding: 12px 16px; border-inline-start: 3px solid var(--amber); background: rgba(227,163,59,.06); border-radius: 0 10px 10px 0; font-size: 1.02rem; }
.dz-story { margin: 0; padding: 16px 18px; background: #ede4d0; color: #2a2013; border-radius: 10px; line-height: 2; font-size: 1rem; box-shadow: inset 0 0 40px rgba(120,90,40,.18); }
.dz-note { margin: 14px 0 0; padding: 10px 14px; border: 1px dashed rgba(194,65,45,.5); border-radius: 10px; color: #ffb3a6; background: rgba(194,65,45,.06); }
.dz-note b { color: #ff8f7d; }

@media (max-width: 860px) {
  .dz-top { grid-template-columns: 1fr; }
  .dz-photo { max-width: 230px; margin: 0 auto; }
  .dz-id { text-align: center; }
  .dz-row { grid-template-columns: 110px 1fr; text-align: start; }
  .dz-id h2 { font-size: 1.6rem; }
  .freej { height: 26vh; }
}
