/* =====================================================================
   v2 · РОДИТЕЛЬ (html[data-yt-role="parent"]) и КАТАЛОГ (#screen-catalog,
   окна анкеты/записи) — для всех ролей. Только токены темы.
   ===================================================================== */

/* ---------- общие мелочи сводки ---------- */
#ypKids, #ypChild, #ypKidLessons, #ypTopicBar{ --yp-gap:16px; }
.yp-link{ display:inline-flex; align-items:center; gap:4px; min-height:44px; padding:0 4px; border:0; background:none;
  font:inherit; font-size:14px; font-weight:800; color:var(--teal-strong); cursor:pointer; text-decoration:underline;
  text-decoration-thickness:1px; text-underline-offset:3px; white-space:nowrap; }
.yp-link:hover{ text-decoration-thickness:2px; }
.yp-link .ico{ width:16px; height:16px; }
.yp-h{ font-family:var(--font-body); font-size:17px; font-weight:800; color:var(--ink); margin:0 0 12px; }
.yp-none{ font-size:14px; color:var(--ink-soft); margin:4px 0 0; line-height:1.45; }
.yp-tag{ display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border-radius:8px; font-size:12px; font-weight:800; white-space:nowrap; }
.yp-tag.warn{ background:var(--ds-warn-bg); color:var(--ds-warn-ink); }
.yp-tag.good{ background:var(--surface-2); color:var(--ink-soft); }
.yp-quiet{ display:flex; gap:10px; align-items:flex-start; padding:12px 16px; border-radius:var(--ds-r-s); background:var(--surface-2);
  color:var(--ink-soft); font-size:14px; line-height:1.45; }
.yp-quiet .ico{ width:18px; height:18px; flex:none; margin-top:1px; }

