/* ═══ كمّل المثل 📜 (mathal.js) — «دفتر الأمثال» (٢٠٢٦/١٠/٢١) — تصميم خاصّ فيها
   مكتب خشب غامق تحت ضوء مصباح، ومخطوطة ورق قديم بلفّتين خشب، المثل بخطّ نسخ (Amiri)،
   التكملة نقاط حبر ⇒ تلميحات ⇒ تنكتب بالحبر الأحمر. اللي يكمّلون يوقّعون بالهامش والأوائل بختم. ═══ */
.mt{position:relative;overflow:hidden;font-weight:800;color:#fff;
  background:radial-gradient(ellipse at 50% 18%,rgba(255,200,120,.32),transparent 55%),
    repeating-linear-gradient(90deg,rgba(0,0,0,.06) 0 2px,transparent 2px 13px),
    linear-gradient(180deg,#3a2414,#2a190d 60%,#1d1108)}
.mt-lamp{position:absolute;top:-30cqh;left:50%;width:80cqh;height:80cqh;margin-left:-40cqh;border-radius:50%;pointer-events:none;z-index:0;
  background:radial-gradient(circle,rgba(255,214,150,.22),transparent 65%)}
.mt>.xg-head,.mt>.mt-main{position:relative;z-index:1}
.mt .xg-chip{background:#2a190d;border:2px solid #b8894a;color:#f3dfb8}
.mt .xg-title b{color:#ffe7b8;text-shadow:0 .3cqh 1.2cqh rgba(0,0,0,.55)}
.mt .xg-title small{color:#e3c592}
.mt-main{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2cqh}

/* المخطوطة */
.mt-scroll{position:relative;width:min(92cqw,150cqh);display:flex;flex-direction:column;align-items:stretch;
  animation:mtOpen .55s cubic-bezier(.2,1.1,.4,1) both}
@keyframes mtOpen{from{transform:scaleY(.15);opacity:0}}
.mt-scroll .roll{display:block;height:4.6cqh;border-radius:2.3cqh;margin:0 -2.2cqh;position:relative;z-index:2;
  background:linear-gradient(180deg,#e9d3a6,#b48a52 45%,#7a5530 85%,#a57b46);box-shadow:0 .6cqh 1.4cqh rgba(0,0,0,.45)}
.mt-scroll .roll::before,.mt-scroll .roll::after{content:"";position:absolute;top:50%;width:3cqh;height:3cqh;margin-top:-1.5cqh;border-radius:50%;
  background:radial-gradient(circle at 35% 35%,#8a5a2a,#4a2c12)}
.mt-scroll .roll::before{left:-1.4cqh}.mt-scroll .roll::after{right:-1.4cqh}
.mt-paper{position:relative;margin:-1.2cqh 0;padding:4.4cqh 5cqh 3.4cqh;color:#3b2410;text-align:center;
  background:radial-gradient(ellipse at 50% 40%,#fbf1d9,#f1dfb5 70%,#e2c68e),#f1dfb5;
  box-shadow:inset 0 0 6cqh rgba(140,90,30,.35),0 1.4cqh 3cqh rgba(0,0,0,.45)}
.mt-paper::before{content:"";position:absolute;inset:1.6cqh;border:.35cqh double rgba(120,70,20,.45);border-radius:.6cqh;pointer-events:none}
.mt-lv{display:inline-block;margin-bottom:1.6cqh;padding:.5cqh 2cqh;border-radius:99px;font-size:max(13px,2.4cqh);font-weight:900;color:#fff;background:#7a5530}
.mt-lv.lv1{background:#4f8a3c}.mt-lv.lv2{background:#b5761f}.mt-lv.lv3{background:#a3322b}
.mt-text{font-family:'Amiri',serif;font-weight:700;font-size:max(28px,min(9cqh,5.4cqw));line-height:1.55}
.mt-a{color:#2a1608}
.mt-b{display:inline-block;min-width:16cqh;color:#a3322b}
/* نقاط الحبر: كلّ كلمة ناقصة نقطة طويلة */
.mt-dots{display:inline-flex;gap:1.4cqh;vertical-align:middle}
.mt-dots i{display:inline-block;width:9cqh;height:1.1cqh;border-radius:99px;background:repeating-linear-gradient(90deg,#6b4520 0 1.1cqh,transparent 1.1cqh 2cqh);opacity:.8}
.mt-hint u{text-decoration:none;color:#8a5a2a;letter-spacing:.06em;margin-inline:.25em;border-bottom:.35cqh dashed #b48a52}
.mt-hint b{color:#a3322b}
/* الكشف: الحبر ينكتب من اليمين لليسار */
.mt-ink{display:inline-block;color:#a3322b;clip-path:inset(0 0 0 100%);animation:mtInk 1.1s steps(18) forwards}
@keyframes mtInk{to{clip-path:inset(0 0 0 0)}}
.mt-paper.done{box-shadow:inset 0 0 6cqh rgba(140,90,30,.35),0 1.4cqh 3cqh rgba(0,0,0,.45),0 0 0 .5cqh rgba(255,215,120,.6)}

/* التواقيع بالهامش */
.mt-sigs{display:flex;flex-wrap:wrap;justify-content:center;gap:1cqh 1.6cqw;margin-top:2.2cqh;min-height:5cqh}
.mt-sig{position:relative;display:inline-flex;align-items:center;gap:.8cqh;padding:.5cqh 1.4cqh .5cqh .6cqh;border-radius:99px;background:rgba(122,85,48,.14);
  font-weight:900;font-size:max(14px,2.6cqh);color:#3b2410;animation:mtSig .4s cubic-bezier(.2,1.5,.4,1) both}
@keyframes mtSig{from{transform:scale(.4) rotate(-6deg);opacity:0}}
.mt-sig .av{width:max(26px,4.4cqh);height:max(26px,4.4cqh)}
.mt-sig>i{display:grid;place-items:center;width:3.6cqh;height:3.6cqh;border-radius:50%;font-style:normal;font-weight:900;color:#fff;font-size:max(13px,2.2cqh);
  background:radial-gradient(circle at 35% 30%,#d9534a,#8f1f1a);box-shadow:0 0 0 .3cqh rgba(143,31,26,.3)}
.mt-sig.r1{background:rgba(212,160,40,.28)}
.mt-more{align-self:center;font-weight:900;color:#7a5530;font-size:max(13px,2.4cqh)}

.mt-foot{font-size:max(15px,3cqh);font-weight:900;color:#f3dfb8;background:rgba(20,10,4,.55);padding:1cqh 2.6cqh;border-radius:99px;text-align:center}
.mt-foot b{color:#ffd27a}
@media (orientation:portrait){ .mt-paper{padding:3cqh 2.4cqh 2.4cqh} .mt-text{font-size:max(22px,4.6cqh)} }
body.perf-lite .mt-scroll,body.perf-lite .mt-sig{animation:none}
