/* ---- Kanz-al-Marjaan for LSD only ---- */
@font-face{
  font-family: 'Kanz-al-Marjaan';
  src: url('assets/fonts/Kanz-al-Marjaan.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
body.lsd { font-family: 'KanzAlMarjaan' !important; }
/* Apply only when body has .lsd */
/* UI stays LTR; only title & question text are RTL and use the font */
body.lsd .section-title,
body.lsd .qtext,
body.lsd .lead,
body.lsd h1 {
  font-family: 'KanzAlMarjaan', Inter, system-ui, sans-serif;
  direction: rtl;
  text-align: right;
}


/* Keep the 1–5 scale LTR so numbers are easy to read */
body.lsd .scale { direction: ltr; }

/* Mixed English inside LSD lines behaves correctly */
body.lsd [dir="auto"] { unicode-bidi: plaintext; }
:root{ --rose:#CF5F6B; --rose-600:#B84E5B; --blush:#E9CFCC; --blush-2:#F7E9E7; --ink:#2B1E1E; --bg:#FFF8F7; }
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif;line-height:1.45}
.container{max-width:980px;margin:0 auto;padding:16px}
.card{background:#fff;border:1px solid var(--blush);border-radius:20px;box-shadow:0 14px 30px rgba(207,95,107,.14);overflow:hidden}
.header{padding:18px;background:radial-gradient(1200px 300px at -200px -200px, #fff 0%, #fff5f4 60%, #fff 100%);border-bottom:1px solid var(--blush)}
h1{margin:0 0 6px;font-size:24px}
.lead{margin:0;color:#6b5151;font-size:14px}
.progress{display:flex;align-items:center;gap:10px;margin-top:12px}
.progressbar{flex:1;height:8px;border-radius:999px;background:var(--blush-2);overflow:hidden}
.progressbar>span{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--rose),var(--rose-600));transition:width .25s ease}
#ptxt{min-width:46px;text-align:right;font-weight:800;color:#7b3a41;font-variant-numeric:tabular-nums}
.body{padding:18px}
.section-title{margin:0 0 12px;font-size:20px;display:flex;align-items:center;gap:8px}
.section-title .emoji{font-size:22px}
.meta-grid{display:grid;grid-template-columns:1fr;gap:12px;margin-top:10px}
.input label{display:block;font-size:14px;margin-bottom:6px;color:#6b5151}
.input input,.input select{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--blush);background:#fff}
.input input:focus,.input select:focus{outline:2px solid var(--rose);box-shadow:0 0 0 3px rgba(207,95,107,.25)}
hr.sep{border:none;border-top:1px dashed #e7c4c1;margin:12px 0}
.scale{display:flex;gap:10px;flex-wrap:wrap}
.scale label{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border:1px solid var(--blush);border-radius:12px;padding:8px 12px;background:#fff;font-weight:700;cursor:pointer;transition:transform .06s ease, box-shadow .06s ease}
.scale input{display:none}
.scale input:checked + span{outline:2px solid var(--rose);box-shadow:0 0 0 3px rgba(207,95,107,.25);border-radius:10px}
.scale label:active{transform:scale(0.98)}
.actionbar{position:sticky;bottom:0;z-index:10;background:#fff;border-top:1px solid var(--blush);padding:10px 16px}
.btnrow{display:flex;gap:10px}
.btn{appearance:none;border:none;padding:14px 18px;border-radius:12px;font-weight:800;cursor:pointer;font-size:16px;flex:1 1 auto;letter-spacing:.2px}
.btn.primary{background:var(--rose);color:#fff}
.btn.primary:active{background:var(--rose-600)}
.intro{display:grid;place-items:center;padding:18px}
.intro img{max-width:100%;height:auto}
.notice{background:#fff4f4;border:1px solid #f6d0cf;color:#6b4040;padding:10px 12px;border-radius:12px;margin:10px 0}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:8px;border-bottom:1px solid #f1dede;text-align:left}
.badge{display:inline-block;background:var(--blush);color:#6b5151;border-radius:999px;padding:4px 10px;font-weight:700;font-size:12px}
@media(min-width:640px){h1{font-size:28px}.meta-grid{grid-template-columns:repeat(3,1fr)}}

/* LSD-only font + RTL for question content */