/* цифры недели */
.yp-metrics{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
@media (min-width:640px){ .yp-metrics{ grid-template-columns:repeat(4, minmax(0, 1fr)); } }
.yp-m{ display:flex; flex-direction:column; gap:2px; padding:12px 16px; border-radius:var(--ds-r-s); background:var(--surface-2); min-width:0; }
.yp-m > span{ font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:var(--ink-soft); }
.yp-m > b{ font-size:26px; line-height:1.15; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; }
.yp-m > b i{ font-style:normal; font-size:14px; font-weight:700; color:var(--ink-soft); }
.yp-d{ font-size:12.5px; font-weight:700; color:var(--ink-soft); display:flex; align-items:center; gap:6px; }
.yp-d.up::before, .yp-d.down::before{ content:""; width:8px; height:8px; border-radius:50%; flex:none; }
.yp-d.up::before{ background:var(--sage); }
.yp-d.down::before{ background:var(--gold); }
.yp-m.good{ box-shadow:inset 3px 0 0 var(--sage); }
.yp-m.warn{ box-shadow:inset 3px 0 0 var(--gold); }

/* слабые темы и уроки */
.yp-gap{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 0; border-top:1px solid var(--border); min-height:52px; }
.yp-gap:first-of-type{ border-top:0; }
.yp-gap-t{ display:flex; flex-direction:column; min-width:0; }
.yp-gap-t b{ font-size:15px; font-weight:800; color:var(--ink); }
.yp-gap-t small{ font-size:12.5px; color:var(--ink-soft); }
.yp-les{ display:flex; align-items:center; gap:12px; padding:8px 0; border-top:1px solid var(--border); min-height:52px; }
.yp-les:first-of-type{ border-top:0; }
.yp-les-when{ flex:none; min-width:64px; font-size:14px; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; }
.yp-les-what{ display:flex; flex-direction:column; min-width:0; flex:1; }
.yp-les-what b{ font-size:14.5px; font-weight:800; color:var(--ink); }
.yp-les-what small{ font-size:12.5px; color:var(--ink-soft); overflow-wrap:anywhere; }
.yp-les{ flex-wrap:wrap; row-gap:4px; }
.yp-les .yp-tag{ margin-left:auto; }
.yp-hw{ display:flex; align-items:center; gap:8px; margin:8px 0 0; padding-top:8px; border-top:1px solid var(--border); font-size:14px; color:var(--ink-soft); }
.yp-hw .ico{ width:16px; height:16px; flex:none; }

/* ================= «Мои дети» ================= */
/* одна колонка: раскладка «плиткой» (две колонки на компьютере) уводила пустой кабинет вправо */
html[data-yt-role="parent"] #screen-parent-home.active,
html[data-yt-role="parent"] #screen-parent-child.active,
html[data-yt-role="parent"] #screen-bookings.active{ display:block !important; }
html[data-yt-role="parent"] #screen-parent-home > *{ max-width:1040px; }
html[data-yt-role="parent"] #screen-parent-home .v93-empty{ max-width:560px; margin:16px 0 0 !important; }
html[data-yt-role="parent"] #screen-parent-home .v93-empty #v93Create{ min-height:44px; }
/* пустой кабинет: Юпи и одно действие — настройки и тарифы появятся вместе с ребёнком */
html[data-yt-role="parent"]:has(#v93Empty) #v66Parent{ display:none !important; }
html[data-yt-role="parent"] #screen-parent-home.yp-has-kids #v66Week,
html[data-yt-role="parent"] #screen-parent-home.yp-has-kids #parentChildrenList{ display:none !important; }
html[data-yt-role="parent"] #ypKids{ display:flex; flex-direction:column; gap:var(--yp-gap); max-width:1040px; margin:4px 0 8px; }
.yp-lead{ margin:0; font-size:15px; line-height:1.5; color:var(--ink-soft); max-width:640px; }
.yp-kid{ display:flex; flex-direction:column; gap:16px; padding:20px !important; margin:0 !important; border-radius:var(--ds-r-l) !important; }
.yp-kid-h{ display:flex; align-items:center; gap:12px; }
.yp-av{ width:44px; height:44px; flex:none; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:var(--ds-main-bg); color:var(--teal-strong); font-weight:800; font-size:15px; }
.yp-kid-n{ flex:1; min-width:0; display:flex; flex-direction:column; }
.yp-kid-n b{ font-family:var(--font-brand); font-size:20px; line-height:1.2; color:var(--ink); }
.yp-kid-n small{ font-size:13px; color:var(--ink-soft); }
.yp-more{ flex:none; }
.yp-cols{ display:grid; grid-template-columns:minmax(0, 1fr); gap:16px; }
@media (min-width:760px){ .yp-cols{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:24px; } }
.yp-cols h4{ margin:0 0 4px; font-size:12px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--ink-soft); }
.yp-kid-f{ display:flex; flex-wrap:wrap; gap:8px; padding-top:4px; }
.yp-kid-f .btn{ min-height:48px; display:inline-flex; align-items:center; justify-content:center; gap:8px; width:auto; margin:0; }
.yp-kid-f .btn .ico{ width:18px; height:18px; }
@media (max-width:599px){
  .yp-kid-f .btn{ width:100%; padding:0 12px; font-size:15px; } .yp-kid{ padding:16px !important; }
  .yp-kid-n b{ font-size:18px; }
  .yp-m{ padding:12px; } .yp-m > b{ font-size:24px; }
  .yp-lead{ font-size:14px; }
}
/* «отчёт за 10 секунд»: сделано · пробел · предлагаем */
.yp-brief{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; border-radius:var(--ds-r-m); background:var(--surface-2); }
.yp-brief > li{ display:grid; grid-template-columns:32px 112px minmax(0, 1fr); align-items:center; column-gap:12px; padding:12px 16px; min-height:56px;
  border-top:1px solid var(--border); }
.yp-brief > li:first-child{ border-top:0; }
.yp-b-ic{ width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--surface); color:var(--ink-soft); }
.yp-b-ic .ico{ width:16px; height:16px; }
.yp-b-done .yp-b-ic{ color:var(--sage); }
.yp-b-gap .yp-b-ic{ color:var(--gold); }
.yp-b-gap.ok .yp-b-ic{ color:var(--sage); }
.yp-b-cta .yp-b-ic{ color:var(--teal-strong); }
.yp-b-k{ font-size:12px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--ink-soft); }
.yp-b-v{ font-size:15px; line-height:1.4; color:var(--ink); min-width:0; }
.yp-b-v b{ font-weight:800; }
.yp-b-v .btn{ min-height:48px; display:inline-flex; align-items:center; justify-content:center; gap:8px; width:auto; max-width:100%; margin:0; }
.yp-b-v .btn .ico{ width:18px; height:18px; flex:none; }
@media (max-width:599px){
  .yp-brief > li{ grid-template-columns:32px minmax(0, 1fr); row-gap:2px; padding:12px; }
  .yp-b-ic{ grid-row:1 / span 2; align-self:start; }
  .yp-b-k, .yp-b-v{ grid-column:2; }
  .yp-b-v .btn{ width:100%; margin-top:6px; padding:0 12px; font-size:15px; }
}
.yp-facts{ display:flex; flex-wrap:wrap; gap:8px 20px; font-size:14px; color:var(--ink-soft); }
.yp-facts b{ color:var(--ink); font-weight:800; }
.yp-tag.wait{ background:var(--ds-main-bg); color:var(--ink); }
.yp-pend-note{ margin:0; padding:8px 0 12px; border-top:1px solid var(--border); font-size:13.5px; line-height:1.45; color:var(--ink-soft); }
.yp-mail{ display:flex; align-items:center; gap:10px; min-height:44px; font-size:14px; color:var(--ink-soft); cursor:pointer; }
.yp-mail input{ width:20px; height:20px; flex:none; accent-color:var(--teal); margin:0; }
/* то, что ниже сводки, — с ровными отступами */
html[data-yt-role="parent"] #screen-parent-home #v66Parent,
html[data-yt-role="parent"] #screen-parent-home #v71AddMore,
html[data-yt-role="parent"] #screen-parent-home #parentPurchases:not(:empty){ max-width:1040px; }
html[data-yt-role="parent"] #screen-parent-home #v71AddMore,
html[data-yt-role="parent"] #screen-parent-home #v71ParentMore{ margin-top:8px !important; }

