/* ══════════════════════════════════════════════════════════
   Qasada · «Ночь», вторая версия

   Одно окно плеера с первого экрана живёт через всю страницу и
   превращается: телефон, лист «Сегодня», карточка дочери, лист
   напоминания, приглашение, совместное дело, доска челленджа и черта
   над ق в слове قصد.

   Цвета, перо и числа движения взяты из приложения:
   lib/core/theme/app_colors.dart, lib/core/ui/paper_motion.dart.

   Без JS и при «уменьшить движение» страница стоит обычными блоками,
   у каждой сцены своё окно в конечном виде (класс motion не ставится).
   ══════════════════════════════════════════════════════════ */

:root {
  --night: #1C1A16;
  --ink: #F3EADC;
  --ink-tr: #C8C0B4;
  --ink-2: #B7B0A5;
  --ink-3: #999389;

  --paper: #F3EADC;
  --sheet: #FEFAF0;
  --text: #1A1A1A;
  --text-2: #5F5A52;
  --tush: #2E2B26;
  --pen: #515D43;
  --pen-deep: #37422B;
  --people: #557A85;
  --wax: #86222F;
  --green: #2E7D5B;

  --ease-paper: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.55, .055, .675, .19);

  --serif: "Lora", "Lora Fallback", Georgia, "Times New Roman", serif;
  --arabic: "Aref Ruqaa", serif;

  --gutter: 16px;
  --max: 1200px;

  color-scheme: dark;
}
@media (min-width: 640px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }

@font-face {
  font-family: "Lora Fallback";
  src: local("Georgia");
  size-adjust: 104%;
  ascent-override: 97%;
  descent-override: 26%;
  line-gap-override: 0%;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.is-day { background: var(--paper); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night) url("fiber.png");
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 430;
  line-height: 1.55;
  font-kerning: normal;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
.motion body { background: none; }

img,
svg { display: block; }
p, h1, h2, h3, h4, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: rgba(243, 234, 220, .24); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 8px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Знак пером из спрайта: толщина пера — в единицах квадрата 18. */
.ic {
  flex: none;
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.17;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic .g-line { stroke-opacity: .95; }
.ic .g-fill { stroke-width: .85; stroke-opacity: .47; }
.ic .g-dots { stroke-dasharray: .01 2.2; }

/* ─── знак ─────────────────────────────────────────── */

.mark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink);
  line-height: 1;
  text-decoration: none;
}
.mark__ar {
  font-family: var(--arabic);
  font-size: 28px;
  line-height: 1.2;
  /* хвосты ق и د у Aref Ruqaa уходят под строку на 0,17 размера: место под них,
     чтобы QASADA не задевал буквы (зазор около 0,24 размера) */
  padding-bottom: .26em;
}
.mark__lat {
  margin-top: 1px;
  margin-right: -.42em;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .42em;
}

/* ─── шапка ────────────────────────────────────────── */

.top {
  position: relative;
  z-index: 100;
  color: var(--ink);
}
.top__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 8px var(--gutter);
}
.top .mark { color: inherit; }
@media (min-width: 1024px) {
  .top__in { padding-block: 16px; }
  .mark__ar { font-size: 32px; }
  .mark__lat { font-size: 10px; }
}
.motion .top {
  position: fixed;
  inset: 0 0 auto;
  pointer-events: none;
}
.motion .top__in > * { pointer-events: auto; }
.top { transition: color 180ms linear; }
.top.is-day { color: var(--tush); }

/* ─── кнопка пером ─────────────────────────────────── */

.pen-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 48px;
  padding: 0 24px;
  border-radius: 13px;
  color: inherit;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 260ms var(--ease-paper);
}
.pen-btn > span { position: relative; }
.pen-btn small {
  position: relative;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pen-btn--sm {
  height: 40px;
  padding: 0 16px;
  font-size: 15px;
}
.pen-btn.is-down {
  transform: translateY(1.5px) scale(.985);
  transition-duration: 140ms;
}
.no-js .pen-btn { box-shadow: inset 0 0 0 1.5px currentColor; }

svg.pen-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: var(--pen-ink, currentColor);
}
svg.pen-line path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.pen-line .pa { stroke-width: 1.5; stroke-opacity: .72; }
svg.pen-line .pb { stroke-width: 1.2; stroke-opacity: .4; }
svg.pen-line .ph { stroke-width: .9; stroke-opacity: .3; }
.is-down svg.pen-line .pa { stroke-opacity: 1; }
@media (hover: hover) {
  .pen-btn:hover svg.pen-line .pa { stroke-opacity: .92; }
}

/* ─── слова ────────────────────────────────────────── */

