/* قاعة الدروس (../lesson-hall/ و ../world/) — إطار الدرس وشريط القاعة وبطاقتها، فوق ../_walk/walk.css */
html,body{background:#EEF5FD}

/* إطار الدرس: على الكشك يُرسم بمنظور الشاشة (hall.js يضع matrix3d)، وداخل الدرس يملأ الشاشة */
#lf{position:fixed;left:0;top:0;width:1200px;height:750px;border:0;margin:0;padding:0;transform-origin:0 0;z-index:2;
  pointer-events:none;opacity:0;background:#EEF5FD;visibility:hidden;transition:opacity .45s}
#lf.on{visibility:visible}
#lf.ready{opacity:1}
html.inside #lf{transform:none!important;width:100vw;height:100%;pointer-events:auto;z-index:6;visibility:visible;opacity:1}
html.inside #lf:not(.ready){opacity:0}
#lfWait{position:fixed;inset:0;z-index:5;display:grid;place-items:center;background:#EEF5FD;pointer-events:none}
#lfWait .hx{width:84px;height:84px;animation:hallSpin 1.4s linear infinite}
@keyframes hallSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){#lfWait .hx{animation:none}}

/* داخل الدرس: عناصر القاعة تختفي */
html.inside #hud,html.inside #card,html.inside #cross,html.inside #aimHint,html.inside .tc,html.inside #top,html.inside #toast{display:none!important}

/* شريط القاعة: زرّ الرجوع ورقم الدرس — أعلى الوسط (الرأس الأيمن لزرّ الشرح والملخّص، والأيسر لنافذة الدرس الثانية،
   والأسفل للوحة الدرس وأزرارها) */
#hallBar{position:fixed;z-index:7;left:50%;transform:translateX(-50%);top:calc(10px + env(safe-area-inset-top));display:flex;align-items:center;gap:12px;
  pointer-events:none;color:#1A3365;max-width:calc(100vw - 480px)}
#hbBack{pointer-events:auto;flex:none;display:flex;align-items:center;gap:6px;min-height:48px;padding:0 18px 0 14px;border-radius:16px;background:#1A3365;color:#fff;
  font-size:19px;font-weight:800;box-shadow:0 8px 22px rgba(26,51,101,.25)}
#hbBack:focus-visible{outline:3px solid #00C6FF;outline-offset:3px}
#hbText{display:flex;flex-direction:column;line-height:1.25;min-width:0;text-shadow:0 0 6px #fff,0 0 3px #fff,0 0 1px #fff}
#hbNum{font-size:17px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#hbSteps{font-size:15px;font-weight:800;color:#5B6B8C;white-space:nowrap}
#hbSteps .ok{color:#0F8F55} #hbSteps .cur{color:#A35C00}
/* المعاينة المجّانيّة (gate.js) تضع شارتها أعلى الوسط: ننزل تحتها */
html.inside.preview #hallBar{top:calc(44px + env(safe-area-inset-top))}
html.inside.preview #hallPrompt{top:calc(112px + env(safe-area-inset-top))}

/* بطاقة القاعة داخل الدرس: «جاهز للتحدّي؟» وأخواتها — وسط الأعلى، لا تغطّي لوحة الدرس */
#hallPrompt{position:fixed;z-index:7;left:50%;top:calc(74px + env(safe-area-inset-top));transform:translateX(-50%);width:min(500px,calc(100vw - 28px));
  background:#fff;border:2px solid #E3E9F4;border-bottom-width:6px;border-radius:24px;padding:16px 20px 16px;color:#1A3365;
  box-shadow:0 18px 50px rgba(26,51,101,.22);animation:hpIn .35s ease-out}
@keyframes hpIn{from{opacity:0;transform:translate(-50%,-10px)}}
@media (prefers-reduced-motion:reduce){#hallPrompt{animation:none}}
#hallPrompt h2{margin:0 0 4px;font-size:26px;line-height:1.3;font-weight:800}
#hallPrompt p{margin:0;font-size:17px;line-height:1.65;font-weight:600;color:#2A3B5F}
#hallPrompt p:empty{display:none}
#hallPrompt .row{margin-top:12px}
#hallPrompt .go{min-height:52px;font-size:20px}
#hallPrompt .sec{min-height:52px;font-size:17px}

/* البطاقة: لا «نصّ الكتاب» في القاعة — سطر الدرس وحالته فقط */
#cTog{display:none}
#cDo{color:#A35C00}

/* شاشة البداية: قائمة الدروس */
.hallList{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px;margin:0 0 18px;padding:0;list-style:none}
.hallList li{display:flex;flex-direction:column;gap:4px;font-size:15px;font-weight:800;line-height:1.35;color:#1A3365}
.hallList img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:14px;background:#EEF3FA;display:block}
.hallList b{color:#A35C00}
.hallList .nv{font-size:12.5px;color:#5B6B8C;font-weight:700}

@media (max-width:1000px){ #hallBar{max-width:calc(100vw - 420px)} #hbText{display:none} }
@media (max-width:700px){
  #hallBar{max-width:none}
  #hbBack{min-height:42px;font-size:16px;padding:0 12px 0 8px;border-radius:14px}
  #hallPrompt{top:calc(66px + env(safe-area-inset-top));width:calc(100vw - 20px);padding:14px 16px}
  html.inside.preview #hallPrompt{top:calc(100px + env(safe-area-inset-top))}
  #hallPrompt h2{font-size:21px} #hallPrompt p{font-size:15px}
  .hallList{grid-template-columns:repeat(3,1fr);gap:8px} .hallList li{font-size:13px} .hallList img{border-radius:10px}
}