/* ================= подробный прогресс ================= */
html[data-yt-role="parent"] #screen-parent-child > *{ max-width:920px; }
#ypChild{ display:flex; flex-direction:column; gap:24px; margin:16px 0 8px; }
.yp-sec{ margin:0; }
.yp-sum{ margin:12px 0 0; font-size:15px; line-height:1.5; color:var(--ink-soft); }
.yp-subj{ display:flex; flex-direction:column; gap:10px; padding:16px !important; margin:0 0 8px !important; }
.yp-subj-h{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.yp-subj-h b{ font-size:16px; font-weight:800; color:var(--ink); }
.yp-subj-h small{ font-size:13px; color:var(--ink-soft); }
.yp-subj .lv-sum{ margin:0 !important; }
.yp-subj .lv-legend{ margin:0 !important; }
.yp-subj-gaps{ border-top:1px solid var(--border); padding-top:8px; }
.yp-lbl{ display:block; font-size:12px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--ink-soft); margin-bottom:2px; }
.yp-err{ margin:0; font-size:14px; line-height:1.45; color:var(--ink-soft); }
.yp-err b{ color:var(--ink); }
.yp-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.yp-chip{ display:inline-flex; align-items:center; min-height:36px; padding:0 14px; border-radius:999px; background:var(--surface-2);
  border:1px solid var(--border); font-size:14px; font-weight:700; color:var(--ink); }
