/* 23.10 — страница матрицы: живой диск у формы (zvezda.js, #zvezda-zhivaya) и тёмная полная схема (matrica-temn.js).
   Цвета схемы берутся из атрибутов Modeli.svgMatrica: лист #fbf6ec, чернила #2e2a3a, линия #c9b99c, личность #7a5584,
   род #6e8c69. Свойства CSS сильнее атрибутов — PDF (своя копия svg) остаётся светлым. */
/* до расчёта: слева шапка и форма, справа диск 300 px — по центру окна расчёта (Паша + GPT, 23.10, вариант «В»):
   легенды нет, формула всплывает у числа (zvezda.js → plavat). В строке сетки .kalk даёт 24 px сверху и 40 снизу —
   margin-bottom 16 px сдвигает центр диска на центр карточки формы. */
.t-matr-verh{display:grid;grid-template-columns:minmax(0,1fr) 300px;column-gap:48px;align-items:start}
.t-matr-verh>section{padding-left:0;padding-right:0}
.t-matr-verh>.vnutr-shapka{grid-column:1;grid-row:1}
.t-matr-verh>.kalk{grid-column:1;grid-row:2}
#zvezda-zhivaya{grid-column:2;grid-row:2;align-self:center;width:100%;margin-bottom:16px;position:relative}
#zvezda-zhivaya .zv-legenda{display:none}
#zvezda-zhivaya .zv-info{position:absolute;z-index:3;width:max-content;max-width:230px;min-height:0;margin:0;padding:6px 11px;font-size:12.5px;line-height:1.3;
  box-shadow:0 10px 24px -10px #1c171880,inset 0 0 0 1px var(--a-line);pointer-events:none;opacity:0;transform:translateY(4px);
  transition:opacity .25s,transform .25s,left .35s cubic-bezier(.2,.7,.2,1),top .35s cubic-bezier(.2,.7,.2,1),bottom .35s cubic-bezier(.2,.7,.2,1)}
#zvezda-zhivaya .zv-info.zv-info-vidna{opacity:1;transform:none}
#zvezda-zhivaya .zv-info-zag{font-size:10px;letter-spacing:.06em}
#zvezda-zhivaya .zv-info-f{font-size:14px}
/* 901–1100 px: справа у края висят ярлыки «Telegram-канал / Заказать разбор» — диск от них отодвинут */
@media (min-width:901px) and (max-width:1100px){.t-matr-verh{column-gap:32px}#zvezda-zhivaya{width:auto;margin-right:40px}}
@media (max-width:900px){
  .t-matr-verh{display:flex;flex-direction:column}
  #zvezda-zhivaya{max-width:330px;margin:0 auto 32px}
  /* телефон: легенда и подсказка — под диском, как на главной */
  #zvezda-zhivaya .zv-legenda{display:flex;margin-top:12px;font-size:13px}
  #zvezda-zhivaya .zv-info{position:static;width:auto;margin-top:8px;opacity:1;transform:none;box-shadow:inset 0 0 0 1px var(--a-line)}
}

/* после расчёта: одна звезда — в результате; сетка распадается, форма — строкой «пол · дата · Пересчитать» */
.t-est-rezultat .t-matr-verh{display:block}
.t-est-rezultat #zvezda-zhivaya{display:none}
.t-est-rezultat #forma-matrica{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;padding:16px 24px}
.t-est-rezultat #forma-matrica::before{display:none}
.t-est-rezultat #forma-matrica .pol-vybor{border:0;padding:0;margin:0;gap:8px}
.t-est-rezultat #forma-matrica .pol-vybor legend,.t-est-rezultat #forma-matrica label[for="m-data"]{position:absolute;width:1px;height:1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.t-est-rezultat #forma-matrica .pol-vybor span{min-height:44px;min-width:0;padding:0 20px}
.t-est-rezultat #forma-matrica .kalk-stroka{flex:1 1 380px;gap:12px}
.t-est-rezultat #forma-matrica .kalk-stroka .btn{margin:0}
.t-est-rezultat #forma-matrica .oshibka{flex-basis:100%}
@media (max-width:600px){.t-est-rezultat #forma-matrica{padding:14px}.t-est-rezultat #forma-matrica .pol-vybor{flex:1 1 100%}}

#matrica-svg.mt-temn{overflow:visible}
.rezultat-shema:has(.mt-temn){display:flex;flex-direction:column;align-items:center}
.mt-temn .mt-fon{pointer-events:none}
.mt-temn .zv-obod{stroke-opacity:.45}
.mt-vrashch,.mt-luchi,.mt-svet{transform-box:view-box;transform-origin:320px 320px}
.mt-vrashch{animation:zv-krug 160s linear infinite}
.mt-luchi{stroke:#f2df6c;stroke-opacity:.55;stroke-width:1.4;stroke-linecap:round;animation:zv-krug 48s linear infinite reverse}
.mt-svet{transform-box:fill-box;transform-origin:center}

/* перекраска схемы */
.mt-temn [stroke="#c9b99c"]{stroke:#f2df6c;stroke-opacity:.38}
.mt-temn circle[fill="#fbf6ec"]{fill:#241d1f}
.mt-temn text[fill="#2e2a3a"]{fill:#fffdf8}
.mt-temn text[fill="#5e5668"]{fill:#f2df6c;fill-opacity:.8}
.mt-temn [stroke="#7a5584"]{stroke:#e8806f}
.mt-temn path[stroke="#7a5584"]{filter:drop-shadow(0 0 3px #e8806f88)}
.mt-temn [stroke="#6e8c69"]{stroke:#8fb0bc}
.mt-temn path[stroke="#6e8c69"]{filter:drop-shadow(0 0 3px #8fb0bc77)}
.mt-temn circle[fill="#7a5584"]{fill:#e8806f}
.mt-temn circle[fill="#2e2a3a"]{fill:#f2df6c;stroke:#fff6c2;stroke-width:2}
.mt-temn .mt-centr text{fill:#1c1718}
.mt-temn circle[fill="#a9853a"]{fill:#e2c63a;stroke:#e2c63a}
.mt-temn path[stroke="#a9853a"]{stroke:#e2c63a}
.mt-temn [stroke="#c98a72"]{stroke:#f0a58b}
.rezultat-shema:has(.mt-temn) .shema-legenda .tochka.svet{background:#e8806f!important}
.rezultat-shema:has(.mt-temn) .shema-legenda .tochka:not(.svet):not(.kontur){background:#e2c63a!important}

/* крупные числа нажимаются */
.mt-uzel{cursor:pointer;outline:none}
.mt-uzel circle{transition:stroke-width .25s,filter .25s}
.mt-uzel.mt-akt circle,.mt-uzel:focus-visible circle{stroke-width:3.6;filter:drop-shadow(0 0 6px #f2df6caa)}
.mt-lich.mt-akt circle{fill:#3b2524}
.mt-rod.mt-akt circle{fill:#22313a}
.mt-centr.mt-akt circle{fill:#f2df6c}
.mt-info,.zv-info{display:block!important;margin:12px auto 0!important;width:100%!important;max-width:340px!important;box-sizing:border-box!important;align-self:center!important;text-align:center!important}
@media (max-width:480px){.mt-info,.zv-info{max-width:calc(100% - 16px)!important;margin:10px auto 0!important;padding:8px 12px!important;font-size:13px!important}}

@media (prefers-reduced-motion:reduce){.mt-vrashch,.mt-luchi,.mt-svet{animation:none}}
