/* =========================================================
   kp_persons.css — kinogo2021
   Palette: #000 bg · #5a2a2a accent · #dd4b39 link hover
   Font: 12px Tahoma, Geneva, sans-serif
   ========================================================= */

/* ---------------------------------------------------------
   PERSONS SECTION wrapper
   --------------------------------------------------------- */

.persons-section {
    margin: 14px 0;
    clear: both;
}

.persons-block {
    margin-bottom: 12px;
}

.persons-block--crew {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #2e2e2e;
}

.persons-crew-row {
    margin-bottom: 10px;
}

.persons-crew-row:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------
   LABEL  "В главных ролях:", "Режиссёр:" etc.
   --------------------------------------------------------- */

.persons-label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #3f3f3f;
    border: 1px solid #555;
    color: #d0d0d0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ---------------------------------------------------------
   HORIZONTAL SCROLL ROW
   --------------------------------------------------------- */

.persons-list {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.persons-list::-webkit-scrollbar        { height: 3px; }
.persons-list::-webkit-scrollbar-track  { background: transparent; }
.persons-list::-webkit-scrollbar-thumb  { background: #444; border-radius: 3px; }

.persons-list--crew {
    gap: 6px;
}

/* ---------------------------------------------------------
   CAST CARD  — <a class="cast-item">
   --------------------------------------------------------- */

.cast-item {
    flex: 0 0 auto;
    display: block;
    width: 68px;
    text-align: center;
    text-decoration: none !important;
    transition: transform .16s ease;
    cursor: pointer;
}

.cast-item:hover {
    transform: translateY(-2px);
    color: inherit;
}

/* Portrait rectangle */
.cast-poster {
    width: 60px;
    height: 80px;
    margin: 0 auto 5px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #484848;
    background: #1f1f1f;
    transition: border-color .16s ease;
}

.cast-item:hover .cast-poster {
    border-color: #8b4b4b;
}

.cast-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform .2s ease;
}

.cast-item:hover .cast-poster img {
    transform: scale(1.06);
}

/* Name */
.cast-name {
    display: block;
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #d8d8d8;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 68px;
}

.cast-item:hover .cast-name {
    color: #dd4b39;
}

/* Character (role) */
.cast-char {
    display: block;
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 9px;
    color: #777;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 68px;
    margin-top: 2px;
}

/* Crew cards — slightly smaller */
.persons-list--crew .cast-item   { width: 54px; }
.persons-list--crew .cast-poster { width: 54px; height: 72px; }
.persons-list--crew .cast-name   { font-size: 9px; max-width: 54px; }


/* =========================================================
   PERSON PAGE v3.0 — .fpageactors + .fp-* blocks
   Palette: kinogo2021 native (#000/#2b2b2b/#585858)
   Accent: #dd4b39 red · #e8a838 gold · #5a2a2a burgundy
   Font: Tahoma, Geneva, sans-serif
   ========================================================= */

.fpageactors {
    --fp-bg:       #1a1a1a;
    --fp-surface:  #242424;
    --fp-card:     #2b2b2b;
    --fp-border:   #3a3a3a;
    --fp-groove-t: #111;
    --fp-groove-s: #404040;
    --fp-text:     #d8d8d8;
    --fp-heading:  #fff;
    --fp-muted:    #999;
    --fp-accent:   #dd4b39;
    --fp-burgundy: #5a2a2a;
    --fp-gold:     #e8a838;
    --fp-ff:       Tahoma, Geneva, sans-serif;
    padding: 0 0 20px;
}

/* ---------------------------------------------------------
   HERO: CSS grid — photo + info
   --------------------------------------------------------- */

.fp-hero {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    padding: 16px;
    background: var(--fp-surface);
    border-radius: 4px;
    border: 1px solid var(--fp-border);
    border-top: 1px solid var(--fp-groove-t);
    box-shadow: inset 0 1px var(--fp-groove-s);
}

.fp-hero-photo img {
    display: block;
    width: 160px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #484848;
    background: #1f1f1f;
}

.fp-profession {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--fp-burgundy);
    color: #e0c0c0;
    font: 700 10px/1.4 var(--fp-ff);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.fp-name {
    font: 700 20px/1.2 var(--fp-ff);
    color: var(--fp-heading);
    text-shadow: 1px 1px #000;
    margin: 0 0 4px;
}

.fp-hero-info {
    min-width: 0;
}

.fp-name-en {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
}

/* ---------------------------------------------------------
   META  <dl>
   --------------------------------------------------------- */

.fp-meta {
    margin: 0;
    font-size: 12px;
    color: var(--fp-text);
}

.fp-meta-row {
    display: flex;
    gap: 6px;
    padding: 3px 0;
    border-bottom: 1px solid #2a2a2a;
}

.fp-meta-row:last-child { border-bottom: 0; }

.fp-meta-row dt {
    flex: 0 0 auto;
    min-width: 110px;
    color: var(--fp-muted);
    font-weight: 700;
    font-size: 11px;
}

.fp-meta-row dd {
    flex: 1;
    margin: 0;
    color: var(--fp-text);
}

.fp-meta-note {
    color: var(--fp-muted);
    font-size: 11px;
    margin-left: 4px;
}

/* ---------------------------------------------------------
   SECTION TITLE (reusable)
   --------------------------------------------------------- */

.fp-section-title {
    font: 700 15px/1.3 var(--fp-ff);
    color: var(--fp-heading);
    text-shadow: 1px 1px #000;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--fp-groove-t);
    box-shadow: 0 1px 0 var(--fp-groove-s);
}

/* ---------------------------------------------------------
   BEST MOVIES — numbered grid (no posters)
   --------------------------------------------------------- */

.fp-best {
    margin-top: 18px;
}

.fp-best-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.fp-best-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-radius: 3px;
    transition: border-color .15s, background .15s;
}

.fp-best-item:hover {
    background: var(--fp-card);
    border-color: var(--fp-burgundy);
}

.fp-best-num {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: var(--fp-burgundy);
    color: #e0c0c0;
    font: 700 11px/1 var(--fp-ff);
}

.fp-best-body {
    flex: 1;
    min-width: 0;
}