.yp-rec{ display:flex; gap:12px; align-items:flex-start; padding:12px 16px; border-radius:var(--ds-r-s); background:var(--surface-2); margin-bottom:8px; font-size:14px; line-height:1.45; color:var(--ink-soft); }
.yp-rec .ico{ width:18px; height:18px; flex:none; color:var(--teal-strong); margin-top:2px; }
.yp-rec b{ display:block; color:var(--ink); font-weight:800; margin-bottom:2px; }
html[data-yt-role="parent"] #screen-parent-child > .section-head{ margin-top:24px !important; }
html[data-yt-role="parent"] #parentChildBookings, html[data-yt-role="parent"] #parentChildHomework{ display:flex; flex-direction:column; gap:8px; }
html[data-yt-role="parent"] #parentChildBookings > .card, html[data-yt-role="parent"] #parentChildHomework > .card{ margin:0 !important; }
.yp-det{ margin-top:24px; border:1px solid var(--border); border-radius:var(--ds-r-m); background:var(--surface); }
.yp-det > summary{ list-style:none; display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:56px; padding:0 16px;
  cursor:pointer; font-weight:800; font-size:15px; color:var(--ink); }
.yp-det > summary::-webkit-details-marker{ display:none; }
.yp-det > summary .ico{ width:18px; height:18px; color:var(--ink-soft); transform:rotate(90deg); transition:transform .15s; }
.yp-det[open] > summary .ico{ transform:rotate(-90deg); }
.yp-det-b{ padding:0 16px 16px; }
.yp-det-b .section-head{ margin:16px 0 8px !important; }
.yp-det-b .section-head h3{ font-size:12px !important; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--ink-soft) !important; font-family:var(--font-body) !important; }
.yp-det-b > .section-head:first-child{ margin-top:4px !important; }

/* ================= «Записи» у родителя ================= */
#ypKidLessons:empty{ display:none; }
#ypKidLessons{ margin-top:16px; }
#ypKidLessons .yp-h{ margin:16px 0 8px; }
#ypKidLessons .yp-h:first-child{ margin-top:0; }
.yp-les-list{ padding:4px 16px !important; margin:0 !important; }
html[data-yt-role="parent"] #screen-bookings.yp-has-kidles #v67ParentNote{ display:none; }
html[data-yt-role="parent"] #screen-bookings.yp-has-kidles #bookingsList{ margin-top:0 !important; }
html[data-yt-role="parent"] #screen-bookings.yp-has-kidles #bookingsList .empty-state{ padding:16px !important; min-height:0; }
html[data-yt-role="parent"] #screen-bookings.yp-has-kidles #bookingsList .empty-state .v92-yupi{ display:none; }
html[data-yt-role="parent"] #screen-bookings > *{ max-width:920px; }

/* ================= профиль родителя ================= */
html[data-yt-role="parent"] #pfNick{ display:none !important; }
html[data-yt-role="parent"] #accentRow button{ width:40px !important; height:40px !important; min-width:40px; }
#screen-catalog #catalogRulesBtn{ display:inline-flex; align-items:center; min-height:44px; vertical-align:middle; }

/* ================= КАТАЛОГ (все роли) ================= */
/* новости — короче: на телефоне только заголовок, текст обрезался посередине */
@media (max-width:599px){ #screen-catalog .v66-banner-wrap .nc-body{ display:none !important; } #screen-catalog .v66-banner-wrap .news-banner{ height:84px !important; } }
#screen-catalog .catalog-results > .section-head{ align-items:center; gap:12px; }
#screen-catalog #catalogSort{ min-height:44px; }
/* подписи групп фильтров */
#screen-catalog .yp-flbl{ font-size:12px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--ink-soft); margin:12px 0 6px; }
#screen-catalog .cf-body > .yp-flbl:first-child{ margin-top:4px; }
#screen-catalog #catalogSubjectChips{ margin-top:0 !important; }
#screen-catalog #catalogSubjectChips + p.muted{ display:none; }
#screen-catalog .format-row{ margin-top:0 !important; }

/* подбор по теме */
.yp-topic-bar{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:16px 0 4px; padding:12px 8px 12px 16px;
  border-radius:var(--ds-r-m); background:var(--ds-main-bg); border:1px solid color-mix(in srgb, var(--teal) 35%, transparent); }
.yp-tb-t{ display:flex; gap:12px; align-items:flex-start; min-width:0; }
.yp-tb-t > .ico{ width:20px; height:20px; flex:none; color:var(--teal-strong); margin-top:2px; }
.yp-tb-t b{ display:block; font-size:15px; font-weight:800; color:var(--ink); }
.yp-tb-t small{ display:block; font-size:13.5px; line-height:1.45; color:var(--ink-soft); margin-top:2px; }
.yp-x{ flex:none; width:44px; height:44px; border:0; border-radius:12px; background:transparent; color:var(--ink-soft); font-size:24px; line-height:1; cursor:pointer; }
.yp-x:hover{ background:var(--surface); color:var(--ink); }
#screen-catalog .yp-why{ display:inline-flex; align-items:flex-start; gap:6px; margin:6px 0 2px; padding:4px 10px; border-radius:8px;
  background:var(--ds-main-bg); color:var(--ink); font-size:13px; font-weight:700; line-height:1.35; }
