/* Исправления по ТЗ от 28.06 */
/* Центровка основных контейнеров */
html,body{overflow-x:hidden!important;}
#uploadZone,#result,#foodDataBlock,#foodPage,#inlineResultContent,#productsPage,.steps-card,.step,.instruction-box,.aspects-section{
  box-sizing:border-box!important;
}
#uploadZone,#result,#foodDataBlock,#foodPage{
  width:min(100%, 820px)!important;
  max-width:820px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
#result{
  padding-left:clamp(18px,4vw,34px)!important;
  padding-right:clamp(18px,4vw,34px)!important;
}
#chartMeta{
  display:block!important;
  width:100%!important;
  text-align:center!important;
  margin:0 auto 2rem!important;
  padding:0!important;
  color:#fff!important;
}
/* Единый Заголовок 2 */
#result > .section-title,
#inlineResultContent h2,
#productsPage h2,
.pdf-export-root h2,
.kbju-title{
  display:block!important;
  width:100%!important;
  margin:2rem auto 1.15rem!important;
  padding:0!important;
  text-align:center!important;
  color:#FC9FBC!important;
  font-size:clamp(1.85rem,5vw,2.45rem)!important;
  line-height:1.05!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  background:transparent!important;
  border:0!important;
}
/* Планеты: 2 квадратные карточки в ряд */
#result .planets-grid{
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:1rem!important;
  margin:1rem auto 1.8rem!important;
}
#result .planet-card{
  width:100%!important;
  aspect-ratio:1/1!important;
  min-height:0!important;
  height:auto!important;
  padding:1rem!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  gap:.55rem!important;
  border-radius:18px!important;
  overflow:hidden!important;
}
#result .planet-info{align-items:center!important;text-align:center!important;}
#result .planet-symbol{font-size:clamp(2rem,7vw,3.1rem)!important;width:auto!important;min-width:0!important;}
#result .planet-name{font-size:clamp(.86rem,3.2vw,1.05rem)!important;margin:0!important;letter-spacing:.12em!important;}
#result .planet-pos{font-size:clamp(1.5rem,6vw,2.25rem)!important;margin:0!important;}
#result .planet-sign{font-size:clamp(.95rem,3.5vw,1.2rem)!important;}
/* Аспекты: меньше и не вылезают */
#result .aspect-list{width:100%!important;display:grid!important;grid-template-columns:1fr!important;gap:.75rem!important;}
#result .aspect-row{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  padding:.8rem .9rem!important;
  border-radius:16px!important;
  gap:.45rem!important;
  overflow:hidden!important;
}
#result .aspect-row .asp-type{font-size:.85rem!important;min-width:0!important;max-width:100%!important;padding:.28rem .9rem!important;white-space:normal!important;}
#result .aspect-row .asp-planets{
  display:block!important;
  width:100%!important;
  text-align:center!important;
  font-size:clamp(.92rem,3.5vw,1.08rem)!important;
  line-height:1.25!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
}
#result .aspect-row .asp-orb{display:none!important;}
/* Стихии и энергии: квадратные карточки */
#result .elements-grid,#result .energies-grid{
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:1rem!important;
  margin:1rem auto 1.6rem!important;
}
#result .element-card,#result .energy-card{
  width:100%!important;
  aspect-ratio:1/1!important;
  min-height:0!important;
  height:auto!important;
  padding:1rem!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  gap:.55rem!important;
  border-radius:18px!important;
  overflow:hidden!important;
}
#result .energy-card>div{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;}
#result .energy-label,#result .element-name{font-size:clamp(.85rem,3.4vw,1.05rem)!important;text-align:center!important;}
#result .energy-score,#result .element-score{font-size:clamp(2.1rem,8vw,3.1rem)!important;text-align:center!important;min-width:0!important;}
/* КБЖУ: заголовок как H2 и 4 карточки рядом */
#inlineResultContent .kbju-grid,#productsPage .kbju-grid,#result .kbju-grid,.pdf-export-root .kbju-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:.75rem!important;
  width:100%!important;
  margin:1rem auto 1.5rem!important;
}
#inlineResultContent .kbju-card,#productsPage .kbju-card,#result .kbju-card,.pdf-export-root .kbju-card{
  aspect-ratio:1/1!important;
  min-height:0!important;
  height:auto!important;
  padding:.7rem!important;
  border-radius:16px!important;
}
#inlineResultContent .kbju-name,#productsPage .kbju-name,.pdf-export-root .kbju-name{font-size:clamp(.68rem,2.3vw,.95rem)!important;}
#inlineResultContent .kbju-value,#inlineResultContent .kbju-unit-inline,#productsPage .kbju-value,#productsPage .kbju-unit-inline,.pdf-export-root .kbju-value,.pdf-export-root .kbju-unit-inline{font-size:clamp(1.15rem,4.5vw,2rem)!important;}
/* После Продолжить скрывается всё предыдущее */
#result.step3-active .chart-title,
#result.step3-active > .section-title,
#result.step3-active > .planets-grid,
#result.step3-active > .aspects-section,
#result.step3-active > #indicatorsSection,
#result.step3-active > #continueBtn{display:none!important;}
#result.step3-active #foodDataBlock{display:block!important;}
/* Итоговые строки: ИМЯ: New chart */
#inlineResultContent .report-row,#productsPage .report-row,.pdf-export-root .report-row{
  display:flex!important;
  align-items:baseline!important;
  justify-content:flex-start!important;
  gap:.35rem!important;
  grid-template-columns:none!important;
  text-align:left!important;
}
#inlineResultContent .row-label,#productsPage .row-label,.pdf-export-root .row-label{
  white-space:nowrap!important;
  color:#FEDCD1!important;
}
#inlineResultContent .row-label::after,#productsPage .row-label::after,.pdf-export-root .row-label::after{content:':';}
#inlineResultContent .row-value,#productsPage .row-value,.pdf-export-root .row-value{color:#fff!important;text-align:left!important;}
/* Рекомендовано зелёным */
#inlineResultContent .report-section.products-rec h2,
#productsPage .report-section.products-rec h2,
.pdf-export-root .report-section.products-rec h2,
#inlineResultContent .sum-card.rec .cs-title,
#productsPage .sum-card.rec .cs-title,
.sum-card.rec>.cs-title{color:#00B050!important;}
@media(max-width:700px){
  #result .planets-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.75rem!important;}
  #result .planet-card{padding:.75rem!important;}
  #inlineResultContent .kbju-grid,#productsPage .kbju-grid,#result .kbju-grid,.pdf-export-root .kbju-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:.45rem!important;}
  #inlineResultContent .kbju-card,#productsPage .kbju-card,#result .kbju-card,.pdf-export-root .kbju-card{padding:.45rem!important;border-radius:12px!important;}
  #inlineResultContent .report-row,#productsPage .report-row,.pdf-export-root .report-row{flex-wrap:wrap!important;gap:.25rem!important;}
}
/* === Правки 28.06: контейнеры меньше, без пересечений; шаг 3 только после «Продолжить» === */
#uploadZone,
#result,
#foodDataBlock,
#foodPage,
#productsPage {
  max-width: 720px !important;
}
#result {
  padding-left: clamp(16px, 3.5vw, 28px) !important;
  padding-right: clamp(16px, 3.5vw, 28px) !important;
}
#result .planets-grid,
#result .elements-grid,
#result .energies-grid {
  gap: clamp(1rem, 3.2vw, 1.6rem) !important;
}
#result .planet-card,
#result .element-card,
#result .energy-card {
  box-sizing: border-box !important;
  max-width: 100% !important;
  transform: none !important;
}
#result .aspect-row {
  box-sizing: border-box !important;
  max-width: 100% !important;
  transform: none !important;
}
#result:not(.step3-active) #foodDataBlock {
  display: none !important;
}
#result.step3-active #foodDataBlock {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#foodCalcBtnWrap,
#foodCalcBtn {
  display: block !important;
}
#foodCalcBtnWrap {
  margin-top: 1rem !important;
  text-align: center !important;
}
@media (max-width: 700px) {
  #uploadZone,
  #result,
  #foodDataBlock,
  #foodPage,
  #productsPage {
    max-width: calc(100% - 24px) !important;
  }
  #result .planets-grid,
  #result .elements-grid,
  #result .energies-grid {
    gap: .85rem !important;
  }
}

