/* title-features — see contract */

/* ---- clickable meta: genres, countries and the year open the filtered catalogue ---- */
a.genre-link { color: #d9d3e7; transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
a.genre-link:active { transform: scale(.96); }
.meta-link { color: inherit; transition: color .15s ease, transform .15s ease; }
.meta-link:focus-visible, a.genre-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
a.genre-link:focus-visible { border-radius: 999px; }
/* a bigger hit area than the 22×16 flag, without moving anything */
.country-link { display: block; padding: 8px 3px; margin: -8px -3px; border-radius: 6px; }
.country-link .flag { transition: box-shadow .15s ease, transform .15s ease; }
.year-link, .country-link .country-name {
  text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: rgba(255,255,255,.32);
  text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.year-link { padding: 6px 0; margin: -6px 0; }
@media (hover: hover) {
  a.genre-link:hover { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.24); }
  .year-link:hover, .country-link:hover .country-name { color: #fff; text-decoration-color: var(--accent); }
  .country-link:hover .flag { transform: translateY(-1px); box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
}

/* ---- my list: the status button and its menu ---- */
.sv-wrap { position: relative; display: inline-flex; }
.btn-save .sv-bi { display: grid; place-items: center; flex: none; }
.btn-save .sv-chev { display: grid; place-items: center; flex: none; margin: 0 -5px 0 -2px; opacity: .55; transition: transform .2s ease; }
.btn-save .sv-chev svg { width: 15px; height: 15px; }
.btn-save[aria-expanded="true"] .sv-chev { transform: rotate(180deg); }
/* saved: tinted by the status, the same colours as the bookmarks on the posters */
.btn-save.saved {
  --st: #ff8fb1; --st-line: rgba(255,127,168,.5); --st-bg: rgba(255,127,168,.14);
  color: var(--st); border-color: var(--st-line); background: linear-gradient(180deg, var(--st-bg), rgba(255,255,255,.03));
}
.btn-save.saved[data-status="watching"] { --st: #8adcff; --st-line: rgba(108,210,255,.5); --st-bg: rgba(108,210,255,.14); }
.btn-save.saved[data-status="postponed"] { --st: #ffd27a; --st-line: rgba(255,194,75,.5); --st-bg: rgba(255,194,75,.13); }
.btn-save.saved[data-status="dropped"] { --st: #bdb6d1; --st-line: rgba(164,157,185,.45); --st-bg: rgba(164,157,185,.13); }
.btn-save.saved:hover { border-color: var(--st); background: linear-gradient(180deg, var(--st-bg), rgba(255,255,255,.07)); }

.sv-menu:not(.as-sheet) {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: 250px; padding: 6px;
  border-radius: 24px; background: var(--panel); border: 1px solid rgba(255,255,255,.12); text-align: left;
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 24px 60px rgba(0,0,0,.5), var(--glass-hi); animation: pop .16s ease;
}
.sv-title { display: none; margin: 0; padding: 2px 12px 8px; font-weight: 700; font-size: 17px; }
.sv-menu.as-sheet .sv-title { display: block; }
.sv-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 6px 12px 6px 7px;
  border: 0; border-radius: 17px; background: transparent; color: var(--text); font: 500 15px var(--body);
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .12s ease;
}
.sv-opt:hover, .sv-opt:focus-visible { background: rgba(255,255,255,.08); outline: none; }
.sv-opt:active { background: rgba(255,255,255,.12); }
.sv-opt.on { font-weight: 600; }
.sv-ic {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #d9d3e7; box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.sv-ic svg { width: 18px; height: 18px; display: block; }
.sv-ic.planned { color: #ff7fa8; background: rgba(255,127,168,.15); }
.sv-ic.watching { color: #6cd2ff; background: rgba(108,210,255,.15); }
.sv-ic.postponed { color: var(--star); background: rgba(255,194,75,.15); }
.sv-ic.dropped { color: #a49db9; background: rgba(164,157,185,.17); }
.sv-name { flex: 1; min-width: 0; }
.sv-check { flex: none; width: 20px; height: 20px; color: #ff8fb1; }
.sv-check svg { width: 20px; height: 20px; display: block; }
.sv-sep { height: 1px; margin: 5px 12px; background: rgba(255,255,255,.1); }
.sv-del { color: #ff9aa6; }
.sv-del .sv-ic { color: #ff8f9c; background: rgba(255,107,125,.13); }
.sv-del .sv-ic svg { width: 16px; height: 16px; }
.sv-menu.as-sheet { padding-bottom: 10px; }
.sv-menu.as-sheet .sv-opt { min-height: 56px; font-size: 16px; }
.sv-menu.as-sheet .sv-ic { width: 36px; height: 36px; }
.sv-menu.as-sheet .sv-ic svg { width: 20px; height: 20px; }

@media (max-width: 719px) {
  /* the wrapper is the grid cell beside the stars; the button fills it */
  .hero-actions .sv-wrap { display: flex; min-width: 0; }
  .hero-actions .sv-wrap .btn-save { flex: 1 1 auto; width: 100%; padding: 0 12px; gap: 6px; }
}
@media (max-width: 389px) { .btn-save .sv-chev { display: none; } }

/* ---- episode marks in the Сезон / Серия lists ---- */
.dd-row { display: flex; align-items: center; border-radius: 14px; }
.dd-row .dd-opt { flex: 1 1 auto; width: auto; min-width: 0; }
.dd-mark {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.dd-mark i {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.32); color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.dd-mark svg { width: 14px; height: 14px; display: block; }
.dd-mark:active i { transform: scale(.86); }
.dd-mark.is-done i { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.32); }
.dd-mark:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
@media (hover: hover) {
  .dd-mark:not(.is-done):hover i { border-color: rgba(255,255,255,.6); color: rgba(255,255,255,.5); }
}
.as-sheet .dd-mark { width: 48px; height: 48px; }
.as-sheet .dd-mark i { width: 27px; height: 27px; }
.as-sheet .dd-mark svg { width: 16px; height: 16px; }

.dd-acts { display: grid; gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.1); }
.dd-acts:empty { display: none; }
.dd-act {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 7px 10px;
  border: 0; border-radius: 14px; background: transparent; color: #fff; text-align: left;
  font: 500 13.5px/1.25 var(--body); cursor: pointer;
}
.dd-act > svg { flex: none; width: 18px; height: 18px; color: #ff8fb1; }
.dd-act span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dd-act small { font-size: 11.5px; font-weight: 400; color: rgba(255,255,255,.5); }
.dd-act:hover { background: rgba(255,255,255,.09); }
.as-sheet .dd-act { min-height: 54px; font-size: 15.5px; }
.as-sheet .dd-act small { font-size: 12.5px; }

/* ---- «Похожие»: full width under the player ---- */
.title-layout .similar { grid-column: 1 / -1; min-width: 0; margin: 4px 0 30px; }
@media (max-width: 719px) { .title-layout .similar { margin: 8px 0 24px; } }

/* ---- kids profile: a title above 12+ ---- */
.kids-block {
  display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 460px; margin: 9vh auto 48px;
  padding: 32px 26px 26px; border-radius: 32px; text-align: center;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi);
}
.kb-ic {
  display: grid; place-items: center; width: 78px; height: 78px; margin-bottom: 4px; border-radius: 50%; color: var(--star);
  background: linear-gradient(180deg, rgba(255,194,75,.24), rgba(255,194,75,.07)); box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}
.kb-ic svg { width: 40px; height: 40px; }
.kids-block h1 { margin: 0; font: 700 22px/1.25 var(--display); letter-spacing: -.01em; }
.kids-block p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.kb-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.kb-acts .btn { height: 46px; padding: 0 22px; }
@media (max-width: 719px) {
  .kids-block { margin: 36px auto 32px; padding: 28px 18px 18px; border-radius: 28px; }
  .kids-block h1 { font-size: 20px; }
  .kb-acts { flex-direction: column; align-self: stretch; }
  .kb-acts .btn { width: 100%; height: 50px; }
}