#screen-catalog .yp-why .ico{ width:14px; height:14px; flex:none; color:var(--teal-strong); margin-top:2px; }

/* карточка репетитора: кто · предмет · цена · рейтинг · окна · «Записаться» */
#screen-catalog .teacher-card{ gap:12px; }
#screen-catalog .teacher-card .tc-meta{ gap:6px; row-gap:6px; }
#screen-catalog .teacher-card .tc-meta .level-tag.yp-zero{ display:none; }
/* на телефоне: аватар только рядом с именем, всё остальное — на всю ширину карточки */
@media (max-width:599px){
  #screen-catalog .teacher-card{ display:grid !important; grid-template-columns:52px minmax(0, 1fr); column-gap:12px; row-gap:0; align-items:start; }
  #screen-catalog .teacher-card > .avatar{ grid-column:1; grid-row:1 / span 2; width:52px !important; height:52px !important; min-width:0; }
  #screen-catalog .teacher-card > .tc-main{ display:contents; }
  #screen-catalog .teacher-card .tc-top{ grid-column:2; }
  #screen-catalog .teacher-card .tc-subject{ grid-column:2; }
  #screen-catalog .teacher-card .tc-main > *:not(.tc-top):not(.tc-subject){ grid-column:1 / -1; }
  #screen-catalog .teacher-card .tc-meta{ margin-top:10px; }
  #screen-catalog .teacher-card .trial-badge, #screen-catalog .teacher-card .yp-why{ justify-self:start; }
  #screen-catalog .teacher-card .v73-slot{ padding:0 10px !important; }
}
#screen-catalog .teacher-card .trial-badge{ margin-top:6px; }
#screen-catalog .teacher-card .v73-slots{ margin-top:12px; gap:6px; }
#screen-catalog .teacher-card .v73-slots > div{ gap:6px; }
#screen-catalog .teacher-card .v73-slot{ min-height:40px !important; padding:0 12px !important; border-radius:10px !important; font-size:13px !important; font-weight:800 !important;
  background:var(--surface) !important; color:var(--ink) !important; border:1px solid var(--border) !important; box-shadow:none !important; transform:none !important; }
#screen-catalog .teacher-card .v73-slot:hover{ border-color:var(--teal) !important; color:var(--teal-strong) !important; }
#screen-catalog .teacher-card .v67-tc-actions{ display:flex; align-items:center; gap:8px; margin-top:12px; flex-wrap:wrap; }
#screen-catalog .teacher-card .v67-tc-actions .btn-primary{ flex:1 1 160px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:8px; margin:0; }
#screen-catalog .teacher-card .v67-tc-actions .btn-ghost{ flex:0 0 auto; width:auto; min-height:44px; padding:0 8px; margin:0; background:none !important; border:0 !important; box-shadow:none !important;
  color:var(--teal-strong) !important; font-weight:800; text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px; }

