/* AstroQ Core — chart + tables + form (horo design tokens, 80% result column) */

:root {
  --bg-deep: #222838;
  --bg-card: #262c3e;
  --bg-card-hover: #2e354a;
  --chart-stage-bg: rgba(5, 6, 8, 0.68);
  --chart-stage-hover: rgba(16, 18, 24, 0.78);
  --border: #323850;
  --border-accent: #434c68;
  --text: #d4d4e0;
  --text-muted: #8888a0;
  --text-secondary: #8890a8;
  --text-bright: #f0f0ff;
  --accent: #9b7dff;
  --gold: #c8a4dc;
  --gold-line: rgba(190, 150, 220, 0.28);
  --green: #4a9d72;
  --red: #e05555;
  --cyan: #48c8b8;
  --focus-border: rgba(138, 112, 58, 0.62);
  --focus-ring: rgba(138, 112, 58, 0.14);
  --focus-shadow: 0 0 0 1px var(--focus-ring);
  --font-heading: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: var(--font-heading);
  --radius: 12px;
  --radius-sm: 8px;
  --content-max: min(1240px, 100%);
  --border-subtle: rgba(50, 56, 80, 0.28);
  --text-violet: rgba(168, 152, 204, 0.78);
  --text-value: var(--text-violet);
  --text-value-strong: rgba(168, 152, 204, 0.88);
  --text-value-soft: rgba(168, 152, 204, 0.68);
  --gold-muted: rgba(190, 150, 220, 0.72);
  --chip-radius: 4px;
  --chip-padding: 0 4px;
  /* Вертикальный ритм строк (панели, таблицы, баланс, антисы) */
  --row-pad-y: 2px;
  --row-gap-x: 8px;
  --row-lh: 1.2;
  --row-chip-fs: var(--table-fs);
  --row-min-h: calc(var(--row-chip-fs) * var(--row-lh) + 1px);
  --stack-gap: 8px;
  /* Отступ подзаголовок / intro → таблица (раскрытый блок) */
  --block-content-gap: var(--stack-gap);
  --chip-surface: rgba(255, 255, 255, 0.014);
  --chip-surface-tint: rgba(255, 255, 255, 0.01);
  --chip-surface-hover: rgba(255, 255, 255, 0.028);
  --chip-shadow: none;
  /* Поверхности brief (лёгкие, без blur) */
  --surface-section: rgba(8, 10, 18, 0.2);
  --surface-section-border: rgba(150, 110, 190, 0.1);
  --surface-chart: rgba(5, 6, 8, 0.32);
  --surface-chart-border: rgba(150, 110, 190, 0.12);
  --table-row-border: rgba(50, 56, 80, 0.14);
  --table-head-border: rgba(150, 110, 190, 0.1);
  --tone-ok: rgba(140, 210, 150, 0.92);
  --tone-alert: rgba(230, 140, 140, 0.92);
  --tone-warn: rgba(220, 198, 140, 0.92);
  --tone-empty: rgba(136, 144, 168, 0.65);
  --tone-waxing: rgba(220, 198, 140, 0.92);
  --tone-waning: rgba(176, 168, 210, 0.92);
  --tone-applying: rgba(140, 200, 160, 0.88);
  /* Прямой срыв / провал 365: планеты и подписи asp-expr-tag--break */
  --tone-break: rgba(178, 118, 132, 0.94);
  --tone-speed-fast: rgba(140, 200, 160, 0.88);
  --tone-speed-slow: rgba(200, 170, 150, 0.88);
  --row-hover: rgba(120, 110, 180, 0.06);
  /* Table + hover tip typography (SSOT) */
  --table-fs: 0.58rem;
  --table-head-fs: calc(var(--table-fs) * 0.94);
  --table-lh: var(--row-lh);
  /* Подписи под строкой (asp-expr-tag) — не уменьшать; колоночные цветные теги — крупнее */
  --table-subtag-fs: 0.78em;
  --table-tag-fs: var(--table-subtag-fs);
  --table-cell-tag-fs: 0.9em;
  --table-status-fs: var(--table-cell-tag-fs);
  --table-status-lh: 1.2;
  --tbl-pin-w: 2.65rem;
  --tbl-role-w: 5.25rem;
  --table-pad-y: var(--row-pad-y);
  --table-pad-x: 6px;
  --tip-fs: 0.58rem;
  --tip-lh: 1.3;
  --tip-tag-fs: 0.76em;
  --tip-tag-gap: 0.22em 0.38em;
  --tip-max-w: min(216px, calc(100vw - 28px));
  --tip-planet-max-w: min(188px, calc(100vw - 32px));
  --tip-stack-gap: 2px;
  --tip-meta-fs: 0.92em;
  --tip-pad: 4px 6px;
  --tip-inner-pad-r: 0.85rem;
  --tip-close-size: 1.2rem;
  --tip-surface: rgba(14, 16, 24, 0.82);
  --tip-border: rgba(120, 132, 168, 0.07);
  --tip-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  --intro-fs: var(--table-fs);
  --intro-lh: var(--table-lh);
  /* Breakpoints SSOT → chart-responsive.css */
  --bp-xs: 479px;
  --bp-sm: 639px;
  --bp-md: 767px;
  --bp-lg: 1023px;
}

html {
  color-scheme: dark;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.page { min-height: 100vh; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.75rem);
}

/* ---- Input section: единые токены формы (xl >1023) ---- */
.input-section {
  /* shell */
  --form-shell-radius: 18px;
  --form-shell-pad-top: clamp(22px, 3.5vw, 36px);
  --form-shell-pad-x: clamp(22px, 4vw, 44px);
  --form-shell-pad-bottom: clamp(22px, 3vw, 32px);
  --form-shell-margin-y: clamp(16px, 3vw, 28px);
  --form-shell-margin-bottom: 36px;
  --form-shell-width: calc(100% - 2rem);
  /* rhythm */
  --form-gap: 14px;
  --form-stack: 14px;
  --form-field-pad-y: 11px;
  --form-field-pad-x: 15px;
  --surface-inset-x: var(--form-field-pad-x);
  /* intro */
  --form-intro-mb: 24px;
  --form-intro-pb: 22px;
  --form-title-size: clamp(1.42rem, 2.4vw, 1.82rem);
  /* fields (#chartForm) */
  --form-font: var(--font-body);
  --form-fc-size: 1.0625rem;
  --form-fc-size-sm: 0.94rem;
  --form-label-size: 0.72rem;
  --form-label-mb: 7px;
  --form-control-pad-y: 12px;
  --form-control-pad-x: 16px;
  --form-area-min-h: 96px;
  --form-area-pad-y: 16px;
  --form-area-pad-x: 18px;
  --form-radius: 12px;
  --form-color: rgba(246, 242, 255, 0.96);
  --form-muted: rgba(168, 152, 204, 0.55);
  --form-bg: rgba(11, 13, 24, 0.78);
  --form-border: rgba(180, 150, 220, 0.2);
  --form-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 6px 24px rgba(0, 0, 0, 0.2);
  --form-focus-border: rgba(200, 120, 180, 0.45);
  --form-focus-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(124, 58, 237, 0.14), 0 8px 28px rgba(0, 0, 0, 0.24);
  --form-hint-color: rgba(168, 138, 200, 0.62);
  --form-option-min-h: 28px;
  --form-option-gap: 1px;
  --form-extras-pt: 8px;
  --form-suggest-max-h: 220px;
  --form-btn-size: 1.2rem;
  --form-btn-pad: 14px;
  --form-btn-min-h: 44px;
  overflow: visible;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(32, 24, 56, 0.55) 0%, rgba(14, 16, 25, 0.78) 55%, rgba(10, 12, 22, 0.82) 100%);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(180, 150, 220, 0.1);
  border-radius: var(--form-shell-radius);
  padding: var(--form-shell-pad-top) var(--form-shell-pad-x) var(--form-shell-pad-bottom);
  margin: var(--form-shell-margin-y) auto var(--form-shell-margin-bottom);
  max-width: 860px;
  width: var(--form-shell-width);
  box-shadow:
    0 0 60px rgba(155, 125, 255, 0.05),
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.form-intro {
  text-align: center;
  margin: 0 0 var(--form-intro-mb);
  padding: 0 0 var(--form-intro-pb);
  border-bottom: 1px solid rgba(180, 150, 220, 0.11);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025);
}

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 10px clamp(0.75rem, 2.5vw, 1.5rem) 0;
  pointer-events: none;
}

.site-chrome .ui-lang-toggle {
  pointer-events: auto;
}

.form-intro-title {
  font-family: var(--form-font);
  font-weight: 600;
  font-size: var(--form-title-size);
  line-height: 1.28;
  letter-spacing: 0.02em;
  margin: 0;
  color: rgba(210, 178, 232, 0.92);
}

.form-group {
  margin-bottom: var(--form-stack);
  position: relative;
  min-width: 0;
}

.form-group--question {
  margin-bottom: calc(var(--form-stack) + 2px);
}

.form-group--location {
  margin-bottom: calc(var(--form-stack) - 4px);
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  width: 100%;
  min-width: 0;
  background: rgba(10, 12, 22, 0.52);
  border: 1px solid rgba(139, 115, 180, 0.12);
  border-radius: 11px;
  color: var(--text-bright);
  padding: var(--form-field-pad-y) var(--form-field-pad-x);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

/* ---- Chart form: наследует токены .input-section ---- */
#chartForm {
  font-family: var(--form-font);
}

#chartForm .form-label {
  display: block;
  font-family: var(--form-font);
  font-size: var(--form-label-size);
  font-weight: 500;
  color: var(--form-muted);
  margin-bottom: var(--form-label-mb);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.3;
}

#chartForm input.form-control,
#chartForm textarea.form-control {
  display: block;
  width: 100%;
  min-width: 0;
  font-family: var(--form-font);
  font-size: var(--form-fc-size);
  font-weight: 400;
  line-height: 1.5;
  color: var(--form-color);
  background: var(--form-bg);
  border: 1px solid var(--form-border);
  border-radius: var(--form-radius);
  box-shadow: var(--form-shadow);
  padding: var(--form-control-pad-y) var(--form-control-pad-x);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

#chartForm .form-control--area {
  min-height: var(--form-area-min-h);
  padding: var(--form-area-pad-y) var(--form-area-pad-x);
  line-height: 1.55;
  resize: vertical;
}

#chartForm .form-control::placeholder {
  color: rgba(168, 152, 204, 0.46);
  font-style: italic;
}

#chartForm input.form-control:focus,
#chartForm textarea.form-control:focus {
  border-color: var(--form-focus-border);
  background: rgba(14, 16, 30, 0.88);
  box-shadow: var(--form-focus-shadow);
  outline: none;
}

#chartForm input.form-control:disabled,
#chartForm textarea.form-control:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

#chartForm .btn-toggle-coords:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

#chartForm .form-control.input-error {
  border-color: rgba(232, 120, 120, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 0 1px rgba(232, 120, 120, 0.12);
}

#chartForm .field-error {
  font-family: var(--form-font);
  font-size: var(--form-fc-size-sm);
}

#chartForm .city-hint {
  font-family: var(--form-font);
  font-size: var(--form-fc-size-sm);
  font-weight: 400;
  color: var(--form-hint-color);
  letter-spacing: 0.02em;
}

#chartForm .pick-input {
  font-family: var(--form-font);
  font-size: var(--form-fc-size);
  color: var(--form-color);
  background: var(--form-bg);
  border: 1px solid var(--form-border);
  border-radius: var(--form-radius);
  box-shadow: var(--form-shadow);
}

#chartForm .pick-input:focus {
  border-color: var(--form-focus-border);
  background: rgba(14, 16, 30, 0.88);
  box-shadow: var(--form-focus-shadow);
  outline: none;
}

