/* РеДизайн 6.5 — рабочий кабинет, единая типографика и корзина на всех страницах */
:root{
  --rd-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  --rd-font-display:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  --reader-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
}
html,body,button,input,select,textarea,
.tests-hub-page,.tests-hub-page button,.tests-hub-page input,.tests-hub-page select,.tests-hub-page textarea,
.bio-tool-page,.bio-tool-page button,.bio-tool-page input,.bio-tool-page select,.bio-tool-page textarea{
  font-family:var(--rd-font)!important;
}
h1,h2,h3,h4,.brand,.account-tab,.result-product-tabs a,
.tests-hub-page h1,.tests-hub-page h2,.tests-hub-page h3,.tests-hub-page b,.tests-hub-page legend,
.bio-tool-page h1,.bio-tool-page h2,.bio-tool-page h3,.bio-tool-page b{
  font-family:var(--rd-font-display)!important;
  letter-spacing:-.018em!important;
}

/* Кабинет: отображается только выбранный сервером раздел, без зависимости от JS/CSS-переключателя. */
.account-pane,.account-pane.is-active{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  visibility:visible!important;
  opacity:1!important;
}
.account-pane[hidden]{display:none!important}
.account-shell{min-height:580px}
.account-tabs{position:relative!important;top:auto!important}
.person-group,.daily-cabinet-card,.archive-intro,.archive-list,.account-grid-side,.mail-settings-card{
  animation:none!important;
}
.purchase-actions .secondary-button,
.daily-cab-actions .primary-button{
  min-height:44px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:var(--rd-gradient)!important;
  color:#fff!important;
  border-color:transparent!important;
}
.person-group-head>div:nth-child(2){min-width:0}
.person-group-head h2,.person-group-head p{overflow-wrap:anywhere}
.empty-state.soft{
  border:1px solid var(--rd-line)!important;
  background:linear-gradient(145deg,#fff,var(--rd-soft-2))!important;
  box-shadow:0 12px 30px rgba(20,73,80,.06)!important;
}

/* РеДизайн дня в кабинете всегда выглядит как содержательный раздел. */
.daily-cabinet-card{
  background:linear-gradient(145deg,var(--rd-primary-deep),var(--rd-primary),var(--rd-accent))!important;
  color:#fff!important;
}
.daily-cabinet-card h3,.daily-cabinet-card b,.daily-cabinet-card p,.daily-cabinet-card small{color:#fff!important}
.daily-cabinet-card .muted{color:rgba(255,255,255,.78)!important}
.daily-cabinet-card .primary-button{background:#fff!important;color:var(--rd-primary-deep)!important;box-shadow:none!important}
.subscription-chip{background:rgba(255,255,255,.18)!important;color:#fff!important}

/* Тесты и биоритмы используют ту же шкалу текста, что главная и расшифровка. */
.tests-hub-shell,.bio-tool-shell{
  width:min(1180px,calc(100% - 32px))!important;
  max-width:1180px!important;
  margin-inline:auto!important;
}
.tests-hub-head,.bio-tool-hero{
  padding:clamp(26px,4vw,48px)!important;
  border-radius:28px!important;
}
.tests-hub-head h1,.bio-tool-hero h1{
  margin:8px 0 14px!important;
  font-size:clamp(2rem,4.2vw,3.7rem)!important;
  line-height:1.04!important;
  letter-spacing:-.045em!important;
}
.tests-hub-head p,.bio-tool-hero p{
  max-width:760px!important;
  font-size:clamp(.98rem,1.3vw,1.08rem)!important;
  line-height:1.65!important;
}
.tests-hub-page p,.bio-tool-page p{line-height:1.62}
.psych-test-tab b{font-size:.98rem!important}
.psych-test-tab small{font-size:.78rem!important;line-height:1.4!important}
.psych-test-tab em{font-size:.76rem!important}
.test-experience-card,.psych-wizard,.psych-result,
.bio-calculator-card,.bio-result-panel{
  border:1px solid var(--rd-line)!important;
  background:#fff!important;
  box-shadow:var(--rd-shadow)!important;
}

/* Кнопка «Далее» больше не фиолетовая. */
.reading-page-controls .reading-page-next,
.reading-inline-pager button:last-child,
.wizard-controls .wizard-next:not(:disabled),
#wizardNext:not(:disabled){
  background:var(--rd-gradient)!important;
  color:#fff!important;
  border-color:transparent!important;
  box-shadow:0 8px 20px color-mix(in srgb,var(--rd-primary) 22%,transparent)!important;
}
.reading-page-controls .reading-page-next:hover,
.reading-inline-pager button:last-child:hover,
.wizard-controls .wizard-next:not(:disabled):hover,
#wizardNext:not(:disabled):hover{
  background:var(--rd-primary-strong)!important;
  color:#fff!important;
}
.reading-page-controls .reading-page-prev,
.reading-page-controls .reading-page-index,
.reading-inline-pager button:not(:last-child),
.wizard-controls .wizard-back{
  background:#fff!important;
  color:var(--rd-primary-strong)!important;
  border-color:var(--rd-line)!important;
}

/* Корзина присутствует на каждой пользовательской странице. */
.cart-button{
  z-index:125!important;
  background:var(--rd-gradient)!important;
  color:#fff!important;
  border:0!important;
}
.cart-button.cart-button-floating{
  position:fixed!important;
  right:18px!important;
  top:18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-width:48px!important;
  height:46px!important;
  padding:0 14px!important;
  border-radius:15px!important;
  box-shadow:0 12px 28px rgba(15,83,88,.24)!important;
}
.cart-button .cart-ic,.cart-button .cart-label{color:#fff!important}
.cart-panel{z-index:181!important}
.cart-overlay{z-index:180!important}

/* Не допускаем повторного «прыгания» шапки после появления корзины. */
.site-header,.site-header.compact{
  grid-template-columns:auto minmax(0,1fr) auto!important;
}
.site-header .cart-button{grid-column:3!important;grid-row:1!important}

/* Мягкие интерактивные акценты вместо старого фиолетового. */
.answer-scale label:has(input:checked),
.wizard-answer-scale label:has(input:checked){
  border-color:var(--rd-primary)!important;
  background:var(--rd-soft)!important;
}
.wizard-question legend span,
.bio-person-heading>span,
.bio-target-card>span{
  background:var(--rd-soft)!important;
  color:var(--rd-primary-strong)!important;
}

@media(max-width:900px){
  .tests-hub-shell,.bio-tool-shell{width:calc(100% - 20px)!important}
  .tests-hub-head,.bio-tool-hero{border-radius:22px!important}
}
@media(max-width:680px){
  .cart-button.cart-button-floating{
    top:10px!important;right:10px!important;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;
  }
  .cart-button.cart-button-floating .cart-label{display:none!important}
  .tests-hub-shell,.bio-tool-shell{width:calc(100% - 14px)!important}
  .tests-hub-head,.bio-tool-hero{padding:23px 17px!important}
  .tests-hub-head h1,.bio-tool-hero h1{font-size:clamp(1.9rem,10vw,2.65rem)!important}
}

/* === Раздел оплат в кабинете === */
.pay-pane{padding:4px 0 40px}
.pay-pane-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.pay-pane-head h2{margin:0 0 4px;font-size:1.4rem;font-weight:700}
.pay-pane-head p{margin:0;font-size:14px;color:var(--muted,#6b7280)}
.pay-pane-total{text-align:right;background:var(--rd-soft,#f5f3ff);border-radius:12px;padding:12px 18px;min-width:120px}
.pay-pane-total span{display:block;font-size:12px;color:var(--muted,#6b7280);margin-bottom:2px;text-transform:uppercase;letter-spacing:.05em}
.pay-pane-total b{font-size:1.5rem;font-weight:800;color:var(--rd-primary-strong,#6d28d9)}
.pay-list{display:flex;flex-direction:column;gap:10px}
.pay-card{display:flex;align-items:center;gap:16px;background:#fff;border:1.5px solid var(--border,#e5e7eb);border-radius:14px;padding:16px 20px;transition:box-shadow .15s,border-color .15s}
.pay-card:hover{box-shadow:0 4px 18px rgba(124,58,237,.08);border-color:var(--rd-primary,#7c3aed)}
.pay-card-icon{width:44px;height:44px;border-radius:12px;background:var(--rd-soft,#f5f3ff);color:var(--rd-primary,#7c3aed);display:flex;align-items:center;justify-content:center;font-size:1.3rem;flex-shrink:0}
.pay-card-body{flex:1;min-width:0}
.pay-card-title{font-size:15px;font-weight:600;color:var(--text,#1a1a2e);display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.pay-name-chip{background:var(--rd-soft,#f5f3ff);color:var(--rd-primary,#7c3aed);border-radius:6px;padding:2px 8px;font-size:12px;font-weight:500}
.pay-card-meta{display:flex;gap:14px;flex-wrap:wrap}
.pay-card-date{font-size:13px;color:var(--muted,#6b7280);font-variant-numeric:tabular-nums}
.pay-card-id{font-size:12px;color:var(--muted,#9ca3af);font-family:monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}
.pay-card-amount{font-size:1.25rem;font-weight:800;color:var(--rd-primary-strong,#6d28d9);white-space:nowrap;flex-shrink:0}
@media(max-width:540px){
  .pay-card{padding:14px 14px;gap:12px}
  .pay-card-icon{width:38px;height:38px;font-size:1.1rem}
  .pay-card-amount{font-size:1.1rem}
  .pay-card-id{display:none}
}
/* === Auth divider === */
.auth-divider{display:flex;align-items:center;gap:10px;margin:12px 0;color:var(--muted,#9ca3af);font-size:13px}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:var(--border,#e5e7eb)}
