/* === ATMA Reports, Matrix, Pickers === */
/* Extracted from components.css -- Step 2 */

/* Report Header */
.report-header {
  text-align: center;
  padding: 16px 0 24px;
}
.report-icon {
  width: 112px;
  height: 112px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.report-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0;
}
#report-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
#report-subtitle {
  color: var(--label);
  font-size: 13px;
  margin-top: 6px;
  letter-spacing: 0.01em;
}

/* Report Body */
.report-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Р В Р Р‹Р В РЎвЂР В Р’В»Р РЋР Р‰Р В Р вЂ¦Р РЋРІР‚в„–Р В Р’Вµ Р РЋР С“Р РЋРІР‚С™Р В РЎвЂўР РЋР вЂљР В РЎвЂўР В Р вЂ¦Р РЋРІР‚в„– / Р В Р’В Р В РЎвЂР РЋР С“Р В РЎвЂќР В РЎвЂ */

/* Р В РІР‚СњР В Р’ВµР В Р вЂ¦Р РЋР Р‰Р В РЎвЂ“Р В РЎвЂ / Р В РЎвЂєР РЋРІР‚С™Р В Р вЂ¦Р В РЎвЂўР РЋРІвЂљВ¬Р В Р’ВµР В Р вЂ¦Р В РЎвЂР РЋР РЏ */

/* Р В РІР‚вЂњР В РЎвЂР В Р’В·Р В Р вЂ¦Р В Р’ВµР В Р вЂ¦Р В Р вЂ¦Р РЋРІР‚в„–Р В РІвЂћвЂ“ Р РЋРЎвЂњР РЋР вЂљР В РЎвЂўР В РЎвЂќ */

/* Футер */

/* ══════════════════════════════════════════
   Mobile polish — Telegram WebView
   ══════════════════════════════════════════ */