#chartForm .suggest-dropdown {
  border-radius: 0 0 var(--form-radius) var(--form-radius);
  max-height: var(--form-suggest-max-h);
  background: rgba(12, 14, 28, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(168, 152, 204, 0.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

#chartForm .suggest-dropdown .suggest-name,
#chartForm .suggest-empty,
#chartForm .suggest-loading {
  font-family: var(--form-font);
  font-size: var(--form-fc-size-sm);
}

#chartForm .suggest-name {
  color: var(--form-color);
}

#chartForm .suggest-item {
  padding: var(--form-control-pad-y) var(--form-control-pad-x);
}

#chartForm .btn-toggle-coords {
  font-family: var(--form-font);
  font-size: var(--form-fc-size-sm);
}

.input-section .btn-primary {
  font-size: var(--form-btn-size);
  padding: var(--form-btn-pad);
  min-height: var(--form-btn-min-h);
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  border-color: var(--focus-border);
  box-shadow: var(--focus-shadow);
  background: rgba(14, 16, 28, 0.7);
  outline: none;
}

textarea { resize: vertical; min-height: 56px; }

.field-error {
  margin-top: 6px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(232, 120, 120, 0.88);
}

.field-error[hidden] {
  display: none !important;
}

.input-error {
  border-color: rgba(232, 120, 120, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(232, 120, 120, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--form-gap);
  align-items: start;
}

#chartForm .form-extras {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2px 0 calc(var(--form-stack) - 4px);
  padding-top: var(--form-extras-pt);
  border-top: 1px solid rgba(180, 150, 220, 0.08);
}

#chartForm .form-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--form-option-min-h);
  padding: 2px 0;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#chartForm .form-option + .form-option {
  margin-top: var(--form-option-gap);
}

#chartForm .form-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 1;
}

#chartForm .form-option__mark {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(180, 150, 220, 0.28);
  border-radius: 3px;
  background: var(--form-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

#chartForm .form-option__mark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid rgba(244, 232, 202, 0);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) scale(0.35);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

#chartForm .form-option input:checked + .form-option__mark {
  border-color: rgba(190, 150, 220, 0.5);
  background: rgba(190, 150, 220, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#chartForm .form-option input:checked + .form-option__mark::after {
  border-color: rgba(244, 232, 202, 0.9);
  transform: rotate(45deg) scale(1);
}

#chartForm .form-option input:focus-visible + .form-option__mark {
  outline: 2px solid rgba(190, 150, 220, 0.4);
  outline-offset: 2px;
}

#chartForm .form-option__text {
  font-family: var(--form-font);
  font-size: var(--form-fc-size-sm);
  font-weight: 400;
  color: rgba(176, 164, 204, 0.68);
  letter-spacing: 0.01em;
  line-height: 1.3;
  transition: color 0.2s ease;
}

#chartForm .form-option input:checked ~ .form-option__text {
  color: rgba(236, 224, 196, 0.9);
}

.form-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-bottom: 0;
  pointer-events: none;
  transition: grid-template-rows 0.28s ease, opacity 0.22s ease, margin-bottom 0.28s ease;
}

.form-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-bottom: 16px;
  pointer-events: auto;
}

.form-panel > .form-panel__inner {
  overflow: hidden;
  min-height: 0;
}

/* Popover календаря/времени — position:absolute ниже поля; иначе обрезается grid-анимацией */
.form-panel.is-open > .form-panel__inner {
  overflow: visible;
}

.form-row--datetime {
  grid-template-columns: 1fr 1fr;
  margin-bottom: 0;
}

/* Custom date / time pickers */
.field-pick {
  position: relative;
}

.pick-shell {
  position: relative;
  display: flex;
  align-items: stretch;
}

.pick-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: var(--form-field-pad-y) 40px var(--form-field-pad-y) var(--form-field-pad-x);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.field-pick:focus-within .pick-input {
  border-color: rgba(139, 115, 180, 0.22);
  background: rgba(14, 16, 28, 0.58);
}

