/* =========================================================
   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: #fff;
    --cast-section-border: #e2e7ef;
    --cast-card-bg: #fff;
    --cast-card-bg-2: #f7f9fc;
    --cast-card-bg-hover: #eefcff;
    --cast-card-border: #d7dee8;
    --cast-card-border-hover: #00a0b0;
    --cast-title: #20242b;
    --cast-accent: #00a0b0;
    --cast-scroll: #b7c5d6;
    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; }
}

/* =========================================================
   PERSON PAGE — FILMOGRAPHY CARDS 2026-07 · «Type-Colored Cards»
   Уникальный визуал №6 (hdrezka.se / new.hdrezka.se, rezka-template).
   Тёмная тема (body #0F172A). Акцент КАЖДОЙ карточки = цвет её типа контента,
   в тон существующим вкладкам: Фильмы→cyan, Сериалы→red, Мультфильмы→green.
   Разметка уже с CSS-вкладками (person-filmography__panel--<type>) и best-рейлом
   с постерами — трогаем только внутренность панели (.filmography-list → .fp-cards).
   Классы .fp-* уникальны для фильмографии этой страницы.
   ========================================================= */
.person-filmography .fp-cards{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:18px;
  --fp-type:#06B6D4; --fp-type-soft:rgba(6,182,212,.28);
}
/* per-type accent (matches tab colour-coding) */
.person-filmography__panel--film    .fp-cards{ --fp-type:#06B6D4; --fp-type-soft:rgba(6,182,212,.30); }
.person-filmography__panel--series  .fp-cards{ --fp-type:#F43F5E; --fp-type-soft:rgba(244,63,94,.30); }
.person-filmography__panel--cartoon .fp-cards{ --fp-type:#22C55E; --fp-type-soft:rgba(34,197,94,.30); }

.person-filmography .fp-card{
  display:flex; flex-direction:column; gap:8px; text-decoration:none;
  position:relative; transition:transform .25s var(--ease-out,ease);
}
.person-filmography .fp-card--linked:hover{ transform:translateY(-4px); }
.person-filmography .fp-card-poster{
  position:relative; aspect-ratio:5/7; border-radius:var(--radius-md,10px); overflow:hidden;
  background:var(--clr-bg-muted,#1e293b);
  box-shadow:var(--shadow-card,0 2px 8px rgba(0,0,0,.4));
  transition:box-shadow .25s, outline-color .2s; outline:0 solid transparent;
}
.person-filmography .fp-card-poster img{
  width:100%; height:100%; object-fit:cover; display:block; transition:transform .35s ease;
}
.person-filmography .fp-card--linked:hover .fp-card-poster{
  box-shadow:0 10px 26px rgba(0,0,0,.5), 0 0 0 2px var(--fp-type);
}
.person-filmography .fp-card--linked:hover .fp-card-poster img{ transform:scale(1.05); }
.person-filmography .fp-card-rating{
  position:absolute; top:8px; right:8px; z-index:2; min-width:30px; padding:3px 8px;
  border-radius:var(--radius-full,999px); background:var(--fp-type); color:#fff;
  font:800 12px/1 var(--ff-display,inherit); letter-spacing:.01em; text-align:center;
  box-shadow:0 2px 8px rgba(0,0,0,.45); font-variant-numeric:tabular-nums;
}
.person-filmography .fp-card-body{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.person-filmography .fp-card-title{
  font:600 13.5px/1.32 var(--ff-body,inherit); color:#E7EDF5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  transition:color .15s;
}
.person-filmography .fp-card--linked:hover .fp-card-title{ color:var(--fp-type); }
.person-filmography .fp-card-meta{
  display:flex; align-items:center; gap:7px; min-width:0;
  font-size:11.5px; color:var(--clr-text-muted,#94A3B8);
}
.person-filmography .fp-card-year{ color:var(--fp-type); font-weight:700; flex:none; font-variant-numeric:tabular-nums; }
.person-filmography .fp-card-year + .fp-card-genres::before{ content:"·"; margin-right:7px; color:var(--clr-text-muted,#94A3B8); }
.person-filmography .fp-card-genres{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.person-filmography .fp-card-role{
  margin-top:1px; padding-left:10px; position:relative;
  font-size:11.5px; font-style:italic; color:var(--clr-text-muted,#94A3B8);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.person-filmography .fp-card-role::before{
  content:""; position:absolute; left:0; top:2px; bottom:2px; width:2px; border-radius:2px;
  background:var(--fp-type-soft);
}

/* RESPONSIVE */
@media (max-width:640px){
  .person-filmography .fp-cards{ grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:12px; }
  .person-filmography .fp-card-title{ font-size:12.5px; }
}

/* ─── Индекс персон /persons.html (pidx) ──────────────────────────────────────
   Светлая тема скина, акцент — циан #0891B2. Классы pidx-* свои, с .fp-card
   не пересекаются: там подпись — выезжающий оверлей с transform, и чужой
   transform прячет текст до наведения. */
.pidx { margin: 0 0 28px; }

.pidx-h,
.pidx-letter-h {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 16px;
    font-size: 20px; font-weight: 700; line-height: 1.2;
    color: var(--clr-text, #0F172A);
}
.pidx-h::after,
.pidx-letter-h::after {
    content: ""; flex: 1 1 auto; height: 1px;
    background: var(--clr-border, #E2E8F0);
}

.pidx-top { margin-bottom: 30px; }
.pidx-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
    gap: 20px 18px;
}
.pidx-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.pidx-ph {
    display: block; position: relative;
    aspect-ratio: 3 / 4;
    margin-bottom: 9px;
    border-radius: 14px; overflow: hidden;
    background: var(--clr-bg-muted, #F1F5F9);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .10);
    transition: transform .18s ease, box-shadow .18s ease;
}
.pidx-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pidx-card:hover .pidx-ph {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(8, 145, 178, .22);
}
.pidx-card .pidx-name {
    font-size: 14px; font-weight: 600; line-height: 1.3;
    color: var(--clr-text, #0F172A);
    transition: color .15s ease;
}
.pidx-card:hover .pidx-name { color: var(--clr-primary-700, #0E7490); }
.pidx-card .pidx-meta { margin-top: 3px; font-size: 12px; color: var(--clr-text-muted, #94A3B8); }

.pidx-abc {
    position: sticky; top: 0; z-index: 5;
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 0 0 26px; padding: 10px 12px;
    border: 1px solid var(--clr-border, #E2E8F0);
    border-radius: 14px;
    background: var(--clr-bg-main, #FFFFFF);
}
.pidx-abc a {
    min-width: 32px; padding: 6px 0;
    border-radius: 9px;
    background: var(--clr-bg-soft, #F8FAFC);
    font-size: 14px; font-weight: 600; text-align: center; text-decoration: none;
    color: var(--clr-text-secondary, #475569);
    transition: background .15s ease, color .15s ease;
}
.pidx-abc a:hover { background: var(--clr-primary-500, #06B6D4); color: #fff; }

.pidx-letter { margin-bottom: 26px; scroll-margin-top: 68px; }
.pidx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.pidx-item {
    display: flex; align-items: baseline; gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--clr-border, #E2E8F0);
    border-radius: 10px;
    background: var(--clr-bg-main, #FFFFFF);
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.pidx-item:hover { border-color: var(--clr-primary-400, #22D3EE); background: var(--clr-bg-soft, #F8FAFC); }
.pidx-item .pidx-name { flex: 1 1 auto; font-size: 14px; line-height: 1.3; color: var(--clr-text, #0F172A); }
.pidx-item .pidx-meta { flex: 0 0 auto; font-size: 12px; color: var(--clr-text-muted, #94A3B8); }

@media (max-width: 640px) {
    .pidx-top-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 14px 10px; }
    .pidx-h, .pidx-letter-h { font-size: 17px; }
    .pidx-grid { grid-template-columns: 1fr; }
}

/* [uifix 2026-08-05] карточка актёра-попапа — это <button>, её ловило общее правило
   кнопок скина button:not(...){display:inline-block} (специфичность 0,0,3,1) и
   перебивало .persons-section .cast-item{display:grid} (0,0,2,0). Уравниваем вес. */
.persons-section button.cast-item {display: grid !important; padding: 8px !important; line-height: normal !important;}

/* Переход между двумя индексами персон: с актёров на режиссёров и обратно. */
.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); }
