/* Общие стили модулей Проработки Рода (НейРо / Астро / Цифра) */
.mod-page {
    margin: -24px -15px 0;
    min-height: calc(100vh - 120px);
    padding: 32px 0 64px;
    position: relative;
}
.mod-page::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.08;
    pointer-events: none;
    background: url("../tree/parchment-bg.099ae71c0e3c.png") center/cover no-repeat;
}
.mod-page > .container { position: relative; z-index: 1; }

.mod-page--neurorod {
    background: radial-gradient(circle at top, rgba(232, 194, 82, 0.18), rgba(12, 18, 10, 0.96));
    --mod-accent: #e8c252;
    --mod-accent-soft: rgba(232, 194, 82, 0.2);
    --mod-text: #f0dba0;
}
.mod-page--cifrarod {
    background: radial-gradient(circle at top, rgba(64, 192, 160, 0.2), rgba(12, 18, 10, 0.96));
    --mod-accent: #6ee7c0;
    --mod-accent-soft: rgba(64, 192, 160, 0.2);
    --mod-text: #9dffd9;
}
.mod-page--astrorod {
    background: radial-gradient(circle at top, rgba(156, 112, 255, 0.22), rgba(12, 18, 10, 0.96));
    --mod-accent: #c4a6ff;
    --mod-accent-soft: rgba(156, 112, 255, 0.2);
    --mod-text: #e8d8ff;
}

.mod-badge {
    display: inline-block;
    border: 1px solid var(--mod-accent);
    color: var(--mod-text);
    background: var(--mod-accent-soft);
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}
.mod-hero-title {
    font-family: var(--font-heading);
    color: var(--mod-text);
    margin-bottom: 0.5rem;
}
.mod-hero-lead { color: rgba(240, 234, 214, 0.82); font-size: 1.05rem; }
.mod-hero-text { color: rgba(240, 234, 214, 0.68); max-width: 640px; margin: 0 auto 1.5rem; }
.mod-muted { color: rgba(240, 234, 214, 0.62); }
.mod-link { color: var(--mod-accent); text-decoration: none; }
.mod-link:hover { color: #fff; text-decoration: underline; }

.mod-btn-primary {
    background: linear-gradient(135deg, var(--mod-accent), color-mix(in srgb, var(--mod-accent) 70%, #000));
    border: 1px solid var(--mod-accent);
    color: #1a1510;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.65rem 1.5rem;
}
.mod-btn-primary:hover { filter: brightness(1.08); color: #0f0c08; }

.mod-panel, .mod-card {
    background: rgba(18, 32, 22, 0.55);
    border: 1px solid rgba(232, 194, 82, 0.2);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    backdrop-filter: blur(8px);
}
.mod-card-title { font-family: var(--font-heading); color: var(--mod-text); font-size: 1rem; margin: 0.5rem 0; }
.mod-card-body { color: rgba(240, 234, 214, 0.75); font-size: 0.92rem; line-height: 1.55; }

/* Библиотека — единые карточки статей */
.mod-library-panel { padding: 1.25rem 1.35rem; }
.mod-library-grid { --bs-gutter-x: 1rem; }
.mod-library-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 1.15rem 1.2rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(212, 168, 67, 0.28);
    background: linear-gradient(145deg, rgba(22, 36, 24, 0.82) 0%, rgba(18, 28, 20, 0.92) 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    color: inherit;
}
.mod-library-card:hover {
    transform: translateY(-3px);
    border-color: var(--mod-accent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 0 0 1px var(--mod-accent-soft);
    color: inherit;
}
.mod-library-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}
.mod-library-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--mod-accent);
    color: var(--mod-text);
    background: var(--mod-accent-soft);
}
.mod-library-chip--letopis {
    border-color: rgba(212, 168, 67, 0.55);
    color: #f0dba0;
    background: rgba(212, 168, 67, 0.15);
}
.mod-library-title {
    font-family: var(--font-heading);
    color: var(--mod-text);
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0 0 0.55rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mod-library-excerpt {
    flex-grow: 1;
    color: rgba(240, 234, 214, 0.68);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0 0 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mod-library-cta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--mod-accent);
    margin-top: auto;
}
.mod-library-article-body { padding: 1.5rem 1.6rem; }
.mod-library-content {
    color: rgba(240, 234, 214, 0.88);
    font-size: 1rem;
    line-height: 1.75;
}
.mod-library-content--html h1,
.mod-library-content--html h2,
.mod-library-content--html h3 {
    font-family: var(--font-heading);
    color: var(--mod-text);
    margin-top: 1.25rem;
}
.mod-library-content--html p { margin-bottom: 0.85rem; }
.mod-library-content--html ul,
.mod-library-content--html ol { padding-left: 1.25rem; }

.mod-panel--nested {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}
.mod-library-cover {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.35);
}
.mod-library-cover__media {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    background: #000;
}
.mod-library-cover__iframe {
    display: block;
    width: 100%;
    height: 220px;
    border: 0;
}

.astro-layout {
    display: grid;
    gap: 1.25rem;
}
.astro-layout-results:not(.d-none) {
    animation: modFadeIn 0.35s ease;
}
.astro-chart-panel {
    overflow: auto;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
}
.astro-chart-panel svg {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}
.mod-page--astrorod .astro-layout-form .mod-panel {
    margin-bottom: 0;
}
.astro-aspects-panel {
    padding: 1rem 1.1rem;
}
.astro-aspects-title {
    font-size: 1rem;
    margin: 0 0 0.75rem;
    color: var(--mod-text);
}
.astro-aspects-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--mod-text);
    font-size: 0.9rem;
}
.astro-aspects-table th {
    font-weight: 600;
    color: rgba(240, 234, 214, 0.65);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}