.field-pick .pick-trigger {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.55;
  border-radius: 8px;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.field-pick .pick-trigger:hover {
  opacity: 0.9;
  background-color: rgba(139, 115, 180, 0.08);
}

.field-pick--date .pick-trigger {
  background: no-repeat center / 14px 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Crect x='2' y='3.5' width='12' height='10' rx='1.5' stroke='%23c4b8dc' stroke-width='1.1'/%3E%3Cpath d='M2 6.5h12' stroke='%23c4b8dc' stroke-width='1.1'/%3E%3Cpath d='M5 2v2M11 2v2' stroke='%23c4b8dc' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
}

.field-pick--time .pick-trigger {
  background: no-repeat center / 14px 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='5.5' stroke='%23c4b8dc' stroke-width='1.1'/%3E%3Cpath d='M8 5v3.2l2 1.2' stroke='%23c4b8dc' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.field-pick:hover .pick-trigger { opacity: 0.82; }

.pick-popover {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  z-index: 200;
  padding: 8px 10px 7px;
  border-radius: 10px;
  background: rgba(14, 16, 26, 0.97);
  border: 1px solid rgba(190, 150, 220, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pick-popover[hidden] { display: none !important; }

.pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.pick-title {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 400;
  color: rgba(228, 220, 248, 0.88);
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

.pick-nav {
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  flex-shrink: 0;
  border: 1px solid rgba(139, 115, 180, 0.14);
  border-radius: 7px;
  background: rgba(10, 12, 22, 0.5);
  cursor: pointer;
  position: relative;
  opacity: 0.75;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.pick-nav::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.pick-nav--prev::before { border-right: 5px solid rgba(212, 196, 230, 0.85); margin-left: -1px; }
.pick-nav--next::before { border-left: 5px solid rgba(212, 196, 230, 0.85); margin-left: 1px; }

.pick-nav:hover { opacity: 1; border-color: rgba(190, 150, 220, 0.28); }

.pick-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 4px;
}

.pick-dow span {
  text-align: center;
  font-size: 0.58rem;
  font-weight: 400;
  color: rgba(168, 152, 204, 0.5);
  letter-spacing: 0.05em;
  padding: 0;
  line-height: 1.2;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.pick-day {
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: rgba(228, 224, 240, 0.86);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 24px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.pick-day:hover {
  background: rgba(155, 125, 255, 0.12);
}

.pick-day--muted {
  color: rgba(168, 168, 188, 0.38);
}

.pick-day--selected {
  background: rgba(155, 125, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(155, 125, 255, 0.32);
  color: #f0ecff;
}

.pick-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(50, 56, 80, 0.28);
}

.pick-foot--center { justify-content: center; }

.pick-link {
  background: none;
  border: none;
  padding: 1px 2px;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 400;
  color: rgba(168, 152, 204, 0.72);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.pick-link:hover { color: rgba(190, 150, 220, 0.9); }

.pick-wheels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-height: 132px;
}

.pick-wheel {
  position: relative;
  border-radius: 7px;
  background: rgba(8, 10, 18, 0.55);
  border: 1px solid rgba(50, 56, 80, 0.3);
  overflow: hidden;
}

.pick-wheel-scroll {
  max-height: 132px;
  overflow-y: auto;
  padding: 2px 1px;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 152, 204, 0.28) transparent;
}

.pick-wheel-scroll::-webkit-scrollbar {
  width: 3px;
}

.pick-wheel-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.pick-wheel-scroll::-webkit-scrollbar-thumb {
  background: rgba(168, 152, 204, 0.22);
  border-radius: 999px;
}

.pick-wheel-scroll:hover::-webkit-scrollbar-thumb {
  background: rgba(168, 152, 204, 0.36);
}

.pick-wheel-item {
  display: block;
  width: 100%;
  padding: 2px 0;
  border: none;
  background: transparent;
  color: rgba(200, 196, 216, 0.68);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1.35;
  transition: background 0.12s ease, color 0.12s ease;
}

.pick-wheel-item:hover {
  background: rgba(155, 125, 255, 0.1);
  color: rgba(236, 232, 248, 0.9);
}

.pick-wheel-item--selected {
  background: rgba(155, 125, 255, 0.2);
  color: #f0ecff;
  font-weight: 450;
}

/* Autocomplete SSOT — город и точный адрес */
.field-autocomplete {
  position: relative;
}

.field-autocomplete .suggest-dropdown[hidden] {
  display: none !important;
}

.field-autocomplete .suggest-dropdown:not([hidden]) {
  display: block;
}

.suggest-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(12, 14, 28, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 152, 204, 0.2);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 152, 204, 0.28) transparent;
}

.suggest-dropdown::-webkit-scrollbar { width: 3px; }
.suggest-dropdown::-webkit-scrollbar-track { background: transparent; }
.suggest-dropdown::-webkit-scrollbar-thumb {
  background: rgba(168, 152, 204, 0.22);
  border-radius: 999px;
}

.suggest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  gap: 12px;
  transition: background 0.15s;
}

.suggest-item:hover,
.suggest-item.suggest-active {
  background: rgba(120, 110, 180, 0.1);
}

.suggest-name {
  color: rgba(232, 228, 248, 0.92);
  font-size: 0.84rem;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.suggest-coords {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.6;
}

.suggest-empty {
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.city-hint {
  display: none;
  margin-top: 6px;
  font-size: var(--form-fc-size-sm, 0.74rem);
  color: var(--form-hint-color, rgba(190, 150, 220, 0.62));
  padding-left: 1px;
  letter-spacing: 0.02em;
}

.city-hint.visible { display: block; }

.field-helper {
  margin: 6px 0 0;
  font-size: 0.74rem;
  color: rgba(168, 152, 204, 0.58);
  line-height: 1.4;
}

.search-hint--ok {
  color: #6dbf6d;
}

.search-hint--error {
  color: rgba(232, 120, 120, 0.88);
}

.coordinates-row { display: none; margin-top: -8px; }

.coordinates-row.visible {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--form-gap, 14px);
}

.btn-toggle-coords {
  background: none;
  border: none;
  color: rgba(168, 152, 204, 0.55);
  font-size: var(--form-fc-size-sm, 0.74rem);
  cursor: pointer;
  padding: 2px 0;
  margin-bottom: calc(var(--form-stack, 14px) - 2px);
  border-bottom: 1px dashed rgba(168, 152, 204, 0.25);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.btn-toggle-coords:hover {
  color: var(--accent);
  border-bottom-color: rgba(155, 125, 255, 0.45);
}

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 14px;
  min-height: 44px;
  background: linear-gradient(135deg, rgba(200, 100, 160, 0.75) 0%, rgba(110, 60, 175, 0.78) 50%, rgba(124, 58, 237, 0.72) 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: var(--radius-sm);
  color: #0a0d1a;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow: 0 0 20px rgba(190, 150, 220, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s, transform 0.1s, background-position 0.5s;
}

.btn-primary:hover {
  background-position: 100% 0;
  box-shadow: 0 0 30px rgba(190, 150, 220, 0.5), 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.error-banner {
  margin-top: 12px;
  background: rgba(224, 85, 85, 0.12);
  border: 1px solid var(--red);
  color: #ffc9c9;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

/* ---- Result header ---- */
.result-top {
  display: none;
  padding: 0 clamp(0.75rem, 2.5vw, 1.5rem);
  margin-bottom: 4px;
}

.result-top.visible { display: block; }

.ui-lang-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.ui-lang-btn {
  min-width: 2.1rem;
  padding: 4px 8px;
  font: 600 0.62rem/1 var(--font-body);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.ui-lang-btn.is-active {
  color: var(--text-bright);
  background: var(--bg-card-hover);
  box-shadow: inset 0 0 0 1px var(--border-accent);
}

.ui-lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.chart-question-frame {
  position: relative;
  max-width: 920px;
  margin: 24px auto 16px;
  padding: 22px clamp(20px, 4vw, 40px) 20px;
  background: rgba(14, 12, 22, 0.55);
  border: 1px solid rgba(150, 110, 190, 0.16);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.chart-question {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: rgba(228, 218, 242, 0.94);
  text-align: center;
  line-height: 1.45;
  font-style: normal;
  font-weight: 500;
  margin: 0;
  position: relative;
  z-index: 1;
}

.chart-question::before,
.chart-question::after {
  color: rgba(190, 150, 220, 0.5);
  font-style: normal;
  margin: 0 0.08em;
}

.chart-question::before { content: '\ab'; }
.chart-question::after { content: '\bb'; }

.rh-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0.35rem;
  margin: 0 0 6px;
  padding: 0 8px;
  font-size: 0.65rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.28);
  text-align: center;
}

.rh-meta__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.42rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- Result: centered 80% column (chart + tables) ---- */
.result-section {
  display: none;
  margin-bottom: 60px;
  padding: 0 clamp(0.75rem, 2.5vw, 1.5rem) 3rem;
}

.result-section.visible { display: block; }

.result-column {
  width: 80%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
}

.chart-stage {
  width: 100%;
  margin: 0 0 24px;
}

.chart-visual {
  position: relative;
  background: var(--surface-chart);
  border: 1px solid var(--surface-chart-border);
  border-radius: var(--radius-sm);
  padding: clamp(6px, 1.2vw, 10px);
  overflow: hidden;
}

/* Unified hover detail (tables, chart SVG, star links) */
.sb-hover-tip {
  position: fixed;
  z-index: 1100;
  pointer-events: none;
  padding: 0;
  border-radius: 6px;
  background: var(--tip-surface);
  border: 1px solid var(--tip-border);
  box-shadow: var(--tip-shadow);
  width: min(max-content, var(--tip-max-w));
  max-width: var(--tip-max-w);
  overflow: visible;
  opacity: 0;
  transition: opacity 0.07s ease;
  font-size: var(--tip-fs);
  line-height: var(--tip-lh);
  letter-spacing: -0.01em;
  font-weight: 400;
}

.sb-hover-tip.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sb-hover-tip__shell {
  position: relative;
}

.sb-hover-tip__close {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tip-close-size);
  height: var(--tip-close-size);
  padding: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: rgba(198, 194, 214, 0.45);
  font-size: calc(var(--tip-close-size) * 0.82);
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.sb-hover-tip__close:hover,
.sb-hover-tip__close:focus-visible {
  color: rgba(220, 214, 230, 0.88);
  background: rgba(120, 132, 168, 0.12);
  opacity: 1;
}

.sb-hover-tip :where(
  .hover-card,
  .hover-card__glyph,
  .hover-card__title-text,
  .hover-card__title,
  .hover-card__kicker,
  .hover-card__body,
  .hover-card__body-text,
  .hover-card__note,
  .hover-card__line,
  .hover-chip,
  .chart-detail-nature,
  .chart-detail-pos,
  .chart-detail-pos--phrase,
  .lot-detail-aspects__title,
  .lot-detail-aspects ul,
  .tag
) {
  font-size: inherit;
  line-height: inherit;
}

@media (hover: none) {
  .sb-hover-tip {
    pointer-events: auto;
  }
}

.sb-hover-tip__inner {
  padding: 0 var(--tip-inner-pad-r) 0 0;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.hover-route-block {
  margin-top: 0.35em;
}

.hover-route-block__label {
  margin-bottom: 0.2em;
  color: rgba(198, 194, 214, 0.72);
}

.hover-route-list {
  margin: 0;
  padding: 0 0 0 0.85em;
  list-style: disc;
  max-height: min(42vh, 220px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hover-route-list__item {
  margin: 0.12em 0;
  color: rgba(198, 194, 214, 0.82);
  font-size: inherit;
  line-height: 1.35;
}

.hover-route-expand {
  display: block;
  margin: 0.45em 0 0;
  padding: 0;
  border: none;
  background: none;
  color: rgba(168, 152, 204, 0.78);
  font: inherit;
  font-size: 0.92em;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.hover-route-expand:hover,
.hover-route-expand:focus-visible {
  color: rgba(190, 150, 220, 0.9);
}

.sb-hover-tip__meta {
  color: var(--text-value-soft);
}

.sb-hover-target {
  cursor: default;
}

.data-table th .th-hover-anchor {
  cursor: help;
  text-decoration: underline;
  text-decoration-color: rgba(168, 152, 204, 0.22);
  text-underline-offset: 0.12em;
}

.sb-hover-target:focus-visible {
  outline: 1px solid rgba(168, 152, 204, 0.28);
  outline-offset: 1px;
}

#chartSVGContainer .sb-hover-target:focus,
#chartSVGContainer .sb-hover-target:focus-visible {
  outline: none;
}

#chartSVGContainer {
  width: 100%;
  overflow: hidden;
  background: var(--chart-stage-bg);
}

#chartSVGContainer svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.32));
}

.chart-tables-stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
  font-family: var(--font-body);
  font-size: var(--table-fs);
  line-height: var(--row-lh);
  --table-cell-inset-x: 3px;
  --intro-fs: var(--table-fs);
  --intro-lh: var(--table-lh);
}

.chart-tables-stack .sb-chip,
.chart-tables-stack .sun-condition-sun-line,
.chart-tables-stack .sun-condition-empty,
.chart-tables-stack .sun-condition-group__title,
.chart-tables-stack .toggle-rows-btn,
.chart-tables-stack .toggle-rec-btn,
.chart-tables-stack .toggle-star-sep-btn,
.chart-tables-stack .ant-card,
.chart-tables-stack .ant-head,
.chart-tables-stack .ant-type,
.chart-tables-stack .ant-detail,
.chart-tables-stack .section-intro,
.chart-tables-stack .section-intro :is(.section-intro-lead, .section-intro-guide),
.chart-tables-stack .house-choice-kinds,
.chart-tables-stack .house-choice-empty {
  font-size: var(--intro-fs);
  line-height: var(--intro-lh);
}

.chart-section {
  background: var(--surface-section);
  border: 1px solid var(--surface-section-border);
  border-radius: var(--radius-sm);
  padding: clamp(10px, 1.6vw, 16px);
  min-width: 0;
  overflow-x: clip;
  overflow-y: visible;
}

.chart-section h3 {
  font-family: var(--font-body);
  font-size: clamp(0.88rem, 1.4vw, 0.98rem);
  font-weight: 600;
  line-height: 1.2;
  color: rgba(196, 154, 220, 0.9);
  margin: 0 0 var(--block-content-gap);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
  letter-spacing: 0.02em;
}

.chart-section > h3::after {
  content: '▴';
  font-size: 0.85em;
  opacity: 0.45;
  transition: transform 0.25s ease;
  align-self: center;
  margin-left: auto;
  flex-shrink: 0;
}

.chart-section.collapsed > h3 { margin-bottom: 0; }
.chart-section.collapsed > h3::after { transform: rotate(180deg); }
.chart-section.collapsed > :not(h3) { display: none; }
.chart-section.collapsed .intro-toggle { display: none; }

.chart-section.collapsed > h3 .section-toolbar-mount,
.chart-section.collapsed > h3 .motion-display-toolbar {
  display: none !important;
}

.timing-panel {
  min-width: 0;
  padding: 0;
}

/* Единая система значений: sb-chip--value + семантические модификаторы */
.sb-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: var(--chip-padding);
  border-radius: var(--chip-radius);
  font-size: var(--row-chip-fs);
  line-height: var(--row-lh);
  min-height: var(--row-min-h);
  box-sizing: border-box;
  border: none;
  background: var(--chip-surface);
  box-shadow: var(--chip-shadow);
  white-space: nowrap;
  max-width: 100%;
}

.sb-chip--value,
.sb-chip--placement,
.sb-chip--planet,
.sb-chip--time,
.sb-chip--text,
.sb-chip--note,
.sb-chip--level {
  color: var(--text-value);
}

.sb-chip--multiline,
.sb-chip--placement,
.sb-chip--note,
.sb-chip--level {
  white-space: normal;
  text-align: right;
  line-height: var(--row-lh);
}

.sb-pos-tail {
  display: inline;
  white-space: normal;
}

.sb-chip__sep {
  opacity: 0.55;
  margin: 0;
}

.sb-chip--ok {
  color: var(--tone-ok);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sb-chip--alert {
  color: var(--tone-alert);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sb-chip--empty {
  color: var(--tone-empty);
  background: var(--chip-surface-tint);
}

.sb-chip--warn {
  color: var(--tone-warn);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sb-chip--block {
  display: flex;
  width: 100%;
  white-space: normal;
  text-align: left;
  line-height: var(--row-lh);
  justify-content: flex-start;
}

.sb-chip--phase.sb-chip--waxing {
  color: var(--tone-waxing);
}

.sb-chip--phase.sb-chip--waning {
  color: var(--tone-waning);
}

.sb-chip--metric {
  color: var(--text-value);
}

.sb-chip--metric .sb-chip__val {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.sb-chip--metric .sb-chip__unit {
  font-size: 0.68rem;
  opacity: 0.72;
  color: var(--text-value-soft);
}

.sb-chip--speed-fast {
  color: var(--tone-speed-fast);
}

.sb-chip--speed-slow {
  color: var(--tone-speed-slow);
}

.sb-chip--aspect {
  gap: 6px;
  padding: 3px 8px;
  background: var(--chip-surface-tint);
  color: var(--text-value);
}

.sb-chip--aspect .sb-chip__planet,
.sb-chip--aspect .sb-chip__sym,
.sb-chip--aspect .sb-chip__asp,
.sb-chip--aspect .sb-chip__orb {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.sb-chip--aspect.sb-chip--app {
  color: var(--tone-applying);
}

.sb-chip--aspect.sb-chip--sep {
  color: var(--text-value-soft);
  opacity: 0.88;
}

.moon-flow-aspect {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.35rem 0.55rem;
  max-width: 100%;
  white-space: nowrap;
}

.moon-flow-aspect .asp-expr {
  font-size: var(--table-fs);
  line-height: var(--table-lh);
  white-space: nowrap;
}

.moon-flow-aspect--app .asp-expr {
  color: var(--tone-applying);
}

.moon-flow-aspect--sep .asp-expr {
  color: var(--text-value-soft);
}

.moon-flow-aspect__orb {
  font-size: var(--table-fs);
  line-height: var(--table-lh);
  font-variant-numeric: tabular-nums;
  color: var(--text-value-soft);
  white-space: nowrap;
}

.sb-chip__sym {
  font-size: 0.82rem;
  opacity: 0.9;
}

.sb-chip__asp {
  font-size: 0.72rem;
  color: var(--text-value-soft);
}

.sb-chip__orb {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.ruler-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ruler-cell .ruler-name {
  font-size: 0.8rem;
  color: var(--text-value-strong);
  letter-spacing: 0.01em;
}

.block-panel {
  padding: var(--row-pad-y) 0 0;
}

.block-group-title {
  font-size: var(--table-fs);
  line-height: var(--table-lh);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-muted);
  padding: 0;
  margin: 0 0 var(--block-content-gap);
}

.bal-planet-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.bal-planet-name {
  color: var(--text-value);
  white-space: nowrap;
}

.bal-val {
  color: var(--text-value);
}

.bal-empty {
  color: var(--text-value-soft);
}

.suggest-loading {
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.suggest-loading::after {
  content: '';
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-left: 8px;
  border: 2px solid rgba(190, 150, 220, 0.25);
  border-top-color: rgba(190, 150, 220, 0.85);
  border-radius: 50%;
  vertical-align: -0.1em;
  animation: suggest-spin 0.7s linear infinite;
}

@keyframes suggest-spin {
  to { transform: rotate(360deg); }
}

/* MapLibre: overflow-x: clip на .chart-section ломает контролы карты */
.chart-section.chart-section--map-host {
  overflow: visible;
  --geo-row-pad-y: var(--table-pad-y);
  --geo-row-lh: var(--table-lh);
}

.geo-direction-map-wrap[hidden] {
  display: none !important;
  margin: 0 !important;
  min-height: 0 !important;
}

.geo-direction-map-wrap {
  position: relative;
  margin: 0 0 1rem;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

body.geo-map-fullscreen-open {
  overflow: hidden;
}

.geo-map-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.geo-direction-map-wrap--fullscreen {
  position: fixed;
  z-index: 1200;
  inset: max(clamp(0.45rem, 2vw, 1.1rem), env(safe-area-inset-top, 0px))
    max(clamp(0.45rem, 2vw, 1.1rem), env(safe-area-inset-right, 0px))
    max(clamp(0.45rem, 2vw, 1.1rem), env(safe-area-inset-bottom, 0px))
    max(clamp(0.45rem, 2vw, 1.1rem), env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  margin: 0;
  width: auto;
  min-width: 0;
  padding: clamp(0.45rem, 1.2vw, 0.75rem);
  border-radius: var(--radius);
  background: rgba(8, 10, 18, 0.97);
  border: 1px solid rgba(190, 150, 220, 0.2);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.48);
}

.geo-direction-map-wrap--fullscreen .geo-direction-map {
  flex: 1;
  min-height: 0;
  height: auto;
  max-height: none;
}

.geo-map-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  flex-shrink: 0;
}

.chart-section > h3 .geo-map-toolbar {
  align-items: center;
}

.geo-map-btn.toggle-rows-btn {
  min-height: var(--row-min-h);
}

.geo-map-btn--hide {
  margin-left: auto;
}

#geoDirectionMapHide[hidden] {
  display: none !important;
}

.geo-direction-map.is-collapsed {
  display: none;
}

.geo-direction-map .maplibregl-ctrl-top-right {
  z-index: 10;
}

.geo-direction-map .geo-map-inset-controls {
  margin: 0;
  box-shadow: none !important;
  pointer-events: auto;
}

.geo-map-inset-btn {
  display: block;
  width: var(--geo-ctrl-size, 29px);
  height: var(--geo-ctrl-size, 29px);
  padding: 0;
  margin: 0;
  cursor: pointer;
  border: none;
  background: var(--geo-ctrl-bg, rgba(32, 36, 48, 0.58)) !important;
}

.geo-map-inset-controls .geo-map-inset-btn + .geo-map-inset-btn {
  border-top: 1px solid rgba(120, 132, 168, 0.28) !important;
}

.geo-map-inset-btn:not(:disabled):hover,
.geo-map-inset-btn:not(:disabled):active {
  background: var(--geo-ctrl-bg-hover, rgba(48, 54, 68, 0.72)) !important;
}

.geo-map-inset-icon,
.geo-direction-map .geo-map-inset-controls .maplibregl-ctrl-icon {
  display: block;
  width: var(--geo-ctrl-size, 29px);
  height: var(--geo-ctrl-size, 29px);
  pointer-events: none;
  opacity: var(--geo-ctrl-icon-op, 0.68);
  background-repeat: no-repeat;
  background-position: center;
  background-size: var(--geo-ctrl-size, 29px) var(--geo-ctrl-size, 29px);
  transition: opacity 0.15s ease;
}

.geo-direction-map .maplibregl-ctrl-group button:not(:disabled):hover .maplibregl-ctrl-icon,
.geo-direction-map .maplibregl-ctrl-group button:not(:disabled):active .maplibregl-ctrl-icon,
.geo-map-inset-btn:not(:disabled):hover .geo-map-inset-icon,
.geo-map-inset-btn:not(:disabled):active .geo-map-inset-icon {
  opacity: var(--geo-ctrl-icon-op-hover, 0.92);
}

.geo-map-inset-icon--expand {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M6 11V6h5M18 6h5v5M23 18v5h-5M11 23H6v-5' stroke='%23dce2ee' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}

.geo-map-inset-icon--close {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M9.5 9.5l10 10M19.5 9.5l-10 10' stroke='%23dce2ee' stroke-width='2.2' fill='none'/%3E%3C/svg%3E");
}

.geo-map-inset-btn:not(:disabled):hover .geo-map-inset-icon--expand,
.geo-map-inset-btn:not(:disabled):active .geo-map-inset-icon--expand {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M6 11V6h5M18 6h5v5M23 18v5h-5M11 23H6v-5' stroke='%23f2f6ff' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}

.geo-map-inset-btn:not(:disabled):hover .geo-map-inset-icon--close,
.geo-map-inset-btn:not(:disabled):active .geo-map-inset-icon--close {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M9.5 9.5l10 10M19.5 9.5l-10 10' stroke='%23f2f6ff' stroke-width='2.2' fill='none'/%3E%3C/svg%3E");
}

.geo-direction-map {
  --geo-map-h: min(48vh, 380px);
  --geo-map-min-h: clamp(200px, 36vh, 280px);
  --geo-ctrl-size: 29px;
  --geo-ctrl-margin: 10px;
  --geo-ctrl-bg: rgba(32, 36, 48, 0.58);
  --geo-ctrl-bg-hover: rgba(48, 54, 68, 0.72);
  --geo-ctrl-border: rgba(120, 132, 168, 0.14);
  --geo-ctrl-divider: rgba(120, 132, 168, 0.12);
  --geo-ctrl-icon-op: 0.68;
  --geo-ctrl-icon-op-hover: 0.92;
  width: 100%;
  height: var(--geo-map-h);
  min-height: var(--geo-map-min-h);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(190, 150, 220, 0.12);
  background: #0d1118;
  position: relative;
}

.geo-direction-map .maplibregl-ctrl-top-left,
.geo-direction-map .maplibregl-ctrl-top-right {
  margin: var(--geo-ctrl-margin);
}

.geo-direction-map__status {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(198, 194, 214, 0.88);
  background: rgba(8, 10, 18, 0.82);
  pointer-events: none;
}

.geo-direction-map__status--error {
  color: rgba(224, 140, 140, 0.95);
}

.geo-origin-pin {
  position: relative;
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.geo-origin-pin__pulse,
.geo-origin-pin__ring,
.geo-origin-pin__core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.geo-origin-pin__pulse {
  width: 36px;
  height: 36px;
  background: rgba(190, 150, 220, 0.18);
  animation: geo-origin-pulse 2.4s ease-out infinite;
}

.geo-origin-pin__ring {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(243, 223, 165, 0.95);
  background: rgba(190, 150, 220, 0.16);
  box-shadow: 0 0 0 4px rgba(190, 150, 220, 0.2);
}

.geo-origin-pin__core {
  width: 10px;
  height: 10px;
  background: #c8a4dc;
  border: 2px solid #fff7e8;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.geo-origin-pin__label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 14rem;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(8, 10, 18, 0.92);
  border: 1px solid rgba(190, 150, 220, 0.28);
  color: rgba(243, 223, 165, 0.95);
  font-size: 0.58rem;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

@keyframes geo-origin-pulse {
  0% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.72);
  }
  70% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

.geo-direction-map .maplibregl-map {
  width: 100%;
  height: 100%;
  background: #0d1118;
}

/* Zoom / fullscreen: приглушённые контролы, ярче при hover */
.geo-direction-map .maplibregl-ctrl-group {
  background: var(--geo-ctrl-bg) !important;
  border: 1px solid var(--geo-ctrl-border);
  border-radius: 6px;
  box-shadow: none !important;
  overflow: hidden;
}

.geo-direction-map .maplibregl-ctrl-group button {
  width: var(--geo-ctrl-size);
  height: var(--geo-ctrl-size);
  background: var(--geo-ctrl-bg) !important;
  color: #dce2ee;
  border: none !important;
}

.geo-direction-map .maplibregl-ctrl-group button + button {
  border-top: 1px solid var(--geo-ctrl-divider) !important;
}

.geo-direction-map .maplibregl-ctrl-group button:not(:disabled):hover,
.geo-direction-map .maplibregl-ctrl-group button:not(:disabled):active {
  background: var(--geo-ctrl-bg-hover) !important;
  color: #1e2430;
}

.geo-direction-map .maplibregl-ctrl-group button:focus,
.geo-direction-map .maplibregl-ctrl-group button:focus-visible {
  box-shadow: none !important;
  outline: none;
}

.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8v13M8 14.5h13' stroke='%23dce2ee' stroke-width='2.2' fill='none'/%3E%3C/svg%3E") !important;
}

.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M8 14.5h13' stroke='%23dce2ee' stroke-width='2.2' fill='none'/%3E%3C/svg%3E") !important;
}

.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-in:not(:disabled):hover .maplibregl-ctrl-icon,
.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-in:not(:disabled):active .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8v13M8 14.5h13' stroke='%232a3040' stroke-width='2.2' fill='none'/%3E%3C/svg%3E") !important;
}

.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-out:not(:disabled):hover .maplibregl-ctrl-icon,
.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-zoom-out:not(:disabled):active .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M8 14.5h13' stroke='%232a3040' stroke-width='2.2' fill='none'/%3E%3C/svg%3E") !important;
}

.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M6 11V6h5M18 6h5v5M23 18v5h-5M11 23H6v-5' stroke='%23dce2ee' stroke-width='2' fill='none'/%3E%3C/svg%3E") !important;
}

.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon,
.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-shrink .geo-map-inset-icon--close {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M9.5 9.5l10 10M19.5 9.5l-10 10' stroke='%23dce2ee' stroke-width='2.2' fill='none'/%3E%3C/svg%3E") !important;
}

.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-fullscreen:not(:disabled):hover .maplibregl-ctrl-icon,
.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-fullscreen:not(:disabled):active .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M6 11V6h5M18 6h5v5M23 18v5h-5M11 23H6v-5' stroke='%23f2f6ff' stroke-width='2' fill='none'/%3E%3C/svg%3E") !important;
}

.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-shrink:not(:disabled):hover .maplibregl-ctrl-icon,
.geo-direction-map .maplibregl-ctrl-group button.maplibregl-ctrl-shrink:not(:disabled):active .maplibregl-ctrl-icon {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M9.5 9.5l10 10M19.5 9.5l-10 10' stroke='%23f2f6ff' stroke-width='2.2' fill='none'/%3E%3C/svg%3E") !important;
}

.geo-direction-map .maplibregl-ctrl-attrib,
.geo-direction-map .maplibregl-ctrl-attrib.maplibregl-compact,
.geo-direction-map .maplibregl-ctrl-attrib.maplibregl-compact-show {
  background-color: rgba(14, 17, 26, 0.9) !important;
  color: rgba(168, 152, 204, 0.72) !important;
  font-size: 0.58rem;
  line-height: 1.25;
  border-radius: 4px;
  margin: 0 4px 4px 0;
  box-shadow: none;
  border: 1px solid rgba(120, 132, 168, 0.22);
}

.geo-direction-map .maplibregl-ctrl-attrib.maplibregl-compact {
  padding: 0;
  min-height: 0;
}

.geo-direction-map .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button {
  background-color: rgba(14, 17, 26, 0.9) !important;
  color: rgba(168, 152, 204, 0.8) !important;
  border: none;
  box-shadow: none;
}

.geo-direction-map .maplibregl-ctrl-attrib.maplibregl-compact-show {
  max-width: min(92vw, 320px);
  padding: 4px 8px;
}

.geo-direction-map .maplibregl-ctrl-attrib a {
  color: rgba(190, 150, 220, 0.78) !important;
}

.chart-tables-stack .geo-direction-row {
  --geo-ray-color: #c8a4dc;
}

.chart-tables-stack .geo-direction-row:hover td,
.chart-tables-stack .geo-direction-row:focus-visible td {
  background: color-mix(in srgb, var(--geo-ray-color) 5%, transparent);
}

.chart-tables-stack .geo-direction-row.geo-row--active td {
  background: color-mix(in srgb, var(--geo-ray-color) 7%, transparent);
}

.chart-tables-stack .geo-direction-row .asp-expr-wrap {
  gap: 0;
  line-height: inherit;
}

.geo-planet-name {
  color: var(--text-value);
}

.geo-val {
  color: var(--text-value);
}

.geo-val--azimuth {
  font-variant-numeric: tabular-nums;
}

.geo-cell-btn {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-value);
  font: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.geo-cell-btn:hover,
.geo-cell-btn:focus-visible {
  color: color-mix(in srgb, var(--geo-ray-color, #c8a4dc) 42%, var(--text-value));
  outline: none;
}

.geo-cell-btn:focus-visible {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--geo-ray-color, #c8a4dc) 22%, transparent);
  border-radius: 4px;
}

.geo-cell-btn--active {
  color: var(--text-value);
}

.chart-tables-stack tr.geo-row--active .geo-cell-btn--active {
  background: color-mix(in srgb, var(--geo-ray-color) 9%, transparent);
  border-radius: 4px;
  padding: 0.12rem 0.2rem;
}

.geo-empty {
  color: var(--text-value-soft);
}

.geo-empty--suppressed {
  opacity: 0.45;
  cursor: help;
}

.geo-empty--hoverable {
  cursor: help;
}

.geo-val--house .asp-expr-tag {
  margin-top: 0.12em;
}

.chart-tables-stack .bal-el--fire .bal-val { color: rgba(210, 150, 120, 0.88); }
.chart-tables-stack .bal-el--earth .bal-val { color: rgba(140, 175, 120, 0.88); }
.chart-tables-stack .bal-el--air .bal-val { color: rgba(150, 175, 210, 0.88); }
.chart-tables-stack .bal-el--water .bal-val { color: rgba(120, 165, 210, 0.88); }

/* Ячеистый hover: якорь .sb-hover-cell / data-hover-* (см. hover-ui.mdc). */
.sb-hover-cell {
  cursor: default;
}

.chart-row-clickable {
  cursor: default;
  transition: background 0.15s;
}

.chart-row-clickable:hover td,
.chart-row-clickable:focus-visible td {
  background: rgba(120, 110, 180, 0.05);
}

.chart-row-clickable:focus-visible {
  outline: none;
}

.chart-tables-stack .block-panel > .table-wrap--scroll + .table-wrap--scroll {
  margin-top: var(--block-content-gap);
}

.chart-tables-stack .rad-checks-table td.rad-check__val {
  font-variant-numeric: tabular-nums;
}

.chart-tables-stack .rad-checks-table tr.rad-check--strike td {
  background: rgba(230, 140, 140, 0.07);
}

.chart-tables-stack .rad-checks-table tr.rad-check--caution td {
  background: rgba(220, 198, 140, 0.07);
}

.chart-tables-stack .rad-checks-table tr.rad-check--strike .rad-check__label {
  color: var(--tone-alert);
}

.chart-tables-stack .rad-checks-table tr.rad-check--caution .rad-check__label {
  color: var(--tone-warn);
}

.asp-connection--warn {
  color: var(--tone-warn);
}

.chart-tables-stack tr.kv-row--active .tbl-kv-label {
  color: var(--tone-warn);
}

.chart-tables-stack .tbl-kv-col-label,
.chart-tables-stack .tbl-kv-label {
  width: 1%;
  max-width: max-content;
  vertical-align: middle;
  color: var(--text-muted);
  white-space: nowrap;
}

.chart-tables-stack .tbl-kv-col-value,
.chart-tables-stack .tbl-kv-value {
  width: auto;
  vertical-align: middle;
  white-space: nowrap;
  text-align: right;
}

.rad-roles-subsection__title {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.1;
  font-family: var(--font-body);
  font-size: var(--table-fs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin: 0 0 var(--block-content-gap);
}

.rec-by-planet {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.rec-table tr.rec-planet-head td.rec-planet-title-cell {
  border-bottom: none;
  padding-top: 6px;
  padding-bottom: 4px;
}

.rec-table tr.rec-planet-head:first-child td.rec-planet-title-cell {
  padding-top: 0;
}

.rec-table tr.rec-planet-head:not(:first-child) td.rec-planet-title-cell {
  border-top: 1px solid rgba(50, 56, 80, 0.28);
}

.rec-planet-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  font-size: inherit;
  line-height: inherit;
}

.chart-tables-stack .rec-planet-name {
  font-weight: 500;
  color: var(--text-value);
}

.chart-tables-stack .rec-planet-meta {
  color: var(--text-value-soft);
}

.chart-tables-stack .rec-expr {
  display: inline;
}

.chart-tables-stack .rec-expr__arrow {
  opacity: 0.72;
}

.rec-planet-section + .rec-planet-section {
  margin-top: 4px;
}

.rec-planet-section-title {
  padding: 2px 0 3px;
  font-size: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(168, 152, 204, 0.62);
}

/* Взаимная рецепция: обитель / экзальтация — голубой */
.rec-mutual-harmonic td {
  background: rgba(70, 140, 210, 0.05);
}


/* Взаимная рецепция: изгнание / падение — сиреневый */
.rec-mutual-hostile td {
  background: rgba(150, 90, 150, 0.05);
}

/* Сила рецепции: обитель/экзальтация — полная; трипл/терм/фас — мягче; перегрин — ещё слабее */
.rec-tier-soft .rec-expr,
.rec-tier-soft .col-rec-type .tbl-cell-tag {
  opacity: 0.72;
}

.rec-tier-faint .rec-expr,
.rec-tier-faint .col-rec-type .tbl-cell-tag {
  opacity: 0.46;
}

.rec-block + .rec-block {
  margin-top: 6px;
}

.rec-group-title {
  padding: 10px 0 5px;
}

.rec-block:first-child .rec-group-title {
  padding-top: 2px;
}

/* Рецепции — скролл только через .table-wrap--h-scroll */

.chart-tables-stack .rec-table tbody tr:last-child td {
  border-bottom: none;
}

.rec-subhead td {
  border-bottom: none;
  padding: 9px 0 4px;
}

.rec-subhead span {
  letter-spacing: 0.04em;
  color: rgba(168, 152, 204, 0.52);
}

/* SSOT: символы планет/узлов — фиксированная em-коробка, одна линия */
.aq-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125em;
  height: 1.125em;
  line-height: 1;
  font-size: 1em;
  flex-shrink: 0;
  vertical-align: middle;
  text-align: center;
  box-sizing: border-box;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", var(--font-body), sans-serif;
}

.glyph-seq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.12em;
  vertical-align: middle;
}

.glyph-seq__g {
  font-size: 0.94em;
}

.glyph-seq__mid {
  font-size: 0.85em;
  line-height: 1;
  opacity: 0.46;
  color: rgba(168, 152, 204, 0.75);
}

.glyph-seq__asp {
  font-size: 0.92em;
  line-height: 1;
  opacity: 0.72;
  letter-spacing: 0;
  color: rgba(190, 150, 220, 0.82);
}

.table-wrap {
  overflow-x: clip;
  max-width: 100%;
}

.table-wrap--scroll {
  overscroll-behavior-x: contain;
}

.chart-tables-stack .table-wrap.table-wrap--scroll.table-wrap--h-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.table-wrap::-webkit-scrollbar {
  height: 3px;
  width: 3px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
  margin: 0 4px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(168, 152, 204, 0.14);
  border-radius: 999px;
}

.table-wrap:hover::-webkit-scrollbar-thumb {
  background: rgba(168, 152, 204, 0.24);
}

.table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(190, 150, 220, 0.32);
}

.chart-tables-stack .house-choice-empty {
  margin: var(--block-content-gap) 0 0;
  opacity: 0.85;
}

.chart-tables-stack td.h-num { color: var(--text-value); }

.chart-tables-stack :is(th, td).h-ruler-alm {
  font-variant-numeric: tabular-nums;
}

.chart-tables-stack .h-num-label {
  display: inline;
  white-space: nowrap;
  font-size: inherit;
}

.chart-tables-stack .h-num-roman {
  font-family: var(--font-heading);
  font-weight: 500;
}

.chart-tables-stack .h-num-roman--angle {
  color: var(--gold);
  font-weight: 700;
}

.chart-tables-stack .h-num-pos {
  margin-left: 0.15em;
  font-size: 0.92em;
  font-weight: 500;
  color: var(--text-value-soft);
}

.chart-tables-stack .h-num-pos--angle {
  color: var(--gold-muted);
  font-weight: 600;
}

.chart-tables-stack .h-meta,
.chart-tables-stack .h-data {
  display: block;
  max-width: 100%;
  line-height: var(--row-lh);
  overflow: visible;
  text-overflow: clip;
}

.chart-tables-stack .h-meta {
  font-weight: 500;
  white-space: nowrap;
}

.chart-tables-stack .h-meta--green { color: var(--tone-ok); }

.chart-tables-stack .h-meta--gray { color: rgba(148, 155, 164, 0.96); }

.chart-tables-stack .h-meta--red { color: var(--tone-alert); }

.chart-tables-stack .h-data {
  color: var(--text-value);
}

.asp-connection--angle {
  color: var(--gold);
}

.asp-expr-tag--acc-strong {
  color: var(--tone-ok);
}

.asp-expr-tag--acc-medium {
  color: var(--text-muted);
}

.asp-expr-tag--acc-weak {
  color: var(--tone-alert);
}

.chart-tables-stack :is(.pt-mean-speed, .pt-speed) {
  font-variant-numeric: tabular-nums;
}

.chart-tables-stack .pt-dignity-val {
  font-weight: 500;
}

.chart-tables-stack .pt-dignity-val--green { color: var(--tone-ok); }

.chart-tables-stack .pt-dignity-val--soft { color: rgba(120, 195, 155, 0.92); }

.chart-tables-stack .pt-dignity-val--gray { color: rgba(148, 155, 164, 0.96); }

.chart-tables-stack .pt-dignity-val--red { color: var(--tone-alert); }

/* ---- Data tables: типографика/ячейки; width/layout — chart-responsive.css (SSOT wrap) ---- */
.data-table {
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: var(--table-fs);
  line-height: var(--table-lh);
  letter-spacing: -0.01em;
}

.data-table th {
  padding: var(--table-pad-y) var(--table-pad-x) var(--table-pad-y) 0;
  color: rgba(168, 152, 204, 0.48);
  font-weight: 400;
  font-size: var(--table-fs);
  line-height: var(--table-lh);
  text-transform: uppercase;
  letter-spacing: 0.045em;
  border-bottom: 1px solid var(--table-head-border);
  white-space: nowrap;
  vertical-align: middle;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 0;
}

.data-table td {
  padding: var(--table-pad-y) var(--table-pad-x) var(--table-pad-y) 0;
  border-bottom: 1px solid var(--table-row-border);
  vertical-align: middle;
  line-height: var(--table-lh);
  color: rgba(168, 152, 204, 0.78);
  font-weight: 400;
}

/* Сетка brief: вертикальные линии между колонками — тот же токен, что у строк */
.data-table :is(th, td):not(:last-child) {
  border-right: 1px solid var(--table-row-border);
}

.chart-tables-stack table td {
  overflow-wrap: normal;
  word-break: normal;
}

/* Таблицы brief (15 блоков): кегль только с токенов стека, не inherit от панелей */
.chart-tables-stack table.data-table {
  font-size: var(--table-fs);
  line-height: var(--table-lh);
}

.chart-tables-stack table.data-table :is(td, th) {
  line-height: var(--table-lh);
}

.chart-tables-stack table.data-table td {
  font-size: var(--table-fs);
}

.chart-tables-stack table.data-table th {
  font-size: var(--table-head-fs);
}

/*
 * Brief tables — выравнивание (SSOT): 1-й столбец слева, последний справа, между — по центру;
 * вертикаль middle; flex-теги — start / center / end. Исключение: tr.asp-empty-row.
 */
.chart-tables-stack table :is(th, td) {
  padding: var(--table-pad-y) var(--table-cell-inset-x);
  vertical-align: middle;
  text-align: center;
}

.chart-tables-stack table :is(th:first-child, td:first-child) {
  text-align: left;
  padding-left: 0;
}

.chart-tables-stack table :is(th:last-child, td:last-child) {
  text-align: right;
  padding-right: 0;
}

.chart-tables-stack table tr.asp-empty-row > :is(td, th) {
  text-align: center;
}

.chart-tables-stack .rec-table td.rec-planet-title-cell {
  text-align: left;
}

.chart-tables-stack table :is(td, th) .tbl-cell-tags {
  justify-content: center;
}

.chart-tables-stack table :is(td:first-child, th:first-child) .tbl-cell-tags {
  justify-content: flex-start;
}

.chart-tables-stack table :is(td:last-child, th:last-child) .tbl-cell-tags {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.chart-tables-stack table :is(.h-meta, .pt-dignity-val) {
  font-size: var(--table-status-fs);
  line-height: var(--table-status-lh);
}

.chart-tables-stack .table-wrap--scroll table :is(th, td) {
  box-sizing: border-box;
}

.chart-tables-stack table :is(.h-data, .h-meta, .hc-cell-inner) {
  max-width: 100%;
  overflow: visible;
}

/*
 * Brief tables — роли колонок (один смысл на класс):
 * tbl-pin   — номер дома / роли (фикс. ширина)
 * tbl-slot  — слот данных (ширина по контенту)
 * tbl-text  — текстовая колонка (auto)
 * tbl-role  — узкая колонка роли (keep/change)
 * tbl-fill  — остаток строки после pin+role
 */
.chart-tables-stack table :is(th, td).tbl-pin {
  width: var(--tbl-pin-w);
  max-width: none;
  white-space: nowrap;
}

.chart-tables-stack table :is(th, td).tbl-slot {
  min-width: 0;
}

.chart-tables-stack table :is(th, td).tbl-text {
  min-width: 0;
}

.chart-tables-stack table :is(th, td).tbl-role {
  width: var(--tbl-role-w);
  max-width: none;
}

.chart-tables-stack table :is(th, td).tbl-fill {
  width: auto;
  min-width: 0;
  max-width: none;
}

.chart-tables-stack .rec-table .col-rec-glyphs {
  width: 1%;
  vertical-align: middle;
}

.chart-tables-stack .rec-table .col-rec-type {
  width: auto;
  vertical-align: middle;
}

.chart-tables-stack table :where(
  .aq-glyph,
  .planet-glyph,
  .planet-name,
  .h-num,
  .h-geometry,
  .h-acc,
  .h-cusp,
  .h-ruler,
  .glyph-seq,
  .glyph-seq__g,
  .glyph-seq__mid,
  .glyph-seq__asp,
  .asp-names,
  .asp-timing-sign-name,
  .asp-timing-sign-mod,
  .asp-timing-house-num,
  .asp-timing-house-class,
  .asp-timing-logic,
  .asp-timing-duration,
  .asp-timing-target,
  .rad-check__desc,
  .rad-check__note,
  .rad-role__dign,
  .rad-role__inf,
  .col-stars,
  .star-link,
  .star-asp,
  .star-asp__planet,
  .star-asp__sym,
  .star-asp__orb,
  .rec-subhead span,
  .col-star-aspects
) {
  font-size: inherit;
  line-height: inherit;
}

/* Колоночные цветные теги (не под asp-expr-core) */
.chart-tables-stack table :is(.tbl-cell-tag, .h-meta, .pt-dignity-val, .asp-connection),
.chart-tables-stack td.asp-type-col .tag-indirect {
  font-size: var(--table-cell-tag-fs);
  line-height: var(--table-status-lh);
  font-weight: 500;
}

.chart-tables-stack table .sb-chip:not(.sb-chip--value):not(.sb-chip--placement):not(.sb-chip--planet):not(.sb-chip--time):not(.sb-chip--text):not(.sb-chip--note):not(.sb-chip--level):not(.sb-chip--empty) {
  font-size: var(--table-cell-tag-fs);
  line-height: var(--table-status-lh);
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.planet-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.planet-name {
  color: var(--text-value);
  font-weight: 400;
}

.planet-glyph {
  opacity: 0.95;
}

.col-orb,
.col-speed {
  font-variant-numeric: tabular-nums;
}

.tag-dignity-good { color: var(--green); }
.tag-dignity-bad { color: var(--red); }

/* ---- Block intro (единая система: иконка в заголовке + текст по клику) ---- */
.heading-title-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
  line-height: 1;
}

.heading-title-text {
  min-width: 0;
}

.chart-tables-stack .section-intro {
  font-family: var(--font-body);
  font-size: var(--intro-fs);
  font-weight: 400;
  color: rgba(168, 152, 204, 0.68);
  line-height: var(--intro-lh);
  letter-spacing: -0.01em;
  margin: 0;
  padding: 0;
}

.chart-tables-stack .section-intro :is(
  .section-intro-lead,
  .section-intro-guide,
  .house-choice-kinds,
  .house-choice-kinds-title,
  .house-choice-kinds-list,
  .house-choice-kind-label
) {
  font: inherit;
  color: inherit;
}

.chart-section:not(.collapsed) .section-intro.is-expanded,
.chart-section:not(.collapsed) .section-intro:not(.is-collapsible) {
  margin-bottom: var(--block-content-gap);
}

.section-intro.is-collapsible:not(.is-expanded) {
  display: none;
}

.house-choice-kinds {
  margin: 0.65rem 0 0.85rem;
}
.house-choice-kinds-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.house-choice-kinds-list {
  margin: 0;
  padding-left: 1.1rem;
}
.house-choice-kind-label {
  font-weight: 600;
}
.chart-tables-stack .hc-rda-th-role {
  display: block;
  font-weight: 600;
  line-height: 1.2;
}
.chart-tables-stack .hc-rda-th-variant {
  display: block;
  font-size: 0.82em;
  font-weight: 500;
  opacity: 0.88;
  line-height: 1.15;
  margin-top: 0.12rem;
}
.house-choice-intro .section-intro-guide {
  display: block;
  margin-top: 0.65em;
}

/* Отчёт пайплайна (Прямые аспекты) */
#aspectsPipelineReport {
  box-sizing: border-box;
  margin: 0 0 var(--block-content-gap);
  padding: 1rem;
  max-height: min(70vh, 520px);
  overflow: auto;
  font: 400 var(--intro-fs) / 1.45 var(--font-body);
  color: rgba(168, 152, 204, 0.8);
  border-radius: 8px;
  border: 1px solid rgba(190, 150, 220, 0.22);
  background: rgba(40, 32, 58, 0.35);
}

#aspectsPipelineReport[hidden],
#aspectsPipelineReport.is-collapsible:not(.is-expanded) {
  display: none;
}

#aspectsPipelineReport > p:first-child {
  margin: 0 0 0.4rem;
  font-weight: 600;
  font-size: 0.92em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(190, 150, 220, 0.88);
}

#aspectsPipelineReport > p:nth-child(2) {
  margin: 0 0 0.5rem;
  color: rgba(168, 152, 204, 0.72);
}

#aspectsPipelineReport > p:nth-child(3) {
  margin: 0 0 0.85rem;
  padding-bottom: 0.75rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(190, 150, 220, 0.14);
}

#aspectsPipelineReport > section {
  margin-top: 0.75rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(190, 150, 220, 0.26);
}

#aspectsPipelineReport h5 {
  margin: 0 0 0.45rem;
  font-size: 0.94em;
  font-weight: 600;
  color: rgba(190, 150, 220, 0.78);
}

#aspectsPipelineReport section > div {
  margin-top: 0.45rem;
  padding-left: 0.55rem;
}

#aspectsPipelineReport h6 {
  margin: 0 0 0.3rem;
  font-size: 0.86em;
  font-weight: 600;
}