/* === Правки по запросу: 28.06 финал === */
/* 1. Поменять размеры: название как градусы, градусы как название; строки чуть выше */
#result .planet-name{
  font-size:clamp(1.9rem,5.8vw,2.55rem)!important;
  line-height:1.18!important;
  margin:0 0 .65rem!important;
}
#result .planet-pos{
  font-size:clamp(1rem,3.2vw,1.18rem)!important;
  line-height:1.22!important;
  margin:0 0 .55rem!important;
}
#result .planet-sign{line-height:1.24!important;}

/* 2. Контейнеры планет, стихий и энергий меньше */
#result .planets-grid{gap:.8rem!important;margin:.9rem auto 1.35rem!important;}
#result .planet-card{
  min-height:104px!important;
  padding:.85rem 1rem!important;
  border-radius:16px!important;
  gap:.75rem!important;
}
#result .planet-symbol{font-size:2.35rem!important;width:52px!important;min-width:52px!important;}
#result .elements-grid{gap:.7rem!important;margin:.85rem auto 1.15rem!important;}
#result .element-card{
  min-height:116px!important;
  padding:.75rem .7rem!important;
  border-radius:15px!important;
}
#result .element-name{font-size:.98rem!important;line-height:1.2!important;margin:0 0 .45rem!important;}
#result .element-score{font-size:2.25rem!important;line-height:1.05!important;}
#result .energies-grid{gap:.7rem!important;margin:.85rem auto 1.2rem!important;}
#result .energy-card{
  min-height:82px!important;
  padding:.75rem .9rem!important;
  border-radius:15px!important;
}
#result .energy-label{font-size:1.02rem!important;line-height:1.22!important;}
#result .energy-score{font-size:2.15rem!important;line-height:1.05!important;}