.fp-best-name {
    display: block;
    font: 700 12px/1.3 var(--fp-ff);
    color: #f0f0f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

a.fp-best-name:hover { color: var(--fp-accent); }

.fp-best-year {
    font-size: 10px;
    color: var(--fp-muted);
}

/* ---------------------------------------------------------
   BIO — collapsible
   --------------------------------------------------------- */

.fp-bio {
    margin-top: 18px;
    padding: 14px 16px;
    background: rgba(255,255,255,.03);
    border-left: 3px solid var(--fp-accent);
    border-radius: 4px;
}

.fp-bio-cb { display: none; }

.fp-bio-body {
    max-height: 120px;
    overflow: hidden;
    transition: max-height .35s ease;
}

.fp-bio-cb:checked ~ .fp-bio-body {
    max-height: 4000px;
}

.fp-bio-body p {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.7;
    color: #d0d0d0;
}

.fp-bio-body p:last-child { margin-bottom: 0; }

.fp-bio-toggle {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 14px;
    border-radius: 3px;
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    color: var(--fp-accent);
    font: 700 11px/1.4 var(--fp-ff);
    cursor: pointer;
    transition: background .15s;
}

.fp-bio-toggle:hover { background: var(--fp-card); }

.fp-bio-more { display: inline; }
.fp-bio-less  { display: none; }
.fp-bio-cb:checked ~ .fp-bio-toggle .fp-bio-more { display: none; }
.fp-bio-cb:checked ~ .fp-bio-toggle .fp-bio-less  { display: inline; }

/* ---------------------------------------------------------
   FACTS
   --------------------------------------------------------- */

.fp-facts {
    margin-top: 14px;
}

.fp-facts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fp-facts-list li {
    position: relative;
    padding: 5px 0 5px 14px;
    border-bottom: 1px solid #222;
    font-size: 11px;
    color: #bbb;
    line-height: 1.55;
}

.fp-facts-list li:last-child { border-bottom: 0; }

.fp-facts-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--fp-burgundy);
    font-weight: 700;
}

/* ---------------------------------------------------------
   FILMOGRAPHY — CSS radio tabs
   --------------------------------------------------------- */

.fp-filmography {
    margin-top: 18px;
}

.fp-tabs { position: relative; }

/* Hide radios */
.fp-tab-r { position: absolute; opacity: 0; pointer-events: none; }

.fp-tab-nav {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--fp-groove-t);
    box-shadow: 0 1px 0 var(--fp-groove-s);
}

.fp-tab-lbl {
    padding: 7px 16px;
    font: 700 11px/1.3 var(--fp-ff);
    color: var(--fp-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    cursor: pointer;
    background: var(--fp-bg);
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    transition: background .15s, color .15s;
    user-select: none;
}

.fp-tab-lbl:hover {
    color: var(--fp-text);
    background: var(--fp-surface);
}

.fp-tab-lbl em {
    font-style: normal;
    margin-left: 4px;
    color: var(--fp-burgundy);
}

/* Active tab — groove-bottom connect */
#fp-tab-film:checked    ~ .fp-tab-nav [for="fp-tab-film"],
#fp-tab-series:checked  ~ .fp-tab-nav [for="fp-tab-series"],
#fp-tab-cartoon:checked ~ .fp-tab-nav [for="fp-tab-cartoon"] {
    background: var(--fp-surface);
    color: var(--fp-heading);
    border-color: var(--fp-border);
    border-bottom-color: var(--fp-surface);
    position: relative;
    z-index: 1;
    margin-bottom: -1px;
}

/* Panels */
.fp-tab-panel { display: none; }

#fp-tab-film:checked    ~ .fp-tab-content #fp-panel-film,
#fp-tab-series:checked  ~ .fp-tab-content #fp-panel-series,
#fp-tab-cartoon:checked ~ .fp-tab-content #fp-panel-cartoon {
    display: block;
}

.fp-tab-content {
    background: var(--fp-surface);
    border: 1px solid var(--fp-border);
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 2px 0;
}

/* ---------------------------------------------------------
   FILMOGRAPHY TABLE
   --------------------------------------------------------- */