#aspectsPipelineReport ul {
  margin: 0;
  padding-left: 1.1rem;
}

#aspectsPipelineReport li {
  margin: 0.35rem 0;
  font-size: 0.92em;
  list-style: disc;
}

#aspectsPipelineReport .asp-pipeline-entry__head {
  font-weight: 600;
  color: rgba(218, 208, 238, 0.98);
}

#aspectsPipelineReport .asp-pipeline-entry__body {
  margin-top: 0.2rem;
  padding-left: 0.15rem;
  font-weight: 400;
  color: rgba(198, 192, 218, 0.92);
}

#aspectsPipelineReport .asp-pipeline-entry--plain .asp-pipeline-entry__head {
  color: rgba(200, 230, 210, 0.98);
}

#aspectsPipelineReport .asp-pipeline-entry--plain .asp-pipeline-entry__body {
  color: rgba(175, 205, 185, 0.88);
}

#aspectsPipelineReport .asp-pipeline-entry--break .asp-pipeline-entry__head {
  color: rgba(255, 195, 210, 0.98);
}

#aspectsPipelineReport .asp-pipeline-entry--break .asp-pipeline-entry__body {
  color: rgba(240, 180, 195, 0.92);
}

#aspectsPipelineReport .asp-pipeline-step-intake {
  font-size: var(--table-fs);
  line-height: var(--table-lh);
  color: var(--text-muted);
  margin: 0.35rem 0 0.65rem;
}