/* 3. Поле возраста и кнопка должны быть видны */
#foodDataBlock{
  display:none;
  width:min(100%,720px)!important;
  max-width:720px!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  overflow:visible!important;
  padding:1.1rem!important;
  margin:1rem auto 2rem!important;
}
#result.step3-active #foodDataBlock{display:block!important;}
#foodDataBlock.energy-card{
  align-items:stretch!important;
  justify-content:flex-start!important;
  text-align:left!important;
}
#foodDataBlock .food-data-form,
#foodDataBlock .input-grid,
#foodDataBlock .form-field{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
#foodDataBlock .input-grid{gap:.8rem!important;}
#foodDataBlock .form-field{margin-bottom:.65rem!important;}
#foodDataBlock .form-field[style]{grid-column:auto!important;}
#foodDataBlock .form-field:has(#ageInput2){grid-column:1/-1!important;}
#foodCalcBtnWrap{display:block!important;visibility:visible!important;margin-top:.85rem!important;text-align:center!important;}
#foodCalcBtn{display:inline-block!important;visibility:visible!important;opacity:1!important;}

@media(max-width:700px){
  #result .planet-card{min-height:96px!important;padding:.75rem .9rem!important;grid-template-columns:48px minmax(0,1fr)!important;}
  #result .planet-symbol{font-size:2.15rem!important;width:46px!important;min-width:46px!important;}
  #result .planet-name{font-size:2rem!important;line-height:1.16!important;}
  #result .planet-pos{font-size:1.05rem!important;line-height:1.22!important;}
  #result .elements-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  #result .element-card{min-height:100px!important;}
  #result .energies-grid{grid-template-columns:1fr!important;}
  #result .energy-card{min-height:74px!important;}
  #foodDataBlock{padding:1rem!important;margin-bottom:2.5rem!important;}
}