.astro-aspects-table td {
    vertical-align: middle;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.astro-aspect-badge {
    display: inline-block;
    padding: 0.12rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.astro-aspect-badge--conjunction { background: rgba(255, 190, 11, 0.22); color: #ffbe0b; }
.astro-aspect-badge--sextile { background: rgba(6, 214, 160, 0.18); color: #06d6a0; }
.astro-aspect-badge--square { background: rgba(239, 71, 111, 0.18); color: #ef476f; }
.astro-aspect-badge--trine { background: rgba(17, 138, 178, 0.2); color: #5ec8e8; }
.astro-aspect-badge--opposition { background: rgba(131, 56, 236, 0.2); color: #b794f6; }
.astro-aspect-badge--default { background: rgba(255, 255, 255, 0.1); color: var(--mod-text); }
.astro-aspects-orb {
    font-variant-numeric: tabular-nums;
    color: rgba(240, 234, 214, 0.75);
}
.astro-subtabs .nav-link.active {
    background: var(--mod-accent-soft, rgba(201, 162, 39, 0.25));
    color: var(--mod-text, #f0ead6);
}
.astro-subtabs .nav-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.astro-planets-panel,
.astro-interp-panel {
    padding: 1rem 1.1rem;
}
.astro-planets-title,
.astro-planets-meta {
    margin-bottom: 0.5rem;
}
.astro-planets-table th {
    color: rgba(240, 234, 214, 0.65);
}
.astro-planets-deg {
    font-variant-numeric: tabular-nums;
}
.astro-interp-heading {
    font-size: 1.05rem;
    margin: 0 0 0.25rem;
}
.astro-interp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
@media (max-width: 991px) {
    .astro-interp-grid {
        grid-template-columns: 1fr;
    }
}
.astro-interp-column-title {
    font-size: 0.95rem;
    margin: 0 0 0.65rem;
    color: var(--mod-accent, #c9a227);
}
.astro-interp-column-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.25rem;
}
.astro-interp-card {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.astro-interp-card:hover,
.astro-interp-card:focus {
    outline: none;
    border-color: rgba(201, 162, 39, 0.55);
    background: rgba(0, 0, 0, 0.4);
}
.astro-interp-card-title {
    font-size: 0.88rem;
    margin: 0 0 0.45rem;
    color: var(--mod-text);
}
.astro-interp-card-text {
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(240, 234, 214, 0.88);
    white-space: pre-wrap;
    max-height: 7.5rem;
    overflow: hidden;
    margin-bottom: 0.35rem;
}
.astro-interp-card-source {
    display: block;
    font-size: 0.72rem;
}
.astro-interp-modal-text {
    white-space: pre-wrap;
    line-height: 1.55;
    font-size: 0.95rem;
}
.astro-interp-modal-text.mod-library-content--html {
    white-space: normal;
}
.astro-label-with-help {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}
.astro-label-with-help .form-label {
    margin-bottom: 0;
}
.astro-field-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.2rem;
    height: 1.2rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}
.astro-field-help:hover,
.astro-field-help:focus-visible {
    color: var(--mod-accent, #c9a962);
    border-color: currentColor;
    outline: none;
}
.astro-chart-settings .astro-label-with-help + .form-select {
    margin-top: 0;
}
.astro-transits-panel {
    padding: 1rem 1.1rem;
}
.astro-transit-heading {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}
.astro-transit-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 640px;
    overflow-y: auto;
}
.astro-transit-card {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
}
.astro-transit-card:hover {
    border-color: rgba(201, 162, 39, 0.55);
}
.astro-transit-card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}
.astro-transit-card-text {
    font-size: 0.84rem;
    line-height: 1.45;
    white-space: pre-wrap;
    max-height: 5.5rem;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
.astro-totem-panel .astro-totem-text {
    white-space: pre-wrap;
}

.astro-lunar-meta {
    line-height: 1.5;
}
.astro-lunar-hint {
    margin-top: 0;
}
.astro-chart-clickable {
    cursor: zoom-in;
}
.astro-chart-clickable:focus-visible {
    outline: 2px solid var(--mod-accent, #c9a227);
    outline-offset: 2px;
}
.astro-chart-modal-host {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 200px;
}
.astro-chart-modal-host svg {
    max-width: 100%;
    height: auto;
}

.astro-transits-view-bar .btn.active {
    background: var(--mod-accent-soft, rgba(201, 162, 39, 0.25));
    border-color: var(--mod-accent, #c9a227);
    color: var(--mod-text, #f0ead6);
}
.astro-transits-view-pane {
    padding: 1rem 1.1rem;
}
.forecast-calendar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.forecast-calendar-day {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}
.forecast-calendar-accordion-item-open {
    border-color: rgba(201, 162, 39, 0.45);
}
.forecast-calendar-accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.75rem 0.9rem;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.forecast-calendar-accordion-trigger:hover {
    background: rgba(201, 162, 39, 0.08);
}
.forecast-calendar-accordion-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
}
.forecast-calendar-accordion-panel {
    padding: 0 0.9rem 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.forecast-calendar-day-count {
    color: rgba(240, 234, 214, 0.55);
    font-size: 0.85rem;
}
.forecast-calendar-events {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.forecast-calendar-event-chip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}
.graphasp-chart-wrap { margin-top: 0.5rem; }
.graphasp-viewer-frame {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.5rem;
}
.graphasp-chart { width: 100%; min-width: 640px; height: auto; }
.graphasp-bg { fill: rgba(0, 0, 0, 0.15); }
.graphasp-grid { stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.graphasp-grid-light { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }
.graphasp-axis-label { fill: rgba(240, 234, 214, 0.55); font-size: 10px; }
.graphasp-row-label { fill: rgba(240, 234, 214, 0.85); font-size: 11px; }
.graphasp-segment { cursor: pointer; }
.graphasp-segment-group.graphasp-segment-active .graphasp-segment { stroke: #fff; stroke-width: 1; }
.graphasp-exact-marker { fill: #fff; pointer-events: none; }
.graphasp-detail {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
}
.forecast-matrix-wrap { margin-top: 0.5rem; }
.forecast-matrix-table-wrap { overflow-x: auto; }
.forecast-matrix-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.forecast-matrix-table th,
.forecast-matrix-table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.35rem;
    text-align: center;
    vertical-align: middle;
}
.forecast-matrix-cell {
    width: 100%;
    min-height: 2.2rem;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--mod-text);
    cursor: pointer;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.forecast-matrix-cell-empty { opacity: 0.35; cursor: default; }
.forecast-matrix-cell-tone-favorable {
    background: rgba(6, 214, 160, 0.22);
    color: #06d6a0;
}
.forecast-matrix-cell-tone-challenging {
    background: rgba(239, 71, 111, 0.22);
    color: #ef476f;
}
.forecast-matrix-cell-tone-neutral {
    background: rgba(255, 255, 255, 0.08);
}
.forecast-matrix-cell-active {
    outline: 2px solid var(--mod-accent, #c9a227);
    outline-offset: 1px;
}
.forecast-matrix-detail {
    margin-top: 0.75rem;
    max-height: 420px;
    overflow-y: auto;
}
.forecast-matrix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.78rem;
}
.terrar-bar-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    min-height: 140px;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.terrar-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 2.4rem;
    border: none;
    background: transparent;
    color: var(--mod-text);
    cursor: pointer;
    padding: 0 0.15rem;
}
.terrar-bar-fill {
    display: block;
    width: 1.1rem;
    border-radius: 4px 4px 0 0;
    margin-top: 0.25rem;
}
.terrar-bar-tone-favorable .terrar-bar-fill { background: #06d6a0; }
.terrar-bar-tone-challenging .terrar-bar-fill { background: #ef476f; }
.terrar-bar-label {
    font-size: 0.68rem;
    margin-top: 0.25rem;
    opacity: 0.75;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    max-height: 4rem;
}
.astro-transit-interp-text {
    white-space: pre-wrap;
    font-size: 0.84rem;
    line-height: 1.45;
}
.graphasp-toolbar .btn.active {
    border-color: var(--mod-accent, #c9a227);
}
.graphasp-legend-table {
    width: auto;
    font-size: 0.78rem;
    border-collapse: collapse;
}
.graphasp-legend-table th,
.graphasp-legend-table td {
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.graphasp-legend-swatch {
    display: inline-block;
    width: 1rem;
    height: 0.65rem;
    border-radius: 2px;
}
.graphasp-modal-viewport {
    overflow: auto;
    max-height: 75vh;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 10px;
    padding: 0.5rem;
}
.graphasp-modal-stage {
    transform-origin: top left;
    transition: transform 0.15s ease;
}
.terrar-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.85rem;
    background: rgba(0, 0, 0, 0.2);
}
.terrar-svg-panel svg {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}
.terrar-event-header strong {
    font-size: 0.9rem;
}
.polarity-score-favorable { color: #06d6a0; }
.polarity-score-challenging { color: #ef476f; }
.polarity-score-neutral { color: rgba(240, 234, 214, 0.6); }

.mod-saved-detail {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    background: rgba(0, 0, 0, 0.22);
}
.mod-saved-type {
    text-transform: capitalize;
    color: rgba(240, 234, 214, 0.75);
    font-size: 0.85rem;
}

/* Библиотека ZET (АстРоРоД) */
.astro-library-coverage {
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(123, 108, 255, 0.1);
    font-size: 0.88rem;
}
.astro-library-coverage-list {
    padding-left: 1.1rem;
    color: rgba(240, 234, 214, 0.75);
}
.astro-library-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
.astro-library-layout.astro-library-layout-open {
    grid-template-columns: minmax(220px, 280px) minmax(240px, 320px) 1fr;
}
.astro-book-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.astro-book-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 150px;
    height: 150px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.astro-book-card:hover {
    border-color: rgba(123, 108, 255, 0.55);
    background: rgba(123, 108, 255, 0.12);
}
.astro-book-card-selected {
    border-color: #7b6cff;
    box-shadow: 0 0 0 1px rgba(123, 108, 255, 0.35);
    background: rgba(123, 108, 255, 0.14);
}
.astro-book-card-doc { border-style: dashed; }
.astro-book-card h4 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: #c4a6ff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.astro-book-meta {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(240, 234, 214, 0.65);
}
.astro-library-entry-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 520px;
    overflow-y: auto;
}
.astro-library-entry-list li + li { margin-top: 0.35rem; }
.astro-library-entry-btn {
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    color: inherit;
}
.astro-library-entry-btn:hover { background: rgba(123, 108, 255, 0.12); }
.astro-library-entry-btn-active {
    border-color: #7b6cff;
    background: rgba(123, 108, 255, 0.16);
}
.astro-library-entry-btn strong {
    display: block;
    font-size: 0.9rem;
}
.astro-library-entry-btn span {
    display: block;
    font-size: 0.78rem;
    color: rgba(240, 234, 214, 0.65);
    margin-top: 0.15rem;
}
.astro-library-detail-text {
    white-space: pre-wrap;
    line-height: 1.55;
    margin-top: 0.75rem;
}
.astro-library-doc-form label { display: block; }
.astro-library-reader-pane,
.astro-library-entries-pane,
.astro-library-books-pane { min-height: 280px; }
@media (max-width: 991px) {
    .astro-library-layout.astro-library-layout-open {
        grid-template-columns: 1fr;
    }
    .astro-library-mobile-entries .astro-library-books-pane,
    .astro-library-mobile-reader .astro-library-books-pane,
    .astro-library-mobile-reader .astro-library-entries-pane {
        display: none;
    }
}

.mod-chip {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: var(--mod-accent-soft);
    color: var(--mod-text);
}

.mod-tabs .nav-link {
    color: rgba(240, 234, 214, 0.7);
    border-radius: 999px;
    margin-right: 0.35rem;
}
.mod-tabs .nav-link.active {
    background: var(--mod-accent-soft);
    color: var(--mod-text);
    border: 1px solid var(--mod-accent);
}

.mod-label { color: rgba(240, 234, 214, 0.8); }
.mod-input {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(232, 194, 82, 0.25);
    color: #f5edd8;
}
.mod-input:focus {
    background: rgba(0, 0, 0, 0.35);
    border-color: var(--mod-accent);
    color: #fff;
    box-shadow: 0 0 0 0.15rem var(--mod-accent-soft);
}

.mod-test-banner {
    background: rgba(232, 194, 82, 0.12);
    border: 1px solid rgba(232, 194, 82, 0.35);
    color: rgba(240, 234, 214, 0.88);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.mod-result-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(232, 194, 82, 0.2);
    border-radius: 12px;
    padding: 1rem;
    color: rgba(240, 234, 214, 0.85);
    white-space: pre-wrap;
    font-size: 0.92rem;
    line-height: 1.55;
}

.mod-person-results {
    margin-top: 0.35rem;
    border: 1px solid rgba(232, 194, 82, 0.2);
    border-radius: 10px;
    overflow: hidden;
    display: none;
}
.mod-person-results.is-open { display: block; }
.mod-person-item {
    display: block;
    width: 100%;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #f0e6d0;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
}
.mod-person-item:hover { background: var(--mod-accent-soft); }

.mod-matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 0.5rem;
    max-width: 360px;
}
.mod-matrix-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--mod-accent);
    border-radius: 10px;
    color: var(--mod-text);
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: help;
    padding: 0.35rem;
}
.cifra-clickable {
    cursor: pointer;
}
.cifra-clickable:hover,
.cifra-clickable:focus {
    box-shadow: 0 0 16px var(--mod-accent-soft);
    transform: translateY(-2px);
    outline: none;
}
.mod-matrix-cell:hover,
.cifra-matrix-cell:focus {
    box-shadow: 0 0 16px var(--mod-accent-soft);
    transform: translateY(-2px);
}
.cifra-cell-digit { font-size: 0.65rem; opacity: 0.65; }
.cifra-cell-value { font-size: 1.15rem; line-height: 1.1; }
.cifra-cell-level { font-size: 0.58rem; opacity: 0.75; text-align: center; }

.cifra-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 1.25rem;
    align-items: start;
}
.cifra-layout-form { min-width: 0; }
.cifra-layout-results { min-width: 0; }
.cifra-subtabs .nav-link.disabled { opacity: 0.45; pointer-events: none; }

.cifra-code-card,
.cifra-quad-card {
    animation: cifraFadeIn 0.35s ease;
}
.cifra-code-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--mod-accent);
    line-height: 1.1;
}
.cifra-code-title {
    font-family: var(--font-heading);
    color: var(--mod-text);
    font-size: 0.95rem;
    margin: 0.35rem 0 0.5rem;
}
.cifra-code-desc,
.cifra-code-advice {
    color: rgba(240, 234, 214, 0.78);
    font-size: 0.88rem;
    line-height: 1.5;
}
.cifra-quadrants-inline .cifra-code-value { font-size: 1.35rem; }
.cifra-quad-mini { padding: 0.65rem 0.5rem; }
.cifra-line-label { font-size: 0.72rem; margin-top: 0.15rem; }
.cifra-lines-section { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 0.75rem; }
.cifra-modal-desc { line-height: 1.6; white-space: pre-wrap; }
#cifraInterpModal,
#cifraAiModal { z-index: 1060; }

.cifra-graph-card { padding: 1rem; min-height: 280px; }
.cifra-graph-svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.cifra-graph-radar { max-width: 360px; }
.cifra-graph-life { max-width: 100%; }
.cifra-life-charts-section .cifra-graph-card { min-height: auto; }
.cifra-life-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.cifra-life-code-badge {
    font-size: 0.82rem;
    color: rgba(240, 234, 214, 0.9);
    border-left: 3px solid var(--badge-color, var(--mod-accent, #40c0a0));
    padding-left: 0.55rem;
}
.cifra-life-code-badge code {
    color: var(--badge-color, var(--mod-accent, #40c0a0));
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}
.cifra-life-formula {
    display: block;
    font-size: 0.75rem;
    color: rgba(240, 234, 214, 0.55);
    margin-top: 0.15rem;
}
.cifra-forecast-month-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.45rem;
}
@media (max-width: 576px) {
    .cifra-forecast-month-grid { grid-template-columns: repeat(4, 1fr); }
}
.cifra-forecast-month-cell,
.cifra-forecast-day-cell {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: color-mix(in srgb, var(--cycle-color, #40c0a0) 22%, transparent);
    border-radius: 8px;
    padding: 0.45rem 0.35rem;
    color: rgba(240, 234, 214, 0.92);
    cursor: pointer;
    text-align: center;
}
.cifra-forecast-month-cell:hover,
.cifra-forecast-day-cell:hover {
    border-color: var(--cycle-color, var(--mod-accent, #40c0a0));
}
.cifra-forecast-month-name { display: block; font-size: 0.72rem; opacity: 0.85; }
.cifra-forecast-month-num { display: block; font-size: 1.15rem; font-weight: 600; }
.cifra-forecast-day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
}
.cifra-forecast-day-num { display: block; font-size: 0.7rem; opacity: 0.75; }
.cifra-forecast-day-val { display: block; font-size: 0.95rem; font-weight: 600; }
.cifra-year-badge {
    border: none;
    background: color-mix(in srgb, var(--cycle-color, #40c0a0) 25%, rgba(0,0,0,0.35));
    border-left: 4px solid var(--cycle-color, #40c0a0);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    color: rgba(240, 234, 214, 0.95);
    cursor: pointer;
}
.cifra-year-badge-num { font-size: 1.75rem; font-weight: 700; margin-right: 0.5rem; }
.cifra-life-timeline { display: flex; flex-direction: column; gap: 0.5rem; }
.cifra-life-period {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid var(--cycle-color, #40c0a0);
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: rgba(240, 234, 214, 0.9);
    cursor: pointer;
}
.cifra-life-period-num { font-size: 1.5rem; font-weight: 700; min-width: 2rem; }
.cifra-life-period-meta span { display: block; font-size: 0.78rem; opacity: 0.7; }
.cifra-peak-card, .cifra-trial-card { cursor: pointer; min-height: 100%; }
.cifra-heatmap-grid { max-width: 280px; margin: 0 auto; }
.cifra-heatmap-cell {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    transition: transform 0.2s;
}
.cifra-heatmap-cell:hover { transform: scale(1.03); }

.cifra-fade-in { animation: cifraFadeIn 0.35s ease; }
@keyframes cifraFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 992px) {
    .cifra-layout { grid-template-columns: 1fr; }
}

.mod-table { --bs-table-bg: transparent; font-size: 0.9rem; }

@media (max-width: 576px) {
    .mod-matrix-grid { max-width: 100%; }
}