#aspectsPipelineReport .asp-pipeline-sec__title {
  font-weight: 600;
}

#aspectsPipelineReport .asp-pipeline-sec__title--plain {
  color: rgba(130, 210, 155, 0.95);
}

#aspectsPipelineReport .asp-pipeline-sec__title--break {
  color: rgba(232, 160, 176, 0.92);
}

/* Колонка «Аспект»: цвет имён планет (SSOT aspect_expr_tone) */
.chart-tables-stack .asp-expr-core--plain,
.chart-tables-stack .asp-expr-core--connect {
  color: rgba(148, 210, 168, 0.96);
}

.chart-tables-stack .asp-expr-core--break,
.chart-tables-stack .asp-expr-core--block {
  color: var(--tone-break);
}

#aspectsPipelineReport .asp-pipeline-sec__title--separating {
  color: rgba(168, 190, 220, 0.9);
}

.asp-character-rule {
  font-size: var(--table-fs);
  line-height: var(--table-lh);
  color: var(--text-muted);
  font-style: italic;
  margin-top: var(--block-content-gap);
}

.asp-connection {
  display: inline-block;
  padding: var(--chip-padding);
  border-radius: var(--chip-radius);
  line-height: var(--table-status-lh);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.01em;
  border: none;
  background: var(--chip-surface);
  box-shadow: var(--chip-shadow);
}