.fp-filmlist {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.fp-filmlist thead th {
    padding: 6px 10px;
    font: 700 10px/1.3 var(--fp-ff);
    color: var(--fp-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: left;
    border-bottom: 1px solid var(--fp-border);
}

.fp-fl-row {
    transition: background .12s;
}

.fp-fl-row:hover {
    background: rgba(90,42,42,.12);
}

.fp-fl-row td {
    padding: 5px 10px;
    border-bottom: 1px solid #222;
    vertical-align: middle;
}

.fp-fl-year {
    width: 44px;
    font-size: 11px;
    color: var(--fp-muted);
    white-space: nowrap;
}

.fp-fl-title {
    font-weight: 700;
    color: #f0f0f0;
}

.fp-fl-title a {
    color: #f0f0f0;
    text-decoration: none;
}

.fp-fl-title a:hover { color: var(--fp-accent); }

.fp-fl-role {
    font-size: 11px;
    color: #777;
    font-style: italic;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fp-fl-r {
    width: 46px;
    text-align: center;
    font: 700 11px/1 var(--fp-ff);
    white-space: nowrap;
}

.fp-r--hi  { color: #83bf45; }
.fp-r--mid { color: var(--fp-gold); }
.fp-r--lo  { color: var(--fp-accent); }

/* ---------------------------------------------------------
   PERSON POPUP
   --------------------------------------------------------- */

.cast-item--popup { cursor: pointer; }
.cast-item--popup:hover .cast-poster { opacity: .85; }
.cast-item--loading { opacity: .6; pointer-events: none; }

.person-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 1200;
}
.person-popup-overlay--visible { display: block; }

.person-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 1201;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 8px;
    width: min(480px, calc(100vw - 24px));
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
.person-popup--visible { display: block; }

.person-popup__close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    z-index: 1;
}
.person-popup__close:hover { color: #fff; }

.person-popup__body {
    display: flex;
    gap: 14px;
    padding: 16px;
}

.person-popup__photo-wrap { flex-shrink: 0; }
.person-popup__photo {
    width: 90px;
    height: 135px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    transition: transform .2s;
}
.person-popup__photo--zoomed {
    width: 160px;
    height: 240px;
    cursor: zoom-out;
}

.person-popup__info { flex: 1; min-width: 0; }
.person-popup__name {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 2px;
}
.person-popup__name-en { font-size: 12px; color: #888; margin-bottom: 6px; }
.person-popup__meta { font-size: 12px; color: #bbb; margin-bottom: 2px; }
.person-popup__bio {
    font-size: 12px;
    color: #ccc;
    line-height: 1.5;
    margin: 8px 0 6px;
}
.person-popup__facts {
    font-size: 11px;
    color: #aaa;
    padding-left: 14px;
    margin: 4px 0;
}
.person-popup__facts li { margin-bottom: 2px; }
.person-popup__best-label { font-size: 12px; color: #999; margin: 8px 0 3px; font-weight: bold; }
.person-popup__best {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
}
.person-popup__best li { margin-bottom: 3px; }
.person-popup__best a { color: #dd4b39; text-decoration: none; }
.person-popup__best a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .person-popup__body { flex-direction: column; }
    .person-popup__photo { width: 80px; height: 120px; }
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 600px) {
    .cast-item   { width: 54px; }
    .cast-poster { width: 54px; height: 72px; }
    .cast-name   { max-width: 54px; }

    .fp-hero {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .fp-hero-photo { text-align: center; }
    .fp-hero-photo img { width: 120px; }

    .fp-meta-row { flex-direction: column; gap: 1px; }
    .fp-meta-row dt { min-width: 0; }

    .fp-best-grid { grid-template-columns: 1fr; }

    .fp-tab-lbl { padding: 6px 10px; font-size: 10px; }

    .fp-fl-role { display: none; }
    .fp-filmlist thead th:nth-child(3) { display: none; }
}

/* codex person card visual refresh 2026-06 */
.persons-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--p-text, #f1f1f1);
    font-size: 13px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}
.persons-label::before {
    content: "";
    display: block;
    width: 3px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--p-gold, #e8a838), var(--p-red, #dd4b39));
}
.persons-list {
    gap: 12px;
    padding: 2px 2px 12px;
    scroll-snap-type: x proximity;
}
.persons-list--crew { gap: 10px; }
.persons-section button.cast-item,
.cast-item {
    display: flex;
    flex-direction: column;
    width: 108px;
    min-height: 176px;
    padding: 8px;
    box-sizing: border-box;
    text-align: left;
    color: var(--p-text, #e2e2e2);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 8px 18px rgba(0,0,0,.24);
    scroll-snap-align: start;
    touch-action: manipulation;
}
.cast-item:hover,
.cast-item:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(232,168,56,.62);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 24px rgba(0,0,0,.34);
    outline: none;
}
.cast-poster {
    width: 100%;
    height: auto;
    aspect-ratio: 200 / 317;
    margin: 0 0 8px;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    background: #161616;
}
.cast-poster img,
.cast-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.cast-name {
    display: -webkit-box;
    max-width: 100%;
    min-height: 31px;
    color: var(--p-text, #f0f0f0);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.28;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
}
.cast-char { display: none; }
.persons-list--crew .cast-item { width: 98px; min-height: 164px; }
.persons-list--crew .cast-name { font-size: 11px; }
.persons-list--crew .cast-poster { width: 100%; height: auto; aspect-ratio: 200 / 317; }
.persons-list--crew .cast-photo { width: 100%; height: 100%; }
@media (max-width: 600px) {
    .persons-list { gap: 10px; padding-bottom: 10px; }
    .persons-section button.cast-item,
    .cast-item { width: 92px; min-height: 158px; padding: 7px; }
    .cast-name { min-height: 29px; font-size: 11px; }
    .persons-list--crew .cast-item { width: 88px; min-height: 150px; }
}

/* codex cast-grid final rezka-template 2026-06-04 */
.persons-section {
    --cast-section-bg: #111926;
    --cast-section-border: rgba(255,255,255,.08);
    --cast-card-bg: #0c121d;
    --cast-card-bg-2: #101827;
    --cast-card-bg-hover: #151f30;
    --cast-card-border: rgba(255,255,255,.10);
    --cast-card-border-hover: rgba(255,151,15,.55);
    --cast-title: #e9edf5;
    --cast-accent: #ff970f;
    --cast-scroll: #2a3547;
    margin: 14px 0 18px;
    padding: 16px;
    border: 1px solid var(--cast-section-border);
    border-radius: 10px;
    background: var(--cast-section-bg);
    border-color: var(--cast-section-border);
}
.persons-section .persons-label { display:flex; align-items:center; gap:9px; margin:0 0 13px; padding:0; border:0; border-radius:0; background:transparent; color:var(--cast-title); font-size:14px; font-weight:800; line-height:1.25; text-transform:none; letter-spacing:0; }
.persons-section .persons-label::before { content:""; display:block; flex:0 0 auto; width:4px; height:20px; border-radius:2px; background:linear-gradient(180deg, var(--cast-accent), #9b2335); }
.persons-section .persons-list { display:grid !important; grid-auto-flow:column; grid-auto-columns:112px; grid-template-rows:1fr; align-items:stretch; gap:12px; overflow-x:auto; overflow-y:hidden; padding:2px 2px 14px; scroll-snap-type:x proximity; scrollbar-color:var(--cast-scroll) transparent; }
.persons-section .persons-list::-webkit-scrollbar { height:5px; }
.persons-section .persons-list::-webkit-scrollbar-thumb { background:var(--cast-scroll); border-radius:999px; }
.persons-section .persons-list > div[itemprop] { min-width:0; }
.persons-section .persons-list--crew { grid-auto-columns:104px; gap:10px; }
.persons-section button.cast-item,
.persons-section .cast-item { appearance:none; display:grid; grid-template-rows:auto minmax(34px, 1fr); align-content:start; width:112px; min-height:190px; padding:8px; box-sizing:border-box; overflow:hidden; text-align:left; text-decoration:none !important; color:var(--cast-title); border:1px solid var(--cast-card-border); border-radius:8px; background:linear-gradient(180deg, var(--cast-card-bg), var(--cast-card-bg-2)); scroll-snap-align:start; touch-action:manipulation; cursor:pointer; }
.persons-section .cast-item:hover,
.persons-section .cast-item:focus-visible { transform:translateY(-2px); border-color:var(--cast-card-border-hover); background:linear-gradient(180deg, var(--cast-card-bg-hover), var(--cast-card-bg-2)); color:var(--cast-title); outline:none; }
.persons-section .cast-poster { width:100%; height:auto; aspect-ratio:68 / 92; margin:0 0 8px; border-radius:7px; overflow:hidden; border:1px solid var(--cast-card-border); background:var(--cast-card-bg-2); }
.persons-section .cast-poster img,
.persons-section .cast-photo { display:block; width:100%; height:100%; object-fit:cover; object-position:center top; }
.persons-section .cast-copy { display:block; min-width:0; }
.persons-section .cast-name { display:-webkit-box; max-width:100%; min-height:34px; color:var(--cast-title); font-size:13px; font-weight:800; line-height:1.3; overflow:hidden; overflow-wrap:anywhere; -webkit-box-orient:vertical; -webkit-line-clamp:2; white-space:normal; }
.persons-section .cast-item:hover .cast-name,
.persons-section .cast-item:focus-visible .cast-name { color:var(--cast-accent); }
.persons-section .cast-char { display:none; }
.persons-section .persons-list--crew .cast-item { width:104px; min-height:178px; }
.persons-section .persons-list--crew .cast-name { min-height:31px; font-size:12px; }
.persons-section .persons-list--crew .cast-poster { width:100%; height:auto; aspect-ratio:68 / 92; }
.persons-section .persons-list--crew .cast-photo { width:100%; height:100%; }
@media (max-width:600px) {
    .persons-section { padding:14px 12px; }
    .persons-section .persons-label { font-size:13px; }
    .persons-section .persons-list { grid-auto-columns:96px; gap:10px; padding-bottom:12px; }
    .persons-section button.cast-item,
    .persons-section .cast-item { width:96px; min-height:166px; padding:7px; }
    .persons-section .cast-name { min-height:30px; font-size:11px; line-height:1.28; }
    .persons-section .persons-list--crew { grid-auto-columns:92px; }
    .persons-section .persons-list--crew .cast-item { width:92px; min-height:158px; }
}

/* codex cast-photo lock rezka-template 2026-06-04 */
.persons-section button.cast-item,
.persons-section a.cast-item,
.persons-section .cast-item { -webkit-appearance:none; appearance:none; display:grid; grid-template-rows:127px minmax(34px, 1fr); justify-items:center; align-content:start; width:112px; min-height:190px; padding:8px; box-sizing:border-box; text-align:center; font:inherit; line-height:normal; }
.persons-section .cast-poster { flex:none; box-sizing:border-box; width:94px; height:127px; aspect-ratio:auto; }
.persons-section .cast-copy { width:100%; }
.persons-section .persons-list--crew .cast-item { width:104px; min-height:178px; grid-template-rows:116px minmax(31px, 1fr); }
.persons-section .persons-list--crew .cast-poster { width:86px; height:116px; aspect-ratio:auto; }
@media (max-width:600px) {
    .persons-section button.cast-item,
    .persons-section a.cast-item,
    .persons-section .cast-item { width:96px; min-height:166px; grid-template-rows:111px minmax(30px, 1fr); }
    .persons-section .cast-poster { width:82px; height:111px; }
    .persons-section .persons-list--crew .cast-item { width:92px; min-height:158px; grid-template-rows:106px minmax(30px, 1fr); }
    .persons-section .persons-list--crew .cast-poster { width:78px; height:106px; }
}

/* codex person page refresh rezka-template 2026-06-23 */
.fpageactors {
    --fp-bg: #0b1018;
    --fp-surface: #111926;
    --fp-surface-2: #0d1420;
    --fp-card: #151f2e;
    --fp-border: rgba(255,255,255,.10);
    --fp-border-strong: rgba(255,151,15,.42);
    --fp-text: #e9edf5;
    --fp-heading: #ffffff;
    --fp-muted: #a5afbf;
    --fp-soft: #737f91;
    --fp-accent: #ff970f;
    --fp-accent-soft: rgba(255,151,15,.14);
    --fp-good: #7fc36a;
    --fp-warn: #e1e289;
    --fp-bad: #df565a;
    color: var(--fp-text);
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid var(--fp-border);
    border-radius: 8px;
    background: var(--fp-bg);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    font-family: Arial, Tahoma, Geneva, sans-serif;
}
.fpageactors * { box-sizing: border-box; }
.fpageactors a { text-decoration: none; }

.fpageactors .fp-hero {
    display: grid;
    grid-template-columns: minmax(128px, 190px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--fp-border);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--fp-surface), var(--fp-surface-2));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 16px 34px rgba(0,0,0,.22);
}
.fpageactors .fp-hero-photo {
    width: 100%;
    max-width: 190px;
}
.fpageactors .fp-hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center top;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: #080d14;
    box-shadow: 0 12px 26px rgba(0,0,0,.28);
}
.fpageactors .fp-hero-info { min-width: 0; padding-top: 2px; }
.fpageactors .fp-profession {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 28px;
    margin: 0 0 10px;
    padding: 0 10px;
    border: 1px solid rgba(255,151,15,.28);
    border-radius: 6px;
    background: var(--fp-accent-soft);
    color: #ffbd68;
    font: 700 12px/1.2 Arial, Tahoma, sans-serif;
    text-transform: none;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
.fpageactors .fp-name {
    margin: 0 0 5px;
    color: var(--fp-heading);
    font: 800 30px/1.15 Arial, Tahoma, sans-serif;
    text-shadow: none;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
.fpageactors .fp-name-en {
    margin: 0 0 16px;
    color: var(--fp-muted);
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.fpageactors .fp-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    margin: 0;
    color: var(--fp-text);
    font-size: 13px;
}
.fpageactors .fp-meta-row {
    display: block;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    background: rgba(255,255,255,.035);
}
.fpageactors .fp-meta-row dt {
    min-width: 0;
    margin: 0 0 3px;
    color: var(--fp-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}
.fpageactors .fp-meta-row dd {
    margin: 0;
    color: var(--fp-text);
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.fpageactors .fp-meta-row dd strong { color: var(--fp-heading); }
.fpageactors .fp-meta-note {
    display: inline-block;
    margin-left: 6px;
    color: var(--fp-soft);
    font-size: 12px;
}

.fpageactors .fp-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 22px 0 12px;
    padding: 0;
    border: 0;
    box-shadow: none;
    color: var(--fp-heading);
    font: 800 18px/1.25 Arial, Tahoma, sans-serif;
    text-shadow: none;
    letter-spacing: 0;
}
.fpageactors .fp-section-title::before {
    content: "";
    flex: 0 0 auto;
    width: 4px;
    height: 22px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--fp-accent), #9b2335);
}

.fpageactors .fp-best { margin-top: 18px; }
.fpageactors .fp-best-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.fpageactors .fp-best-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 58px;
    padding: 11px;
    border: 1px solid var(--fp-border);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--fp-surface), var(--fp-surface-2));
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.fpageactors .fp-best-item:hover,
.fpageactors .fp-best-item:focus-within {
    transform: translateY(-2px);
    border-color: var(--fp-border-strong);
    background: linear-gradient(180deg, var(--fp-card), var(--fp-surface-2));
}
.fpageactors .fp-best-num {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--fp-accent);
    color: #16110a;
    font: 800 13px/32px Arial, Tahoma, sans-serif;
    text-align: center;
}
.fpageactors .fp-best-body { flex: 1; min-width: 0; }
.fpageactors .fp-best-name {
    display: -webkit-box;
    color: var(--fp-heading);
    font: 800 14px/1.32 Arial, Tahoma, sans-serif;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.fpageactors a.fp-best-name:hover { color: var(--fp-accent); }
.fpageactors .fp-best-year {
    display: block;
    margin-top: 3px;
    color: var(--fp-muted);
    font-size: 12px;
}

.fpageactors .fp-bio {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--fp-border);
    border-left: 4px solid var(--fp-accent);
    border-radius: 8px;
    background: rgba(255,255,255,.035);
}
.fpageactors .fp-bio-body { max-height: 132px; }
.fpageactors .fp-bio-cb:checked ~ .fp-bio-body { max-height: 4000px; }
.fpageactors .fp-bio-body p {
    margin: 0 0 9px;
    color: var(--fp-text);
    font-size: 14px;
    line-height: 1.65;
}
.fpageactors .fp-bio-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-top: 10px;
    padding: 0 12px;
    border: 1px solid rgba(255,151,15,.30);
    border-radius: 6px;
    background: rgba(255,151,15,.10);
    color: #ffbd68;
    font: 700 13px/1 Arial, Tahoma, sans-serif;
}
.fpageactors .fp-bio-toggle:hover { background: rgba(255,151,15,.16); }

.fpageactors .fp-facts { margin-top: 16px; }
.fpageactors .fp-facts-list li {
    position: relative;
    padding: 8px 0 8px 17px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    color: var(--fp-text);
    font-size: 13px;
    line-height: 1.55;
}
.fpageactors .fp-facts-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 17px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--fp-accent);
}

.fpageactors .fp-filmography { margin-top: 22px; }
.fpageactors .fp-tabs { min-width: 0; }
.fpageactors .fp-tab-nav {
    display: flex;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0 0 2px;
    overflow-x: auto;
    border: 0;
    box-shadow: none;
    scrollbar-color: #2a3547 transparent;
}
.fpageactors .fp-tab-nav::-webkit-scrollbar { height: 5px; }
.fpageactors .fp-tab-nav::-webkit-scrollbar-thumb { background: #2a3547; border-radius: 999px; }
.fpageactors .fp-tab-lbl {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--fp-border);
    border-radius: 6px;
    background: var(--fp-surface-2);
    color: var(--fp-muted);
    font: 800 13px/1 Arial, Tahoma, sans-serif;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}
.fpageactors .fp-tab-lbl:hover { color: var(--fp-heading); background: var(--fp-card); }
.fpageactors .fp-tab-lbl em {
    margin-left: 6px;
    color: var(--fp-accent);
    font-style: normal;
}
.fpageactors #fp-tab-film:checked ~ .fp-tab-nav [for="fp-tab-film"],
.fpageactors #fp-tab-series:checked ~ .fp-tab-nav [for="fp-tab-series"],
.fpageactors #fp-tab-cartoon:checked ~ .fp-tab-nav [for="fp-tab-cartoon"] {
    margin-bottom: 0;
    border-color: rgba(255,151,15,.55);
    background: var(--fp-accent);
    color: #16110a;
}
.fpageactors #fp-tab-film:checked ~ .fp-tab-nav [for="fp-tab-film"] em,
.fpageactors #fp-tab-series:checked ~ .fp-tab-nav [for="fp-tab-series"] em,
.fpageactors #fp-tab-cartoon:checked ~ .fp-tab-nav [for="fp-tab-cartoon"] em { color: #16110a; }
.fpageactors .fp-tab-content {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--fp-border);
    border-radius: 8px;
    background: var(--fp-surface-2);
}
.fpageactors .fp-filmlist {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--fp-text);
    font-size: 13px;
}
.fpageactors .fp-filmlist thead th {
    padding: 11px 12px;
    border-bottom: 1px solid var(--fp-border);
    background: rgba(255,255,255,.035);
    color: var(--fp-muted);
    font: 800 12px/1.25 Arial, Tahoma, sans-serif;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
}
.fpageactors .fp-filmlist thead th:first-child { width: 72px; }
.fpageactors .fp-filmlist thead th:last-child { width: 64px; text-align: right; }
.fpageactors .fp-fl-row { transition: background .14s ease; }
.fpageactors .fp-fl-row:hover { background: rgba(255,151,15,.07); }
.fpageactors .fp-fl-row td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    vertical-align: middle;
}
.fpageactors .fp-filmlist tbody tr:last-child td { border-bottom: 0; }
.fpageactors .fp-fl-year {
    width: 72px;
    color: var(--fp-muted);
    font-size: 12px;
    white-space: nowrap;
}
.fpageactors .fp-fl-title,
.fpageactors .fp-fl-title a {
    color: var(--fp-heading);
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.fpageactors .fp-fl-title a:hover { color: var(--fp-accent); }
.fpageactors .fp-fl-role {
    max-width: none;
    color: var(--fp-soft);
    font-size: 12px;
    font-style: normal;
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}
.fpageactors .fp-fl-r {
    width: 64px;
    color: var(--fp-muted);
    font: 800 13px/1 Arial, Tahoma, sans-serif;
    text-align: right;
}
.fpageactors .fp-r--hi { color: var(--fp-good); }
.fpageactors .fp-r--mid { color: var(--fp-warn); }
.fpageactors .fp-r--lo { color: var(--fp-bad); }

@media (max-width: 760px) {
    .fpageactors { margin: 0 -4px 20px; padding: 12px; }
    .fpageactors .fp-hero { grid-template-columns: 124px minmax(0, 1fr); gap: 14px; padding: 14px; }
    .fpageactors .fp-name { font-size: 24px; }
    .fpageactors .fp-name-en { margin-bottom: 12px; font-size: 13px; }
    .fpageactors .fp-meta { grid-template-columns: 1fr; gap: 8px; }
    .fpageactors .fp-best-grid { grid-template-columns: 1fr; }
    .fpageactors .fp-section-title { font-size: 17px; }
    .fpageactors .fp-filmlist,
    .fpageactors .fp-filmlist tbody,
    .fpageactors .fp-filmlist tr,
    .fpageactors .fp-filmlist td { display: block; width: 100%; }
    .fpageactors .fp-filmlist thead { display: none; }
    .fpageactors .fp-fl-row {
        position: relative;
        min-height: 56px;
        padding: 11px 56px 11px 64px;
        border-bottom: 1px solid rgba(255,255,255,.07);
    }
    .fpageactors .fp-filmlist tbody tr:last-child { border-bottom: 0; }
    .fpageactors .fp-fl-row td { padding: 0; border: 0; }
    .fpageactors .fp-fl-year {
        position: absolute;
        left: 12px;
        top: 13px;
        width: 42px;
        font-size: 12px;
    }
    .fpageactors .fp-fl-title { font-size: 14px; }
    .fpageactors .fp-fl-role {
        display: block;
        margin-top: 4px;
        font-size: 12px;
    }
    .fpageactors .fp-fl-r {
        position: absolute;
        right: 12px;
        top: 14px;
        width: auto;
        min-width: 34px;
        text-align: right;
    }
}

@media (max-width: 520px) {
    .fpageactors { margin-left: -8px; margin-right: -8px; padding: 10px; border-radius: 0; }
    .fpageactors .fp-hero { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; }
    .fpageactors .fp-profession { min-height: 26px; padding: 0 8px; font-size: 11px; }
    .fpageactors .fp-name { font-size: 21px; line-height: 1.18; }
    .fpageactors .fp-meta-row { padding: 9px 10px; }
    .fpageactors .fp-section-title { font-size: 16px; }
    .fpageactors .fp-tab-lbl { min-height: 34px; padding: 0 10px; font-size: 12px; }
    .fpageactors .fp-fl-row { padding-right: 48px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UX-REDESIGN 2026-07-08 — hdrezka.it «Rezka Orange / Underline»
   Уникальный визуал (≠ the-hdrezka Blue, ≠ hdrezka.fi Amber): 
   #dd4b39, мета всегда под постером, underline-вкладки, звёздный рейтинг.
   Скин rezka-template (тёмно-серая тема). Только этот сайт.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── «Лучшие»: постер-рейл, красный рейтинг-номер ──────────────────────────── */
.fp-best--rail .fp-best-grid {
    display: flex;
    gap: 14px;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 14px;
    scroll-snap-type: x proximity;
    scrollbar-color: #4a4a4a transparent;
}
.fp-best--rail .fp-best-grid::-webkit-scrollbar { height: 6px; }
.fp-best--rail .fp-best-grid::-webkit-scrollbar-thumb { background: #4a4a4a; border-radius: 6px; }
.fp-best--rail .fp-best-item {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 120px;
    width: 120px;
    gap: 0;
    padding: 0;
    background: none;
    border: 0;
    text-decoration: none;
    scroll-snap-align: start;
}
.fp-best--rail .fp-best-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #1c1c1c;
    border: 1px solid var(--fp-border);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
    transition: transform .2s ease, box-shadow .2s ease;
}
.fp-best--rail .fp-best-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fp-best--rail .fp-best-item--linked:hover .fp-best-poster {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 151, 15, .28);
}
.fp-best--rail .fp-best-num {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: var(--fp-accent);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
}
.fp-best--rail .fp-best-rating {
    position: absolute;
    bottom: 6px;
    right: 6px;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(0, 0, 0, .8);
    color: #fff !important;
    font-weight: 800;
    font-size: 11px;
}
.fp-best--rail .fp-best-body { padding: 8px 2px 0; }
.fp-best--rail .fp-best-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    font-size: 13px;
    line-height: 1.3;
    color: var(--fp-heading);
}
.fp-best--rail .fp-best-item--linked:hover .fp-best-name { color: var(--fp-accent); }
.fp-best--rail .fp-best-year { display: block; margin-top: 2px; font-size: 12px; color: var(--fp-text); opacity: .65; }

/* ── Underline-вкладки (≠ пилюли the-hdrezka, ≠ сегменты hdrezka.fi) ────────── */
.fp-tabs { position: relative; }
.fp-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--fp-border);
    border-radius: 0;
    margin-bottom: 16px;
}
.fp-tab-lbl {
    border: 0;
    background: none;
    border-radius: 0;
    min-height: 38px;
    padding: 0 14px;
    color: var(--fp-text);
    opacity: .6;
    font-weight: 700;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.fp-tab-lbl em { opacity: .8; font-size: 12px; font-style: normal; }
#fp-tab-film:checked ~ .fp-tab-nav label[for="fp-tab-film"],
#fp-tab-series:checked ~ .fp-tab-nav label[for="fp-tab-series"],
#fp-tab-cartoon:checked ~ .fp-tab-nav label[for="fp-tab-cartoon"] {
    color: var(--fp-heading);
    opacity: 1;
    background: none;
    border-bottom-color: var(--fp-accent);
}

