/* Калькулятор матрицы судьбы (luceaweb.ru/matrica-sudby).
   Поверх /styles.css: токены, фон, шрифты и подвал — оттуда. */

.mx main.mx-main {
  max-width: 640px;
  padding: 0 20px;
}

/* ----- Шапка ----- */

.mx-top {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 20px 0;
}

.mx-top__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.12em;
}

.mx-top__brand img {
  width: 28px;
  height: 28px;
}

/* ----- Герой и форма ----- */

.mx-hero {
  padding: 40px 0 28px;
  text-align: center;
}

.mx-eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.mx-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(38px, 9vw, 56px);
  line-height: 1.04;
  color: var(--gold-bright);
  text-shadow: 0 0 40px rgba(244, 199, 87, 0.18);
}

.mx-title__soft {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  font-size: 0.62em;
  margin-top: 6px;
}

.mx-lead {
  margin: 18px auto 0;
  max-width: 470px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

.mx-form {
  margin: 28px auto 0;
  max-width: 420px;
  display: grid;
  gap: 14px;
  text-align: left;
}

.mx-field {
  display: grid;
  gap: 6px;
}

.mx-field__label {
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.02em;
}

.mx-field__hint {
  color: var(--text-muted);
  font-size: 12px;
  margin-left: 4px;
}

.mx-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(42, 29, 16, 0.72);
  color: var(--text);
  font: 500 17px/1 var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.mx-input--date {
  font-size: 20px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.mx-input::placeholder {
  color: #6F5F48;
  letter-spacing: 0.02em;
}

.mx-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 166, 64, 0.18);
}

.mx-input[aria-invalid="true"] {
  border-color: #C8704B;
}

.mx-error {
  min-height: 1.2em;
  margin: -4px 0 0;
  color: #E59A72;
  font-size: 14px;
}

.mx-error:empty {
  min-height: 0;
  margin: 0;
}

/* ----- Кнопки ----- */

.mx-btn {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font: 600 16px/1 var(--font-body);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mx-btn:active {
  transform: scale(0.98);
}

.mx-btn:focus-visible,
.mx-unlock:focus-visible,
.mx-store:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

.mx-btn--primary {
  color: #1A0F08;
  background: linear-gradient(135deg, #C9973A 0%, #F4C757 50%, #D4A640 100%);
  box-shadow: 0 8px 28px rgba(244, 199, 87, 0.22);
}

.mx-btn--primary:hover {
  box-shadow: 0 10px 34px rgba(244, 199, 87, 0.34);
}

.mx-btn--ghost {
  color: var(--gold-bright);
  background: transparent;
  border: 1px solid var(--gold-dark);
}

.mx-btn--text {
  color: var(--text-muted);
  background: transparent;
  min-height: 44px;
}

/* ----- Результат ----- */

.mx-result {
  padding: 24px 0 8px;
  scroll-margin-top: 12px;
  outline: none;
}

.mx-result__title {
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.1;
  color: var(--gold-bright);
}

.mx-result__date {
  text-align: center;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.mx-scheme {
  margin: 22px auto 8px;
  max-width: 340px;
}

.mx-scheme svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.mx-lines line {
  stroke: rgba(212, 166, 64, 0.42);
  stroke-width: 1.4;
}

.mx-node circle {
  fill: #22160C;
  stroke: var(--gold-dark);
  stroke-width: 1.6;
}

.mx-node--main circle {
  stroke: var(--gold);
}

.mx-node--center circle {
  fill: #3A2812;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 10px rgba(244, 199, 87, 0.35));
}

.mx-node text {
  fill: var(--text);
  font: 600 16px var(--font-body);
  text-anchor: middle;
}

.mx-node--center text {
  fill: var(--gold-bright);
  font-size: 21px;
  font-weight: 700;
}

.mx-h3 {
  margin: 30px 0 12px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  color: var(--text);
}

.mx-cards {
  display: grid;
  gap: 12px;
}

.mx-card {
  position: relative;
  border-radius: 18px;
  padding: 16px 16px 18px;
  background: linear-gradient(180deg, rgba(42, 29, 16, 0.9), rgba(30, 20, 11, 0.9));
  border: 1px solid var(--border);
  overflow: hidden;
}

.mx-card--open {
  border-color: rgba(212, 166, 64, 0.5);
  box-shadow: 0 0 0 1px rgba(212, 166, 64, 0.08), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.mx-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mx-card__badge {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--gold);
  color: var(--gold-bright);
  font: 700 17px/1 var(--font-body);
  background: #22160C;
}

.mx-card__role {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mx-card__arcana {
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--gold-bright);
  line-height: 1.15;
  font-variant-numeric: lining-nums;
}

.mx-card__body {
  margin-top: 12px;
}

.mx-card__text {
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.6;
}

/* Размытие закрытых блоков */
.mx-blur {
  filter: blur(6px);
  opacity: 0.55;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  max-height: 96px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
}

.mx-skeleton {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.mx-skeleton span {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: rgba(232, 224, 208, 0.5);
}

.mx-skeleton span:nth-child(2) { width: 86%; }
.mx-skeleton span:nth-child(3) { width: 64%; }

.mx-unlock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(212, 166, 64, 0.65);
  background: rgba(26, 15, 8, 0.86);
  color: var(--gold-bright);
  font: 600 14px/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

.mx-unlock svg {
  width: 16px;
  height: 16px;
}

.mx-card--locked .mx-card__body {
  min-height: 74px;
}

.mx-locklist {
  list-style: none;
  display: grid;
  gap: 12px;
}

.mx-locklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 15.5px;
}

.mx-locklist svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--gold-dark);
}

.mx-unlock--inline {
  position: static;
  transform: none;
  margin: 18px auto 0;
  display: flex;
}

/* ----- Призыв скачать ----- */

.mx-cta {
  margin: 26px 0 6px;
  padding: 22px 18px;
  border-radius: 22px;
  text-align: center;
  border: 1px solid rgba(212, 166, 64, 0.45);
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(244, 199, 87, 0.14), rgba(244, 199, 87, 0) 70%),
    #20140A;
}

