/* ===== Ajustes por idioma: tipografías para japonés y árabe, y maquetación de derecha a izquierda ===== */

/* --- japonés --- */
html[lang="ja"]{
  --display:"Bricolage Grotesque","Noto Sans JP","Hiragino Sans","Yu Gothic",sans-serif;
  --serif:"Source Serif 4","Noto Serif JP","Hiragino Mincho ProN","Yu Mincho",serif;
  --mono:"JetBrains Mono","Noto Sans JP",monospace;
  --hand:"Noto Sans JP","Hiragino Sans",sans-serif;
}
html[lang="ja"] body{line-height:1.8;line-break:strict}
html[lang="ja"] h1,html[lang="ja"] h2,html[lang="ja"] h3{letter-spacing:0;line-height:1.3;font-weight:800}
html[lang="ja"] .head h1,html[lang="ja"] .close h2{font-size:clamp(30px,5.2vw,58px);line-height:1.3}
html[lang="ja"] em,html[lang="ja"] i,html[lang="ja"] q,html[lang="ja"] .epi,html[lang="ja"] .verse,html[lang="ja"] .scene,html[lang="ja"] .card-msg{font-style:normal}
html[lang="ja"] .mono{letter-spacing:.04em}
html[lang="ja"] .night textarea,html[lang="ja"] .nb p{font-size:20px}

/* --- árabe --- */
html[lang="ar"]{
  --display:"Noto Kufi Arabic","Bricolage Grotesque","Segoe UI",Tahoma,sans-serif;
  --serif:"Noto Naskh Arabic","Source Serif 4","Segoe UI",Tahoma,serif;
  --mono:"JetBrains Mono","Noto Kufi Arabic",monospace;
  --hand:"Noto Naskh Arabic","Segoe UI",Tahoma,serif;
}
/* las letras árabes van unidas: nada de espaciado entre letras, cursivas ni mayúsculas forzadas */
html[lang="ar"] *{letter-spacing:0 !important}
html[lang="ar"] body{line-height:1.9;font-size:19px}
html[lang="ar"] h1,html[lang="ar"] h2,html[lang="ar"] h3{line-height:1.35;font-weight:700}
html[lang="ar"] .head h1,html[lang="ar"] .close h2{font-size:clamp(32px,5.4vw,60px);line-height:1.4}
html[lang="ar"] em,html[lang="ar"] i,html[lang="ar"] q,html[lang="ar"] .epi,html[lang="ar"] .verse,html[lang="ar"] .scene,html[lang="ar"] .card-msg,html[lang="ar"] .small,html[lang="ar"] .note,html[lang="ar"] .hint{font-style:normal}
html[lang="ar"] .mono{text-transform:none;font-family:var(--display);font-size:13.5px}
html[lang="ar"] .night textarea,html[lang="ar"] .nb p{font-size:21px}

/* --- derecha a izquierda --- */
[dir="rtl"] .opt,[dir="rtl"] .kit button.k,[dir="rtl"] .suprow{text-align:right}
[dir="rtl"] .scene{border-left:0;border-right:3px solid var(--coin-deep);padding:4px 22px 4px 0}
[dir="rtl"] .inter .you{border-left:0;border-right:3px solid var(--coin);padding:4px 18px 4px 0}
[dir="rtl"] .bul li{padding:0 38px 0 0}
[dir="rtl"] .bul li::before{left:auto;right:0}
[dir="rtl"] .offerbox li{padding:8px 26px 8px 0}
[dir="rtl"] .offerbox li::before{left:auto;right:2px}
[dir="rtl"] .ps p{padding-left:0;padding-right:3.2em}
[dir="rtl"] .faq summary{padding:18px 0 18px 40px}
[dir="rtl"] .faq summary::after{right:auto;left:4px}
[dir="rtl"] details.more summary{padding:14px 0 14px 30px}
[dir="rtl"] details.more summary::after{right:auto;left:2px}
[dir="rtl"] .ck-b.ck-ghost{margin-right:0;margin-left:auto}
[dir="rtl"] .brand i{margin-right:0}
[dir="rtl"] .sign .hand{transform-origin:right}
[dir="rtl"] .pocket small{direction:rtl}
[dir="rtl"] .supmsg.out{justify-self:start}
/* la escala del tiempo de reacción, el reloj y los contadores se leen igual en todos los idiomas */
[dir="rtl"] .scale,[dir="rtl"] .scale-l,[dir="rtl"] .timer b,[dir="rtl"] .tally b,[dir="rtl"] .tally2 b,[dir="rtl"] .chart{direction:ltr}
[dir="rtl"] .field[type="email"],[dir="rtl"] input[type="email"],[dir="rtl"] input[type="password"]{direction:ltr;text-align:right}

/* japonés: los titulares se parten por frases, no por caracteres sueltos (en navegadores compatibles) */
html[lang="ja"] h1,html[lang="ja"] h2,html[lang="ja"] h3,html[lang="ja"] .big,html[lang="ja"] .kitrun p{word-break:auto-phrase;text-wrap:balance}
/* el enlace oculto de accesibilidad no debe crear desplazamiento lateral en árabe */
[dir="rtl"] .skip{left:auto;right:-999px}
[dir="rtl"] .skip:focus{right:16px}
[dir="rtl"] .q-bar i b{transform-origin:right}
/* el bolsillo izquierdo se dibuja a la izquierda también en árabe */
[dir="rtl"] .counter,[dir="rtl"] .pockets{direction:ltr}
[dir="rtl"] .counter .pocket small,[dir="rtl"] .pockets .pocket small,[dir="rtl"] .tally,[dir="rtl"] .tally2{direction:rtl}