@media (max-width: 420px) {
  .report-section {
    padding: 16px 14px;
  }
  .report-section h3 {
    font-size: 15px;
  }
  .report-section p,
  .desc-text,
  .hd-desc-long {
    font-size: 14px;
  }
  .callout {
    padding: 14px 14px;
  }
  .hd-hero-label {
    min-width: 72px;
    font-size: 11px;
  }
  .hd-hero-value {
    font-size: 15px;
  }
  .hd-type-emoji {
    font-size: 44px;
  }
  .hd-type-title {
    font-size: 20px;
  }
  #report-title {
    font-size: 20px;
  }
  .archetype-big {
    font-size: 18px;
  }
  .hd-stats {
    gap: 16px;
  }
  .hd-stat-num {
    font-size: 24px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   MATRIX DESTINY Р Р†Р вЂљРІР‚Сњ Р В РЎС™Р В Р’В°Р РЋРІР‚С™Р РЋР вЂљР В РЎвЂР РЋРІР‚В Р В Р’В° Р В Р Р‹Р РЋРЎвЂњР В РўвЂР РЋР Р‰Р В Р’В±Р РЋРІР‚в„– Р В Р вЂ Р В РЎвЂР В Р’В·Р РЋРЎвЂњР В Р’В°Р В Р’В»Р В РЎвЂР В Р’В·Р В Р’В°Р РЋРІР‚В Р В РЎвЂР РЋР РЏ
   ══════════════════════════════════════════════════════════════════════════ */

.matrix-header-card {
  text-align: center;
  background: var(--tile-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.matrix-header-card h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--label);
}

/* Контейнер карты */
.matrix-destiny-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Accordion items */
.df-accordion.open .df-acc-chevron {
  transform: rotate(180deg);
}
.df-accordion.open .df-accordion-body {
  max-height: 600px;
  padding: 0 14px 14px;
}

/* Inner text */


/* ══════════════════════════════════════
   Source: matrix.css
   ══════════════════════════════════════ */


.matrix-section-card {
  background: var(--tile-bg);
  border-radius: var(--radius);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  border: 1px solid var(--border);
}
.matrix-section-card:active {
  transform: scale(0.97);
}
.matrix-section-card.locked {
  opacity: 0.7;
}
.matrix-section-card .section-icon {
  font-size: 28px;
}
.matrix-section-card .section-title {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  color: var(--text-primary);
}
.matrix-section-card .section-lock {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 14px;
}
.matrix-section-card .section-arrow {
  color: var(--label);
  font-size: 16px;
}

/* Locked Section Card */
.matrix-locked-section .btn.large {
  padding: 14px 24px;
  font-size: 16px;
  width: 100%;
  margin-bottom: 12px;
}

/* Biorhythm sync */


/* Matrix pair */
.matrix-pair-info .label {
  font-size: 12px;
  color: var(--label);
  display: block;
}
.matrix-pair-info .value {
  font-size: 14px;
}
.matrix-pair-info .value.arcana {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}
.matrix-col .label {
  font-weight: 600;
}
.matrix-col .value {
  font-size: 12px;
  color: var(--label);
}


/* Verdict */


/* ══════════════════════════════════════════════════════
   Picker Overlay — Bottom Sheet (DatePicker / TimePicker)
   Appended to document.body, position: fixed.
   Visibility: .pk-visible class only. No inline styles.
   ══════════════════════════════════════════════════════ */

/* Overlay scrim */
.pk-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.pk-overlay.pk-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Bottom sheet */
.pk-sheet {
  width: 100%;
  max-width: 400px;
  background: var(--tile-bg);
  border-radius: 16px 16px 0 0;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.pk-overlay.pk-visible .pk-sheet {
  transform: translateY(0);
}

/* Header */
.pk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.pk-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.pk-btn {
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
}
.pk-cancel { color: var(--text-secondary); }
.pk-done   { color: var(--accent); }

/* Labels */
.pk-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-align: center;
}

/* Selects row */
.pk-selects {
  display: flex;
  gap: 10px;
  padding: 16px 18px 8px;
  justify-content: center;
}
.pk-selects-time {
  gap: 6px;
  align-items: center;
}
.pk-field {
  flex: 1;
  min-width: 0;
}
.pk-field-wide {
  flex: 1.6;
}

/* Native select */
.pk-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  background-color: rgba(255,255,255,0.06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  text-align: center;
}
.pk-select:focus {
  outline: none;
  border-color: var(--accent);
  background-color: rgba(255,255,255,0.10);
}

/* Time separator */
.pk-sep {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-secondary);
  padding-top: 22px;
}

/* Decade buttons */
.pk-decades {
  display: flex;
  gap: 6px;
  padding: 8px 18px 4px;
  justify-content: center;
  flex-wrap: wrap;
}
.pk-decade-btn {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  opacity: 0.6;
}
.pk-decade-btn.active {
  background: var(--text-primary);
  color: var(--bg-main);
  border-color: var(--text-primary);
  opacity: 1;
}

/* Quick minute row */
.pk-quick-row {
  display: flex;
  gap: 8px;
  padding: 8px 18px 4px;
  justify-content: center;
}
.pk-quick-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  opacity: 0.6;
}
.pk-quick-btn.active {
  background: var(--text-primary);
  color: var(--bg-main);
  border-color: var(--text-primary);
  opacity: 1;
}

/* Hint */
.pk-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 10px 18px 6px;
}

/* ═══════════ 5. Forecast accordion — base states ═══════════ */
.df-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
}
.df-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.df-date {
  font-size: 11px;
  color: var(--label);
}
.df-loading {
  padding: 20px;
  text-align: center;
  color: var(--label);
  font-size: 12px;
}
.df-accordion {
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.df-accordion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.df-accordion-header:active {
  background: rgba(255,255,255,.04);
}
.df-acc-emoji {
  font-size: 16px;
  flex-shrink: 0;
}
.df-acc-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.df-acc-chevron {
  font-size: 11px;
  color: var(--label);
  transition: transform .2s;
  flex-shrink: 0;
}
.df-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 14px;
}
.df-line {
  font-size: 13px;
  color: var(--text-primary);
  margin: 0 0 6px;
  line-height: 1.4;
}
.df-text {
  font-size: 12px;
  color: var(--label);
  line-height: 1.5;
  margin: 0 0 8px;
}
.df-transit {
  font-size: 12px;
  color: var(--label);
  line-height: 1.5;
  margin: 4px 0;
}
.df-stats {
  font-size: 11px;
  color: var(--label);
  margin: 4px 0 0;
}