/* ── View toggle (красный active) ──────────────────────────────────────────── */
.fp-view-r { position: absolute; opacity: 0; pointer-events: none; }
.fp-view-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    background: #1c1c1c;
    border: 1px solid var(--fp-border);
}
.fp-view-lbl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    border-radius: 5px;
    color: #8a8a8a;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}
.fp-view-lbl svg { fill: currentColor; }
.fp-view-lbl:hover { color: var(--fp-accent); }
#fp-view-grid:checked ~ .fp-view-toggle .fp-view-lbl--grid,
#fp-view-list:checked ~ .fp-view-toggle .fp-view-lbl--list {
    background: var(--fp-accent);
    color: #fff;
}

/* ── Фильмография: постер-карточки, мета под постером ───────────────────────── */
.fp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px 14px;
}
.fp-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.fp-card-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #1c1c1c;
    border: 1px solid var(--fp-border);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.fp-card-poster::after {
    content: "🎬";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    opacity: .22;
    z-index: 0;
}
.fp-card-poster img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fp-card--linked:hover .fp-card-poster {
    transform: translateY(-4px);
    border-color: var(--fp-accent);
    box-shadow: 0 12px 26px rgba(255, 151, 15, .3);
}
.fp-card-rating {
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .78);
    color: #fff !important;
    font-weight: 800;
    font-size: 12px;
    border: 1px solid rgba(255, 151, 15, .5);
}
.fp-card-rating::before { content: "★"; color: var(--fp-accent); font-size: 11px; }
.fp-card-type {
    position: absolute;
    bottom: 7px;
    left: 7px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--fp-accent);
    color: #fff;
    font-weight: 700;
    font-size: 10px;
    text-transform: lowercase;
    letter-spacing: .2px;
}
.fp-card-body { padding: 9px 2px 0; }
.fp-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--fp-heading);
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.3;
}
.fp-card--linked:hover .fp-card-title { color: var(--fp-accent); }
.fp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 8px;
    margin-top: 4px;
    color: var(--fp-text);
    opacity: .7;
    font-size: 12px;
}
.fp-card-genres { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.fp-card-role {
    display: block;
    margin-top: 3px;
    color: var(--fp-text);
    opacity: .6;
    font-size: 12px;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── List view (тёмные строки в тон теме) ──────────────────────────────────── */
#fp-view-list:checked ~ .fp-tab-content .fp-cards { grid-template-columns: 1fr; gap: 8px; }
#fp-view-list:checked ~ .fp-tab-content .fp-card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    background: var(--fp-card);
    border: 1px solid var(--fp-border);
}
#fp-view-list:checked ~ .fp-tab-content .fp-card--linked:hover { border-color: var(--fp-accent); }
#fp-view-list:checked ~ .fp-tab-content .fp-card-poster {
    flex: 0 0 54px;
    width: 54px;
    border-radius: 6px;
    box-shadow: none;
}
#fp-view-list:checked ~ .fp-tab-content .fp-card--linked:hover .fp-card-poster { transform: none; border-color: var(--fp-border); }
#fp-view-list:checked ~ .fp-tab-content .fp-card-body { padding: 0; flex: 1; }
#fp-view-list:checked ~ .fp-tab-content .fp-card-title { -webkit-line-clamp: 1; font-size: 14px; }
#fp-view-list:checked ~ .fp-tab-content .fp-card-type { display: none; }
#fp-view-list:checked ~ .fp-tab-content .fp-card-rating { top: 4px; left: 4px; padding: 1px 5px; font-size: 10px; }