/* Тип аспекта: гармоничный — зелёный, напряжённый — красный, нейтральный — серый */
.asp-connection--harmonious,
.asp-connection--connects {
  color: var(--tone-applying);
}

.asp-connection--tense,
.asp-connection--blocks {
  color: var(--tone-alert);
}

.asp-connection--neutral {
  color: var(--text-muted);
}

.chart-detail-nature.asp-connection {
  display: inline-block;
  margin-bottom: 10px;
}

.chart-tables-stack td.asp-mechanism-col .tag {
  white-space: nowrap;
}

.chart-tables-stack :is(td.col-orb, th.col-metric-col, td.asp-timing-sign-col, td.asp-timing-tempo-col) {
  font-variant-numeric: tabular-nums;
}

.chart-tables-stack .asp-timing-house-num {
  font-variant-numeric: tabular-nums;
}

.chart-tables-stack td.asp-timing-logic-col {
  color: var(--text-muted);
}

.intro-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 0.56rem;
  height: 0.56rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(190, 150, 220, 0.3);
  border-radius: 50%;
  background: rgba(190, 150, 220, 0.06);
  color: rgba(190, 150, 220, 0.8);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.intro-toggle::before {
  content: 'i';
  display: block;
  font-family: var(--font-body);
  font-size: 0.34rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  text-align: center;
}

