/* هوية «مين الدخيل؟»: غرفة التحقيق — خشب داكن، فانوس، ورق عتيق، أحمر */
:root{
 --bg:#120b07;--bg2:#1f140c;--card:rgba(30,19,11,.9);--line:#6b4a2a;--text:#fff3dd;--muted:#cdb48e;
 --accent:#e0352b;--accent2:#ff6a3d;--ok:#5bd68a;--radius:20px;--gold:#ffb347;--ink:#3a2412;
}
html{background:#0c0704}
body{min-height:100vh;color:var(--text);
 background:linear-gradient(180deg,rgba(10,6,3,.5) 0%,rgba(10,6,3,.78) 55%,rgba(10,6,3,.9) 100%),url('/theme/bg-mobile.jpg') center top/cover no-repeat fixed,#0c0704;
 overflow-x:hidden}
@media(min-width:760px){body{background:linear-gradient(180deg,rgba(10,6,3,.45),rgba(10,6,3,.85)),url('/theme/bg-desktop.jpg') center/cover no-repeat fixed,#0c0704}}
#app{position:relative;z-index:1}
.top{padding-top:14px}
.brand{font-size:0;width:140px;height:46px;background:url('/theme/logo.png') center/contain no-repeat;filter:drop-shadow(0 4px 10px rgba(0,0,0,.6))}
.code-pill,.icon,.coinbadge,.tabs button{background:rgba(24,15,9,.85);border-color:#7a5430;color:var(--text)}
.coinbadge{color:var(--gold)}
main{gap:16px}
.card{background:linear-gradient(160deg,rgba(40,26,15,.93),rgba(22,14,8,.93));border:1px solid #7a5430;box-shadow:0 14px 32px rgba(0,0,0,.45),inset 0 1px rgba(255,214,150,.08);backdrop-filter:blur(8px)}
/* عناوين على ورق عتيق */
main>h2.center,.card>h3:first-child{
 background:url('/theme/parchment.png') center/100% 100% no-repeat;color:var(--ink);text-align:center;
 padding:14px 26px;font-weight:900;text-shadow:none;align-self:center;min-width:62%;filter:drop-shadow(0 4px 8px rgba(0,0,0,.45))}
.card>h3:first-child{font-size:17px;padding:12px 22px;margin-bottom:6px;align-self:center}
h2 .deco{height:34px;vertical-align:middle;margin-inline-start:4px}
/* الصفحة الرئيسية */
.hero{padding:34px 0 10px;gap:4px;position:relative}
.hero .logo{font-size:0;width:min(100%,380px);height:210px;margin:0 auto;background:url('/theme/logo.png') center/contain no-repeat;filter:drop-shadow(0 10px 22px rgba(0,0,0,.65))}
.hero h1{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.hero .muted{font-size:16px;color:#ead7b4;margin-top:-2px;text-shadow:0 2px 8px #000}
.hero:before{content:"";position:absolute;right:-4px;top:10px;width:58px;height:80px;background:url('/theme/lantern.png') center/contain no-repeat;animation:flick 3.2s ease-in-out infinite;pointer-events:none}
@keyframes flick{0%,100%{filter:drop-shadow(0 0 16px rgba(255,170,60,.75))}45%{filter:drop-shadow(0 0 9px rgba(255,150,40,.45))}70%{filter:drop-shadow(0 0 20px rgba(255,190,80,.9))}}
/* الأزرار */
.btn{border-radius:16px;min-height:54px;color:var(--text);background:linear-gradient(180deg,#34210f,#1d1109);border:1px solid #8a6038;box-shadow:0 6px 14px rgba(0,0,0,.4),inset 0 1px rgba(255,220,160,.12)}
.btn.primary{color:#fff;font-weight:900;background:linear-gradient(180deg,#ff5a4a 0%,#d92b22 55%,#a8140d 100%);border-color:#7a0f0a;box-shadow:0 8px 20px rgba(217,43,34,.4),inset 0 2px rgba(255,255,255,.28);text-shadow:0 2px 3px rgba(80,0,0,.55)}
.btn.danger{background:linear-gradient(180deg,#b3261e,#6e100b);border-color:#4a0905}
.btn.ghost{background:rgba(24,15,9,.7)}
.btn:active{transform:translateY(1px) scale(.985)}
.text-input,input.code-input{background:#0f0905;border-color:#7a5430;color:var(--text);box-shadow:inset 0 3px 12px rgba(0,0,0,.45)}
.text-input:focus,input.code-input:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(255,179,71,.16)}
.catbtn,.avatar-btn,.opt{background:linear-gradient(180deg,#2e1d10,#1a0f08);border-color:#6b4a2a;color:var(--text)}
.catbtn.on,.opt.sel,.avatar-btn.sel{border-color:var(--gold);background:#3a2514;box-shadow:0 0 16px rgba(255,179,71,.28)}
.seg button.on{background:linear-gradient(180deg,#ff5a4a,#b8180f);color:#fff}
.tabs button.on{border-color:var(--gold);color:var(--gold)}
/* الأيقونات */
.ico3d{background:radial-gradient(circle at 32% 28%,#8a6238 0,#3b2615 62%,#1d1109 100%);box-shadow:inset -4px -6px 10px rgba(0,0,0,.45),inset 3px 3px 7px rgba(255,214,150,.3),0 6px 10px rgba(0,0,0,.5),0 0 0 2px #7a5430}
/* بطاقة الدور */
.role .big{display:none}
.role.imp:before,.role.crew:before,.role.lock:before{content:"";display:block;margin-bottom:4px;background:center/contain no-repeat}
.role.imp:before{width:120px;height:185px;background-image:url('/theme/intruder.png');filter:drop-shadow(0 0 22px rgba(255,49,40,.55))}
.role.crew:before{width:125px;height:185px;background-image:url('/theme/detective.png');filter:drop-shadow(0 8px 14px rgba(0,0,0,.6))}
.role.lock:before{width:70px;height:100px;background-image:url('/theme/question_mark.png');filter:drop-shadow(0 6px 12px rgba(255,40,30,.5))}
.role.imp h2{color:#ff6a58;text-shadow:0 0 18px rgba(255,49,40,.5)}
.role .secret{color:var(--gold)}
/* السؤال كورقة */
.question{background:url('/theme/parchment.png') center/100% 100% no-repeat;color:var(--ink);padding:26px 30px;font-weight:800;text-shadow:none;filter:drop-shadow(0 6px 12px rgba(0,0,0,.5))}
/* النتيجة */
.result-title{display:flex;flex-direction:column;align-items:center}
.result-title:before{content:"";display:block;width:72px;height:66px;background:center/contain no-repeat;margin-bottom:2px}
.result-title.win:before{background-image:url('/theme/crown.png');filter:drop-shadow(0 4px 12px rgba(255,190,60,.6))}
.result-title.lose:before{background-image:url('/theme/hat.png');filter:drop-shadow(0 4px 12px rgba(255,49,40,.5))}
.result-title.win{color:var(--gold)}
@media(max-width:380px){#app{padding-inline:12px}.hero .logo{height:170px}.hero .muted{font-size:14px}}
@media(prefers-reduced-motion:reduce){.hero:before{animation:none}}
body:has(.hero) .top .brand{visibility:hidden}

.si{width:1.15em;height:1.15em;vertical-align:-.2em;margin-inline-end:6px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.btn.primary .si{filter:drop-shadow(0 1px 1px rgba(80,0,0,.5))}
.coinbadge .si{stroke:var(--gold)}
.hero .tagline{font-size:18px;font-weight:800;line-height:1.7;color:#ffe9c2;margin:2px 0 0;text-shadow:0 2px 10px #000;text-align:center;letter-spacing:.2px}
.acct{margin:6px 0 2px}
.card.howto{padding:18px 20px 20px;text-align:right}
.card.howto p{margin:0 0 14px;line-height:2;font-size:16px;color:#ead7b4}
.card.howto b{color:var(--gold)}
.card.howto .outro{margin:18px 0 0;padding-top:14px;border-top:1px dashed #7a5430;text-align:center;color:var(--gold);font-weight:800;line-height:1.9}
.card.howto .outro .si{display:block;margin:0 auto 6px;width:1.5em;height:1.5em}