.cap {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.name-h {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.016em;
  text-wrap: balance;
}
.line {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.45;
  text-wrap: pretty;
}
@media (min-width: 1024px) {
  .name-h { font-size: 44px; line-height: 1.08; }
  .line { font-size: 20px; }
}

.intro__title {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.022em;
  max-width: 11.5em;
}
.intro__lead {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.5;
}
@media (min-width: 1024px) {
  .intro__title { font-size: 56px; max-width: 10.5em; }
  .intro__lead { margin-top: 20px; font-size: 20px; }
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
@media (min-width: 1024px) { .stores { margin-top: 32px; } }
@media (max-width: 400px) {
  .intro .stores { gap: 10px; }
  .intro .stores .pen-btn { flex: 1 1 0; padding: 0 10px; gap: 8px; }
}

/* SplitText: строка выходит из своей маски. Запас снизу — хвосты букв. */
.ln-mask {
  padding-bottom: .14em;
  margin-bottom: -.14em;
}

/* ─── окно плеера: аяты ────────────────────────────── */

.player__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-inline: 2px;
}
.player__title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.player__count {
  color: var(--ink-3);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
}
.player__cap {
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: .01em;
  text-align: center;
}
.pane--player {
  container-type: inline-size;
}
.ayahs {
  display: grid;
  height: 100%;
  align-content: center;
}
.ayah {
  grid-area: 1 / 1;
  display: grid;
  grid-template-rows: auto auto;
  row-gap: clamp(12px, 3.6cqi, 20px);
  padding: 0 calc(10px + 7cqi);
}
.ayah__ar {
  align-self: end;
  color: var(--ink);
  font-family: var(--arabic);
  font-size: clamp(28px, 10.4cqi, 54px);
  font-weight: 400;
  line-height: 1.8;
  text-align: center;
  text-wrap: balance;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}
.ayah__ru {
  align-self: start;
  color: var(--ink-tr);
  font-size: clamp(15px, 4.4cqi, 20px);
  font-weight: 500;
  line-height: 1.42;
  text-align: center;
  text-wrap: balance;
}

.player__ctl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.ctl {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ctl svg {
  width: 40px;
  height: 40px;
  overflow: visible;
  transition: transform 260ms var(--ease-paper);
}
.ctl--main { width: 60px; height: 60px; }
.ctl--main svg { width: 54px; height: 54px; }
.ctl.is-down svg { transform: translateY(1.5px) scale(.94); transition-duration: 140ms; }
.ctl path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.ctl .ring { stroke-width: 1.5; stroke-opacity: .92; }
.ctl .mark-line { stroke-opacity: .95; }
.ctl .hatch { stroke-width: 1.1; stroke-opacity: .5; opacity: 0; transition: opacity 260ms linear; }
.ctl--main .hatch,
.ctl.is-down .hatch { opacity: 1; transition-duration: 140ms; }
.ctl .g-play { display: none; }
.ctl.is-paused .g-play { display: inline; }
.ctl.is-paused .g-pause { display: none; }
.ctl:focus-visible { border-radius: 50%; outline-offset: 2px; }

/* ─── снимки в телефоне ────────────────────────────── */

.pane--shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ─── лист «Сегодня» ───────────────────────────────────
   Свёрстан в мерке снимка home.webp: 1em = сто точек снимка. Тогда в
   миг смены снимка на лист строки ложатся одна в одну. */

.today {
  position: relative;
  height: 100%;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.today__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.48em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 .52em 0 .51em;
}
.today__cap {
  color: #6A655D;
  font-size: .276em;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.today__count {
  display: inline-flex;
  align-items: baseline;
  gap: .3em;
  color: var(--text);
  font-size: .32em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums lining-nums;
}
.today__n {
  position: relative;
  display: inline-grid;
  overflow: hidden;
  overflow: clip;
  padding-block: .2em;
  margin-block: -.2em;
}
.today__n > span { grid-area: 1 / 1; }
.today__view {
  position: absolute;
  top: 1.12em;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  overflow: clip;
}
.today__list { padding-bottom: .6em; }

.when { position: relative; }
.when__head {
  display: flex;
  align-items: center;
  height: .92em;
  margin: 0;
  padding: 0 .3em 0 .47em;
  white-space: nowrap;
  font-size: 1em;
}
.when__dot {
  flex: none;
  width: .18em;
  height: .18em;
  border-radius: 50%;
  background: var(--w);
}
.when__head b {
  margin-left: .96em;
  color: var(--wt);
  font-size: .27em;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.when__mid {
  margin-left: .95em;
  color: #8A857D;
  font-size: .27em;
}
.when__from {
  margin-left: .53em;
  color: #757575;
  font-size: .352em;
}
.when__rule {
  flex: 1;
  height: 1px;
  margin-left: .27em;
  margin-right: .26em;
  background: rgba(46, 125, 91, .14);
}
.when--morning { --w: #E89A3D; --wt: #C47A2A; }
.when--noon    { --w: #C0872E; --wt: #A87A2B; }
.when--evening { --w: #B85C3D; --wt: #B0583A; }
.when--night   { --w: #4A5899; --wt: #4A5899; }
.when--morning { padding-top: .41em; }
.when--morning .deed { height: 1.72em; margin-top: .24em; }
.when--noon { padding-top: 1em; }
.when--evening,
.when--night { padding-top: .9em; }
/* Прошедшее окно суток бледное, как на главной до Фаджра. */
.when.is-past .when__head,
.when.is-past .deed { opacity: .42; }

.deed {
  --c: #2E7D5B;
  --c12: rgba(46, 125, 91, .12);
  position: relative;
  display: flex;
  align-items: center;
  height: 1.86em;
  padding-left: .58em;
  padding-right: .96em;
}
.c-azkar   { --c: #3B7BBA; --c12: rgba(59, 123, 186, .12); }
.c-quran   { --c: #2E7D5B; --c12: rgba(46, 125, 91, .12); }
.c-green   { --c: #2E7D5B; --c12: rgba(46, 125, 91, .12); }
.c-trainer { --c: #6E4B2E; --c12: rgba(110, 75, 46, .14); }
.c-sunnah  { --c: #737A58; --c12: rgba(115, 122, 88, .14); }

.deed__thread {
  position: absolute;
  left: .58em;
  top: .04em;
  bottom: .04em;
  width: .085em;
  border-radius: .05em;
  background: var(--c);
  opacity: .82;
}
.c-azkar .deed__thread { opacity: .5; }
.deed__tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.2em;
  height: 1.2em;
  margin-left: .68em;
  border-radius: .24em;
  background: var(--c12);
  color: var(--c);
}
.deed__tile .ic { width: .56em; height: .56em; stroke-width: 1.2; }
.deed__txt {
  position: relative;
  top: -.15em;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  margin-left: .37em;
}
.when--morning .deed__txt { top: -.04em; }
.deed__time {
  color: #8D8880;
  font-size: .356em;
  line-height: 1.2;
  margin-bottom: .2em;
  font-variant-numeric: tabular-nums lining-nums;
}
.deed__nm {
  font-size: .48em;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.005em;
}
.deed__sub {
  margin-top: .32em;
  color: #757575;
  font-size: .37em;
  line-height: 1.3;
}
.strike-host {
  position: relative;
  display: inline-block;
}
.strike {
  position: absolute;
  top: 0;
  left: -3px;
  width: calc(100% + 6px);
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.strike path { fill: none; stroke: #6B6760; stroke-width: 1.4; stroke-linecap: round; }
.deed__mark {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: .92em;
  height: .92em;
}
.deed__mark .dmk {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.deed__num {
  position: relative;
  color: #8A8680;
  font-size: .33em;
  font-variant-numeric: tabular-nums lining-nums;
}
.dmk path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dmk .dk-grey { stroke: rgba(117, 117, 117, .5); stroke-width: 1.5; }
.dmk .dk-ring { stroke: rgba(46, 125, 91, .85); stroke-width: 1.5; }
.dmk .dk-h { stroke: #2E7D5B; stroke-opacity: .32; stroke-width: 1.1; }
.dmk .dk-check { stroke: #2E7D5B; stroke-width: 1.8; }
.deed.is-done .deed__nm { color: #757575; }
.deed.is-done .deed__num { opacity: 0; }
html:not(.js) .deed__mark { border: 1.5px solid rgba(117, 117, 117, .5); border-radius: 50%; }
html:not(.js) .deed.is-done .deed__mark { border-color: rgba(46, 125, 91, .85); }
html:not(.js) .deed.is-done .deed__nm { text-decoration: line-through; text-decoration-color: #757575; }

/* ─── карточки «Вместе»: слова на пластине ─────────────
   Мерка — ширина карточки: 1em = ширина / 358 × 16. */

.card,
.leaf {
  position: relative;
  -webkit-font-smoothing: antialiased;
}
.card {
  padding: 1em;
  color: var(--text);
  font-size: 1em;
  line-height: 1.4;
}
.who {
  display: flex;
  align-items: center;
  gap: .75em;
}
.who__g {
  width: 2.75em;
  height: 2.75em;
  padding: .5em;
  color: var(--green);
  stroke-width: 1.15;
}
.who__tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5em;
  height: 2.5em;
  margin: .125em;
  border-radius: .69em;
  background: var(--c12);
  color: var(--c);
}
.who__tile .ic { width: 1.375em; height: 1.375em; stroke-width: 1.1; }
.who__name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.who__name b {
  font-size: 1.125em;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.022em;
}
.who__name span {
  color: #6B6760;
  font-size: .75em;
  line-height: 1.5;
}
.acts {
  display: flex;
  gap: .5em;
}
.act {
  position: relative;
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
}
.act__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.act__svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.act .ic { width: 1em; height: 1em; stroke-width: 1.35; }
.act--plus { color: var(--green); }
.act--bell { color: var(--pen); }
.act--chart { color: #737A58; }
html:not(.js) .act { border: 1.5px solid currentColor; border-radius: 50%; }

.rows { margin-top: 1.25em; }
.row {
  display: flex;
  align-items: center;
  gap: .75em;
  padding-block: .5625em;
}
.row__tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.125em;
  height: 2.125em;
  border-radius: .5625em;
  background: var(--c12);
  color: var(--c);
}
.row__tile .ic { width: 1.125em; height: 1.125em; stroke-width: 1.2; }
.row__t {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.row__t b {
  font-size: .875em;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.006em;
  white-space: nowrap;
}
.row__t > span,
.row__t .swap > span {
  color: #6B6760;
  font-size: .6875em;
  line-height: 1.45;
}
.row__t .swap { font-size: 1em; }
.row__t .swap > span { font-size: .6875em; }
.row__t .is-wait { color: #5A6047; }
.row__t b.is-done { color: #757575; }
.dm {
  flex: none;
  width: 1.625em;
  height: 1.625em;
  overflow: visible;
}
.dm path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
html:not(.js) .dm { border: 1.5px solid rgba(117, 117, 117, .45); border-radius: 50%; }
html:not(.js) .dm[data-done="1"] { border-color: rgba(46, 125, 91, .85); }
html:not(.js) .row__t b.is-done { text-decoration: line-through; }

.swap { display: inline-grid; }
.swap > * { grid-area: 1 / 1; }
.swap__a { opacity: 0; }

.card__wait {
  margin-top: .25em;
  padding-top: .5em;
  border-top: 1px solid rgba(117, 117, 117, .16);
  color: #5A6047;
  font-size: .8125em;
  font-weight: 600;
  text-align: center;
}

/* Лист на главной: тёмная пластина, белые слова. */
.leaf {
  padding: 1em;
  color: #FFFFFF;
}
.leaf__kick {
  display: flex;
  align-items: center;
  gap: .3em;
  color: rgba(255, 255, 255, .82);
  font-size: .6875em;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.leaf__kick .ic { width: 1.3em; height: 1.3em; stroke-width: 1.1; }
.leaf__title {
  margin-top: .45em;
  font-size: 1.125em;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -.012em;
}
.leaf__with {
  margin-top: .5em;
  color: rgba(255, 255, 255, .86);
  font-size: .78em;
}
.leaf__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5em;
  margin-top: .75em;
}
.pen-btn--leaf {
  width: 100%;
  height: 2.625em;
  padding: 0 .5em;
  color: #FFFFFF;
  font-size: .875em;
  cursor: default;
}
.chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: .75em;
  margin-top: .75em;
  padding: .625em 1em .625em 1.125em;
}
.chip__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chip__ring path { fill: none; }
.chip .ic { width: 1.25em; height: 1.25em; stroke-width: 1.05; color: #F3EADC; }
.chip__info { opacity: .85; }
.chip__t {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.chip__t b { font-size: .94em; font-weight: 700; letter-spacing: -.012em; }
.chip__t span { color: rgba(255, 255, 255, .86); font-size: .72em; line-height: 1.4; }
html:not(.js) .chip { border: 1.5px solid rgba(243, 234, 220, .42); border-radius: 999px; }

/* ─── доска челленджа ──────────────────────────────── */

.btab {
  position: relative;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btab > span { position: relative; }
.btab__ring {
  position: absolute;
  top: -7px;
  left: -14px;
  width: calc(100% + 28px);
  height: calc(100% + 14px);
  overflow: visible;
  pointer-events: none;
}
.btab__ring path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
  stroke-opacity: .82;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btab:focus-visible { border-radius: 10px; outline-offset: 6px; }

.ch__name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.ch__about {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.45;
  text-wrap: pretty;
}
.ch__say {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.45;
  text-wrap: pretty;
}
.figs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 16px;
}
.figs::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  background: rgba(243, 234, 220, .14);
}
.fig { display: flex; flex-direction: column; }
.fig:first-child { grid-column: 1; grid-row: 1; }
.fig:last-child { grid-column: 3; grid-row: 1; }
.fig__cap {
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.fig__val {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 15px;
}
.fig__val.is-stacked > span { display: block; }
.fig__val b {
  color: var(--ink);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums lining-nums;
}

.road-static {
  width: 100%;
  height: auto;
  overflow: visible;
}
.road-static text { font-family: var(--serif); font-variant-numeric: tabular-nums lining-nums; }
.road-static .r-grid { stroke: rgba(243, 234, 220, .08); stroke-width: 1; }
.road-static .r-today { stroke: rgba(243, 234, 220, .3); stroke-width: 1; stroke-dasharray: 2 3; }
.road-static .r-road { stroke: rgba(243, 234, 220, .22); stroke-width: 1; stroke-dasharray: 3 3; }
.road-static .r-road--bed { stroke-dasharray: 3 5; }
.road-static .r-bed { stroke: rgba(243, 234, 220, .05); stroke-width: 16; stroke-linecap: round; }
.road-static .r-sep { stroke: rgba(243, 234, 220, .07); stroke-width: 1; }
.road-static .r-mine { fill: rgba(243, 234, 220, .035); }
.road-static .r-day { fill: var(--ink-3); font-size: 10.5px; font-weight: 600; }
.road-static .r-place { fill: var(--ink-3); font-size: 12.5px; }
.road-static .r-name { fill: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.road-static .r-name.is-mine { font-weight: 700; }
.road-static .r-count { fill: var(--ink-3); font-size: 11.5px; }
.road-static .r-side { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; }
.road-static .r-you { fill: #FEFAF0; font-size: 10px; font-weight: 700; }
.road-static .dots circle { fill: rgba(243, 234, 220, .68); }
.road-static .tick { stroke: rgba(243, 234, 220, .8); stroke-linecap: round; }

/* ─── имя ──────────────────────────────────────────── */

.name__word {
  font-weight: 400;
  text-align: center;
}
.name__ar {
  display: inline-block;
  color: var(--tush);
  font-family: var(--arabic);
  font-size: 180px;
  font-weight: 400;
  line-height: 1.5;
}
.name__svg { display: none; }
.name__mean {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-align: center;
  text-wrap: balance;
}
.hadith { text-align: center; }
.hadith__ar {
  color: var(--tush);
  font-family: var(--arabic);
  font-size: 32px;
  line-height: 1.7;
}
.hadith__ru {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.45;
  text-wrap: balance;
}
.hadith__src {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 14px;
  letter-spacing: .02em;
}
@media (min-width: 1024px) {
  .name__ar { font-size: 300px; }
  .name__mean { font-size: 26px; }
  .hadith__ar { font-size: 40px; }
  .hadith__ru { font-size: 21px; }
  .hadith__src { font-size: 13px; }
}

/* ─── скачать и подвал ─────────────────────────────── */

.get {
  position: relative;
  color: var(--text);
  text-align: center;
}
.get__in {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 96px var(--gutter) 112px;
}
.get__title {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.get__line {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 18px;
}
.stores--get {
  justify-content: center;
  margin-top: 36px;
}
.get .pen-btn { --pen-ink: var(--pen); color: var(--pen-deep); }
.get .pen-btn small { color: var(--text-2); }
@media (min-width: 1024px) {
  .get__in { padding-block: 128px 144px; }
  .get__title { font-size: 48px; }
  .get__line { font-size: 21px; }
}
@media (max-width: 639px) {
  .stores--get { flex-direction: column; align-items: stretch; }
  .stores--get .pen-btn { width: 100%; }
}

.foot {
  position: relative;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
}
.foot__in {
  position: relative;
  display: grid;
  gap: 20px;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 40px var(--gutter) 56px;
}
.foot__in > .rule {
  position: absolute;
  top: -4px;
  left: var(--gutter);
  right: var(--gutter);
  width: calc(100% - 2 * var(--gutter));
  height: 8px;
  overflow: visible;
}
.foot__in > .rule path { fill: none; stroke: var(--pen); stroke-opacity: .35; stroke-width: 1; stroke-linecap: round; }
.foot .mark { color: var(--tush); justify-self: start; }
.foot .mark__ar { font-size: 26px; }
.foot__src { max-width: 46em; text-wrap: pretty; }
.foot__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.foot :focus-visible,
.get :focus-visible { outline-color: var(--tush); }
@media (min-width: 900px) {
  .foot__in {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 48px;
  }
  .foot__meta { flex-direction: column; align-items: flex-end; text-align: right; }
}

/* ══════════════════════════════════════════════════════
   ПОКОЙ: без JS и при «уменьшить движение»
   Сцены идут обычными блоками, у каждой своё окно.
   ══════════════════════════════════════════════════════ */

html:not(.motion) .slot,
html:not(.motion) .win,
html:not(.motion) .pen,
html:not(.motion) .ink,
html:not(.motion) .board__road,
html:not(.motion) .board__tabs,
html:not(.motion) .ribbon__line { display: none; }

html:not(.motion) .track {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
html:not(.motion) .frame,
html:not(.motion) .stage { display: contents; }

/* Окно в покое: та же бумага и тень, рамка дорисована. */
html:not(.motion) .pane {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--night) url("fiber.png") 113px 71px;
  box-shadow:
    0 0 0 1px rgba(243, 234, 220, .075),
    0 2px 5px rgba(0, 0, 0, .38),
    0 30px 72px -26px rgba(0, 0, 0, .78);
}
html:not(.motion) .pane > .frame-pen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.frame-pen path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.no-js .pane { outline: 1.5px solid rgba(243, 234, 220, .26); outline-offset: -8px; }

.intro { padding-top: 24px; }
html:not(.motion) .player { margin-top: 40px; }
html:not(.motion) .player__head { margin-bottom: 12px; }
html:not(.motion) .pane--player { padding-block: 40px; }
html:not(.motion) .ayahs { display: block; }
html:not(.motion) .ayah { display: none; }
html:not(.motion) .ayah.on { display: grid; }
.no-js .ayah { display: grid !important; }
.no-js .ayah + .ayah { margin-top: 32px; }
.no-js .player__ctl,
.no-js .player__count { display: none; }
html:not(.motion) .player__ctl { margin-top: 20px; }
html:not(.motion) .player__cap { margin-top: 14px; }

html:not(.motion) .inside { margin-top: 112px; }
html:not(.motion) .items {
  display: grid;
  gap: 48px;
  margin-top: 28px;
}
html:not(.motion) .item {
  display: grid;
  justify-items: start;
  row-gap: 20px;
}
html:not(.motion) .item__words { order: 2; }
html:not(.motion) .item .line { margin-top: 6px; max-width: 24em; }
html:not(.motion) .pane--shot {
  width: min(64vw, 260px);
  border-radius: 13.6% / 6.3%;
  background: var(--paper);
}
html:not(.motion) .pane--shot > .frame-pen { inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); }

html:not(.motion) .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 112px;
}
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tab > span { position: relative; }
.no-js .tab { box-shadow: inset 0 0 0 1px rgba(243, 234, 220, .4); }

html:not(.motion) .day { margin-top: 40px; display: grid; gap: 28px; }
html:not(.motion) .day .line { margin-top: 10px; max-width: 26em; }
html:not(.motion) .ribbon {
  display: flex;
  justify-content: space-between;
  max-width: 540px;
  padding-inline: 8px;
}
.station {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink);
}
.station__name {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
}
.station__g {
  position: relative;
  width: 28px;
  height: 28px;
  stroke-width: 1.15;
}
.station__ring {
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 46px;
  height: 46px;
  margin-left: -23px;
  overflow: visible;
  pointer-events: none;
}
.station__ring path { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
html:not(.motion) .station:nth-child(n + 4) { opacity: .5; }
.no-js .station:nth-child(-n + 3) .station__g { opacity: .9; }

html:not(.motion) .pane--today {
  width: 100%;
  max-width: 540px;
  height: auto;
  border-radius: 24px;
  background: var(--sheet) url("fiber.png") 7px 11px;
  font-size: calc(min(540px, 100vw - 2 * var(--gutter)) / 10.86);
}
html:not(.motion) .today { height: auto; padding-bottom: .3em; }
html:not(.motion) .today__top { position: relative; }
html:not(.motion) .today__view { position: relative; top: 0; }
.no-js .pane--today { outline-color: rgba(81, 93, 67, .4); outline-style: dashed; outline-offset: -.14em; }

html:not(.motion) .together { margin-top: 128px; }
html:not(.motion) .family,
html:not(.motion) .friends,
html:not(.motion) .race {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}
html:not(.motion) .friends,
html:not(.motion) .race { margin-top: 96px; }
html:not(.motion) .family__words .line,
html:not(.motion) .friends__words .line,
html:not(.motion) .race__words .line { margin-top: 8px; max-width: 26em; }
html:not(.motion) .family__words .line + .line,
html:not(.motion) .friends__words .line + .line { margin-top: 4px; }

html:not(.motion) .plate {
  width: 100%;
  max-width: 400px;
  border-radius: 18px;
  background: var(--sheet) url("fiber.png") 7px 11px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 26px 52px -24px rgba(0, 0, 0, .8);
  font-size: calc(min(400px, 100vw - 2 * var(--gutter)) / 358 * 16);
}
html:not(.motion) .plate--dark { background: var(--pen) url("fiber.png") 31px 3px; border-radius: 14px; }
html:not(.motion) .pane--invite { background-color: var(--people); }
html:not(.motion) .pane--nudge,
html:not(.motion) .pane--deed { margin-top: -10px; margin-left: auto; margin-right: 0; position: relative; }
html:not(.motion) .pane--nudge { width: 92%; max-width: 368px; }
.no-js .plate { outline-color: rgba(81, 93, 67, .4); outline-style: dashed; outline-offset: -7px; }
.no-js .plate--dark { outline-color: rgba(255, 255, 255, .3); }

html:not(.motion) .pane--board {
  display: grid;
  gap: 48px;
  overflow: visible;
  background: none;
  box-shadow: none;
}
.no-js .pane--board { outline: 0; }
html:not(.motion) .ch {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 24px 20px;
  border-radius: 16px;
  background: var(--night) url("fiber.png") 53px 29px;
  box-shadow:
    0 0 0 1px rgba(243, 234, 220, .075),
    0 2px 5px rgba(0, 0, 0, .38),
    0 30px 72px -26px rgba(0, 0, 0, .78);
}
html:not(.motion) .ch > .frame-pen { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.no-js .ch { outline: 1.5px solid rgba(243, 234, 220, .2); outline-offset: -8px; }
html:not(.motion) .ch__road { margin-inline: -6px; }
html:not(.motion) .ch__road canvas { display: block; width: 100%; }

/* Рассвет: ночь светлеет до бумаги приложения, там имя и «Скачать». */
html:not(.motion) .name {
  margin: 128px calc(50% - 50vw) 0;
  padding: clamp(280px, 60vh, 560px) var(--gutter) 64px;
  color: var(--text);
  background-color: var(--paper);
  background-image:
    url("fiber.png"),
    linear-gradient(to bottom, #1C1A16 0, #1E1C18 6%, #2A2823 14%, #43403A 22%, #68635B 30%, #948E85 38%, #C2BAAE 46%, #E5DCCF 54%, #F3EADC 62%);
  background-size: 320px 320px, 100% clamp(280px, 60vh, 560px);
  background-repeat: repeat, no-repeat;
}
html:not(.motion) .name ::selection { background: rgba(81, 93, 67, .22); color: var(--text); }
html:not(.motion) .name__mean { margin-top: 8px; }
html:not(.motion) .hadith { margin-top: 56px; }
html:not(.motion) .get,
html:not(.motion) .foot { background: var(--paper) url("fiber.png"); margin-top: -1px; }

@media (min-width: 1024px) {
  html:not(.motion) .track {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 96px;
    align-items: center;
  }
  html:not(.motion) .intro { grid-column: 1; grid-row: 1; padding-top: 0; }
  html:not(.motion) .player {
    grid-column: 2;
    grid-row: 1;
    width: 452px;
    margin-top: 24px;
  }
  html:not(.motion) .stage > :not(.player) { grid-column: 1 / -1; }
  html:not(.motion) .pane--player { min-height: 588px; display: grid; }
  .no-js .pane--player { min-height: 0; }
  html:not(.motion) .items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html:not(.motion) .pane--shot { width: min(100%, 280px); }
  html:not(.motion) .day {
    grid-template-columns: minmax(0, 1fr) 540px;
    column-gap: 96px;
    align-items: start;
  }
  html:not(.motion) .day__words { grid-column: 1; grid-row: 1 / span 2; padding-top: 80px; }
  html:not(.motion) .ribbon { grid-column: 2; }
  html:not(.motion) .pane--today { grid-column: 2; }
  html:not(.motion) .family,
  html:not(.motion) .friends {
    grid-template-columns: minmax(0, 1fr) 420px;
    column-gap: 96px;
    align-items: center;
  }
  html:not(.motion) .family__words,
  html:not(.motion) .friends__words { grid-column: 1; grid-row: 1 / span 2; }
  html:not(.motion) .family .pane,
  html:not(.motion) .friends .pane { grid-column: 2; }
  html:not(.motion) .plate { font-size: calc(400px / 358 * 16); }
  html:not(.motion) .ch {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    grid-template-areas: "name name" "road about" "road figs" "road say";
    grid-template-rows: auto auto auto 1fr;
    column-gap: 56px;
    padding: 32px;
  }
  html:not(.motion) .ch__name { grid-area: name; }
  html:not(.motion) .ch__road { grid-area: road; margin: 0; }
  html:not(.motion) .ch__about { grid-area: about; }
  html:not(.motion) .figs { grid-area: figs; margin-top: 12px; }
  html:not(.motion) .ch__say { grid-area: say; }
  html:not(.motion) .name__word { margin-top: 0; }
}

/* ══════════════════════════════════════════════════════
   ДВИЖЕНИЕ: дорожка 1300 экранов прокрутки и кадр на ней
   ══════════════════════════════════════════════════════ */

.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

.motion .light {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
html:not(.motion) .light { display: none; }
.light__day,
.light__night {
  position: absolute;
  inset: 0;
}
.light__day { background: var(--paper); }
.light__night { background: var(--tone, #1C1A16); }
.glow {
  position: absolute;
  width: 150vmax;
  height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  border-radius: 50%;
  opacity: 0;
  will-change: opacity;
}
.glow--fajr { left: 25%; top: 120%; background: radial-gradient(closest-side, rgba(170, 184, 198, .05), rgba(170, 184, 198, .02) 55%, rgba(170, 184, 198, 0)); }
.glow--noon { left: 45%; top: -30%; background: radial-gradient(closest-side, rgba(243, 234, 220, .04), rgba(243, 234, 220, .015) 55%, rgba(243, 234, 220, 0)); }
.glow--asr { left: 75%; top: -10%; background: radial-gradient(closest-side, rgba(214, 164, 102, .06), rgba(214, 164, 102, .022) 55%, rgba(214, 164, 102, 0)); }
.glow--maghrib { left: 100%; top: 90%; background: radial-gradient(closest-side, rgba(184, 112, 61, .07), rgba(184, 112, 61, .025) 55%, rgba(184, 112, 61, 0)); }
.light__fiber {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100% + 320px);
  background: url("fiber.png");
  will-change: transform;
}

.motion .track {
  position: relative;
  height: calc(1300vh + 100vh);
  height: calc(1300svh + 100lvh);
}
.motion .frame {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  overflow: clip;
}
.motion .stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  --C: min(1200px, 100% - 96px);
  --L: calc((100% - var(--C)) / 2);
}

.motion .intro {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 100vh;
  height: 100svh;
  padding: 0;
  pointer-events: none;
}
.motion .intro__in {
  position: absolute;
  pointer-events: auto;
}

/* Всё в кадре стоит на своих местах; что видно, решает сцена. */
.motion .slot {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}
.motion .pane {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 11;
  visibility: hidden;
  transform-origin: 0 0;
}
.motion .pane.is-on { visibility: visible; }
.motion .win {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  overflow: hidden;
  contain: layout paint;
  box-shadow:
    0 0 0 1px rgba(243, 234, 220, .075),
    0 2px 5px rgba(0, 0, 0, .38),
    0 30px 72px -26px rgba(0, 0, 0, .78);
}
.mat {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.mat--night { background: var(--night) url("fiber.png") 113px 71px; opacity: 1; }
.mat--card { background: var(--sheet) url("fiber.png") 7px 11px; }
.mat--nudge { background: var(--pen) url("fiber.png") 31px 3px; }
.mat--people { background: var(--people) url("fiber.png") 31px 3px; }

.motion .pen,
.motion .ink {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}
.motion .pen { z-index: 12; }
.motion .ink { z-index: 13; width: 100%; height: 100%; }
.pen path,
.ink path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pen .run-m { stroke: #fff; stroke-width: 7; }
.ink .ink-a { stroke: var(--wax); stroke-width: 1.4; }
.ink .ink-b { stroke: var(--ink); stroke-width: 1.4; stroke-opacity: .8; }

/* Слова сцен: каждая на своём месте, скрытые прозрачны, но читаются. */
.motion .player__head,
.motion .player__ctl,
.motion .player__cap,
.motion .inside__cap,
.motion .item__words,
.motion .day__words,
.motion .tabs,
.motion .ribbon,
.motion .together__cap,
.motion .family__words,
.motion .friends__words,
.motion .race__words,
.motion .name__word,
.motion .name__mean,
.motion .hadith {
  position: absolute;
  z-index: 20;
}
.motion .player__head,
.motion .player__ctl,
.motion .player__cap { z-index: 5; }
.motion .ribbon { z-index: 12; }

.motion .family__words .line,
.motion .friends__words .line {
  position: absolute;
  left: 0;
  right: 0;
}

.motion .tabs {
  display: flex;
  gap: 10px;
}
.motion .station {
  position: absolute;
  top: 0;
  left: 0;
}
.motion .ribbon__line {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
}
.ribbon__line path { fill: none; stroke: var(--ink); stroke-linecap: round; }
.ribbon__line .rb-a { stroke-width: 1.4; stroke-opacity: .42; }
.ribbon__line .rb-b { stroke-width: 1.8; stroke-opacity: .92; }

/* Лист «Сегодня» в окне: слова без бумаги, бумагу даёт окно. */
.motion .pane--today { overflow: visible; }
.motion .plate { background: none; }
.motion .pane--board { color: var(--ink); }
.motion .ch__road,
.motion .ch__name { display: none; }

.motion .board__road {
  position: absolute;
}
.board__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.board__labels {
  position: absolute;
  inset: 0;
}
.bl {
  position: absolute;
  white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}
.bl > span { display: inline-block; }
.bl-day { color: var(--ink-3); font-size: 10.5px; font-weight: 600; }
.bl-row { display: flex; align-items: baseline; gap: 0; }
.bl-place { color: var(--ink-3); font-size: 12.5px; }
.bl-name { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.bl-name.is-mine { font-weight: 700; }
.bl-count { color: var(--ink-3); font-size: 11.5px; }
.bl-side { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; }
.bl-clip { display: block; overflow: hidden; overflow: clip; padding-bottom: .15em; margin-bottom: -.15em; }

.motion .board__tabs {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  column-gap: 30px;
  row-gap: 6px;
}
.motion .ch > * { position: absolute; }

/* Имя: слово письмом, окно садится чертой над ق. */
.motion .name__ar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.motion .name__svg {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.motion .name__mean,
.motion .hadith { color: var(--text); left: 16px; right: 16px; }
.motion .hadith__ru { color: var(--text); }

.motion .get { color: var(--text); }

/* Без шрифта слова сцен не показываются: строки делит SplitText. */
.motion:not(.is-ready) .stage { visibility: hidden; }
.motion:not(.is-ready) .intro__in { visibility: hidden; }

/* ─── гнёзда окна и места слов: компьютер ────────────── */

.motion .intro,
.motion .stage {
  --C: min(1200px, 100% - 96px);
  --L: calc((100% - var(--C)) / 2);
}
.motion .tab .tab__pen { color: var(--ink); }
.motion .tab .ph { stroke-width: .9; stroke-opacity: .34; }
.motion .tab .pt { stroke-width: 1.2; stroke-opacity: .5; }
.motion .tab .pb { stroke-width: 1.1; stroke-opacity: .5; }
.motion .tab[aria-current="page"] { font-weight: 600; }

.motion .ribbon { top: 0; left: 0; width: 0; height: 0; }
.motion .station {
  top: auto;
  bottom: -4px;
  width: 84px;
  margin-left: -42px;
}
.motion .station__ring { bottom: -8px; }
.motion .name__mean,
.motion .hadith { top: 0; }

@media (min-width: 1024px) {
  .motion .intro__in {
    left: var(--L);
    top: 50%;
    width: calc(var(--C) * .48);
    transform: translateY(-50%);
  }
  .motion .slot[data-slot="player"] {
    --h: clamp(380px, calc(100svh - 312px), 588px);
    height: var(--h);
    width: calc(var(--h) * .7687);
    left: calc(var(--L) + var(--C) - var(--h) * .7687);
    top: calc(50svh - var(--h) / 2);
  }
  .motion .slot[data-slot="phone"] {
    --h: 78svh;
    height: var(--h);
    width: calc(var(--h) * .46);
    left: calc(var(--L) + .8117 * var(--C) - var(--h) * .23);
    top: 11svh;
  }
  .motion .slot[data-slot="sheet"] {
    width: calc(.45 * var(--C));
    left: calc(var(--L) + .395 * var(--C));
    top: max(196px, 25.3svh);
    height: calc(100svh - max(196px, 25.3svh) - 28px);
  }
  /* Семья и друзья: окно и слова парой по центру экрана; окно от 1280 точек
     шириной 560, слова на пластине растут вместе с ним. */
  .motion .stage {
    --cw: clamp(460px, 43.75%, 560px);
    --ww: min(440px, calc(.367 * var(--C)));
    --pg: clamp(72px, 7%, 104px);
    --pl: calc((100% - var(--cw) - var(--pg) - var(--ww)) / 2);
  }
  .motion .slot[data-slot="card"] {
    width: var(--cw);
    left: var(--pl);
    top: 50svh;
    height: 0;
  }
  .motion .slot[data-slot="board"] {
    width: min(1080px, 84%);
    left: calc(50% - min(1080px, 84%) / 2);
    top: max(220px, 27.8svh);
    height: min(560px, calc(100svh - max(220px, 27.8svh) - 36px));
  }

  .motion .inside__cap {
    left: var(--L);
    top: calc(50svh - 128px);
  }
  .motion .item__words {
    left: var(--L);
    top: calc(50svh - 94px);
    width: calc(.333 * var(--C));
  }
  .motion .item .line { margin-top: 14px; max-width: 18em; }
  .motion .day__words {
    left: var(--L);
    top: max(196px, 25.3svh);
    width: calc(.34 * var(--C));
  }
  .motion .day__words .line { margin-top: 14px; }
  .motion .together__cap {
    left: calc(var(--pl) + var(--cw) + var(--pg));
    top: calc(50svh - 128px);
  }
  .motion .together__cap.is-race {
    left: calc(50% - min(1080px, 84%) / 2);
    top: calc(max(220px, 27.8svh) - 150px);
  }
  .motion .family__words,
  .motion .friends__words {
    left: calc(var(--pl) + var(--cw) + var(--pg));
    top: calc(50svh - 94px);
    width: var(--ww);
  }
  .motion .family__words .line,
  .motion .friends__words .line { top: 62px; }
  .motion .race__words {
    left: calc(50% - min(1080px, 84%) / 2);
    top: calc(max(220px, 27.8svh) - 124px);
    width: min(820px, 58%);
  }
  .motion .race__words .line { margin-top: 10px; }

  .motion .board__tabs { left: 28px; top: 22px; right: 40%; }
  .motion .ch > .ch__about { left: calc(60% + 56px); right: 32px; top: 80px; }
  .motion .ch > .figs { left: calc(60% + 56px); right: 32px; top: 168px; }
  .motion .ch > .ch__say { left: calc(60% + 56px); right: 32px; top: 262px; }
}

/* ─── телефон: полоса слов сверху, окно под ней ──────── */

@media (max-width: 1023px) {
  .motion .intro__in {
    left: 16px;
    right: 16px;
    top: 72px;
  }
  .motion .intro .stores { margin-top: 16px; flex-wrap: nowrap; }
  .motion .slot[data-slot="player"] {
    --top: clamp(250px, 38svh, 320px);
    --h: min(390px, calc(100svh - var(--top) - 134px));
    height: var(--h);
    width: calc(var(--h) / 1.3);
    left: calc(50% - var(--h) / 2.6);
    top: var(--top);
  }
  .motion .slot[data-slot="phone"] {
    --top: clamp(236px, 33svh, 282px);
    --h: min(540px, calc(100svh - var(--top) - 34px));
    height: var(--h);
    width: calc(var(--h) * .46);
    left: calc(50% - var(--h) * .23);
    top: var(--top);
  }
  .motion .slot[data-slot="sheet"] {
    left: 16px;
    width: calc(100% - 32px);
    top: 262px;
    height: calc(100svh - 286px);
  }
  .motion .slot[data-slot="card"] {
    left: 16px;
    width: calc(100% - 32px);
    top: calc(50svh + 52px);
    height: 0;
  }
  .motion .slot[data-slot="board"] {
    left: 16px;
    width: calc(100% - 32px);
    top: 262px;
    height: min(560px, calc(100svh - 278px));
  }

  /* Полоса слов начинается под шапкой: когда она выезжает, ей есть где встать. */
  .motion .inside__cap,
  .motion .together__cap { left: 16px; right: 16px; top: 72px; }
  .motion .item__words,
  .motion .family__words,
  .motion .friends__words,
  .motion .race__words { left: 16px; right: 16px; top: 100px; }
  .motion .day__words { left: 16px; right: 16px; top: 72px; }
  .motion .item .line,
  .motion .day__words .line,
  .motion .race__words .line { margin-top: 8px; }
  .motion .family__words .line,
  .motion .friends__words .line { top: 40px; }
  .motion .together__cap.is-race { top: 72px; }
  .motion .race__words { top: 100px; }

  .motion .station { width: 72px; margin-left: -36px; }
  .motion .station__name { font-size: 11px; }
  .motion .station__ring { width: 40px; height: 40px; margin-left: -20px; bottom: -8px; }
  .motion .tab { height: 32px; padding: 0 12px; font-size: 14px; }
  .motion .tabs { gap: 8px; }

  .motion .board__tabs { left: 16px; right: 16px; top: 14px; column-gap: 26px; }
  .motion .btab { font-size: 13px; }
  .motion .ch > .ch__about { left: 16px; right: 16px; top: 94px; font-size: 15px; line-height: 1.4; }
  .motion .ch > .figs { left: 16px; right: 16px; top: 166px; }
  .motion .ch > .ch__say { left: 16px; right: 16px; top: 228px; font-size: 14.5px; line-height: 1.4; }
  .motion .fig__val b { font-size: 24px; }
}
@media (max-width: 1023px) and (max-height: 700px) {
  .motion .intro__title { font-size: 30px; }
}
@media (max-width: 639px) {
  html:not(.motion) .fig__val > span { display: block; }
}
