.horoscope-page.ui-page{
  width: 100%;
  max-width: var(--container, 1440px);
  margin: 0 auto;
  padding: 12px 0 32px;
  box-sizing: border-box;
}

.horoscope-shell{
  width: 100%;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(181,194,222,.4);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(26,39,64,.06);
  padding: 22px 24px 26px;
  box-sizing: border-box;
}

.horoscope-hero{
  margin-bottom: 18px;
}

.horoscope-hero__row{
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.horoscope-hero__symbol{
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef3fb, #e4ebf8);
  color: #1a2740;
  font-size: 34px;
  flex: 0 0 auto;
}

.horoscope-hero__title{
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
  line-height: 1.15;
  font-weight: 800;
  color: #1a2740;
}

.horoscope-hero__meta,
.horoscope-hero__lead{
  margin-top: 8px;
  color: #475569;
  line-height: 1.5;
  max-width: 1100px;
}

.horoscope-subhint{
  margin: 10px 0 0;
  color: #64748b;
  font-size: 14px;
}

.horoscope-back{
  display: inline-block;
  margin-bottom: 10px;
  color: #475569;
  text-decoration: none;
  font-size: 14px;
}

.horoscope-back:hover{
  color: #1a2740;
  text-decoration: underline;
}

.horoscope-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 18px;
}