/* ── Адаптив ───────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
    .fp-cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px 10px; }
    .fp-filmography { overflow: visible; }
    .fp-view-toggle { position: static; margin-bottom: 12px; }
}
@media (max-width: 430px) {
    .fp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px 8px; }
    .fp-best--rail .fp-best-item { flex-basis: 104px; width: 104px; }
}


/* ─── Индекс персон /persons.html (pidx) ──────────────────────────────────────
   Композиция «титры», намеренно НЕ повторяющая плиточную сетку hdrezka.st:
   тройка лидеров идёт афишами во всю ширину колонки, остальной топ — строками
   с круглым аватаром, а буквенные секции набраны колонками-оглавлением с
   точечным лидером до счётчика. Разметка у сайтов общая, различие только тут.

   Классы pidx-* свои, с .fp-card не пересекаются: там подпись — выезжающий
   оверлей с transform, и переиспользование его классов прячет текст до
   наведения. */
.pidx { margin: 0 0 30px; }

/* ── Заголовки: номер секции набран как в титрах ── */
.pidx-h,
.pidx-letter-h {
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--rzdk-muted, #8b95a7);
}
.pidx-h { display: flex; align-items: center; gap: 12px; }
.pidx-h::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, var(--rzdk-accent, #ff8a00), transparent);
}