/* User requested adjustments */
#result .planet-card,
#result .kbju-card{
  width:315px!important;
  max-width:315px!important;
  height:315px!important;
  aspect-ratio:auto!important;
}
#result .planets-grid,
#result .kbju-grid{
  justify-content:center!important;
}
#result .planet-name{font-size:1.2rem!important;}
#result .planet-pos,
#result .planet-sign{font-size:0.8rem!important;}
#result .aspect-row .asp-planets{
  font-size:0.8rem!important;
  color:#D8C3A5!important;
  text-transform:uppercase!important;
}
.recommended-title,.recommended-header{
 color:inherit!important;
 background:inherit!important;
}
#result .kbju-grid{
 display:grid!important;
 grid-template-columns:repeat(2,315px)!important;
 gap:1rem!important;
}
#result .kbju-card{
 display:flex!important;
 flex-direction:column!important;
 align-items:center!important;
 justify-content:center!important;
 text-align:center!important;
}
#result .kbju-card .title{
 color:#fff!important;
 font-size:0.8rem!important;
}
#result .kbju-card .value{
 color:#FC9FBC!important;
 font-size:1.3rem!important;
}


/* Final verification fixes — only requested changes */
#result .planets-grid{
  display:grid!important;
  grid-template-columns:repeat(2,315px)!important;
  justify-content:center!important;
  gap:1rem!important;
}
#result .planet-card{
  width:315px!important;
  max-width:315px!important;
  height:315px!important;
  max-height:315px!important;
  aspect-ratio:auto!important;
  box-sizing:border-box!important;
}
#result .planet-name{
  font-size:1.2rem!important;
}
#result .planet-pos,
#result .planet-sign{
  font-size:0.8rem!important;
}
#result .aspect-row .asp-planets{
  font-size:0.8rem!important;
  color:#D8C3A5!important;
  text-transform:uppercase!important;
}
#result .aspect-row .asp-orb{
  display:none!important;
}
#inlineResultContent .report-section.products-rec h2,
#productsPage .report-section.products-rec h2,
.pdf-export-root .report-section.products-rec h2,
#inlineResultContent .sum-card.rec .cs-title,
#productsPage .sum-card.rec .cs-title,
.sum-card.rec>.cs-title{
  color:var(--status-recommended-color,#00B5A6)!important;
}
#result .kbju-grid,
.kbju-grid{
  display:grid!important;
  grid-template-columns:repeat(2,315px)!important;
  justify-content:center!important;
  gap:1rem!important;
}
#result .kbju-card,
.kbju-card{
  width:315px!important;
  max-width:315px!important;
  height:315px!important;
  max-height:315px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  box-sizing:border-box!important;
}
#result .kbju-card .kbju-name,
.kbju-card .kbju-name{
  color:#fff!important;
  font-size:0.8rem!important;
  line-height:1.2!important;
  text-align:center!important;
  margin:0 0 .75rem!important;
}
#result .kbju-card .kbju-value,
#result .kbju-card .kbju-unit-inline,
.kbju-card .kbju-value,
.kbju-card .kbju-unit-inline{
  color:#FC9FBC!important;
  font-size:1.3rem!important;
  line-height:1.15!important;
  text-align:center!important;
}
@media(max-width:700px){
  #result .planets-grid,
  #result .kbju-grid,
  .kbju-grid{
    grid-template-columns:repeat(2,315px)!important;
  }
}

/* Финальная точечная правка 28.06 */
#result .planets-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.7rem!important;width:100%!important;margin:.85rem auto 1.2rem!important;}
#result .planet-card{aspect-ratio:1/1!important;min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.7rem!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;gap:.35rem!important;border-radius:15px!important;overflow:hidden!important;box-sizing:border-box!important;}
#result .planet-symbol{font-size:clamp(1.8rem,5vw,2.35rem)!important;line-height:1!important;width:auto!important;min-width:0!important;}
#result .planet-info{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;min-width:0!important;max-width:100%!important;}
#result .planet-name{color:#FC9FBC!important;font-size:clamp(1rem,3.2vw,1.2rem)!important;line-height:1.08!important;letter-spacing:.055em!important;margin:0 0 .28rem!important;white-space:normal!important;overflow-wrap:anywhere!important;}
#result .planet-pos,#result .planet-sign{font-size:clamp(.72rem,2.4vw,.8rem)!important;line-height:1.15!important;margin:0!important;color:#fff!important;white-space:normal!important;overflow-wrap:anywhere!important;}
@media(max-width:700px){#result .planets-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.65rem!important;}#result .planet-card{aspect-ratio:1/1!important;min-height:0!important;padding:.55rem!important;}#result .planet-symbol{font-size:clamp(1.45rem,7vw,2rem)!important;width:auto!important;min-width:0!important;}#result .planet-name{font-size:clamp(.9rem,4.6vw,1.08rem)!important;}#result .planet-pos,#result .planet-sign{font-size:clamp(.66rem,3.3vw,.8rem)!important;}}
body.food-calculated #uploadZone,body.food-calculated #foodDataBlock,body.food-calculated #result > .chart-title,body.food-calculated #result > .section-title,body.food-calculated #result > .planets-grid,body.food-calculated #result > .aspects-section,body.food-calculated #result > #indicatorsSection,body.food-calculated #continueBtn{display:none!important;}
body.food-calculated #result{display:block!important;}
body.food-calculated #foodPage{display:block!important;}

/* Точечные правки по списку: аспекты и названия стихий/энергий */
#result .aspect-row .asp-planets{
  font-size:clamp(.62rem,2.2vw,.76rem)!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  text-align:center!important;
}
#result .element-name,
#result .energy-label{
  color:#FC9FBC!important;
  font-size:clamp(1rem,3.2vw,1.2rem)!important;
  line-height:1.08!important;
  letter-spacing:.055em!important;
  text-transform:uppercase!important;
}



