/* НейРоРод — рабочая область для новичка (FZ-RF 1091): шаги «вопрос» и «о ком», экран «Ваш родовой портрет»,
 * плитки «что ещё», свёрнутый «Маршрут исследователя». */
.nr-app {
    --nr-violet: #c4afff; --nr-gold: #e8c252; --nr-card: rgba(20, 11, 42, 0.8); --nr-line: rgba(196, 175, 255, 0.3);
    --nr-text: rgba(240, 232, 255, 0.86); --nr-muted: rgba(240, 232, 255, 0.62);
    position: relative;
}

/* Строка «чей портрет» — только когда портрет готов. */
.nr-databar {
    display: none; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 10px 14px; margin-bottom: 14px; border-radius: 16px; background: var(--nr-card); border: 1px solid var(--nr-line);
}
.nr-app.nr-has-result .nr-databar { display: flex; }
.nr-app.nr-has-result .nr-setup { display: none; }
.nr-app:not(.nr-has-result) .nr-results { display: none; }
.nr-databar-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nr-databar-ico { font-size: 1.6rem; }
.nr-databar-who strong { display: block; color: #fff; }
.nr-databar-who small { display: block; color: var(--nr-muted); }
.nr-databar-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Шаги ввода. */
.nr-setup { max-width: 800px; margin: 0 auto 1rem; }
.nr-step { margin-bottom: 18px; }
.nr-step-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.nr-step-num {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; color: #1a0f33; background: linear-gradient(135deg, var(--nr-violet), var(--nr-gold));
    box-shadow: 0 0 18px rgba(196, 175, 255, 0.45);
}
.nr-step-title { font-size: 1.3rem; margin: 0; color: #fff; font-family: var(--font-heading); }
.nr-step-text { margin: 2px 0 0; color: var(--nr-muted); font-size: 0.92rem; }
.nr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nr-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer; margin: 0;
    color: #efe7ff; font-size: 0.95rem; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--nr-line);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.nr-chip:hover { border-color: var(--nr-violet); transform: translateY(-1px); }
.btn-check:checked + .nr-chip {
    color: #1a0f33; font-weight: 700; background: linear-gradient(135deg, #e2d6ff, var(--nr-violet) 50%, var(--nr-gold));
    border-color: transparent; box-shadow: 0 0 18px rgba(196, 175, 255, 0.45);
}
.btn-check:focus-visible + .nr-chip { outline: 2px solid var(--nr-gold); outline-offset: 2px; }
.nr-field { margin-bottom: 12px; }
.nr-name-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.nr-check { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 0.9rem; color: var(--nr-text); cursor: pointer; }
.nr-hint { margin: 6px 0 0; font-size: 0.8rem; color: var(--nr-muted); }
.nr-error { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 107, 107, 0.14); border: 1px solid rgba(255, 107, 107, 0.45); color: #ffd0d0; }
.nr-error[hidden] { display: none; }
.nr-run { width: 100%; padding: 0.85rem 1rem; font-size: 1.08rem; font-weight: 700; border-radius: 999px; }
.nr-setup-note { margin: 8px 0 0; text-align: center; font-size: 0.8rem; color: var(--nr-muted); }

/* Портрет. */
.nr-portrait { display: grid; gap: 16px; }
.nr-head {
    position: relative; overflow: hidden; padding: 20px; border-radius: 24px;
    background: radial-gradient(ellipse at 85% 0%, rgba(196, 175, 255, 0.22), transparent 55%),
        radial-gradient(ellipse at 0% 100%, rgba(232, 194, 82, 0.12), transparent 50%), rgba(18, 10, 38, 0.88);
    border: 1px solid rgba(196, 175, 255, 0.4);
}
.nr-head-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.nr-kicker { font-size: 0.85rem; color: var(--nr-violet); }
.nr-full-badge { font-size: 0.78rem; font-weight: 700; color: #2a1f05; background: var(--nr-gold); padding: 3px 10px; border-radius: 999px; }
.nr-name { font-family: var(--font-heading); color: #fff; font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 4px 0 2px; }
.nr-date { color: var(--nr-muted); font-size: 0.9rem; }
.nr-question { display: flex; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.nr-question-ico { font-size: 1.8rem; line-height: 1; }
.nr-question strong { color: #fff; }
.nr-question p { margin: 4px 0 0; color: var(--nr-text); font-size: 0.92rem; line-height: 1.45; }
.nr-question-focus { color: #f3dd94 !important; }

.nr-block { padding: 18px; border-radius: 22px; background: var(--nr-card); border: 1px solid var(--nr-line); }
.nr-h3 { font-family: var(--font-heading); color: #fff; font-size: 1.3rem; margin: 0 0 6px; }
.nr-h4 { font-weight: 700; color: #fff; margin: 16px 0 8px; font-size: 1rem; }
.nr-sub { color: var(--nr-muted); font-size: 0.9rem; margin: 0 0 12px; line-height: 1.45; }
.nr-note { color: var(--nr-muted); font-size: 0.8rem; margin: 10px 0 0; }

/* Карты архетипов. */
.nr-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nr-card {
    position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 14px; border-radius: 20px;
    background: linear-gradient(165deg, color-mix(in srgb, var(--c) 26%, transparent), rgba(18, 10, 38, 0.94) 65%);
    border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); color: var(--nr-text);
    transition: transform 0.25s, box-shadow 0.25s;
}
.nr-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px color-mix(in srgb, var(--c) 28%, transparent); }
.nr-card-pos { font-size: 0.8rem; color: #fff; opacity: 0.85; }
.nr-card-ico { font-size: 2.6rem; line-height: 1.1; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--c) 70%, transparent)); }
.nr-card-name { font-family: var(--font-heading); color: var(--c); font-size: 1.15rem; margin: 0; }
.nr-card-text { margin: 0; font-size: 0.92rem; line-height: 1.5; }
.nr-card-rows { margin: 0; display: grid; gap: 4px; }
.nr-card-rows dt { font-size: 0.8rem; color: #fff; margin-top: 4px; }
.nr-card-rows dd { margin: 0; font-size: 0.88rem; line-height: 1.45; }
.nr-card-note { margin: 4px 0 0; font-size: 0.8rem; color: var(--nr-muted); }
.nr-synth { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(196, 175, 255, 0.1); border: 1px solid var(--nr-line); color: var(--nr-text); font-size: 0.92rem; }
.nr-ai-btn {
    align-self: flex-start; margin-top: auto; padding: 5px 12px; border-radius: 999px; font-size: 0.82rem; cursor: pointer;
    color: #f3dd94; background: rgba(232, 194, 82, 0.1); border: 1px solid rgba(232, 194, 82, 0.5);
}
.nr-ai-btn:hover { background: rgba(232, 194, 82, 0.22); color: #fff; }

/* Колесо баланса. */
.nr-wheel-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 18px; align-items: center; }
.nr-sliders { display: grid; gap: 6px; }
.nr-slider { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 26px; gap: 8px; align-items: center; margin: 0; cursor: pointer; }
.nr-slider-name { font-size: 0.9rem; color: var(--nr-text); }
.nr-slider input[type="range"] { width: 100%; accent-color: var(--c); }
.nr-slider output { font-weight: 700; color: var(--c); text-align: right; }
.nr-wheel-fig { margin: 0; }
.nr-wheel-svg { width: 100%; max-width: 340px; display: block; margin: 0 auto; overflow: visible; }
.nr-wheel-grid { fill: none; stroke: rgba(196, 175, 255, 0.2); stroke-width: 0.8; stroke-dasharray: 2 4; }
.nr-wheel-spoke { stroke: rgba(196, 175, 255, 0.22); stroke-width: 0.8; }
.nr-wheel-sector { fill: var(--c); fill-opacity: 0.5; stroke: var(--c); stroke-width: 1.4; transition: d 0.3s; filter: drop-shadow(0 0 5px var(--c)); }
.nr-wheel-ico { font-size: 17px; text-anchor: middle; dominant-baseline: central; }
.nr-wheel-read { margin-top: 12px; }
.nr-wheel-hint, .nr-wheel-read-text { margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); color: var(--nr-text); font-size: 0.93rem; line-height: 1.55; }
.nr-avg { color: #fff; font-weight: 700; }
.nr-wheel-apply { margin-top: 10px; border-radius: 999px; }
.nr-wheel-apply[hidden] { display: none; }
.nr-practices { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nr-practices li { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border-left: 3px solid var(--c); display: flex; flex-direction: column; gap: 4px; }
.nr-practice-head { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; color: #fff; font-size: 0.9rem; }
.nr-practices p { margin: 0; color: var(--nr-text); font-size: 0.88rem; line-height: 1.45; }
.nr-zone { font-style: normal; font-size: 0.72rem; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.nr-zone--attention { color: #ffd0a8; }
.nr-zone--strong { color: #b6f5cf; }
.nr-history { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nr-history li { padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); display: grid; gap: 1px; min-width: 130px; }
.nr-history span { color: var(--nr-muted); font-size: 0.78rem; }
.nr-history b { color: var(--nr-gold); font-size: 1.2rem; }
.nr-history small { color: var(--nr-text); font-size: 0.75rem; }

/* Гексаграмма. */
.nr-iching { display: flex; gap: 18px; align-items: flex-start; }
.nr-hex { flex: 0 0 auto; display: flex; flex-direction: column; gap: 7px; width: 110px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--nr-line); }
.nr-hex-line { display: flex; gap: 12px; height: 11px; opacity: 0; animation: nr-line 0.5s ease forwards; animation-delay: calc((6 - var(--n)) * 0.12s); }
.nr-hex-line i { flex: 1; border-radius: 3px; background: linear-gradient(90deg, #f3dd94, var(--nr-gold)); box-shadow: 0 0 8px rgba(232, 194, 82, 0.5); }
.nr-hex-line.is-moving i { background: linear-gradient(90deg, #e2d6ff, var(--nr-violet)); box-shadow: 0 0 12px rgba(196, 175, 255, 0.9); }
@keyframes nr-line { from { opacity: 0; transform: scaleX(0.3); } to { opacity: 1; transform: scaleX(1); } }
.nr-iching-text { min-width: 0; }
.nr-hex-name { font-family: var(--font-heading); color: var(--nr-gold); font-size: 1.2rem; }
.nr-hex-tri { color: var(--nr-muted); font-size: 0.85rem; margin-bottom: 6px; }
.nr-iching-text p { margin: 0 0 6px; color: var(--nr-text); font-size: 0.93rem; line-height: 1.5; }
.nr-iching-ask { display: flex; gap: 8px; margin-top: 12px; }
.nr-iching-ask .btn { flex: 0 0 auto; border-radius: 999px; }

/* Установка семьи. */
.nr-reframe { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; margin-bottom: 12px; }
.nr-reframe-old, .nr-reframe-new { padding: 12px 14px; border-radius: 14px; font-size: 0.93rem; line-height: 1.5; }
.nr-reframe small { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; opacity: 0.8; }
.nr-reframe-old { background: rgba(255, 255, 255, 0.04); border: 1px dashed rgba(255, 255, 255, 0.25); color: var(--nr-muted); font-style: italic; }
.nr-reframe-new { background: linear-gradient(135deg, rgba(111, 207, 151, 0.18), rgba(20, 11, 42, 0.6)); border: 1px solid rgba(111, 207, 151, 0.55); color: #eafff1; }
.nr-reframe-arrow { align-self: center; font-size: 1.6rem; color: var(--nr-gold); }
.nr-deep p { margin: 0 0 8px; padding-left: 12px; border-left: 3px solid var(--nr-violet); color: var(--nr-text); font-size: 0.92rem; line-height: 1.5; }
.nr-refl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.nr-refl-field { display: grid; gap: 4px; margin: 0; }
.nr-refl-field span { font-size: 0.88rem; color: var(--nr-text); }
#nr-refl-go { border-radius: 999px; }

/* Сценарии рода. */
.nr-patterns { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.nr-patterns li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border-left: 3px solid #6fcf97; }
.nr-patterns--hyp li { border-left-color: var(--nr-gold); }
.nr-patterns li > span { font-size: 1.3rem; }
.nr-patterns strong { color: #fff; font-size: 0.95rem; }
.nr-patterns p { margin: 2px 0 0; color: var(--nr-text); font-size: 0.88rem; line-height: 1.45; }
.nr-locked { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.nr-locked span { font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; color: #f3dd94; background: rgba(232, 194, 82, 0.1); border: 1px solid rgba(232, 194, 82, 0.4); }
.nr-rod-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.nr-rod-actions .btn { border-radius: 999px; }
.nr-demo { margin-top: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--nr-line); }
.nr-demo summary { cursor: pointer; color: var(--nr-text); font-size: 0.9rem; }
.nr-demo[open] summary { margin-bottom: 10px; }
.nr-block--rod { background: linear-gradient(135deg, rgba(46, 125, 50, 0.2), rgba(20, 11, 42, 0.8)); border-color: rgba(111, 207, 151, 0.4); }

/* «В полной версии» и «С Древом Рода». */
.nr-upsell { margin-top: 12px; display: grid; gap: 6px; }
.nr-upsell-paid, .nr-upsell-rod { padding: 9px 12px; border-radius: 12px; font-size: 0.86rem; line-height: 1.45; color: var(--nr-text); }
.nr-upsell-paid { background: rgba(232, 194, 82, 0.09); border: 1px solid rgba(232, 194, 82, 0.4); }
.nr-upsell-rod { background: rgba(111, 207, 151, 0.08); border: 1px solid rgba(111, 207, 151, 0.35); }
.nr-upsell a { font-weight: 700; color: #f3dd94; white-space: nowrap; }
.nr-upsell-rod a { color: #b6f5cf; }

/* Что ещё можно сделать. */
.nr-next { padding: 18px; border-radius: 22px; background: rgba(18, 10, 38, 0.6); border: 1px solid var(--nr-line); }
.nr-next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.nr-tile {
    display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; text-align: left; text-decoration: none; cursor: pointer;
    color: var(--nr-text); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--nr-line); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.nr-tile:hover { transform: translateY(-3px); border-color: var(--nr-gold); box-shadow: 0 12px 28px rgba(232, 194, 82, 0.14); color: #fff; }
.nr-tile-ico { font-size: 1.7rem; }
.nr-tile strong { color: #fff; font-size: 0.98rem; }
.nr-tile small { color: var(--nr-muted); font-size: 0.8rem; line-height: 1.35; }
.nr-offer {
    display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; padding: 16px; border-radius: 18px;
    background: linear-gradient(135deg, rgba(232, 194, 82, 0.18), rgba(157, 120, 255, 0.14)); border: 1px solid rgba(232, 194, 82, 0.55);
}
.nr-offer-text { display: grid; gap: 4px; max-width: 640px; }
.nr-offer-text strong { color: #fff; font-size: 1.05rem; }
.nr-offer-text span { color: var(--nr-text); font-size: 0.92rem; }
.nr-offer-text small { color: var(--nr-muted); }
.nr-offer .btn { border-radius: 999px; }

/* Маршрут исследователя (старые методики). */
.nr-expert { margin-top: 16px; padding: 12px 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--nr-line); }
.nr-expert > summary { cursor: pointer; color: var(--nr-text); font-weight: 600; }
.nr-expert[open] > summary { margin-bottom: 14px; }
.nr-disclaimer { margin: 14px 0 0; font-size: 0.78rem; color: var(--nr-muted); text-align: center; }

/* Появление портрета. */
.nr-anim .nr-head, .nr-anim .nr-block, .nr-anim .nr-next { animation: nr-rise 0.55s ease both; }
.nr-anim .nr-block--cards { animation-delay: 0.08s; }
.nr-anim .nr-block--wheel { animation-delay: 0.16s; }
.nr-anim .nr-block--iching { animation-delay: 0.24s; }
.nr-anim .nr-card { animation: nr-flip 0.7s ease both; animation-delay: calc(0.2s + var(--d)); }
@keyframes nr-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes nr-flip { from { opacity: 0; transform: perspective(700px) rotateY(70deg); } to { opacity: 1; transform: none; } }

@media (max-width: 899.98px) {
    .nr-cards { grid-template-columns: 1fr; }
    .nr-wheel-layout { grid-template-columns: 1fr; }
    .nr-wheel-fig { order: -1; }
    .nr-practices, .nr-refl-grid { grid-template-columns: 1fr; }
    .nr-next-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575.98px) {
    .nr-block, .nr-head, .nr-next { padding: 14px; border-radius: 18px; }
    .nr-iching { flex-direction: column; align-items: center; }
    .nr-iching-ask { flex-direction: column; }
    .nr-reframe { grid-template-columns: 1fr; }
    .nr-reframe-arrow { transform: rotate(90deg); justify-self: center; }
    .nr-slider { grid-template-columns: minmax(0, 1fr) 26px; }
    .nr-slider input[type="range"] { grid-column: 1 / -1; grid-row: 2; }
    .nr-next-grid { grid-template-columns: 1fr; }
    .nr-databar-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .nr-anim .nr-head, .nr-anim .nr-block, .nr-anim .nr-next, .nr-anim .nr-card, .nr-hex-line { animation: none !important; opacity: 1; }
}