/* ── Топ ── */
.pidx-top { margin-bottom: 34px; }
.pidx-top-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    counter-reset: pidx;
}
.pidx-card { counter-increment: pidx; text-decoration: none; color: inherit; }

/* Тройка лидеров — карточка-разворот: портрет целиком слева, титры справа.
   Кадрировать портрет 3:4 в широкую афишу нельзя — срезает лоб и подбородок,
   поэтому лицо показываем как есть, а ширину добирает текстовая часть. */
.pidx-card:nth-child(-n+3) {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 14px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--rzdk-panel, #121824);
    border: 1px solid var(--rzdk-line, rgba(255,255,255,.09));
    transition: border-color .18s ease;
}
.pidx-card:nth-child(-n+3):hover { border-color: var(--rzdk-accent, #ff8a00); }
.pidx-card:nth-child(-n+3) .pidx-ph {
    flex: 0 0 auto;
    width: 108px;
    aspect-ratio: 3 / 4;
    background: var(--rzdk-panel-2, #182132);
}
.pidx-card:nth-child(-n+3) .pidx-ph img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
}
.pidx-card:nth-child(-n+3)::before {
    content: counter(pidx);
    align-self: flex-start;
    margin: 12px 0 0 0;
    order: 2;
    font-size: 30px; font-weight: 800; line-height: 1;
    color: var(--rzdk-accent, #ff8a00);
}
.pidx-card:nth-child(-n+3) .pidx-name {
    order: 3;
    align-self: center;
    flex: 1 1 auto;
    padding: 0 14px 0 0;
    font-size: 17px; font-weight: 700; line-height: 1.25;
    color: var(--rzdk-text, #e9edf5);
}
.pidx-card:nth-child(-n+3) .pidx-meta {
    order: 4;
    position: absolute; left: 122px; bottom: 12px;
    font-size: 12px;
    color: var(--rzdk-muted, #8b95a7);
}

/* Остальной топ — строки: аватар кружком, имя, счётчик справа */
.pidx-card:nth-child(n+4) {
    grid-column: span 1;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 10px 7px 7px;
    border-bottom: 1px solid var(--rzdk-line, rgba(255,255,255,.09));
    transition: background .15s ease;
}
.pidx-card:nth-child(n+4):hover { background: var(--rzdk-panel, #121824); }
.pidx-card:nth-child(n+4) .pidx-ph {
    flex: 0 0 auto;
    width: 42px; height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--rzdk-panel-2, #182132);
}
.pidx-card:nth-child(n+4) .pidx-ph img { width: 100%; height: 100%; object-fit: cover; }
.pidx-card:nth-child(n+4) .pidx-name {
    flex: 1 1 auto;
    font-size: 14px; font-weight: 500; line-height: 1.25;
    color: var(--rzdk-text, #e9edf5);
}
.pidx-card:nth-child(n+4):hover .pidx-name { color: var(--rzdk-accent, #ff8a00); }
.pidx-card:nth-child(n+4) .pidx-meta {
    flex: 0 0 auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--rzdk-muted, #8b95a7);
}

/* ── Алфавит: лента букв без плашек ── */
.pidx-abc {
    position: sticky; top: 0; z-index: 5;
    display: flex; flex-wrap: wrap; gap: 0;
    margin: 0 0 24px;
    padding: 9px 0;
    border-top: 1px solid var(--rzdk-line, rgba(255,255,255,.09));
    border-bottom: 1px solid var(--rzdk-line, rgba(255,255,255,.09));
    background: var(--rzdk-bg, #0b0f17);
}
.pidx-abc a {
    min-width: 28px;
    padding: 2px 0;
    font-size: 15px; font-weight: 700; text-align: center; text-decoration: none;
    color: var(--rzdk-muted, #8b95a7);
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.pidx-abc a:hover {
    color: var(--rzdk-accent, #ff8a00);
    border-bottom-color: var(--rzdk-accent, #ff8a00);
}

/* ── Буквенные секции: оглавление в колонках, точечный лидер до счётчика ── */
.pidx-letter { margin-bottom: 28px; scroll-margin-top: 64px; }
.pidx-letter-h {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rzdk-line, rgba(255,255,255,.09));
    font-size: 22px;
    letter-spacing: 0;
    color: var(--rzdk-accent, #ff8a00);
}
.pidx-grid {
    display: block;
    column-count: 4;
    column-gap: 34px;
}
.pidx-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 0;
    text-decoration: none;
    break-inside: avoid;
}
.pidx-item .pidx-name {
    flex: 0 1 auto;
    font-size: 14px; line-height: 1.3;
    color: var(--rzdk-text, #e9edf5);
    transition: color .15s ease;
}
.pidx-item:hover .pidx-name { color: var(--rzdk-accent, #ff8a00); }
.pidx-item::before {
    content: "";
    order: 1;
    flex: 1 1 auto;
    min-width: 12px;
    height: 1px;
    align-self: flex-end;
    margin-bottom: 4px;
    background-image: radial-gradient(circle, var(--rzdk-line, rgba(255,255,255,.09)) 1px, transparent 1px);
    background-size: 4px 1px;
    background-repeat: repeat-x;
}
.pidx-item .pidx-meta {
    order: 2;
    flex: 0 0 auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--rzdk-muted, #8b95a7);
}

@media (max-width: 1100px) {
    .pidx-grid { column-count: 3; }
}
@media (max-width: 760px) {
    .pidx-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pidx-card:nth-child(-n+3) { grid-column: span 2; }
    .pidx-grid { column-count: 2; }
}
@media (max-width: 480px) {
    .pidx-top-grid { grid-template-columns: 1fr; }
    .pidx-card:nth-child(-n+3) { grid-column: span 1; }
    .pidx-card:nth-child(-n+3) .pidx-name { font-size: 15px; }
    .pidx-grid { column-count: 1; }
}

/* Переход между двумя индексами персон: с актёров на режиссёров и обратно. */
.pidx-switch {
  display: inline-block;
  margin-left: 14px;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  font-size: 13px;
  line-height: 20px;
  text-decoration: none;
  color: inherit;
  opacity: .85;
  vertical-align: middle;
}
.pidx-switch:hover { opacity: 1; border-color: rgba(255,255,255,.4); }


/* ─── Вкладки ролей в блоке персон (карточка фильма) — как .fp-tab-lbl на странице персоны ─ */
.kpc-r { position: absolute; opacity: 0; pointer-events: none; }
.kpc-tabs { display: flex; flex-wrap: nowrap; max-width: 100%; margin: 0 0 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; box-sizing: border-box; gap:8px; }
.kpc-tabs::-webkit-scrollbar { display: none; }
.kpc-lbl { display: inline-flex; flex: 0 0 auto; align-items: center; margin: 0; white-space: nowrap; cursor: pointer; user-select: none; box-sizing: border-box; gap:6px;height:36px;padding:0 12px;border:1px solid rgba(255,255,255,.10);border-radius:6px;background:#0d1420;color:#a5afbf;font-size:13px;font-weight:800;line-height:1;transition:background .18s, border-color .18s, color .18s; }
.kpc-lbl:hover { border-color:rgba(255,151,15,.55);color:#e9edf5; }
.kpc-lbl em { font-style: normal; font-size:12px;font-weight:800;color:#ff970f; }
.kpc-panel { display: none; margin: 0; }
.kpc-r:nth-of-type(1):checked ~ .kpc-panels > .kpc-panel:nth-of-type(1),
.kpc-r:nth-of-type(2):checked ~ .kpc-panels > .kpc-panel:nth-of-type(2),
.kpc-r:nth-of-type(3):checked ~ .kpc-panels > .kpc-panel:nth-of-type(3),
.kpc-r:nth-of-type(4):checked ~ .kpc-panels > .kpc-panel:nth-of-type(4),
.kpc-r:nth-of-type(5):checked ~ .kpc-panels > .kpc-panel:nth-of-type(5),
.kpc-r:nth-of-type(6):checked ~ .kpc-panels > .kpc-panel:nth-of-type(6) { display: block; }
.kpc-r:nth-of-type(1):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(1),
.kpc-r:nth-of-type(2):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(2),
.kpc-r:nth-of-type(3):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(3),
.kpc-r:nth-of-type(4):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(4),
.kpc-r:nth-of-type(5):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(5),
.kpc-r:nth-of-type(6):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(6) { border-color:rgba(255,151,15,.55);background:#ff970f;color:#16110a; }
.kpc-r:nth-of-type(1):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(1) em,
.kpc-r:nth-of-type(2):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(2) em,
.kpc-r:nth-of-type(3):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(3) em,
.kpc-r:nth-of-type(4):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(4) em,
.kpc-r:nth-of-type(5):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(5) em,
.kpc-r:nth-of-type(6):checked ~ .kpc-tabs > .kpc-lbl:nth-of-type(6) em { color:#16110a; }
@media (max-width: 600px) { .kpc-lbl { height:34px;padding:0 10px;font-size:12px; } }

/* ─── Окно персоны без своей страницы — вариант A (2026-10-14): тёмно-синее окно, оранжевый акцент как у активной вкладки ─ */
.person-modal__box.pm2 { width: min(740px, 100%); padding: 24px; border: 1px solid rgba(255,255,255,.10); border-radius: 12px; background: #111926; color: #c3cad6; box-shadow: 0 24px 70px rgba(0,0,0,.6); font-family: inherit; box-sizing: border-box; }
.person-modal .person-modal__box.pm2 .person-modal__close.person-modal__close.person-modal__close { padding: 0; margin: 0; border: 0; font-size: 24px; top: 14px; right: 14px; width: 40px; height: 40px; min-height: 0; border-radius: 10px; background: #0d1420; color: #c3cad6; line-height: 40px; box-shadow: none; text-align: center; }
.person-modal .person-modal__box.pm2 .person-modal__close.person-modal__close.person-modal__close:hover { background: #0d1420; color: #ff970f; }
.pm2-head { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 20px; align-items: start; padding-right: 48px; }
.pm2-photo { display: block; width: 132px; height: 196px; border: 1px solid rgba(255,255,255,.10); border-radius: 10px; background: #0d1420; object-fit: cover; object-position: center top; }
.pm2-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pm2-name { margin: 0; color: #e9edf5; font-size: 26px; font-weight: 800; line-height: 1.2; }
.pm2-role { align-self: flex-start; padding: 7px 12px; border-radius: 999px; background: rgba(255,151,15,.13); color: #ff970f; font-size: 13px; font-weight: 700; line-height: 1.35; }
.pm2-facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 14px; }
.pm2-facts dt { color: #a5afbf; }
.pm2-facts dd { margin: 0; color: #e9edf5; font-weight: 600; }
.pm2-sect { display: flex; align-items: center; gap: 9px; margin: 22px 0 12px; color: #e9edf5; font-size: 14px; font-weight: 800; }
.pm2-sect::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: linear-gradient(180deg,#ff970f,#c96f00); }
.pm2-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 104px; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: rgba(255,151,15,.44) transparent; }
.pm2-film { display: flex; flex-direction: column; gap: 6px; color: #e9edf5; text-decoration: none; }
.pm2-film:hover .pm2-ftitle { color: #ff970f; }
.pm2-poster { display: block; width: 104px; height: 150px; overflow: hidden; border: 1px solid rgba(255,255,255,.10); border-radius: 8px; background: #0d1420; }
.pm2-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pm2-ftitle { display: -webkit-box; overflow: hidden; font-size: 12px; font-weight: 700; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pm2-fyear { color: #a5afbf; font-size: 11px; }
.pm2-only { margin: 22px 0 0; padding: 12px 14px; border: 1px solid rgba(255,255,255,.10); border-radius: 10px; background: #0d1420; color: #c3cad6; font-size: 13px; }
.pm2-peers { display: flex; flex-wrap: wrap; gap: 10px; }
.person-modal .person-modal__box.pm2 .pm2-peer.pm2-peer.pm2-peer { display: inline-flex; width: auto; height: auto; margin: 0; line-height: 1.2; text-align: left; text-transform: none; letter-spacing: normal; box-shadow: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 6px; border: 1px solid rgba(255,255,255,.10); border-radius: 999px; background: #0d1420; color: #e9edf5; font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.person-modal .person-modal__box.pm2 .pm2-peer.pm2-peer.pm2-peer:hover { border-color: #ff970f; background: #0d1420; color: #ff970f; }
.pm2-peer img, .pm2-ini { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: center top; flex: 0 0 auto; }
.pm2-ini { display: inline-flex; align-items: center; justify-content: center; background: #ff970f; color: #16110a; font-size: 12px; font-weight: 800; }
@media (max-width: 600px) {
    .person-modal__box.pm2 { padding: 16px; }
    .pm2-head { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding-right: 40px; }
    .pm2-photo { width: 92px; height: 136px; }
    .pm2-name { font-size: 20px; }
    .pm2-facts { grid-template-columns: 1fr; gap: 2px; font-size: 13px; }
    .pm2-facts dd { margin-bottom: 6px; }
    .pm2-rail { grid-auto-columns: 92px; }
    .pm2-poster { width: 92px; height: 133px; }
}