/* Точечные правки 28.06: только аспектная строка и названия стихий/энергий */
#result .aspect-row{
  grid-template-columns:1fr!important;
  grid-template-areas:"type" "planets"!important;
  text-align:center!important;
}
#result .aspect-row .asp-planets{
  grid-area:planets!important;
  justify-self:center!important;
  width:100%!important;
  max-width:100%!important;
  text-align:center!important;
  color:#fff!important;
  font-size:clamp(.82rem,2.2vw,1rem)!important;
  line-height:1.05!important;
  font-weight:900!important;
  letter-spacing:.07em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  margin:0!important;
}
#result .aspect-row .asp-orb{
  display:none!important;
}
#result .element-name,
#result .energy-label,
#result .energies-grid .energy-label{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  max-width:100%!important;
  min-width:min(9.5rem,100%)!important;
  padding:.34rem 1.25rem!important;
  border-radius:999px!important;
  border:1.5px solid rgba(254,220,209,.42)!important;
  background:rgba(254,220,209,.12)!important;
  color:#FC9FBC!important;
  text-align:center!important;
  font-size:clamp(.82rem,2.2vw,1rem)!important;
  line-height:1.05!important;
  font-weight:900!important;
  letter-spacing:.07em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  margin:0 0 .45rem!important;
  box-sizing:border-box!important;
}
@media(max-width:700px){
  #result .aspect-row .asp-planets{
    font-size:.95rem!important;
    text-align:center!important;
    justify-self:center!important;
  }
  #result .element-name,
  #result .energy-label,
  #result .energies-grid .energy-label{
    font-size:.95rem!important;
    min-width:min(8.5rem,100%)!important;
    padding:.32rem 1rem!important;
  }
}

/* Правка 28.06: убрать плашки и уменьшить названия стихий/энергий */
#indicatorsSection .elements-grid .element-name,
#indicatorsSection .energies-grid .energy-label{
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#FC9FBC!important;
  text-align:center!important;
  font-size:clamp(.68rem,1.85vw,.82rem)!important;
  line-height:1.1!important;
  font-weight:900!important;
  letter-spacing:.06em!important;
  text-transform:uppercase!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  margin:0 0 .45rem!important;
  box-sizing:border-box!important;
}
@media(max-width:700px){
  #indicatorsSection .elements-grid .element-name,
  #indicatorsSection .energies-grid .energy-label{
    font-size:.74rem!important;
    min-width:0!important;
    padding:0!important;
  }
}
