@font-face { font-family: "MyQuran"; src: url("My_Quran_Font.ttf") format("truetype"); font-display: block; }
@font-face { font-family: "AmiriLocal"; src: url("amiri-400.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "AmiriLocal"; src: url("amiri-700.woff2") format("woff2"); font-weight: 700; font-display: block; }

:root {
  --bg: #f3eee3;
  --card: #fffdf8;
  --ink: #1d2a30;
  --muted: #8a8172;
  --line: #e4dccb;
  --ph: #d6cdbb;
  --dark: #17242a;
  --ar: "AmiriLocal", "Amiri", "Traditional Arabic", "Sakkal Majalla", serif;
  --ui: "Segoe UI", "Inter", Roboto, Arial, sans-serif;
  --gap: clamp(8px, 1.2vh, 16px);
  --s: clamp(40px, min(4.3vw, 7.4vh), 86px);   /* размер ячейки буквы */
  --bw: clamp(118px, 8.6vw, 170px);           /* колонка кнопок правило/примеры */
  --nw: clamp(190px, 17vw, 330px);            /* колонка названий */
  --cg: clamp(10px, 1.4vw, 28px);             /* промежуток колонок */
  --px: clamp(10px, 1.2vw, 22px);             /* отступ строки */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: var(--gap);
  padding: clamp(10px, 1.6vh, 22px) clamp(12px, 1.6vw, 30px);
  background: var(--bg);
  background-image: radial-gradient(#e6dfcf 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font: 16px/1.4 var(--ui);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 3px solid #6e9fd0; outline-offset: 3px; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[lang="ar"] { font-family: var(--ar); }

/* ===== КНОПКИ ПОКАЗА ===== */
.toggle {
  display: flex; align-items: center; gap: 12px;
  min-height: clamp(48px, 7vh, 72px);
  padding: 6px 22px 6px 7px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 2px 0 #e2d9c6;
  transition: background .2s, border-color .2s, transform .1s;
}
.toggle:active { transform: translateY(2px); box-shadow: none; }
.toggle-ico {
  width: clamp(36px, 5.4vh, 56px); height: clamp(36px, 5.4vh, 56px);
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink); color: #fff;
}
.toggle-ico svg { width: 55%; height: 55%; }
.toggle-ico.ar { font-size: clamp(16px, 2.6vh, 26px); font-weight: 700; line-height: 1; padding-bottom: 4px; }
.toggle-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.toggle-txt b { font-size: clamp(15px, 2.2vh, 22px); }
.toggle-txt small { font-size: clamp(11px, 1.45vh, 14px); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.toggle[aria-pressed="true"] .toggle-ico { background: #f3c86b; color: var(--ink); }
.toggle[aria-pressed="true"] small { color: #b9c4c4; }

.rules-head {
  display: grid;
  grid-template-columns: var(--bw) 1fr var(--nw);
  gap: var(--cg);
  padding: 0 calc(var(--px) + 1.5px);
  align-items: center;
}
.head-letters { display: flex; justify-content: center; }
.head-names { display: flex; justify-content: flex-start; padding-left: 12px; }

/* ===== ДОСКА ===== */
.board {
  position: relative;
  display: grid;
  grid-template-columns: 1fr clamp(60px, 8vw, 170px) clamp(180px, 18vw, 360px);
  min-height: 0;
}
.rules { display: grid; grid-template-rows: auto 1fr 1fr 1fr 1.25fr; gap: var(--gap); min-height: 0; position: relative; z-index: 1; }

.rule {
  --tint: color-mix(in srgb, var(--c) 10%, white);
  display: grid;
  grid-template-columns: var(--bw) 1fr var(--nw);
  align-items: center;
  gap: var(--cg);
  padding: 0 var(--px);
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  min-height: 0;
  box-shadow: 0 3px 0 #e6decd;
}

/* кнопки правила / примеров */
.rule-btns { display: flex; flex-direction: column; gap: clamp(5px, .9vh, 10px); width: var(--bw); }
.btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  min-height: clamp(38px, 5.6vh, 58px);
  padding: 0 16px 0 10px;
  border-radius: 14px;
  font-weight: 600;
  font-size: clamp(13px, 1.9vh, 19px);
  transition: transform .1s, background .2s;
}
.btn:active { transform: scale(.96); }
.btn-ico { width: 1.6em; height: 1.6em; display: grid; place-items: center; flex: none; }
.btn-ico svg { width: 100%; height: 100%; }
.btn-rule { background: var(--c); color: #fff; border: 2px solid var(--c); }
.btn-examples { background: var(--tint); color: var(--c); border: 2px solid color-mix(in srgb, var(--c) 30%, white); }

/* буквы */
.letters { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px clamp(14px, 2vw, 36px); }
.group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.group + .group { padding-right: clamp(14px, 2vw, 36px); border-right: 2px dashed var(--line); }
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(5px, .55vw, 10px); }
.r-ikhfa .slots { --s: clamp(38px, min(3.7vw, 6.6vh), 74px); max-width: calc(var(--s) * 8 + 7 * clamp(5px, .55vw, 10px)); }

.slot {
  width: var(--s); height: var(--s);
  padding: 0;
  display: grid; place-items: center;
  border: 2px dashed var(--ph);
  border-radius: 14px;
  background: #faf6ee;
  font-family: var(--ar);
  font-size: calc(var(--s) * .6);
  font-weight: 700;
  line-height: 1;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.slot span {
  display: block;
  padding-bottom: .12em;
  color: var(--ink);
  opacity: 0;
  transform: scale(.3) rotate(-12deg);
  transition: opacity .25s, transform .4s cubic-bezier(.3, 1.6, .5, 1);
}
.slot.on { border-style: solid; border-color: color-mix(in srgb, var(--c) 45%, white); background: var(--tint); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 25%, white); }
.slot.on span { opacity: 1; transform: none; }
.group.ghunna .slot span { color: #1f8a4c; }
.group.plain .slot.on { border-color: #b9bfbf; background: #f1f2ef; box-shadow: 0 3px 0 #d9dcd7; }
.slot:not(.on):hover { border-color: #bdb29c; }

.group-label { font-size: clamp(11px, 1.45vh, 14px); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--c); opacity: 0; transition: opacity .3s; }
.group.plain .group-label { color: var(--muted); }
.group:has(.slot.on) .group-label { opacity: 1; }

/* название правила */
.name {
  display: flex; align-items: center; gap: clamp(10px, 1vw, 16px);
  align-self: stretch;
  margin: clamp(6px, 1vh, 12px) 0;
  padding: 0 12px;
  border: none;
  border-radius: 14px;
  background: transparent;
  text-align: left;
}
.name-ico {
  position: relative;
  width: clamp(44px, 6.6vh, 72px); height: clamp(44px, 6.6vh, 72px);
  flex: none;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--c);
  color: #fff;
}
.name-ico svg { width: 52%; height: 52%; }
.name-txt { position: relative; display: flex; flex-direction: column; gap: .25em; min-width: 0; flex: 1; }
.name-txt b { font-size: clamp(16px, 2.6vh, 28px); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); line-height: 1.1; }
.name-ar { font-size: clamp(18px, 2.8vh, 30px); font-weight: 700; color: var(--c); line-height: 1.7; align-self: flex-start; }
.name-txt b, .name-ar { opacity: 0; transform: translateX(-10px); transition: opacity .3s, transform .35s; }
.ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; transition: opacity .25s; }
.ph em { display: block; height: 10px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--ph) 0 10px, transparent 10px 16px); }
.ph em:first-child { width: 88%; }
.ph em:last-child { width: 52%; }

.rule.named .ph { opacity: 0; }
.rule.named .name-txt b, .rule.named .name-ar { opacity: 1; transform: none; }
.rule.named .name-ar { transition-delay: .08s; }
.rule.named { box-shadow: 0 3px 0 #e6decd, inset -6px 0 0 var(--c); }

/* ===== СТРЕЛКИ ===== */
.links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.link { fill: none; stroke-width: 3; stroke-dasharray: 7 7; opacity: .55; transition: opacity .3s; }
.link.on { stroke-width: 3.5; stroke-dasharray: none; opacity: 1; }

/* ===== НУН / ТАНВИН ===== */
.side { grid-column: 3; display: flex; flex-direction: column; gap: var(--gap); min-height: 0; position: relative; z-index: 1; margin-right: 6px; }
.harakat-btn { align-self: stretch; justify-content: flex-start; }
.harakat-btn .toggle-ico { background: #6b4fb0; }
.source {
  flex: 1; min-height: 0;
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 26px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 2vh 1vw;
}
.source-label { position: relative; z-index: 1; font-size: clamp(12px, 1.6vh, 16px); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.nun { font-family: var(--ar); font-size: clamp(80px, 17vh, 210px); line-height: 1.9; font-weight: 700; color: var(--ink); margin: -.25em 0 -.35em; }
.source-sep { width: 60%; height: 2px; background: var(--line); margin: 2vh 0 0; }
.tanwin { display: flex; gap: clamp(14px, 1.8vw, 34px); font-family: var(--ar); font-size: clamp(40px, 7vh, 90px); line-height: 2.6; font-weight: 700; color: var(--ink); margin-bottom: -.3em; }

/* ===== НИЖНИЕ КАРТОЧКИ ===== */
.notes { display: grid; grid-template-columns: 1.25fr 1fr 1.3fr; gap: var(--gap); }
.note {
  background: var(--dark);
  color: #e8e3d7;
  border-radius: 18px;
  padding: clamp(10px, 1.5vh, 18px) clamp(14px, 1.3vw, 24px);
  font-size: clamp(13px, 1.75vh, 18px);
}
.note p { margin: 0; }
.note-h { font-size: clamp(11px, 1.4vh, 14px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #93aaa3; margin-bottom: 4px; }
.note-ar { font-family: var(--ar); font-size: clamp(30px, 5vh, 54px); line-height: 1.7; white-space: nowrap; margin-top: .1em !important; color: #fff; text-align: right; }
.ar-inline { font-size: 1.25em; }

.note-count { display: flex; align-items: center; justify-content: space-around; gap: 6px; }
.note-count i { font-style: normal; color: #6b7d7a; font-size: clamp(16px, 2.6vh, 26px); }
.cnt { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.cnt b { font-size: clamp(26px, 5vh, 54px); font-weight: 700; color: #4d5f5c; transition: color .3s, transform .3s; }
.cnt b.on { transform: scale(1.06); }
.cnt small { font-size: clamp(11px, 1.4vh, 14px); color: #93aaa3; text-transform: lowercase; }
.c-izhar b.on { color: #7fb4f0; }
.c-idgham b.on { color: #6fd39b; }
.c-iqlab b.on { color: #f3a764; }
.c-ikhfa b.on { color: #f185a5; }
.c-total b.on { color: #fff; }

/* ===== ВСПЛЫВАЮЩЕЕ ОКНО ===== */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(14, 22, 26, .6);
  opacity: 0;
  transition: opacity .18s;
}
.modal.open { opacity: 1; }
.modal[hidden] { display: none; }
.modal-win {
  --side: clamp(112px, 6.6vw, 150px);
  width: 97vw; height: 97vh;
  display: grid;
  grid-template-columns: 1fr var(--side);
  background: var(--card);
  border-radius: 24px;
  border-right: 10px solid var(--c);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  overflow: hidden;
  transform: scale(.97);
  transition: transform .2s;
  user-select: text; -webkit-user-select: text;
}
.modal.open .modal-win { transform: none; }
.modal-head {
  grid-column: 2; grid-row: 1;
  display: flex; flex-direction: column; align-items: center; gap: 1.2vh;
  padding: 1.4vh 10px;
  border-left: 1.5px solid var(--line);
  background: color-mix(in srgb, var(--c) 4%, var(--card));
  text-align: center;
  overflow: auto;
}
.modal-head > div:not(.modal-tabs) { display: flex; flex-direction: column; align-items: center; }
.modal-ico { margin-top: .6vh; width: clamp(40px, 5.4vh, 58px); height: clamp(40px, 5.4vh, 58px); flex: none; display: grid; place-items: center; border-radius: 18px; background: var(--c); color: #fff; }
.modal-ico svg { width: 52%; height: 52%; }
.modal-kind { display: none; font-size: clamp(10px, 1.3vh, 13px); margin-bottom: 2px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.modal-head h2 { margin: 0; white-space: nowrap; font-size: clamp(11px, .72vw, 15px); line-height: 1.15; text-transform: uppercase; letter-spacing: .03em; }
.modal-head h2 span { font-family: var(--ar); text-transform: none; color: var(--c); letter-spacing: 0; font-size: 1.45em; line-height: 1.8; margin-top: -.1em; }
.modal-close {
  align-self: center;
  flex: none;
  width: clamp(52px, 7.4vh, 76px); height: clamp(52px, 7.4vh, 76px);
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: var(--ink); color: #fff;
  transition: background .2s, transform .1s;
}
.modal-close:hover { background: #b8365c; }
.modal-close:active { transform: scale(.93); }
.modal-close svg { width: 46%; height: 46%; stroke-width: 2.6; }
.modal-body { grid-column: 1; grid-row: 1; min-width: 0; overflow: auto; padding: 3vh 3vw; font-size: clamp(18px, 2.6vh, 30px); line-height: 1.55; }
.modal-body .ar { font-family: var(--ar); direction: rtl; text-align: right; font-size: 1.6em; line-height: 1.9; }
.modal-empty { height: 100%; display: grid; place-items: center; color: #c3b9a6; font-size: clamp(16px, 2.4vh, 24px); border: 2px dashed var(--line); border-radius: 18px; }

/* ===== УЗКИЕ ЭКРАНЫ (телефон / планшет вертикально) ===== */
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  body { height: auto; min-height: 100vh; overflow: auto; }
  .board { grid-template-columns: 1fr; gap: var(--gap); }
  .links { display: none; }
  .side { grid-column: 1; grid-row: 1; margin: 0; }
  .source { flex-direction: row; flex-wrap: wrap; gap: 4vw; margin: 0; }
  .source-sep { display: none; }
  .rules { grid-template-rows: none; }
  .rules-head { grid-template-columns: 1fr 1fr; padding: 0; }
  .rules-head > span { display: none; }
  .rule { grid-template-columns: 1fr; padding: 14px; gap: 12px; }
  .rule-btns { flex-direction: row; order: 3; }
  .name { order: 1; margin: 0; }
  .letters { order: 2; }
  .notes { grid-template-columns: 1fr; }
  :root { --s: 46px; }
}

/* ===== ВКЛАДКИ В ОКНЕ ПРИМЕРОВ ===== */
.modal-tabs { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 1vh; }
.modal-tabs[hidden] { display: none; }
.tab {
  display: grid; place-items: center;
  width: 100%;
  height: clamp(64px, 10vh, 110px);
  border: 2px solid color-mix(in srgb, var(--c) 35%, white);
  border-radius: 18px;
  background: color-mix(in srgb, var(--c) 8%, white);
  color: var(--c);
  transition: background .2s, color .2s, transform .1s;
}
.tab:active { transform: scale(.96); }
.tab-ar { font-size: clamp(28px, 4.2vh, 46px); font-weight: 700; line-height: 1; padding-top: .3em; }
.tab[data-tab="tanwin"] .tab-ar { font-size: clamp(22px, 3.4vh, 38px); padding: .3em 0 .4em; word-spacing: .2em; }
.tab.active { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 60%, black); }

/* ===== ОГЛАСОВКИ ===== */
.names-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 100%; margin-top: 1vh; padding: 12px 6px;
  border: 2px solid color-mix(in srgb, var(--c) 35%, white); border-radius: 18px;
  background: color-mix(in srgb, var(--c) 8%, white); color: var(--c);
  font-size: clamp(11px, 1.45vh, 14px); font-weight: 700; line-height: 1.2; text-align: center;
}
.names-btn[hidden] { display: none; }
.names-btn svg { width: 30px; height: 30px; }
.names-btn[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.harakat {
  height: 100%;
  display: grid; align-items: stretch;
  grid-template-columns: repeat(5, 1fr) 2px 2fr;
  gap: clamp(12px, 1.6vw, 32px);
  padding: 2vh 0;
}
.hk-sep { background: repeating-linear-gradient(180deg, var(--line) 0 10px, transparent 10px 18px); border-radius: 2px; }
.hk-card {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6vh;
  padding: 5vh 1vw 3vh;
  background: #fff; border: 1.5px solid var(--line); border-radius: 24px;
  box-shadow: 0 4px 0 #ebe4d4;
  transition: transform .1s, border-color .2s;
}
.hk-card:active { transform: scale(.98); }
.hk-card img { height: 34vh; width: auto; max-width: 100%; pointer-events: none; }
.hk-name { order: -1; position: relative; display: flex; flex-direction: column; align-items: center; min-height: 11vh; justify-content: center; }
.hk-name b { font-size: clamp(22px, 4.2vh, 48px); line-height: 1.1; letter-spacing: .02em; color: #1f4fb5; }
.hk-name span { font-family: var(--ar); font-size: clamp(22px, 3.6vh, 40px); font-weight: 700; color: var(--c); line-height: 1.6; }
.hk-name b, .hk-name span { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .3s; }
.hk-ph { position: absolute; left: 50%; top: 50%; width: 70%; height: 12px; transform: translate(-50%, -50%); border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--ph) 0 10px, transparent 10px 16px); transition: opacity .2s; }
.hk-card.shown .hk-name b, .hk-card.shown .hk-name span { opacity: 1; transform: none; }
.hk-card.shown .hk-ph { opacity: 0; }
.hk-card.shown { border-color: color-mix(in srgb, var(--c) 35%, white); }
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .harakat { grid-template-columns: 1fr 1fr; }
  .hk-sep { display: none; }
  .hk-tanwin { grid-column: span 2; }
}

/* ===== СТРАНИЦА ПРАВИЛА ===== */
.modal-body:has(.rp) { display: flex; flex-direction: column; }
.rp { flex: 1; min-height: 0; display: grid; grid-template-rows: auto 1fr auto; gap: 2.4vh; }
.rp [lang="ar"] { font-family: "MyQuran", var(--ar); }
.rp-rule { margin: 0; text-align: center; font-size: clamp(20px, 3.4vh, 40px); line-height: 1.9; font-weight: 500; }
.rp-box {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  min-width: 1.6em; min-height: 1.75em; padding: 0 .3em; margin: 0 .1em;
  border: 2px solid #e05a5a; border-radius: .35em; background: #fff;
  font-size: 1.15em; line-height: 1;
}
.rp-box[lang="ar"] { line-height: 1.7; padding: .05em .4em .25em; font-size: 1.3em; }
.rp-box.rp-letters { font-size: 1.15em; gap: .45em; padding: .05em .45em .2em; font-family: "MyQuran", var(--ar); line-height: 1.7; }
.rp-grp { word-spacing: .15em; white-space: nowrap; }
.rp-gsep { align-self: stretch; width: 2px; margin: .35em 0 .25em; background: color-mix(in srgb, var(--c) 30%, white); border-radius: 2px; }
.rp-letters { color: var(--c); font-weight: 700; word-spacing: .3em; }
.rp-tw { height: 1.5em; }
.rp-red { color: #d93636; }
.rp-c { color: var(--c); }

.rp-main { min-height: 0; display: grid; grid-template-columns: .8fr repeat(3, 1fr); gap: clamp(12px, 1.6vw, 30px); }
.rp-source, .rp-zone {
  min-height: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 22px; padding: 2vh 1vw;
}
.rp-source { background: transparent; border: 2px dashed var(--line); gap: 1vh; }
.rp-an { font-size: clamp(56px, 11vh, 130px); line-height: 1.2; padding-top: .3em; }
.rp-tw-big { height: 13vh; }
.rp-source small, .rp-zname { font-size: clamp(12px, 1.7vh, 18px); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; text-align: center; color: var(--muted); }
.rp-zone { background: #fff; border: 1.5px solid var(--line); box-shadow: 0 4px 0 #ebe4d4; padding-right: 2.6vw; }
.rp-zname { color: var(--c); margin-top: 1vh; }
.rp-zletters { display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.rp-zletters span { font-size: clamp(62px, 12.5vh, 150px); line-height: 1.25; padding-top: .25em; }
.rp-throat { position: absolute; right: .8vw; top: 50%; transform: translateY(-50%); height: 44%; max-height: 190px; opacity: .45; }
.rp-throat, .rp-throat * { stroke: none; }
.rp-throat text { font: 600 9px var(--ui); fill: #c3bba9; }

.rp-bottom { display: grid; grid-template-columns: 1fr; gap: clamp(12px, 1.6vw, 30px); }
.rp-note { border-radius: 20px; padding: 1.8vh 1.6vw; background: #fff; border: 1.5px solid var(--line); font-size: clamp(14px, 2vh, 22px); line-height: 1.45; }
.rp-note p { margin: .2em 0 .6em; }
.rp-note p:last-child { margin-bottom: 0; }
.rp-note [lang="ar"] { font-size: 1.3em; unicode-bidi: isolate; direction: rtl; white-space: nowrap; }
.rp-h { font-size: clamp(11px, 1.5vh, 15px); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.rp-dark { background: var(--dark); border-color: var(--dark); color: #e8e3d7; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.rp-dark .rp-h { color: #93aaa3; align-self: flex-start; }
.rp-mnemonic { width: 100%; max-height: 11vh; object-fit: contain; filter: invert(1) hue-rotate(180deg); }
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .rp-main, .rp-bottom { grid-template-columns: 1fr; }
}

/* ===== ПРАВИЛО: УДВОЕНИЕ ===== */
.modal-body:has(.ig) { display: flex; flex-direction: column; padding-top: 2.4vh; padding-bottom: 2.4vh; }
.ig { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.6vh; }
.ig [lang="ar"] { font-family: "MyQuran", var(--ar); }
.ig-halves { flex: 1; min-height: 0; display: flex; gap: clamp(16px, 2.2vw, 40px); }
.ig-divider { width: 2px; flex: none; background: repeating-linear-gradient(180deg, var(--line) 0 12px, transparent 12px 20px); }
.ig-half { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.4vh; }
.ig-head { margin: 0; text-align: center; font-size: clamp(26px, 4.8vh, 54px); letter-spacing: .08em; text-transform: uppercase; font-weight: 800; color: #2a8a55; line-height: 1.1; }
.ig-top { margin-top: -.6vh !important; }
.ig-arrows { display: flex; height: clamp(26px, 4.4vh, 48px); margin: -1.2vh 0 -.6vh; }
.ig-arr { position: relative; flex: 1; }
.ig-arr svg { position: absolute; inset: 0 0 8px 0; width: 100%; height: calc(100% - 8px); overflow: visible; }
.ig-arr path { fill: none; stroke: #b9b1a1; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: 2 7; }
.ig-arr i { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border: 8px solid transparent; border-top: 11px solid #b9b1a1; border-bottom: 0; }
.ig-target { display: flex; align-items: center; justify-content: center; gap: 16px; direction: rtl; font-size: clamp(20px, 3.4vh, 37px); }
.ig-title {
  padding: .3em .9em; border-radius: 999px;
  font-size: .85em; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; color: #fff; white-space: nowrap;
}
.ig-g .ig-title { background: #2a8a55; }
.ig-n .ig-title { background: var(--ink); }
.ig-rule { margin: 0; text-align: center; font-size: clamp(19px, 3.3vh, 36px); line-height: 1.6; }
.ig-green { color: #2a8a55; }
.ig .rp-box { font-size: 1em; }
.ig-g .rp-letters { color: #0AB53D; }
.ig-n .rp-letters { color: var(--ink); }
.ig-cols { flex: 1; min-height: 0; display: flex; gap: clamp(12px, 1.4vw, 26px); }
.ig-col {
  flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2.4vh;
  background: #fbf8f1; border: 1.5px dashed var(--line); border-radius: 22px; padding: 1.6vh .8vw;
}
.ig-cap { margin-bottom: -.8vh; text-align: center; font-size: clamp(12px, 1.8vh, 19px); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8a8172; }
.ig-cap.green { color: #2a8a55; }
.ig-pair { display: flex; align-items: center; justify-content: center; gap: clamp(6px, .7vw, 12px); }
.ig-src, .ig-res { display: flex; border-radius: 16px; padding: .4vh .7vw; min-width: 0; }
.ig-src { background: #fff; border: 1.5px solid var(--line); }
.ig-res { background: #fff7d6; border: 1.5px solid #ecdc9a; }
.ig-pair svg.tile { height: clamp(46px, 9.4vh, 110px); width: auto; max-width: 100%; display: block; }
.ig-pair svg.tile, .ig-pair svg.tile * { stroke: none; }
.ig-arrow { width: clamp(22px, 1.8vw, 34px); flex: none; fill: none; stroke: #9a9384; stroke-width: 2.5; }
.ig-legend {
  display: flex; align-items: center; justify-content: space-between; gap: 2vw;
  padding: 1.4vh 1.6vw; border-radius: 18px; background: var(--ink); color: #e8e3d7;
  font-size: clamp(12px, 1.8vh, 19px);
}
.ig-legend > div[dir="ltr"] { flex: 1; min-width: 0; }
.ig-keys { display: flex; gap: 1.6vw; align-items: center; flex-wrap: nowrap; flex: none; white-space: nowrap; }
.ig-keys span { display: flex; align-items: center; gap: .5em; }
.ig-keys i { width: 1.15em; height: 1.15em; border-radius: 6px; flex: none; }
.ig-legend [lang="ar"] { font-size: 1.35em; color: #fff; unicode-bidi: isolate; direction: rtl; white-space: nowrap; }
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .ig-halves { flex-direction: column; }
  .ig-divider { display: none; }
  .ig-legend { flex-direction: column; align-items: flex-start; }
}

/* переключение «нун / танвин» на странице удвоения */
.ig[data-mode="nun"] .ig-pair[data-mode="tanwin"], .ig[data-mode="tanwin"] .ig-pair[data-mode="nun"] { display: none; }
button.rp-box { font: inherit; color: inherit; cursor: pointer; transition: background .2s, box-shadow .2s, opacity .2s; }
.ig-mode { opacity: .55; }
.ig[data-mode="nun"] .ig-mode[data-mode="nun"], .ig[data-mode="tanwin"] .ig-mode[data-mode="tanwin"] {
  opacity: 1; background: #fff3c4; box-shadow: 0 0 0 4px #fde7a0;
}
.ig-mode[data-mode="nun"] span { font-size: 1.3em; line-height: 1.7; padding: .05em .1em .25em; display: block; }

/* ===== ПРАВИЛО ПРЕВРАЩЕНИЯ ===== */
.iq .ig-head { color: var(--c); }
.iq .rp-box [lang="ar"] { font-size: 1.3em; line-height: 1.7; padding: .05em .15em .25em; display: block; }
.iq-ba { color: var(--ink); }
.iq-mim { font-size: 1.6em; color: #0AB53D; font-weight: 700; line-height: 1; vertical-align: .05em; padding: 0 .15em; }
.iq-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1.6vh clamp(20px, 3vw, 60px); }
.iq-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vh; min-height: 0; }
.iq-cap { font-size: clamp(12px, 1.8vh, 19px); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8a8172; }
.iq .ig-pair svg.tile { height: clamp(90px, 21vh, 240px); }
.iq .ig-src, .iq .ig-res { padding: .6vh 1.2vw; border-radius: 20px; }
.iq .ig-arrow { width: clamp(28px, 2.6vw, 48px); }

/* ===== ПРАВИЛО СОКРЫТИЯ ===== */
.ik-letters { display: flex; justify-content: center; font-size: clamp(20px, 3.4vh, 37px); margin: -.6vh 0; }
.ik .rp-letters { color: var(--c); word-spacing: .25em; }
.ik .ig-green { color: #0AB53D; }

/* Рабочая доска */
:root {
  --bg: #f5f3eb; --card: #fffefa; --ink: #18382f; --dark: #163d33;
  --muted: #605f54; --line: #dedbcd; --ph: #d7d4c7;
  --ui: "Segoe UI", Arial, sans-serif;
  --s: clamp(34px, 3.1vw, 49px); --bw: clamp(110px, 8.7vw, 145px);
  --nw: clamp(161px, 14vw, 232px); --cg: clamp(10px, 1.2vw, 22px);
}
html { height: auto; scrollbar-gutter: stable; }
body {
  display: block; width: min(100%, 1600px); height: auto; min-height: 100vh;
  overflow: visible; margin: 0 auto; padding: 0 clamp(16px, 3vw, 52px) 28px;
  background: var(--bg); color: var(--ink);
}
body.modal-visible { overflow: hidden; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 1rem; padding: 4px 0 22px; border-bottom: 1px solid #c7c9b9; }
.subject { display: flex; align-items: center; gap: 8px; color: #456356; font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.book-mark { font: 25px/1 Georgia, serif; color: #906c32; }
h1, .rules-head h2, .modal-head h2, .example-set h3 { font-family: Georgia, "Times New Roman", serif; }
h1 { margin: 4px 0 0; font-size: clamp(34px, 3.75vw, 64px); font-weight: 500; line-height: 1.1; letter-spacing: -.045em; }
h1 em { font-weight: 400; color: #466558; }
.harakat-btn { align-self: center; padding: 5px 15px 5px 5px; color: var(--ink); font-weight: 650; }
.harakat-btn .toggle-ico { background: var(--dark); color: #fff8dd; }
.toggle { gap: 8px; min-height: 44px; border: 1px solid #cfcfbd; box-shadow: none; }
.toggle-ico { width: 32px; height: 32px; }
.toggle-txt b { font-size: 14px; }
.toggle-txt small { font-size: 10px; letter-spacing: .05em; }
.board { grid-template-columns: minmax(0, 1fr) clamp(42px, 5.4vw, 86px) clamp(145px, 13.5vw, 220px); margin-top: 16px; }
.rules { grid-template-rows: auto; gap: 10px; min-width: 0; }
.rules-head { display: flex; align-items: center; gap: 8px; padding: 0 0 3px; }
.rules-head > span { display: none; }
.rules-head h2 { flex: 1; margin: 0; font-size: clamp(21px, 1.9vw, 32px); font-weight: 500; }
.head-names { padding: 0; }
.rules-head .toggle { padding: 4px 12px 4px 4px; }
.rule { min-height: 99px; padding: 12px var(--px); border-radius: 14px; box-shadow: 0 1px 1px #14352c0d; }
.rule.named { box-shadow: inset -4px 0 0 var(--c); }
.btn { min-height: 38px; padding: 0 10px; font-size: 14px; border-radius: 9px; }
.btn-ico { width: 18px; height: 18px; }
.btn-examples { border-width: 1px; }
.letters, .group, .slots { min-width: 0; }
.letters { gap: 8px clamp(6px, .8vw, 18px); }
.group + .group { padding-right: clamp(7px, .8vw, 16px); }
.slots { gap: 5px; }
.r-ikhfa .slots { --s: clamp(34px, 2.9vw, 47px); max-width: calc(var(--s) * 8 + 35px); }
.slot { border-radius: 9px; border-width: 1.5px; }
.name { margin: 0; padding: 0 3px; }
.name-ico { width: clamp(38px, 3.4vw, 55px); height: clamp(38px, 3.4vw, 55px); border-radius: 12px; }
.name-txt b { font-size: clamp(13px, 1.25vw, 21px); letter-spacing: .015em; }
.ph em { height: 6px; }
.side { margin: 0; padding-top: 57px; }
.source {
  background-color: var(--dark); color: #fff6d9; overflow: hidden; isolation: isolate;
  border: 1px solid #1d4c3b; border-radius: 15px; box-shadow: none; gap: 16px;
}
.source::before, .source::after {
  content: ""; position: absolute; width: 160px; height: 160px; pointer-events: none; z-index: -1;
  border: 1px solid #c4af7159; outline: 1px solid #c4af7136; outline-offset: 8px;
}
.source::before { top: -107px; left: -42px; transform: rotate(38deg); }
.source::after { bottom: -112px; right: -36px; transform: rotate(38deg); }
.source-item { min-width: 0; display: grid; justify-items: center; }
.nun { color: #fffae8; font-size: clamp(64px, 7.5vw, 118px); }
.tanwin { color: #fffae8; font-size: clamp(37px, 3.7vw, 62px); gap: 10px; }
.source-label { color: #e3d7ae; font-size: 12px; letter-spacing: .07em; }
.source-sep { width: 48%; height: 1px; margin: 0; background: #8e9973; }
.link { stroke-width: 1.6; stroke-dasharray: 3 5; opacity: .7; }
.link.on { stroke-width: 2; }
.notes { margin-top: 15px; grid-template-columns: 1.2fr 1fr 1fr; }
.note { background: #e9ece1; border: 1px solid #d6daca; color: #28473b; border-radius: 13px; padding: 14px 18px; font-size: 14px; }
.note-h { color: #51674f; font-size: 11px; }
.note-ar { color: var(--ink); white-space: normal; font-size: clamp(23px, 2.25vw, 38px); }
.note-count { background: #e5e9dc; }
.cnt small { color: #506357; }
.cnt b { font-size: clamp(22px, 2.6vw, 42px); color: #6d7c68; }
.c-izhar b.on { color: #25568e; } .c-idgham b.on { color: #226b43; } .c-iqlab b.on { color: #8b490a; } .c-ikhfa b.on { color: #9c3150; } .c-total b.on { color: var(--ink); }

/* Диалог. Прокручивается область урока, заголовок и закрытие всегда доступны. */
.modal { background: #0e251fcc; padding: 12px; }
.modal-win { width: min(100%, 1510px); height: min(94vh, 1060px); height: min(94dvh, 1060px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: 17px; }
.modal-head {
  grid-area: 1 / 1; display: flex; flex-flow: row wrap; gap: 8px 14px;
  padding: 10px 18px; border: 0; border-top: 3px solid var(--c); border-bottom: 1px solid var(--line);
  background: var(--card); text-align: left; overflow: visible;
}
.modal-head > div:not(.modal-tabs) { align-items: flex-start; margin-right: auto; }
.modal-close { order: 5; width: 40px; height: 40px; border-radius: 50%; }
.modal-ico { width: 38px; height: 38px; margin: 0; border-radius: 11px; }
.modal-kind { display: block; }
.modal-head h2 { font-size: clamp(20px, 1.8vw, 29px); text-transform: none; letter-spacing: -.02em; }
.modal-tabs { display: flex; flex-flow: row; align-items: center; width: auto; gap: 4px; padding: 3px; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: #f4f3ec; }
.tab { display: flex; gap: 6px; justify-content: center; align-items: center; width: auto; height: 40px; padding: 0 12px; background: transparent; border: 0; border-radius: 9px; }
.tab-ar, .tab[data-tab="tanwin"] .tab-ar { font-size: 24px; padding: 0; line-height: 1.6; }
.tab small { font-weight: 650; font-size: 13px; }
.tab.active { box-shadow: none; }
.names-btn { flex-flow: row; justify-content: center; gap: 7px; width: auto; min-height: 44px; margin: 0; padding: 6px 10px; border-width: 1px; border-radius: 10px; font-size: 13px; }
.names-btn svg { width: 19px; height: 19px; }
.modal-content { grid-area: 2 / 1; min-height: 0; display: flex; flex-direction: column; }
.audio-status { margin: 0; padding: 8px clamp(12px, 2vw, 26px); font-size: 13px; color: #53604e; background: #eff0e7; }
.modal-body { flex: 1; min-height: 0; padding: clamp(12px, 2vw, 28px); overflow: auto; overscroll-behavior: contain; }
.modal-body:has(.example-grid) { display: flex; flex-direction: column; }
.example-grid { flex: 1; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(168px, 1fr); }
.example-grid.pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.example-set { display: flex; flex-direction: column; flex: 1; }
.example-set + .example-set { margin-top: 14px; }
.example-set h3 { display: flex; align-items: center; gap: 12px; font-weight: 500; margin: 0 0 8px; font-size: 22px; }
.example-set h3 span { font-size: 24px; line-height: 1.4; color: var(--c); }
.example { display: grid; grid-template-rows: auto 1fr; position: relative; border: 1px solid var(--line); background: white; border-radius: 14px; min-width: 0; }
.example-meta { display: flex; align-items: center; gap: 8px; padding: 8px 13px 0; }
.example-letter { display: grid; place-content: center; color: var(--c); background: color-mix(in srgb,var(--c) 9%,white); border-radius: 8px; width: 35px; height: 35px; font-size: 24px; font-weight: bold; }
.ex-group, .ex-verse { color: #5d6156; font: 600 12px/1.2 var(--ui); }
.ex-verse { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.read-example { min-width: 0; min-height: 100px; width: 100%; display: grid; align-items: center; justify-items: center; background: transparent; border: 0; padding: 3px 12px 36px; border-radius: 12px; }
.read-example::before { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.read-example:disabled { cursor: default; }
.read-example:enabled:hover::before, .read-example.playing::before { box-shadow: inset 0 0 0 2px var(--c); }
.example-script { width: 100%; height: clamp(85px, 13vh, 170px); object-fit: contain; }
.play-icon, .flip-one { position: absolute; bottom: 4px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; }
.play-icon { right: 6px; color: var(--c); }
.flip-one { left: 6px; color: #506459; }
.flip-one:hover, .flip-one[aria-pressed="true"] { background: #e9efe7; }
.play-icon svg, .flip-one svg { width: 21px; height: 21px; }
.read-example:disabled .play-icon { visibility: hidden; }
.rp, .ig { min-height: min-content; }
.rp-main { min-height: 195px; }
.ig-keys { white-space: normal; flex-wrap: wrap; }
.hk-card { gap: clamp(10px, 4vh, 42px); justify-content: center; padding: 12px; }
.hk-card img { object-fit: contain; }

@media (max-width: 1000px) {
  .board { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .links { display: none; }
  .side { grid-column: 1; grid-row: 1; padding: 0; }
  .source { flex-direction: row; flex-wrap: nowrap; padding: 9px 18px; gap: clamp(14px, 5vw, 52px); }
  .source-item { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
  .source-sep { display: block; width: 1px; height: 36px; }
  .source-label { font-size: 11px; }
  .nun { font-size: 44px; line-height: 1.45; margin: 0; }
  .tanwin { font-size: 28px; line-height: 1.9; margin: 0; }
  .rules { grid-row: 2; }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-count { grid-column: 1 / -1; }
}
@media (min-width: 681px) and (max-width: 1000px) {
  .rule { grid-template-columns: 110px minmax(0, 1fr) 154px; }
  .rule-btns, .letters, .name { order: 0; }
  .rule-btns { flex-direction: column; }
}
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .modal-head { grid-area: 1 / 1; }
  .rp-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp, .ig { flex: none; height: auto; min-height: 0; }
  .rp-main, .rp-bottom { gap: 10px; }
  .rp-zletters { flex-flow: row; }
  .rp-zletters span, .rp-an { font-size: 52px; }
  .rp-tw-big { height: 58px; }
  .ig-cols { flex-wrap: wrap; }
  .ig-col { flex-basis: 145px; }
  .ig-keys { flex-direction: column; align-items: flex-start; gap: 6px; }
  .ig-divider { display: none; }
  .harakat { height: auto; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 0; gap: 10px; }
  .hk-card { min-width: 0; gap: 10px; }
  .hk-card img { height: 95px; max-width: 100%; }
  .hk-name { min-height: 52px; }
  .hk-name b { font-size: 18px; }
  .hk-name span { font-size: 23px; }
  .hk-tanwin { grid-column: auto; }
  .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body { padding: 0 clamp(10px, 3vw, 20px) 18px; }
  .masthead { flex-wrap: wrap; position: relative; padding: 0 0 14px; }
  .subject { height: 38px; }
  h1 { margin-top: 12px; font-size: clamp(31px, 6.5vw, 42px); }
  .harakat-btn { position: absolute; right: 0; top: 0; font-size: 13px; padding-right: 10px; }
  .board { margin-top: 12px; }
  .source { padding: 8px; gap: 12px; justify-content: space-evenly; }
  .source-item { flex-direction: column; gap: 0; }
  .nun { line-height: 1; margin-bottom: 5px; }
  .tanwin { line-height: 1.6; }
  .rules-head { flex-wrap: wrap; }
  .rules-head h2 { flex-basis: 100%; margin: 3px 0; }
  .rule { display: grid; grid-template-columns: minmax(0,1fr); padding: 12px; gap: 10px; }
  .name { order: 0; min-height: 42px; }
  .name-ico { width: 38px; height: 38px; }
  .name-txt { flex-direction: row; align-items: center; justify-content: space-between; }
  .name-txt b { font-size: 16px; }
  .ph { width: 110px; gap: 5px; }
  .letters { order: 1; }
  .rule-btns { order: 2; flex-flow: row; width: 100%; gap: 8px; }
  .btn { flex: 1; min-height: 44px; justify-content: center; }
  .slots, .r-ikhfa .slots { --s: 40px; }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .modal { padding: 0; }
  .modal-win { width: 100%; height: 100vh; height: 100dvh; border: none; border-radius: 0; }
  .modal-head { padding: 7px 10px; gap: 6px; }
  .modal-head > div:not(.modal-tabs) { width: calc(100% - 102px); flex: 1; }
  .modal-close { order: 0; margin-left: auto; width: 44px; height: 44px; }
  .modal-ico { order: -3; }
  .modal-head > div:not(.modal-tabs) { order: -2; }
  .modal-tabs { order: 1; }
  .names-btn { order: 2; }
  .modal-head:has(.modal-tabs:not([hidden]),.names-btn:not([hidden]))::after { content: ""; order: 0; flex-basis: 100%; height: 0; }
  .modal-tabs, .names-btn { margin-top: -3px; }
  .tab { height: 38px; padding: 0 9px; }
  .ex-group { font-size: 11px; }
  .example-grid, .example-grid.pairs { grid-auto-rows: minmax(148px, auto); }
  .modal-body { padding: 10px; }
  .rp-rule, .ig-rule { font-size: 18px; }
  .rp { gap: 12px; }
  .rp-box.rp-letters { flex-wrap: wrap; }
  .ig-legend { padding: 12px; }
  .ig-arrows { display: none; }
  .iq-grid { gap: 14px; }
  .iq .ig-pair svg.tile { height: 76px; }
  .ik .rp-grp { white-space: normal; text-align: center; }
}
@media (max-width: 500px) {
  .example-grid, .example-grid.pairs { grid-template-columns: minmax(0, 1fr); }
  .example-script { height: 102px; }
  .harakat { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .iq-grid { grid-template-columns: 1fr; }
  .ig-target { gap: 8px; }
}
@media (max-height: 510px) and (orientation: landscape) {
  .modal { padding: 0; }
  .modal-win { height: 100dvh; border-radius: 0; }
  .modal-head { padding: 3px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; }
}
.toggle-ico.ar { white-space: nowrap; font-size: 16px; padding: 0; }
.ik .rp-letters { max-width: 100%; }
.ik .rp-grp { white-space: normal; text-align: center; }
.tab-ar, .tab[data-tab="tanwin"] .tab-ar { font-size: 21px; transform: translateY(2px); }
@media (max-width: 680px) {
  .source { padding-block: 13px 10px; }
  .nun { line-height: 1.25; margin: 1px 0 0; }
  .tanwin { line-height: 1.9; }
  .r-ikhfa .slots { display: grid; grid-template-columns: repeat(5, var(--s)); --s: 42px; }
}