.intro-toggle[aria-expanded='true'] {
  background: rgba(190, 150, 220, 0.14);
  border-color: rgba(190, 150, 220, 0.48);
  color: rgba(190, 150, 220, 0.95);
}

.intro-toggle:hover {
  background: rgba(190, 150, 220, 0.11);
  border-color: rgba(190, 150, 220, 0.42);
}

.heading-title-row .toggle-rows-btn {
  align-self: center;
}

/* Колоночные теги: чип в ячейке (tbl-cell-tag) */
.chart-tables-stack table :is(.tag.tbl-cell-tag, .asp-connection.tbl-cell-tag) {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1px 5px;
  line-height: var(--table-status-lh);
}

.chart-tables-stack .asp-expr-wrap .asp-connection {
  display: inline-flex;
  font-size: var(--table-subtag-fs);
  font-weight: 500;
  padding: 0;
}

.chart-tables-stack td.asp-mechanism-col .asp-mechanism {
  font-weight: 400;
  color: var(--text-value-soft);
}

.aspects-subsection {
  margin-top: 4px;
}

.chart-section > h3 .section-h3-head,
.chart-section > h3 > .heading-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 12rem;
  max-width: 100%;
  line-height: 1;
}

.chart-section > h3 .section-h3-title,
.chart-section > h3 .heading-title-text {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  line-height: 1.1;
}

.chart-section:not(.collapsed) > h3 .section-toolbar-mount {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin: 0;
  padding: 0;
}

.chart-section > h3 .section-h3-tools {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex-wrap: nowrap;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.chart-section > h3 .section-h3-tools .section-toolbar-mount {
  flex: 1 1 auto;
  min-width: 0;
}

.chart-section > h3 .section-h3-tools .motion-display-toolbar {
  flex-wrap: wrap;
}

.chart-section > h3 .section-toolbar-mount .motion-display-toolbar,
.chart-section > h3 .section-toolbar-mount .aspects-direct-toolbar {
  align-items: center;
}

.chart-section > h3 .toggle-rows-btn {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
}

.chart-section > .aspects-subsection:first-child {
  margin-top: 0;
}

.aspects-subsection + .aspects-subsection {
  margin-top: var(--stack-gap);
  padding-top: calc(var(--row-pad-y) * 3);
  border-top: 1px solid rgba(190, 150, 220, 0.1);
}

.aspects-subsection .aspects-subsection {
  margin-top: var(--stack-gap);
  padding-top: calc(var(--row-pad-y) * 3);
  border-top: 1px solid rgba(190, 150, 220, 0.1);
}

.aspects-subsection[hidden] {
  display: none !important;
}

/* Подзаголовки внутри блока brief (аспекты, выбор, …) — один стиль */
.aspects-subsection__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 var(--block-content-gap);
  font-family: var(--font-body);
  font-size: var(--table-fs);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(190, 150, 220, 0.72);
}

.aspects-subsection-toolbar-mount {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.aspects-subsection-toolbar-mount .motion-display-toolbar {
  margin: 0;
}

/* Срок/дата: классы из knowledge.aspect_timing_units_ssot (timing_row_class) */
.chart-tables-stack tr.asp-timing--applying :is(.asp-timing-duration, .asp-timing-target) {
  color: var(--tone-applying);
}

.chart-tables-stack tr.asp-timing--blocks :is(.asp-timing-duration, .asp-timing-target) {
  color: var(--tone-alert);
}

.chart-tables-stack tr.asp-timing--separating :is(.asp-timing-duration, .asp-timing-target) {
  color: var(--text-muted);
}

/* Срок / дата — перенос во всех тайминг-таблицах */
.asp-timing-duration-col,
.asp-timing-target-col,
.asp-timing-duration,
.asp-timing-target {
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.asp-timing-duration,
.asp-timing-target {
  display: inline-block;
  max-width: 100%;
}

.chart-tables-stack tr.motion-sep-row :is(.asp-timing-duration, .asp-timing-target) {
  color: var(--text-violet);
}

.chart-tables-stack :is(.asp-timing-sign-mod, .asp-timing-house-class) {
  display: inline;
  margin-left: 0.35em;
  color: var(--text-muted);
}

.chart-tables-stack table tr.asp-empty-row > td {
  white-space: normal;
  padding: var(--table-pad-y) var(--table-pad-x);
  color: var(--text-muted);
}

.tag-indirect {
  color: var(--text-secondary);
}

.chart-section:not(.collapsed) .sun-condition-sun + #sunConditionBody #sunConditionWrap {
  margin-top: var(--block-content-gap);
}


.asp-mechanism {
  margin: 0;
}

.ant-card {
  padding: var(--row-pad-y) 0;
  margin-bottom: var(--row-pad-y);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}

.ant-card:last-child { margin-bottom: 0; }
.ant-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
  color: var(--text-value-strong);
  line-height: 1.25;
}

.ant-planet {
  font-weight: 500;
  color: var(--text-value-strong);
}

.ant-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.125em;
  font-size: 0.82em;
  opacity: 0.55;
  color: var(--text-value-soft);
}

.ant-type {
  opacity: 0.6;
  margin-left: 2px;
  color: var(--text-value-soft);
}
.ant-detail { color: var(--text-value); }
.ant-orb { opacity: 0.55; margin-left: 4px; color: var(--text-muted); }

.col-stars {
  color: var(--text-value-soft);
  max-width: none;
  white-space: normal;
}

.star-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  font: inherit;
  font-size: inherit;
  color: var(--text-value);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(168, 152, 204, 0.32);
  text-underline-offset: 2px;
}

.star-link:hover,
.star-link:focus-visible {
  color: var(--text-value-strong);
  text-decoration-color: rgba(168, 152, 204, 0.55);
  outline: none;
}

.star-link-sep {
  color: var(--text-muted);
  text-decoration: none;
  pointer-events: none;
}

.col-star-aspects {
  white-space: normal;
  min-width: 8rem;
  max-width: 280px;
  vertical-align: middle;
}

.star-aspects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 7px;
}

.star-asp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(8, 10, 18, 0.48);
  border: 1px solid rgba(50, 56, 80, 0.3);
  line-height: 1;
  white-space: nowrap;
}

.star-asp__planet {
  opacity: 0.94;
}

.star-asp .aq-glyph {
  width: 1.1em;
  height: 1.1em;
}

.star-asp__sym {
  color: rgba(190, 150, 220, 0.78);
  opacity: 0.88;
}

.star-asp__orb {
  font-variant-numeric: tabular-nums;
  color: rgba(168, 152, 204, 0.72);
  letter-spacing: 0.02em;
}

.star-asp--sep,
.motion-sep-chip {
  display: none;
  opacity: 0.82;
}

.table-wrap.motion-show-sep .star-asp--sep,
.table-wrap.motion-show-sep .motion-sep-chip {
  display: inline-flex;
}

.toggle-star-sep-btn {
  display: block;
  width: fit-content;
  margin: 0 0 10px;
}

.brief-json-panel {
  margin-top: 28px;
  background: rgba(38, 44, 62, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.brief-json-panel summary {
  cursor: pointer;
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1rem;
  user-select: none;
}

.brief-json-pre {
  margin: 14px 0 0;
  padding: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow: auto;
  max-height: 480px;
  color: var(--text-secondary);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 152, 204, 0.28) transparent;
}

.brief-json-pre::-webkit-scrollbar {
  height: 3px;
  width: 3px;
}

.brief-json-pre::-webkit-scrollbar-track { background: transparent; }

.brief-json-pre::-webkit-scrollbar-thumb {
  background: rgba(168, 152, 204, 0.22);
  border-radius: 999px;
}

.chart-section[data-block="plan"] .brief-plan-content {
  min-width: 0;
}

.chart-section[data-block="plan"] .brief-plan-intro {
  margin-bottom: var(--block-content-gap);
}

.chart-section[data-block="plan"] .brief-plan-global-pipeline {
  margin: 0 0 var(--block-content-gap);
}

.chart-section[data-block="plan"] .brief-plan-block-pipeline {
  margin: 0 0 0.45em;
}

.chart-section[data-block="plan"] .brief-plan-pipeline-label {
  margin: 0 0 0.2em;
  font-family: var(--font-body);
  font-size: var(--intro-fs);
  font-weight: 700;
  line-height: var(--intro-lh);
  color: rgba(168, 152, 204, 0.78);
}

.chart-section[data-block="plan"] .brief-plan-section {
  margin: 0 0 var(--block-content-gap);
}

.chart-section[data-block="plan"] .brief-plan-section:last-child {
  margin-bottom: 0;
}

.chart-section[data-block="plan"] .brief-plan-item-intro {
  margin: 0 0 0.35em;
}

.chart-section[data-block="plan"] .brief-plan-list {
  margin: 0 0 var(--block-content-gap);
  padding-left: 1.15em;
  font-family: var(--font-body);
  font-size: var(--intro-fs);
  line-height: var(--intro-lh);
  color: rgba(168, 152, 204, 0.68);
}

.chart-section[data-block="plan"] .brief-plan-list li {
  margin: 0.22em 0;
}

.chart-section[data-block="plan"] .brief-plan-source {
  margin: 0 0 0.45em;
  padding: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: calc(var(--intro-fs) * 0.92);
  font-weight: 400;
  line-height: 1.45;
  color: rgba(168, 152, 204, 0.62);
  word-break: break-word;
}

.chart-section[data-block="plan"] .brief-plan-subhead {
  margin: 0.55em 0 0.28em;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--intro-fs);
  font-weight: 700;
  line-height: var(--intro-lh);
  color: rgba(168, 152, 204, 0.82);
}

.chart-section[data-block="plan"] .brief-plan-item-intro + .brief-plan-subhead,
.chart-section[data-block="plan"] .brief-plan-list + .brief-plan-subhead {
  margin-top: 0.5em;
}

.chart-section[data-block="plan"] .brief-plan-subhead:first-child {
  margin-top: 0;
}

.chart-section[data-block="plan"] .brief-plan-section:last-child .brief-plan-list {
  margin-bottom: 0;
}

/* ---- Aspect table ---- */
/* Подпись под строкой: asp-expr-core (1-я строка) + asp-expr-tag / asp-expr-tags (2-я) */
.chart-tables-stack .asp-expr-wrap {
  display: inline-flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.14em;
  line-height: inherit;
  max-width: none;
  white-space: normal;
}

.chart-tables-stack table :is(td:last-child, th:last-child) .asp-expr-wrap {
  align-items: flex-end;
}

.chart-tables-stack table :is(td, th):not(:first-child):not(:last-child) .asp-expr-wrap {
  align-items: center;
}

.asp-expr-core {
  white-space: nowrap;
}

.asp-expr-tag {
  display: block;
  margin-left: 0;
  padding: 0;
  font-size: var(--table-subtag-fs);
  font-weight: 500;
  line-height: var(--table-status-lh);
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: none;
  background: none;
  box-shadow: none;
  opacity: 0.9;
}

.asp-expr-tag--harmonious {
  color: var(--tone-applying);
}

.asp-expr-tag--tense,
.asp-expr-tag--blocks {
  color: var(--tone-alert);
}

.asp-expr-tag--separating {
  color: var(--text-violet);
}