/* ═══════════ 6. Report pages — constrain all images ═══════════ */
.report-body img {
  max-width: 100%;
  height: auto;
}

/* ═══════════ Report content — max-width + z-index ═══════════ */
.report-body {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: var(--z-base);
}

/* ═══════════ Report Section base styles ═══════════ */
.report-section {
  background: var(--tile-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px; overflow: hidden; max-width: 100%; box-sizing: border-box;
}
.report-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.report-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  line-height: 1.35;
}
.report-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 6px;
  color: var(--accent);
}
.report-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  opacity: 0.92;
}
.report-section p + p {
  margin-top: 8px;
}
.report-section + .report-section {
  margin-top: 2px;
}
.callout-icon {
  font-size: 18px;
  margin-right: 8px;
  vertical-align: middle;
}
.callout-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.callout-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
  opacity: 0.9;
}
.callout-main {
  background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(96,165,250,0.08));
  border: 1px solid rgba(167,139,250,0.3);
  border-left: 4px solid var(--accent);
}
.callout-main .callout-title { color: var(--accent); }
.callout-tip {
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  border-left: 4px solid #34d399;
}
.callout-tip .callout-title { color: #34d399; }
.callout-risk {
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.2);
  border-left: 4px solid #fbbf24;
}
.callout-risk .callout-title { color: #fbbf24; }
.callout-green {
  background: rgba(16,185,129,0.1);
  border-left: 3px solid #10b981;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.callout-red {
  background: rgba(239,68,68,0.1);
  border-left: 3px solid #ef4444;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.callout-green h5, .callout-red h5 {
  font-size: 12px;
  margin-bottom: 6px;
}
.callout-green p, .callout-red p {
  font-size: 13px;
  line-height: 1.5;
}

/* ═══════════ Responsive: report sections ═══════════ */
@media (max-width: 360px) {
  .report-section p,
  .desc-text,
  .callout-body {
    font-size: 13px;
  }
  .report-section h3 {
    font-size: 14px;
  }
}

/* ── Step 10: Report overflow containment ── */
.report-body,
.report-section,
.report-header {
  max-width: 100%;
  overflow-x: hidden;
}
.report-section * {
  min-width: 0;
  max-width: 100%;
}
.report-section table {
  width: 100%;
  table-layout: fixed;
}
.report-section img {
  max-width: 100%;
  height: auto;
}
/* HD bodygraph table containment */
.hd-hero,
.hd-stats,
.hd-bodygraph-wrap,
[class*="bodygraph"] {
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Step 12: HD report extra containment ── */
/* Planet table rows */
.hd-planet-row,
.hd-gate-row,
[class*="planet-row"],
[class*="gate-row"] {
  display: flex;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.hd-planet-row > *,
.hd-gate-row > * {
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bodygraph image/SVG */
.bodygraph-container,
.bodygraph-img,
[class*="bodygraph"] {
  max-width: 100%;
  overflow: hidden;
}
.bodygraph-container img,
.bodygraph-container svg {
  max-width: 100%;
  height: auto;
}

/* Any absolutely positioned elements in reports */
.report-section {
  position: relative;
  overflow: hidden;
}

/* ── Step 13: HD report SVG + planet containment ── */
.report-section svg {
  max-width: 100%;
  height: auto;
  display: block;
}
/* Remove fixed width/height from SVG via CSS override */
.report-section svg[width],
.report-section svg[height] {
  width: 100% !important;
  height: auto !important;
  max-width: 400px;
}
/* Planet data rows */
.hd-planet-data,
.hd-gate-data,
[class*="planet"],
[class*="gate-row"] {
  max-width: 100%;
  overflow: hidden;
}
/* Astrology interpretation */
.astro-list,
.hd-interpretation {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
}
.astro-item {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}
.astro-item span {
  word-break: break-word;
  min-width: 0;
}


/* Astrology readability refresh */
.natal-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.nc-header {
  text-align: center;
  padding: 12px 16px 4px;
}
.nc-header h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}
.nc-subtitle {
  margin: 10px auto 0;
  max-width: 28rem;
  color: var(--subtext, #aeb7cf);
  font-size: 14px;
  line-height: 1.5;
}
.nc-chart-wrap {
  padding: 10px 0 2px;
}
.nc-block-title {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.2;
}
.nc-legend-card,
.element-balance-card,
.psych-summary,
.asc-block,
.mc-block {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 16px;
}
.planet-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
}
.pl-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pl-planet {
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
}
.pl-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 0;
}
.pl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pl-sign-badge,
.pl-degree,
.pl-house {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.3;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}
.pl-degree,
.pl-house {
  color: var(--text-secondary, #d8dceb);
}
.element-balance {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.eb-row {
  display: grid;
  grid-template-columns: minmax(96px, 116px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.eb-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.eb-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.eb-fill {
  height: 100%;
  border-radius: 999px;
}
.eb-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 44px;
}
.eb-count {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}
.eb-pct {
  font-size: 12px;
  color: var(--subtext, #aeb7cf);
}
.psych-triad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.psych-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px;
}
.psych-label {
  display: block;
  font-size: 12px;
  color: var(--subtext, #aeb7cf);
  margin-bottom: 6px;
}
.psych-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
}
.psych-desc,
.asc-desc,
.planet-desc,
.house-desc,
.acc-short,
.acc-deep,
.section-intro,
.df-text {
  line-height: 1.65;
}
.planet-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
}
.field-icon {
  font-size: 18px;
  line-height: 1;
  margin-top: 1px;
}
.astro-accordion-body {
  line-height: 1.6;
}
@media (max-width: 640px) {
  .nc-header h3 {
    font-size: 22px;
  }
  .nc-subtitle {
    font-size: 13px;
  }
  .pl-row {
    padding: 10px 12px;
  }
  .pl-name {
    font-size: 16px;
  }
  .pl-sign-badge,
  .pl-degree,
  .pl-house {
    font-size: 13px;
  }
  .eb-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .eb-side {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
  }
  .psych-triad {
    grid-template-columns: 1fr;
  }
}

/* ═══ Share buttons (natal chart) ═══ */
.nc-share-card {
  background: rgba(195, 47, 250, 0.06);
  border: 1px solid rgba(195, 47, 250, 0.2);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
}
.nc-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.nc-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.15s, opacity 0.15s;
}
.nc-share-btn:hover { transform: translateY(-1px); opacity: 0.92; }
.nc-share-tg   { background: #29A7E1; color: #fff; }
.nc-share-vk   { background: #4A76A8; color: #fff; }
.nc-share-copy { background: #393C44; color: #F2F1ED; }

/* ═══ Aspect table — readable planet names ═══ */
.asp-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto auto;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
}
.asp-row + .asp-row { border-top: 1px solid rgba(255,255,255,0.06); }
.asp-p1, .asp-p2 { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.asp-pname {
  font-size: 12px;
  color: #AAADB6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asp-type { font-size: 14px; padding: 0 4px; }
.asp-name { font-size: 12px; color: #868A94; white-space: nowrap; }
.asp-orb { font-size: 11px; color: #868A94; font-variant-numeric: tabular-nums; }

@media (max-width: 480px) {
  .asp-row {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "p1 type p2"
      "name name orb";
    row-gap: 2px;
  }
  .asp-p1 { grid-area: p1; }
  .asp-type { grid-area: type; }
  .asp-p2 { grid-area: p2; }
  .asp-name { grid-area: name; }
  .asp-orb { grid-area: orb; justify-self: end; }
}

/* ═══ Back-to-top floating button ═══ */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 88px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(195, 47, 250, 0.92);
  color: #fff;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition: opacity 0.2s, transform 0.2s;
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { transform: translateY(-2px); background: #A625D9; }
.back-to-top:active { transform: translateY(0); }

/* ═══ Numerology — Birthday Number / Forecast / Compatibility ═══ */
.nm-forecast-card {
  background: linear-gradient(135deg, rgba(195, 47, 250, 0.08), rgba(58, 71, 132, 0.08));
  border: 1px solid rgba(195, 47, 250, 0.18);
  border-radius: 16px;
}
.nm-forecast-item {
  padding: 10px 0;
}
.nm-forecast-item + .nm-forecast-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}
.nm-forecast-head {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: #F2F1ED;
}
.nm-forecast-short {
  color: #AAADB6;
  margin: 4px 0 8px;
  line-height: 1.5;
}

.nm-compat-card {
  background: rgba(255, 95, 145, 0.05);
  border: 1px solid rgba(255, 95, 145, 0.2);
  border-radius: 16px;
}
.nm-compat-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0 0;
}
.nm-compat-input {
  flex: 1 1 200px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  color: #F2F1ED;
  font-size: 14px;
  font-family: inherit;
  color-scheme: dark;
}
.cta-btn {
  padding: 10px 20px;
  border-radius: 12px;
  background: #C42FFA;
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.cta-btn:hover { background: #A625D9; }
.cta-btn:active { transform: translateY(1px); }
.cta-btn:disabled { opacity: 0.5; cursor: wait; }
.nm-compat-result {
  margin-top: 18px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}
.nm-compat-score {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin: 6px 0;
  font-variant-numeric: tabular-nums;
}
.nm-compat-score-green { color: #4ECCA3; }
.nm-compat-score-amber { color: #FFB347; }
.nm-compat-score-red   { color: #FF6B6B; }

/* ═══ Pythagoras Square 3x3 ═══ */
.pyth-card {
  background: rgba(195, 47, 250, 0.04);
  border: 1px solid rgba(195, 47, 250, 0.18);
  border-radius: 16px;
}
.pyth-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 14px 0 18px;
  max-width: 360px;
}
.pyth-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.12s, background 0.12s;
  user-select: none;
}
.pyth-cell:hover { transform: translateY(-2px); }
.pyth-cell-filled {
  background: linear-gradient(135deg, rgba(195, 47, 250, 0.18), rgba(255, 95, 145, 0.12));
  border: 1px solid rgba(195, 47, 250, 0.4);
}
.pyth-cell-empty {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.55;
}
.pyth-cell-num {
  font-size: 22px;
  font-weight: 700;
  color: #F2F1ED;
  line-height: 1;
}
.pyth-cell-dots {
  font-size: 12px;
  color: #C42FFA;
  letter-spacing: 1px;
  margin: 4px 0 2px;
  min-height: 14px;
}
.pyth-cell-label {
  font-size: 10px;
  color: #AAADB6;
  margin-top: 2px;
  line-height: 1.1;
}
.pyth-cell-tip {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  padding: 12px 14px;
  background: #17181B;
  border: 1px solid #C42FFA;
  border-radius: 12px;
  font-size: 12px;
  color: #F2F1ED;
  text-align: left;
  z-index: 100;
  opacity: 1 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 0 4px rgba(0, 0, 0, 0.6);
  white-space: normal;
  line-height: 1.5;
  pointer-events: none;
  /* Tooltip width: comfortable read width, clamped to viewport */
  width: 260px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  /* Default: center horizontally to cell */
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
/* Left-column cells (1, 4, 7): anchor tooltip to LEFT edge of cell */
.pyth-grid > .pyth-cell:nth-child(3n+1) .pyth-cell-tip {
  left: 0;
  right: auto;
  transform: translateX(0);
}
/* Right-column cells (3, 6, 9): anchor tooltip to RIGHT edge of cell */
.pyth-grid > .pyth-cell:nth-child(3n) .pyth-cell-tip {
  left: auto;
  right: 0;
  transform: translateX(0);
}
.pyth-cell { isolation: isolate; }
.pyth-cell.open { z-index: 100; }
.pyth-cell.open .pyth-cell-tip { display: block; }
/* Arrow pointer — adjusted per column */
.pyth-cell.open .pyth-cell-tip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: #17181B;
  border-left: 1px solid #C42FFA;
  border-top: 1px solid #C42FFA;
}
.pyth-grid > .pyth-cell:nth-child(3n+1).open .pyth-cell-tip::before {
  left: 24px;
  transform: rotate(45deg);
}
.pyth-grid > .pyth-cell:nth-child(3n).open .pyth-cell-tip::before {
  left: auto;
  right: 24px;
  transform: rotate(45deg);
}

.pyth-lines {
  margin-top: 18px;
}
.pyth-lines-title {
  font-size: 15px;
  margin: 0 0 8px;
  color: #F2F1ED;
}
.pyth-line {
  margin-bottom: 6px;
}
.pyth-line-sig {
  font-size: 11px;
  color: #868A94;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin-right: 8px;
}

/* ═══ Pinnacles + Challenges ═══ */
.pinnacles-timeline { margin-top: 10px; }
.pinnacle-card, .challenge-card, .karmic-debt-card .astro-accordion {
  margin-bottom: 6px;
}
.pin-phase {
  font-size: 11px;
  color: #C42FFA;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(195, 47, 250, 0.12);
  border-radius: 6px;
  margin-right: 8px;
}
.pin-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(195, 47, 250, 0.2);
  color: #F2F1ED;
  font-weight: 700;
  font-size: 13px;
  margin-right: 8px;
}
.karmic-num {
  background: rgba(255, 107, 107, 0.2);
  color: #FF6B6B;
}
.pin-age {
  font-size: 11px;
  color: #868A94;
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
}
.challenge-main {
  border: 1px solid rgba(255, 95, 145, 0.3);
  background: rgba(255, 95, 145, 0.04);
  border-radius: 10px;
}

/* ═══ Karmic debt ═══ */
.karmic-debt-card {
  background: rgba(255, 107, 107, 0.04);
  border: 1px solid rgba(255, 107, 107, 0.2);
}

/* ═══ Letter Analysis (Cornerstone / Capstone / First Vowel) ═══ */
.letter-analysis-card {
  background: rgba(78, 204, 163, 0.04);
  border: 1px solid rgba(78, 204, 163, 0.2);
  border-radius: 16px;
}
.letter-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.letter-row:first-of-type { border-top: none; }
.letter-big {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(195, 47, 250, 0.3), rgba(255, 95, 145, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: #F2F1ED;
  flex-shrink: 0;
}
.letter-body { flex: 1; min-width: 0; }
.letter-label {
  font-size: 11px;
  color: #AAADB6;
  margin-bottom: 2px;
}
.letter-title {
  font-size: 14px;
  font-weight: 600;
  color: #F2F1ED;
  margin: 2px 0 4px;
}

/* ═══ Human Design — Incarnation Cross + Deep Cards ═══ */
.hd-cross-card {
  background: linear-gradient(135deg, rgba(255, 95, 145, 0.06), rgba(195, 47, 250, 0.08));
  border: 1px solid rgba(255, 95, 145, 0.25);
  border-radius: 16px;
}
.hd-cross-angle {
  font-size: 14px;
  color: #FFB347;
  margin-bottom: 14px;
}
.hd-cross-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}
.hd-cross-cell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.hd-cross-cell.hd-cross-design {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.25);
}
.hd-cross-label {
  font-size: 11px;
  color: #AAADB6;
  margin-bottom: 4px;
}
.hd-cross-gate {
  font-size: 20px;
  font-weight: 700;
  color: #F2F1ED;
  font-variant-numeric: tabular-nums;
}
.hd-cross-sig {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: #AAADB6;
}
.hd-cross-sig code {
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'SF Mono', monospace;
  color: #F2F1ED;
}

.hd-deep-card {
  background: rgba(195, 47, 250, 0.04);
  border: 1px solid rgba(195, 47, 250, 0.18);
  border-radius: 16px;
}
.hd-archetype {
  font-size: 15px;
  color: #C42FFA;
  margin-bottom: 8px;
}
.hd-short-lead {
  font-size: 16px;
  font-style: italic;
  color: #F2F1ED;
  line-height: 1.5;
  margin: 8px 0 14px;
  padding-left: 12px;
  border-left: 3px solid #C42FFA;
}

/* ═══ HD Activated Gates — readable yellow tags (black on yellow) ═══ */
.hd-acc-tag {
  background: #FFE48A !important;
  color: #1A1A1A !important;
  border: 1px solid #C9A22A !important;
  border-left-width: 4px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}
.hd-acc-tag b,
.hd-acc-tag strong {
  color: #000 !important;
  font-weight: 700;
}
.hd-acc-tag.gift   { border-left-color: #16A34A !important; }
.hd-acc-tag.shadow { border-left-color: #C0392B !important; }
.hd-acc-tag.plus   { border-left-color: #2E7D32 !important; }
.hd-acc-tag.minus  { border-left-color: #B71C1C !important; }

/* HD gate-number badge — black on yellow */
.hd-acc-num {
  background: #FFE48A !important;
  color: #1A1A1A !important;
  border: 1px solid #C9A22A !important;
  font-weight: 800 !important;
}

/* HD summary stats round badges — black on yellow */
.hd-summary-num {
  background: #FFE48A !important;
  color: #1A1A1A !important;
  border: 2px solid #C9A22A !important;
  font-weight: 800 !important;
}

/* ═══ Matrix of Destiny — new visible blocks ═══ */
.matrix-purpose-card,
.matrix-karmic-card,
.matrix-line-card,
.matrix-task40-card,
.matrix-year-card {
  border-radius: 16px;
  border: 1px solid rgba(195, 47, 250, 0.18);
  background: rgba(195, 47, 250, 0.04);
}
.matrix-karmic-card {
  background: rgba(255, 107, 107, 0.05);
  border-color: rgba(255, 107, 107, 0.22);
}
.matrix-task40-card {
  background: rgba(78, 204, 163, 0.05);
  border-color: rgba(78, 204, 163, 0.22);
}
.matrix-year-card {
  background: rgba(255, 183, 71, 0.05);
  border-color: rgba(255, 183, 71, 0.25);
}
.mx-line-male   { background: rgba(64, 158, 255, 0.05); border-color: rgba(64, 158, 255, 0.22); }
.mx-line-female { background: rgba(255, 95, 145, 0.05); border-color: rgba(255, 95, 145, 0.22); }
.mx-line-talent { background: rgba(255, 215, 0, 0.05);  border-color: rgba(255, 215, 0, 0.25); }

.mx-purpose-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.mx-purpose-4 .purpose-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.mx-purpose-4 .purpose-label {
  font-size: 13px;
  font-weight: 600;
  color: #F2F1ED;
}
.mx-purpose-4 .purpose-age {
  font-size: 11px;
  color: #AAADB6;
}
.mx-purpose-4 .purpose-num {
  font-size: 32px;
  font-weight: 800;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.mx-purpose-4 .lvl-personal  .purpose-num { color: #4ECCA3; }
.mx-purpose-4 .lvl-earthly   .purpose-num { color: #FFB347; }
.mx-purpose-4 .lvl-spiritual .purpose-num { color: #C42FFA; }
.mx-purpose-4 .lvl-planetary .purpose-num { color: #5DADE2; }

@media (max-width: 480px) {
  .mx-purpose-4 { grid-template-columns: 1fr 1fr; }
  .mx-purpose-4 .purpose-num { font-size: 26px; }
}

/* ═══ Matrix sections — inline accordion ═══ */
.matrix-sections-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.matrix-section-acc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.matrix-section-acc[open] {
  border-color: rgba(195, 47, 250, 0.35);
  background: rgba(195, 47, 250, 0.05);
}
.matrix-section-acc-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-weight: 600;
}
.matrix-section-acc-summary::-webkit-details-marker { display: none; }
.matrix-section-acc-summary .section-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.matrix-section-acc-summary .section-title {
  flex: 1;
  font-size: 14px;
  color: #F2F1ED;
}
.matrix-section-acc-summary .section-chevron {
  font-size: 14px;
  color: #AAADB6;
  transition: transform 0.18s;
}
.matrix-section-acc[open] .section-chevron { transform: rotate(180deg); }
.matrix-section-acc-summary .section-lock {
  font-size: 14px;
  opacity: 0.6;
}
.matrix-section-acc.locked .matrix-section-acc-summary { opacity: 0.7; }

.matrix-section-acc-body {
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: #DEDDD7;
  line-height: 1.55;
}
.matrix-acc-placeholder {
  color: #868A94;
  font-style: italic;
  padding: 8px 0;
}
.matrix-acc-locked {
  padding: 14px;
  background: rgba(255, 183, 71, 0.06);
  border: 1px dashed rgba(255, 183, 71, 0.3);
  border-radius: 10px;
}
.matrix-acc-content {
  padding-top: 4px;
}
.matrix-section-text {
  margin: 8px 0;
}
.matrix-section-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.matrix-section-item:first-child { border-top: none; }
.section-item-icon {
  font-size: 18px;
  grid-row: span 2;
}
.section-item-title {
  font-weight: 600;
  color: #F2F1ED;
  grid-column: 2;
}
.section-item-text {
  color: #AAADB6;
  grid-column: 2;
}
.section-item-num {
  font-weight: 700;
  font-size: 18px;
  color: #C42FFA;
  grid-column: 3;
  grid-row: span 2;
}
.matrix-subsection {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #C42FFA;
  border-radius: 6px;
}
.matrix-subsection h4 { margin: 0 0 6px; font-size: 13px; color: #F2F1ED; }
.matrix-subsection p  { margin: 0; color: #AAADB6; }

/* Matrix accordion inline content extras */
.matrix-acc-lead {
  font-size: 13.5px;
  color: #DEDDD7;
  line-height: 1.55;
  margin: 8px 0 12px;
}
.matrix-acc-arcana {
  display: inline-block;
  padding: 6px 10px;
  background: rgba(195, 47, 250, 0.12);
  border: 1px solid rgba(195, 47, 250, 0.35);
  border-radius: 8px;
  color: #F2F1ED;
  font-size: 13px;
  margin: 6px 0 12px;
}
.matrix-acc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.matrix-section-item-row {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border-left: 3px solid rgba(195, 47, 250, 0.35);
}
.mx-item-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFE48A;
  color: #1A1A1A;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #C9A22A;
}
.mx-item-body { flex: 1; min-width: 0; }
.matrix-acc-content .section-item-title {
  font-weight: 600;
  color: #F2F1ED;
  margin-bottom: 4px;
}
.matrix-acc-content .section-item-text {
  color: #AAADB6;
  font-size: 13px;
  margin: 2px 0;
  line-height: 1.5;
}

/* Chakra list inside matrix accordion */
.matrix-chakra-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.matrix-chakra-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border-left: 3px solid rgba(195, 47, 250, 0.5);
}
.chakra-emoji { font-size: 22px; text-align: center; }
.chakra-body  { min-width: 0; }
.chakra-name  { color: #F2F1ED; font-size: 14px; }
.chakra-area  { color: #AAADB6; font-size: 12px; margin-left: 4px; }
.chakra-vals  { color: #868A94; font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.chakra-num   {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFE48A;
  color: #1A1A1A;
  font-weight: 800;
  border: 2px solid #C9A22A;
}

/* Chakra aspect grid — 3 aspects (Физика · Энергия · Эмоции) */
.chakra-vals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 6px;
}
.chakra-aspect {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chakra-aspect-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.chakra-aspect-num {
  font-size: 14px;
  font-weight: 800;
  color: #F2F1ED;
  font-variant-numeric: tabular-nums;
}
.chakra-aspect-name {
  color: #AAADB6;
  font-size: 10px;
  line-height: 1.2;
}

/* clan_tasks rows — wider for more content */
.matrix-task-row {
  border-left-color: #C42FFA !important;
}