.mx-cta--pulse {
  animation: mx-pulse 1.2s ease-out 1;
}

@keyframes mx-pulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 199, 87, 0.55); }
  100% { box-shadow: 0 0 0 18px rgba(244, 199, 87, 0); }
}

.mx-cta__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  color: var(--gold-bright);
  line-height: 1.15;
}

.mx-cta__text {
  margin: 10px auto 0;
  max-width: 440px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

.mx-stores {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.mx-store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-height: 54px;
  min-width: 150px;
  padding: 8px 18px;
  border-radius: 14px;
  border: 1px solid var(--gold-dark);
  color: var(--text);
  background: rgba(15, 8, 5, 0.6);
}

.mx-store--primary {
  flex: 1 1 100%;
  max-width: 320px;
  align-items: center;
  color: #1A0F08;
  border: 0;
  background: linear-gradient(135deg, #C9973A 0%, #F4C757 50%, #D4A640 100%);
  box-shadow: 0 8px 28px rgba(244, 199, 87, 0.24);
}

.mx-stores--equal .mx-store {
  flex: 1 1 0;
  min-width: 0;
  max-width: 180px;
  align-items: center;
}

.mx-store__sub {
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.mx-store__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.mx-stores__note {
  flex: 1 1 100%;
  font-size: 13px;
  color: var(--text-muted);
}

.mx-qr {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
}

.mx-qr__item img {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}

.mx-qr__item figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ----- Поделиться ----- */

.mx-share {
  margin: 28px auto 0;
  max-width: 420px;
  display: grid;
  gap: 10px;
}

.mx-share__note {
  min-height: 1.2em;
  text-align: center;
  color: var(--gold);
  font-size: 14px;
}

/* ----- Текст для поиска ----- */

.mx-about {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.65;
}

.mx-about p + .mx-h2,
.mx-about ul + .mx-h2 {
  margin-top: 28px;
}

.mx-h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  color: var(--gold-bright);
  margin-bottom: 10px;
  line-height: 1.2;
}

.mx-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.mx-list b {
  color: var(--gold-bright);
  font-weight: 600;
}

.mx-faq {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.mx-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mx-faq summary::-webkit-details-marker {
  display: none;
}

.mx-faq summary::after {
  content: "+";
  color: var(--gold);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
}

.mx-faq[open] summary::after {
  content: "−";
}

.mx-faq p {
  margin-top: 8px;
  color: var(--text-muted);
}

.mx-footer {
  margin-top: 48px;
}

.mx-footer .footer__word a {
  color: inherit;
}

@media (max-width: 400px) {
  .mx main.mx-main,
  .mx-top {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mx-store {
    min-width: 0;
    flex: 1 1 40%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mx-cta--pulse {
    animation: none;
  }
}