.asp-expr-tags {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: inherit;
  gap: 0.4em;
  max-width: 100%;
}

.asp-expr-tags .asp-expr-tag {
  display: inline;
  white-space: nowrap;
}

.asp-expr-tag--motion-app {
  color: var(--tone-applying);
  font-weight: 500;
}

.asp-expr-tag--motion-sep {
  color: var(--text-violet);
  font-weight: 500;
}

.asp-expr-tag--neutral {
  color: var(--text-muted);
}

.asp-expr-tag--warn {
  color: var(--tone-warn);
}

.asp-expr-tag--ok {
  color: var(--tone-ok);
}

.asp-expr-tag--alert {
  color: var(--tone-alert);
}

.asp-expr-tag--break {
  color: var(--tone-break);
}

.asp-expr-tag--antisc {
  color: rgba(190, 150, 220, 0.88);
}

.chart-tables-stack .asp-expr,
.chart-tables-stack .asp-expr-core,
.chart-tables-stack .geo-val {
  white-space: nowrap;
}

.asp-expr__asp {
  font-size: 0.92em;
  line-height: 1;
  opacity: 0.82;
  color: rgba(190, 150, 220, 0.88);
}

.asp-expr__asp--circle {
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin: 0 0.12em;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  vertical-align: 0.08em;
  box-sizing: border-box;
  opacity: 0.88;
}

.tag {
  display: inline-block;
  padding: var(--chip-padding);
  border-radius: var(--chip-radius);
  font-size: var(--table-fs);
  font-weight: 400;
  line-height: var(--table-lh);
  white-space: nowrap;
  border: none;
  background: var(--chip-surface);
  box-shadow: var(--chip-shadow);
}

.tag-applying {
  color: var(--tone-applying);
}

.tag-separating {
  color: var(--text-value-soft);
}

.tag-mechanism-static {
  color: var(--text-value-soft);
}

.tag-retrograde {
  color: var(--red);
  margin-left: 3px;
  vertical-align: middle;
}

.tag-combust {
  color: #ff6a1e;
  margin-left: 3px;
  vertical-align: middle;
}

.tag-sunbeams {
  color: #d4a020;
  margin-left: 3px;
  vertical-align: middle;
}

.tag-cazimi {
  color: var(--gold);
  margin-left: 3px;
  vertical-align: middle;
}

.tag-sun-opp {
  color: var(--red);
  margin-left: 3px;
  vertical-align: middle;
}

.sun-condition-sun {
  margin-bottom: var(--row-pad-y);
}

.sun-condition-sun-line {
  color: var(--text-value);
  font-weight: 500;
}

.sun-condition-empty {
  padding: var(--row-pad-y) 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.aspects-direct-toolbar,
.motion-display-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
}

.chart-section:not(.collapsed) > h3 .section-toolbar-mount .aspects-direct-toolbar,
.chart-section:not(.collapsed) > h3 .section-toolbar-mount .motion-display-toolbar,
.chart-section:not(.collapsed) > h3 .section-toolbar-mount .geo-map-toolbar {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chart-tables-stack .toggle-rows-btn {
  width: auto;
  max-width: 100%;
  padding: 3px 8px;
  font-size: 0.56rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.toggle-rows-btn {
  background: var(--chip-surface);
  border: 1px solid rgba(168, 152, 204, 0.14);
  color: rgba(168, 152, 204, 0.72);
  font-family: var(--font-body);
  font-weight: 400;
  padding: var(--chip-padding);
  margin: 0;
  border-radius: var(--chip-radius);
  box-shadow: var(--chip-shadow);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.toggle-rows-btn:hover {
  background: var(--chip-surface-hover);
  border-color: rgba(168, 152, 204, 0.28);
  color: var(--text-value);
}

.toggle-rec-btn {
  display: block;
  width: fit-content;
  margin: 2px 0 10px;
}

.rec-pos .rec-expr { color: rgba(100, 175, 130, 0.88); }
.rec-pos .rec-expr__arrow { color: rgba(100, 175, 130, 0.62); opacity: 1; }

.rec-neg .rec-expr { color: rgba(224, 100, 100, 0.92); }
.rec-neg .rec-expr__arrow { color: rgba(224, 100, 100, 0.65); opacity: 1; }

.rec-mutual-weak td {
  background: rgba(120, 110, 160, 0.04);
}

/* Взаимная рецепция: фон — по стилю взаимности; текст — по знаку рецепции */
.rec-mutual.rec-pos .rec-expr,
.rec-mutual.rec-pos .col-rec-type .pt-dignity-val {
  color: rgba(100, 175, 130, 0.88);
}

.rec-mutual.rec-pos .rec-expr__arrow {
  color: rgba(100, 175, 130, 0.62);
  opacity: 1;
}

.rec-mutual.rec-neg .rec-expr,
.rec-mutual.rec-neg .col-rec-type .pt-dignity-val {
  color: rgba(224, 100, 100, 0.92);
}

.rec-mutual.rec-neg .rec-expr__arrow {
  color: rgba(224, 100, 100, 0.65);
  opacity: 1;
}

.rec-intro em {
  font-style: normal;
  color: rgba(200, 188, 232, 0.92);
}

/* ---- Hover tip (SSOT: --tip-fs / --tip-lh) ---- */
.sb-hover-tip .hover-card {
  padding: var(--tip-pad);
}

.sb-hover-tip .hover-card--compact {
  padding: var(--tip-pad);
}

.sb-hover-tip .hover-card--planet {
  padding: 3px 5px 4px;
  min-width: 0;
  max-width: var(--tip-planet-max-w);
}

.sb-hover-tip .hover-card--stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--tip-stack-gap);
  text-align: center;
}

.sb-hover-tip .hover-card__primary {
  font-weight: 500;
  color: rgba(240, 240, 255, 0.94);
  line-height: 1.25;
  text-align: center;
  width: 100%;
}

.sb-hover-tip .hover-card__meta {
  font-size: var(--tip-meta-fs);
  color: rgba(168, 164, 188, 0.88);
  line-height: 1.22;
  text-align: center;
  width: 100%;
}

.sb-hover-tip .hover-card__title-text,
.sb-hover-tip .hover-card__title {
  font-weight: 500;
  color: rgba(240, 240, 255, 0.92);
  letter-spacing: 0.01em;
  font-size: inherit;
  line-height: 1.22;
}

.sb-hover-tip .hover-card__flag--retro {
  font-weight: 600;
  color: rgba(190, 150, 220, 0.88);
  line-height: 1;
}

.sb-hover-tip .hover-card__flags {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}

.sb-hover-tip .hover-card__flags .tag {
  margin: 0;
  padding: 0 3px;
  vertical-align: baseline;
}

.sb-hover-tip .hover-card__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.2em 0.32em;
  margin: 1px 0 0;
  width: 100%;
}

.sb-hover-tip .hover-card--planet.hover-card--stack {
  align-items: center;
}

.sb-hover-tip .hover-card__chips--tags .hover-chip {
  display: inline-block;
  padding: 0 0.32em;
  border-radius: 2px;
  background: rgba(100, 108, 140, 0.14);
  line-height: 1.28;
}

.sb-hover-tip .hover-card:has(.hover-card__chips) .hover-card__body {
  margin-top: 6px;
  padding-top: 4px;
}

/* Теги в hover-карточках — компактный текст, как asp-expr-tag (без крупных плашек). */
.sb-hover-tip .hover-chip {
  display: inline;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: var(--tip-tag-fs);
  line-height: 1.22;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.sb-hover-tip .hover-chip--pos {
  color: var(--tone-applying);
}

.sb-hover-tip .hover-chip--pos-soft {
  color: rgba(150, 205, 175, 0.92);
}

.sb-hover-tip .hover-chip--neg {
  color: var(--tone-alert);
}

.sb-hover-tip .hover-chip--muted,
.sb-hover-tip .hover-chip--neutral {
  color: var(--text-muted);
}

.sb-hover-tip .hover-chip--score-pos {
  font-variant-numeric: tabular-nums;
  color: rgba(190, 150, 220, 0.92);
}

.sb-hover-tip .hover-chip--score-neg {
  font-variant-numeric: tabular-nums;
  color: rgba(220, 140, 140, 0.92);
}

.sb-hover-tip .hover-chip--score-neutral {
  font-variant-numeric: tabular-nums;
  color: rgba(168, 168, 190, 0.88);
}

.sb-hover-tip .hover-card__title {
  font-weight: 600;
  color: var(--text-bright);
  text-align: center;
  letter-spacing: 0.01em;
}

.sb-hover-tip .hover-card__kicker {
  margin-top: 2px;
  color: var(--text-value);
  text-align: center;
}

.sb-hover-tip .hover-card__kicker--pos {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--text-value);
}

.sb-hover-tip .hover-card__badge {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3px 0 0;
}

.sb-hover-tip .hover-chip--tempo {
  font-size: var(--tip-tag-fs);
  line-height: 1.25;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.sb-hover-tip .hover-card__body,
.sb-hover-tip .hover-card__body-text {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sb-hover-tip .hover-card__body {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(120, 132, 168, 0.12);
  color: var(--text);
  text-align: left;
  white-space: normal;
}

.sb-hover-tip .hover-card__body-text {
  margin-bottom: 3px;
}

.sb-hover-tip .hover-card:has(.hover-card__body) .hover-card__note {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(120, 132, 168, 0.08);
}

.sb-hover-tip .hover-card__note {
  margin-top: 3px;
  color: var(--text-muted);
  text-align: left;
}

.sb-hover-tip .hover-card__lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-hover-tip .hover-card__line {
  padding: 2px 0;
  color: var(--text);
}

.sb-hover-tip .hover-card__line--pos {
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(85, 192, 128, 0.07);
  border-left: 2px solid rgba(85, 192, 128, 0.35);
}

.sb-hover-tip .hover-card__line--neg {
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(224, 85, 85, 0.07);
  border-left: 2px solid rgba(224, 85, 85, 0.35);
}

.sb-hover-tip .hover-card__line--muted {
  color: var(--text-muted);
}

.sb-hover-tip .chart-detail-nature {
  display: inline;
  padding: 0;
  border-radius: 0;
  font-size: var(--tip-tag-fs);
  line-height: 1.25;
  font-weight: 500;
  background: transparent;
}

.sb-hover-tip .chart-nature--harm,
.sb-hover-tip .chart-nature--tense,
.sb-hover-tip .chart-nature--neutral {
  background: transparent;
}

.sb-hover-tip .chart-nature--harm {
  color: var(--tone-applying);
}

.sb-hover-tip .chart-nature--tense {
  color: var(--tone-alert);
}

.sb-hover-tip .chart-nature--neutral {
  color: var(--text-muted);
}

.sb-hover-tip .chart-detail-pos {
  display: inline;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.chart-detail-pos--phrase {
  letter-spacing: 0.01em;
}

.chart-nature--harm {
  background: rgba(85, 192, 128, 0.15);
  color: var(--green);
}
.chart-nature--tense {
  background: rgba(224, 85, 85, 0.15);
  color: var(--red);
}
.chart-nature--neutral {
  background: rgba(168, 152, 204, 0.15);
  color: var(--text-violet);
}

.sb-hover-tip .lot-detail-aspects {
  margin-top: 3px;
  text-align: left;
}

.sb-hover-tip .lot-detail-aspects__title {
  color: var(--text-muted);
  margin-bottom: 1px;
}

.sb-hover-tip .lot-detail-aspects ul {
  margin: 0;
  padding-left: 0.85rem;
  color: var(--text);
}

.sb-hover-tip .lot-detail-aspects__more {
  color: var(--text-muted);
  list-style: none;
  margin-left: -0.85rem;
}

/* Responsive matrix → assets/css/chart-responsive.css */