.horoscope-card{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(181,194,222,.45);
  background: #f7f9fe;
  min-height: 140px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.horoscope-card:hover{
  border-color: rgba(70,110,180,.45);
  box-shadow: 0 8px 22px rgba(26,39,64,.08);
  transform: translateY(-1px);
}

.horoscope-card__symbol{
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1a2740;
  font-size: 24px;
  flex: 0 0 auto;
}

.horoscope-card__title{
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
  color: #1a2740;
}

.horoscope-card__title a{
  color: inherit;
  text-decoration: none;
}

.horoscope-card__title a:hover{
  text-decoration: underline;
}

.horoscope-card__dates{
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}

.horoscope-card__focus{
  font-size: 13px;
  color: #475569;
  line-height: 1.35;
}

.horoscope-card__links{
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.horoscope-card__links a{
  font-size: 12px;
  color: #3b5b8a;
  background: #fff;
  border: 1px solid rgba(181,194,222,.5);
  border-radius: 999px;
  padding: 3px 8px;
  text-decoration: none;
}

.horoscope-card__links a:hover{
  background: #eef3fb;
}

.horoscope-sign-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.horoscope-sign-nav__item{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid rgba(181,194,222,.45);
  background: #fff;
  color: #1a2740;
  font-size: 18px;
}

.horoscope-sign-nav__item.is-active,
.horoscope-sign-nav__item:hover{
  border-color: rgba(70,110,180,.5);
  background: #eef3fb;
  text-decoration: none;
}

.horoscope-tabs{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.horoscope-tabs__item{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 104px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(181,194,222,.45);
  background: #fff;
  color: #1a2740;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
}

.horoscope-tabs__item.is-active{
  background: #1a2740;
  border-color: #1a2740;
  color: #fff;
}

.horoscope-tabs__item:hover{
  text-decoration: none;
}

.horoscope-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.horoscope-navbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(181,194,222,.55);
  background: #fff;
  color: #1a2740;
  text-decoration: none;
  font-weight: 600;
}

.horoscope-navbtn:hover{
  background: #eef3fb;
  text-decoration: none;
}

.horoscope-navbtn__short{
  display: none;
}

.horoscope-date-form{
  min-width: 0;
}

.horoscope-date-form__label{
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #64748b;
}

.horoscope-date-form__caption{
  display: inline-block;
}

.horoscope-date-form input[type="date"]{
  min-width: 180px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(181,194,222,.55);
  background: #fff;
  font-size: 15px;
  box-sizing: border-box;
}

.horoscope-week-label{
  font-weight: 800;
  color: #1a2740;
  font-size: 1.05rem;
}

.horoscope-daybanner{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 18px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef3fb, #f7f9fe 55%, #fff);
  border: 1px solid rgba(181,194,222,.4);
  margin-bottom: 14px;
}

.horoscope-daybanner__title{
  margin: 0;
  font-size: 1.35rem;
  color: #1a2740;
}

.horoscope-daybanner__sub{
  margin-top: 4px;
  color: #64748b;
  text-transform: capitalize;
}

.horoscope-daybanner__chips{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 1 1 320px;
}

.horoscope-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.horoscope-chips--scores{
  flex-wrap: nowrap;
}

.horoscope-chip{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(181,194,222,.45);
  color: #334155;
  font-size: 13px;
  white-space: nowrap;
}

.horoscope-chip--score,
.horoscope-chip--tone{
  font-weight: 650;
}

.horoscope-chip.is-bad{
  background: #fdecec;
  border-color: #e7a3a3;
  color: #8f2f2f;
}

.horoscope-chip.is-mid{
  background: #fff6df;
  border-color: #e0c36a;
  color: #7a5a10;
}

.horoscope-chip.is-good{
  background: #e8f6ee;
  border-color: #8fc9a4;
  color: #1f6b3a;
}

.horoscope-panel-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.horoscope-panel-grid--day{
  grid-template-columns: 1.2fr 1fr 1fr;
}

.horoscope-panel{
  padding: 18px 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(181,194,222,.42);
  background: #fff;
  min-width: 0;
}

.horoscope-panel__title{
  margin: 0 0 12px;
  font-size: 1.12rem;
  color: #1a2740;
}

.horoscope-panel__text{
  margin: 0;
  line-height: 1.65;
  color: #243247;
  white-space: pre-line;
  font-size: 15px;
}

.horoscope-week-days{
  margin-top: 14px;
}

.horoscope-week-days__hint{
  margin: -2px 0 12px;
  color: #64748b;
  font-size: 14px;
}

.horoscope-week-days__list{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.horoscope-week-day{
  display: block;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(181,194,222,.4);
  background: #f7f9fe;
  text-decoration: none;
  color: inherit;
  min-height: 168px;
}

.horoscope-week-day:hover{
  border-color: rgba(70,110,180,.45);
  background: #fff;
  text-decoration: none;
}

.horoscope-week-day__top{
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: capitalize;
}

.horoscope-week-day__tone{
  font-size: 12px;
  color: #3b5b8a;
  margin-bottom: 6px;
}

.horoscope-week-day__scores{
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.horoscope-chip--mini{
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 650;
}

.horoscope-week-day__text{
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #334155;
}

.horoscope-footnote{
  margin: 16px 0 0;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #94a3b8;
}

@media (max-width: 1200px){
  .horoscope-panel-grid,
  .horoscope-panel-grid--day{
    grid-template-columns: 1fr;
  }
  .horoscope-week-days__list{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .horoscope-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px){
  /* edge-to-edge: убираем «колонку» и двойные поля */
  main.app-main.container:has(.horoscope-page){
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100%;
  }

  .horoscope-page.ui-page{
    padding: 0 0 calc(var(--bottom-nav-h, 72px) + 20px) !important;
    max-width: 100%;
  }

  .horoscope-shell{
    padding: 12px 12px 22px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    box-shadow: none;
    background: rgba(255,255,255,.97);
  }

  .horoscope-hero{
    margin-bottom: 12px;
  }

  .horoscope-hero__row{
    gap: 12px;
    margin-bottom: 12px;
  }

  .horoscope-hero__symbol{
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 28px;
  }

  .horoscope-hero__title{
    font-size: 1.45rem;
  }

  .horoscope-hero__meta{
    font-size: 13px;
    line-height: 1.4;
  }

  .horoscope-back{
    margin-bottom: 8px;
  }

  /* знаки: ровная сетка 6×2 */
  .horoscope-sign-nav{
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
  }

  .horoscope-sign-nav__item{
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 12px;
    font-size: 17px;
  }

  /* табы на всю ширину */
  .horoscope-tabs{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .horoscope-tabs__item{
    min-width: 0;
    width: 100%;
    padding: 11px 8px;
    font-size: 14px;
  }

  /* вчера | дата | завтра — одна строка */
  .horoscope-toolbar,
  .horoscope-toolbar--day,
  .horoscope-toolbar--week{
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: end;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
  }

  .horoscope-toolbar--week{
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
  }

  .horoscope-navbtn{
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
  }

  .horoscope-navbtn__full{
    display: none;
  }

  .horoscope-navbtn__short{
    display: inline;
    font-size: 20px;
    line-height: 1;
  }

  .horoscope-date-form__caption{
    display: none;
  }

  .horoscope-date-form input[type="date"]{
    min-width: 0;
    height: 44px;
    font-size: 16px; /* iOS zoom fix */
  }

  .horoscope-week-label{
    text-align: center;
    font-size: 14px;
    line-height: 1.3;
  }

  .horoscope-daybanner{
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    margin-bottom: 12px;
  }

  .horoscope-daybanner__title{
    font-size: 1.2rem;
  }

  .horoscope-daybanner__chips{
    align-items: stretch;
    flex: 1 1 auto;
  }

  .horoscope-chips{
    justify-content: flex-start;
    gap: 6px;
  }

  .horoscope-chips--scores{
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .horoscope-chips--scores .horoscope-chip{
    flex: 1 1 0;
    justify-content: center;
    padding: 5px 6px;
    font-size: 12px;
  }

  .horoscope-chip{
    font-size: 12px;
    padding: 5px 9px;
  }

  .horoscope-panel{
    padding: 14px;
    border-radius: 14px;
  }

  .horoscope-panel__title{
    font-size: 1.05rem;
    margin-bottom: 8px;
  }

  .horoscope-panel__text{
    font-size: 14.5px;
    line-height: 1.6;
  }

  .horoscope-grid{
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .horoscope-card{
    min-height: 0;
    padding: 14px;
  }

  .horoscope-week-days__list{
    grid-template-columns: 1fr;
  }

  .horoscope-week-day{
    min-height: 0;
  }

  .horoscope-footnote{
    margin-top: 14px;
    font-size: 12px;
  }
}

@media (max-width: 380px){
  .horoscope-sign-nav{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .horoscope-shell{
    padding-left: 10px;
    padding-right: 10px;
  }
}
