/* АстРоРод: понятная рабочая область и экран «Ваша карта» (FZ-RF 1089). */
.ar-app {
    --ar-gold: #e8c252;
    --ar-violet: #c4a6ff;
    --ar-violet-soft: rgba(156, 112, 255, 0.18);
    --ar-ink: #efe6ff;
    --ar-muted: #bfb3d9;
    --ar-card: rgba(18, 14, 34, 0.78);
    --ar-line: rgba(196, 166, 255, 0.28);
}

/* --- Шаги --- */
.ar-step {
    display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
    font-size: 1.15rem; color: var(--ar-ink); font-family: var(--font-heading, inherit);
}
.ar-step-num {
    width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ar-violet), #8b5cf6); color: #160f2b; font-weight: 800; font-size: 0.95rem; flex: none;
}
.ar-step-note, .ar-hint { color: var(--ar-muted); font-size: 0.84rem; }
.ar-req { color: var(--ar-gold); font-weight: 700; }
.ar-check { display: inline-flex; align-items: center; gap: 6px; color: var(--ar-muted); font-size: 0.86rem; cursor: pointer; }
.ar-app .astro-layout-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ar-app .astro-layout-form .mod-panel { margin-bottom: 0; }
.ar-app .astro-layout-setup { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
@media (max-width: 991.98px) { .ar-app .astro-layout-setup { grid-template-columns: 1fr; } }

/* --- «Точнее» и «Настройка карты» свёрнуты --- */
.ar-precise summary, .ar-settings > summary, .ar-expert > summary {
    cursor: pointer; list-style: none; color: var(--ar-violet); font-size: 0.88rem;
}
.ar-precise summary::-webkit-details-marker, .ar-settings > summary::-webkit-details-marker,
.ar-expert > summary::-webkit-details-marker { display: none; }
.ar-precise summary::before, .ar-settings > summary::before, .ar-expert > summary::before {
    content: '▸'; display: inline-block; margin-right: 6px; transition: transform 0.2s;
}
.ar-precise[open] summary::before, .ar-settings[open] > summary::before, .ar-expert[open] > summary::before { transform: rotate(90deg); }
.ar-precise summary span, .ar-settings-note { color: var(--ar-muted); font-size: 0.8rem; margin-left: 4px; }
.ar-app .ar-settings { height: auto !important; display: block !important; }
.ar-settings-title { color: var(--ar-ink); font-weight: 600; font-size: 0.98rem; }
.ar-settings select option { color: #111; }

/* --- Плитки методов --- */
.ar-methods { min-width: 0; }
.ar-method-group { margin-bottom: 14px; }
.ar-method-group-title { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ar-gold); margin: 0 0 8px; }
.ar-method-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0 !important; }
.ar-method { position: relative; min-width: 0; }
.ar-app .ar-method-btn.nav-link {
    width: 100%; height: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto;
    column-gap: 10px; row-gap: 2px; align-items: start; padding: 12px 34px 12px 12px; border-radius: 14px;
    background: var(--ar-card); border: 1px solid var(--ar-line); color: var(--ar-ink);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ar-app .ar-method-btn.nav-link:hover { border-color: var(--ar-violet); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(120, 80, 255, 0.18); color: #fff; }
.ar-app .ar-method-btn.nav-link.active {
    border-color: var(--ar-gold); background: linear-gradient(160deg, rgba(232, 194, 82, 0.16), rgba(156, 112, 255, 0.16));
    box-shadow: 0 0 0 1px rgba(232, 194, 82, 0.45), 0 10px 26px rgba(232, 194, 82, 0.14); color: #fff;
}
.ar-method-ico { grid-row: 1 / span 3; font-size: 1.6rem; line-height: 1; padding-top: 2px; }
.ar-method-title { font-weight: 700; font-size: 0.93rem; line-height: 1.25; }
.ar-method-text { color: var(--ar-muted); font-size: 0.78rem; line-height: 1.3; }
.ar-method-badge { justify-self: start; margin-top: 4px; font-size: 0.68rem; padding: 2px 8px; border-radius: 999px; font-style: normal; }
.ar-method-badge.is-free { background: rgba(110, 231, 160, 0.16); color: #9ff0c4; border: 1px solid rgba(110, 231, 160, 0.4); }
.ar-method-badge.is-locked { background: rgba(232, 194, 82, 0.12); color: var(--ar-gold); border: 1px solid rgba(232, 194, 82, 0.35); }
.ar-app .ar-method-help.astro-field-help { position: absolute; top: 8px; right: 8px; }

/* --- Строка «Чья карта» после расчёта --- */
.ar-databar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; border-radius: 16px; background: var(--ar-card); border: 1px solid var(--ar-line);
}
.ar-databar-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ar-databar-icon { font-size: 1.6rem; }
.ar-databar-who strong { display: block; color: #fff; font-size: 1.05rem; }
.ar-databar-meta { display: block; color: var(--ar-muted); font-size: 0.85rem; }
.ar-app.ar-has-result #ar-setup,
.ar-app.ar-has-result #astro-action-buttons { display: none !important; }
.ar-app.ar-has-result .ar-databar { display: flex !important; }

/* --- Экран «Ваша карта» --- */
.ar-result-top { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 18px; align-items: start; }
@media (max-width: 991.98px) { .ar-result-top { grid-template-columns: 1fr; } }
.ar-chart-shell .astro-chart-panel { border-radius: 18px; background: radial-gradient(circle at 50% 45%, #1c1840 0%, #0b1020 70%); border: 1px solid var(--ar-line); }
.ar-chart-hint { text-align: center; color: var(--ar-muted); font-size: 0.8rem; margin: 6px 0 0; }
.ar-portrait { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ar-portrait-title { font-family: var(--font-heading, inherit); color: var(--ar-gold); font-size: 1.35rem; margin: 0; }
.ar-portrait-sub { color: var(--ar-muted); font-size: 0.88rem; margin: -6px 0 0; }
.ar-pcard {
    display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 14px; border-radius: 16px;
    background: var(--ar-card); border: 1px solid var(--ar-line); opacity: 0; transform: translateY(8px);
    animation: ar-rise 0.5s ease forwards;
}
.ar-pcard:nth-child(3) { animation-delay: 0.15s; } .ar-pcard:nth-child(4) { animation-delay: 0.3s; } .ar-pcard:nth-child(5) { animation-delay: 0.45s; }
.ar-pcard-ico {
    width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
    background: radial-gradient(circle, rgba(232, 194, 82, 0.28), rgba(156, 112, 255, 0.12)); border: 1px solid rgba(232, 194, 82, 0.4);
}
.ar-pcard-role { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ar-gold); font-weight: 700; }
.ar-pcard-sign { color: #fff; font-weight: 700; font-size: 1.02rem; }
.ar-pcard-text { color: var(--ar-ink); font-size: 0.9rem; line-height: 1.4; margin: 2px 0 0; }
.ar-elements { padding: 12px 14px; border-radius: 16px; background: var(--ar-card); border: 1px solid var(--ar-line); opacity: 0; animation: ar-rise 0.5s 0.6s ease forwards; }
.ar-elements h4 { font-size: 0.95rem; color: #fff; margin: 0 0 8px; }
.ar-el-row { display: grid; grid-template-columns: 88px 1fr 22px; gap: 8px; align-items: center; font-size: 0.82rem; color: var(--ar-muted); margin-bottom: 4px; }
.ar-el-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ar-el-bar span { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 1s 0.8s ease; }
.ar-el-fire .ar-el-bar span { background: linear-gradient(90deg, #ff9a5a, #ff5d5d); }
.ar-el-earth .ar-el-bar span { background: linear-gradient(90deg, #b9d36b, #6dbf6a); }
.ar-el-air .ar-el-bar span { background: linear-gradient(90deg, #9ad7ff, #c4a6ff); }
.ar-el-water .ar-el-bar span { background: linear-gradient(90deg, #5ab6ff, #4f7bff); }
.ar-elements p { margin: 8px 0 0; color: var(--ar-ink); font-size: 0.88rem; }
.ar-portrait-credit { color: var(--ar-muted); font-size: 0.74rem; margin: 0; }
@keyframes ar-rise { to { opacity: 1; transform: none; } }

/* Карта появляется: колесо доворачивается, планеты «влетают», линии аспектов проявляются */
.ar-anim svg { animation: ar-wheel 1.3s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 50%; }
.ar-anim svg line { animation: ar-fade 0.9s 0.9s both; }
.ar-anim .ar-planet { animation: ar-pop 0.55s cubic-bezier(.3, 1.6, .5, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes ar-wheel { from { opacity: 0; transform: rotate(-40deg) scale(0.86); } to { opacity: 1; transform: none; } }
@keyframes ar-fade { from { opacity: 0; } }
@keyframes ar-pop { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: none; } }
.ar-planet { cursor: pointer; outline: none; }
.ar-planet:hover circle, .ar-planet:focus circle, .ar-planet.is-hot circle { stroke: var(--ar-gold) !important; stroke-width: 3 !important; filter: drop-shadow(0 0 6px rgba(232, 194, 82, 0.8)); }
.ar-planet-tip {
    position: absolute; z-index: 30; max-width: 280px; padding: 10px 12px; border-radius: 12px; pointer-events: none;
    background: rgba(14, 10, 30, 0.96); border: 1px solid rgba(232, 194, 82, 0.55); color: var(--ar-ink); font-size: 0.86rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.ar-planet-tip[hidden] { display: none; }
.ar-planet-tip strong { display: block; color: var(--ar-gold); margin-bottom: 2px; }

/* --- «Что ещё можно узнать» --- */
.ar-next { margin: 18px 0; }
.ar-next-title { font-size: 1.2rem; color: #fff; margin: 0 0 12px; font-family: var(--font-heading, inherit); }
.ar-next-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ar-next-tile {
    position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; border-radius: 16px;
    background: var(--ar-card); border: 1px solid var(--ar-line); color: var(--ar-ink); text-decoration: none;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.ar-next-tile:hover { transform: translateY(-2px); border-color: var(--ar-gold); box-shadow: 0 10px 26px rgba(232, 194, 82, 0.15); color: #fff; }
.ar-next-ico { font-size: 1.8rem; line-height: 1; margin-bottom: 4px; }
.ar-next-tile strong { color: #fff; font-size: 0.98rem; }
.ar-next-tile > span:not(.ar-next-ico) { color: var(--ar-muted); font-size: 0.83rem; line-height: 1.35; }
.ar-next-lock { margin-top: 6px; align-self: flex-start; font-style: normal; font-size: 0.7rem; padding: 2px 8px; border-radius: 999px;
    color: var(--ar-gold); border: 1px solid rgba(232, 194, 82, 0.35); background: rgba(232, 194, 82, 0.1); }
.ar-next-lock.is-ai { color: var(--ar-violet); border-color: rgba(196, 166, 255, 0.4); background: var(--ar-violet-soft); }
.ar-next-lock.is-free { color: #9ff0c4; border-color: rgba(110, 231, 160, 0.4); background: rgba(110, 231, 160, 0.12); }
.ar-next-offer {
    margin-top: 12px; padding: 14px 16px; border-radius: 16px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(232, 194, 82, 0.14), rgba(156, 112, 255, 0.16)); border: 1px solid rgba(232, 194, 82, 0.45);
}
.ar-next-offer strong { color: #fff; }
.ar-next-offer p { color: var(--ar-ink); font-size: 0.9rem; }

/* --- «Для знатоков» --- */
.ar-expert { padding: 12px 16px; border-radius: 16px; background: rgba(0, 0, 0, 0.22); border: 1px dashed var(--ar-line); }
.ar-expert #astro-summary { white-space: pre-wrap; }

/* Телефон */
@media (max-width: 575.98px) {
    .ar-method-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ar-app .ar-method-btn.nav-link { grid-template-columns: 1fr; padding: 10px 28px 10px 10px; }
    .ar-method-ico { grid-row: auto; font-size: 1.4rem; }
    .ar-method-text { display: none; }
    .ar-next-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ar-next-tile { padding: 11px; }
    .ar-next-tile > span:not(.ar-next-ico) { font-size: 0.76rem; }
    .ar-planet-tip { max-width: 230px; }
}
@media (prefers-reduced-motion: reduce) {
    .ar-anim svg, .ar-anim svg line, .ar-anim .ar-planet, .ar-pcard, .ar-elements { animation: none !important; opacity: 1 !important; transform: none !important; }
}
.ar-app #astro-panel-natal { position: relative; }
/* Тема сайта задаёт .nav-link padding и цвет с !important — плиткам методов нужны свои */
.ar-app .ar-method-btn.nav-link { padding: 12px 40px 12px 12px !important; color: var(--ar-ink) !important; }
.ar-app .ar-method-btn.nav-link.active, .ar-app .ar-method-btn.nav-link:hover { color: #fff !important; }
.ar-app .ar-method-btn.nav-link::after { display: none; }
@media (max-width: 575.98px) { .ar-app .ar-method-btn.nav-link { padding: 10px 30px 10px 10px !important; } }