/* окно анкеты: «Записаться» — первая и главная; «Хочу заниматься у него» — тихой ссылкой */
#overlayTeacher #teacherDetailContent > .btn-row{ display:flex; flex-direction:column; gap:8px; }
#overlayTeacher #teacherDetailContent > .btn-row > .btn{ width:100%; min-height:48px; margin:0; }
#overlayTeacher #btnBook{ order:-1; }
@media (min-width:600px){
  #overlayTeacher #teacherDetailContent > .btn-row{ flex-direction:row; }
  #overlayTeacher #btnBook{ flex:2; } #overlayTeacher #btnMessage{ flex:1; }
}
#overlayTeacher #v50Ask{ width:100%; min-height:44px; margin-top:4px; background:none !important; border:0 !important; box-shadow:none !important;
  color:var(--teal-strong) !important; font-weight:800; text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px; }
#overlayTeacher .stat-row{ gap:8px; }
/* окно записи: отступы ровные, «Сначала написать» — тихой ссылкой */
#overlayBooking #bookingContent > p.muted{ line-height:1.5; }
#overlayBooking #confirmBooking{ margin-top:16px; min-height:48px; }
#overlayBooking #messageInstead{ min-height:44px; margin-top:4px; background:none !important; border:0 !important; box-shadow:none !important;
  color:var(--teal-strong) !important; font-weight:800; }

/* ---------- bugparent: запись на ребёнка, отмена урока ребёнка ---------- */
.yp-forkid{ display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin:14px 0 4px; padding:10px 12px;
  border-radius:var(--ds-r-s); background:var(--surface-2); border:1px solid var(--border); }
.yp-forkid-l{ font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-soft); }
.yp-forkid-c{ display:flex; flex-wrap:wrap; gap:8px; }
.yp-kchip{ min-height:40px; padding:0 14px; border-radius:999px; border:1px solid var(--border); background:var(--surface);
  font:inherit; font-size:14px; font-weight:700; color:var(--ink); cursor:pointer; }
.yp-kchip.on{ background:var(--ink); border-color:var(--ink); color:var(--paper); }
.yp-kchip:focus-visible{ outline:2px solid var(--teal); outline-offset:2px; }
.yp-les .yp-cancel{ min-height:36px; font-size:13px; color:var(--ink-soft); }
.yp-les .yp-tag + .yp-cancel{ margin-left:4px; }
.yp-les .yp-cancel:not(.yp-tag ~ .yp-cancel){ margin-left:auto; }
.yp-les .yp-cancel.arm{ color:var(--ds-warn-ink, #b42318); }
.yp-more-note{ border-top:0; padding-top:12px; }
html[data-yt-role="parent"] #screen-bookings.yp-hide-own #bookingsList{ display:none !important; }

/* ================= «Нужно ваше согласие» (родитель, ребёнок младше 14) ================= */
#ypConsent{ margin:0 0 14px; }
#ypConsent .yp-cons{ border:1px solid var(--teal); background:color-mix(in srgb, var(--teal) 9%, var(--surface)); padding:16px; display:flex; flex-direction:column; gap:10px; }
#ypConsent .yp-cons h3{ margin:0; font-size:17px; color:var(--ink); }
#ypConsent .yp-cons p{ margin:0; font-size:14px; line-height:1.5; color:var(--ink); }
#ypConsent .yp-cons .btn{ align-self:flex-start; min-height:44px; }
#ypConsent .yp-cons small{ font-size:12px; line-height:1.4; color:var(--ink-soft); }
@media (max-width:599px){ #ypConsent .yp-cons .btn{ align-self:stretch; } }
/* старый блок согласия внизу — заменён карточкой наверху */
#screen-parent-home.yp-need-cons #v66Parent .card:has([data-cons-ok]){ display:none; }
/* баннер новостей в каталоге — цвета палитры, а не старый синий */
#screen-catalog .news-banner-slide.tone-rose{ background:color-mix(in srgb, var(--teal) 62%, #1b1b24) !important; }
