/*
 * kp_persons.css -- layout helpers for Default skin.
 * Visual styling comes from common.css, styles.css and theme files.
 * Keep this file limited to structure, sizing and responsive behavior.
 */

/* ─── Persons cast block (film page) ──────────────────────────────────────── */
.persons-section {
    --persons-surface: var(--p-section-bg, rgba(28, 28, 28, 0.9));
    --persons-surface-2: var(--p-section-bg-2, rgba(20, 20, 20, 0.92));
    --persons-card: var(--p-card-bg, rgba(255, 255, 255, 0.045));
    --persons-card-hover: var(--p-card-hover, rgba(255, 255, 255, 0.08));
    --persons-border: var(--p-section-border, rgba(255, 255, 255, 0.09));
    --persons-text: var(--p-text, #fff);
    --persons-muted: var(--p-muted, #94acc2);
    --persons-accent: var(--p-red, #d06070);
    margin: 28px 0 30px;
    padding: 18px;
    border: 1px solid var(--persons-border);
    border-radius: 8px;
    background:
        linear-gradient(180deg, var(--persons-surface), var(--persons-surface-2));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.04);
}

.light-is-active .persons-section,
.light2-is-active .persons-section,
.dark-is-active .persons-section,
.old-is-active .persons-section,
body:not(.light-is-active, .light2-is-active, .dark-is-active, .old-is-active) .persons-section {
    --persons-surface: var(--p-section-bg);
    --persons-surface-2: var(--p-section-bg-2);
    --persons-card: var(--p-card-bg);
    --persons-card-hover: var(--p-card-hover);
    --persons-border: var(--p-section-border);
    --persons-text: var(--p-text);
    --persons-muted: var(--p-muted);
    --persons-accent: var(--p-red);
    box-shadow: var(--p-section-shadow);
}

.persons-block { margin-bottom: 18px; }
.persons-block:last-child { margin-bottom: 0; }

.persons-block--crew {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--persons-border);
}

.persons-crew-row {
    display: block;
    margin-bottom: 0;
}

.persons-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--persons-text);
}

.persons-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--persons-accent);
    box-shadow: 0 0 0 4px var(--p-focus, rgba(208, 96, 112, 0.16));
}

.persons-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: var(--persons-muted) transparent;
    scrollbar-width: thin;
}

.persons-list::-webkit-scrollbar {
    height: 6px;
}

.persons-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--persons-muted);
}

.persons-list::-webkit-scrollbar-track {
    background: transparent;
}

.cast-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 88px;
    min-height: 134px;
    padding: 8px 6px 7px;
    border: 1px solid var(--persons-border);
    border-radius: 8px;
    background: var(--persons-card);
    text-decoration: none !important;
    color: var(--persons-text);
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

a.cast-item:hover,
a.cast-item:focus-visible,
.cast-item--popup:hover,
.cast-item--popup:focus-visible {
    border-color: rgba(208, 96, 112, 0.58);
    background: var(--persons-card-hover);
    transform: translateY(-1px);
    outline: none;
}

.cast-poster {
    width: 68px;
    aspect-ratio: 31 / 42;
    margin: 0 auto 8px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cast-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
}

.cast-name {
    display: -webkit-box;
    max-width: 76px;
    min-height: 30px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--persons-text);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
}

.cast-char {
    display: block;
    max-width: 82px;
    overflow: hidden;
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.persons-list--crew {
    padding-bottom: 2px;
}

.persons-list--crew .cast-item {
    width: 100px;
    min-height: 128px;
}

.persons-list--crew .cast-poster { width: 62px; }
.persons-list--crew .cast-name   { max-width: 86px; font-size: 12px; }

@media (max-width: 480px) {
    .persons-section {
        margin: 22px 0 24px;
        padding: 14px;
    }

    .persons-crew-row {
        display: block;
    }

    .cast-item {
        width: 78px;
        min-height: 124px;
    }

    .cast-poster { width: 58px; }
    .cast-name   { max-width: 68px; font-size: 11px; }

    .persons-list--crew .cast-item { width: 88px; }
    .persons-list--crew .cast-poster { width: 58px; }
    .persons-list--crew .cast-name { max-width: 74px; font-size: 11px; }
}

/* Xfilter actor bridge: layout only; visual layer comes from root skin. */
.xactor-bridge {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 0 0 18px;
}

.xactor-bridge__photo {
    display: block;
    width: 88px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.xactor-bridge__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.xactor-bridge__body {
    min-width: 0;
}

.xactor-bridge__eyebrow,
.xactor-bridge__name-en,
.xactor-bridge__meta,
.xactor-bridge__link {
    font-size: 13px;
    line-height: 1.45;
}

.xactor-bridge__name {
    display: inline-block;
    max-width: 100%;
    font-size: 21px;
    line-height: 1.25;
    text-decoration: none;
}

.xactor-bridge__link {
    display: inline-block;
    margin-top: 8px;
}

/* Person hub page: layout only; visual layer comes from root skin. */
.fpageactors {
    padding-bottom: 20px;
}

.fp-hero {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 24px;
}

.fp-hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center top;
}

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

.fp-profession {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.4;
    text-transform: uppercase;
}

.fp-name {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
}

.fp-name-en {
    margin-bottom: 14px;
}

.fp-meta {
    margin: 0;
}

.fp-meta-row {
    display: flex;
    gap: 12px;
    padding: 6px 0;
}

.fp-meta-row dt {
    flex: 0 0 130px;
    font-weight: 500;
}

.fp-meta-row dd {
    margin: 0;
}

.fp-meta-note {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
}

.fp-best,
.fp-bio,
.fp-facts,
.fp-filmography {
    margin-top: 22px;
}

.fp-section-title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
}

.fp-best-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}

.fp-best-item {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    min-height: 40px;
    height: auto;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: inherit;
    text-decoration: none !important;
    white-space: normal;
    background: transparent !important;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

a.fp-best-item:hover,
a.fp-best-item:focus-visible {
    border-color: currentColor;
    box-shadow: inset 0 0 0 1px currentColor;
    color: inherit;
}

.fp-best-num {
    display: flex;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-weight: 700;
}

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

.fp-best-name {
    display: block;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fp-best-year,
.fp-fl-role {
    font-size: 12px;
}

.fp-facts-list {
    margin: 0;
    padding-left: 18px;
}

.fp-facts-list li {
    margin-bottom: 6px;
}

.fp-bio-cb,
.fp-tab-r {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fp-bio-body {
    max-height: 130px;
    overflow: hidden;
}

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

.fp-bio-body p {
    margin: 0 0 8px;
}

.fp-bio-toggle {
    display: inline-block;
    margin-top: 8px;
    cursor: pointer;
}

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

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

.fp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.fp-tab-lbl.xfilter__group-item {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-height: 36px;
    padding: 0 14px;
    cursor: pointer;
    white-space: nowrap;
}

.fp-tab-lbl.xfilter__group-item:before {
    display: none;
}

.fp-tab-lbl em {
    margin-left: 4px;
    font-style: normal;
}

.fp-tab-panel {
    display: none;
}

.fp-tab-content {
    flex: 0 0 100%;
    min-width: 100%;
}

#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-filmlist {
    width: 100%;
    border-collapse: collapse;
}

.fp-filmlist th,
.fp-filmlist td {
    padding: 7px 9px;
    text-align: left;
    vertical-align: middle;
}

.fp-fl-year {
    width: 54px;
    white-space: nowrap;
}

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

.fp-fl-r {
    width: 54px;
    text-align: right;
    font-weight: 700;
}

@media (max-width: 640px) {
    .xactor-bridge {
        grid-template-columns: 70px minmax(0, 1fr);
        gap: 12px;
    }

    .xactor-bridge__photo {
        width: 70px;
    }

    .xactor-bridge__name {
        font-size: 18px;
    }

    .fp-hero {
        grid-template-columns: 130px minmax(0, 1fr);
        gap: 14px;
    }

    .fp-name {
        font-size: 22px;
    }

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

    .fp-meta-row {
        flex-wrap: wrap;
        gap: 2px;
    }

    .fp-meta-row dt {
        flex-basis: 100%;
    }

    .fp-fl-role,
    .fp-filmlist th:nth-child(3),
    .fp-filmlist td: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 person theme tokens 2026-06 */
:root {
    --p-section-bg: #32425c;
    --p-section-bg-2: #28364c;
    --p-section-tint: rgba(202,185,145,.12);
    --p-section-border: rgba(255,255,255,.16);
    --p-section-shadow: 0 14px 30px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.05);
    --p-card-bg: rgba(255,255,255,.075);
    --p-card-bg-2: rgba(255,255,255,.028);
    --p-card-hover: rgba(255,255,255,.12);
    --p-card-border: rgba(255,255,255,.13);
    --p-card-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 18px rgba(0,0,0,.24);
    --p-card-shadow-hover: inset 0 1px 0 rgba(255,255,255,.07), 0 13px 26px rgba(0,0,0,.34);
    --p-poster-bg: #1c2636;
    --p-poster-border: rgba(255,255,255,.13);
    --p-text: #ffffff;
    --p-muted: #c4cacf;
    --p-gold: #cab991;
    --p-red: #d06070;
    --p-focus: rgba(202,185,145,.34);
    --pm-bg: #28364c;
    --pm-bg-2: #32425c;
    --pm-border: rgba(255,255,255,.16);
    --pm-text: #ffffff;
    --pm-muted: #c4cacf;
    --pm-chip: rgba(255,255,255,.08);
    --pm-chip-hover: rgba(255,255,255,.14);
    --pm-overlay: rgba(10,13,19,.72);
}

body.dark-is-active {
    --p-section-bg: #181818;
    --p-section-bg-2: #202734;
    --p-section-tint: rgba(25,118,210,.15);
    --p-section-border: rgba(148,172,194,.15);
    --p-card-bg: rgba(255,255,255,.07);
    --p-card-bg-2: rgba(255,255,255,.025);
    --p-card-hover: rgba(25,118,210,.13);
    --p-card-border: rgba(148,172,194,.16);
    --p-poster-bg: #111;
    --p-poster-border: rgba(148,172,194,.18);
    --p-text: #ffffff;
    --p-muted: #94acc2;
    --p-gold: #94acc2;
    --p-red: #1976d2;
    --p-focus: rgba(25,118,210,.35);
    --pm-bg: #181818;
    --pm-bg-2: #202734;
    --pm-border: rgba(148,172,194,.18);
    --pm-text: #f4f7fb;
    --pm-muted: #94acc2;
    --pm-chip: rgba(148,172,194,.12);
    --pm-chip-hover: rgba(25,118,210,.22);
    --pm-overlay: rgba(0,0,0,.7);
}

body.light-is-active {
    --p-section-bg: #f0f0f0;
    --p-section-bg-2: #ffffff;
    --p-section-tint: rgba(208,96,112,.10);
    --p-section-border: rgba(67,88,120,.15);
    --p-section-shadow: 0 12px 24px rgba(67,88,120,.13), inset 0 1px 0 rgba(255,255,255,.72);
    --p-card-bg: rgba(255,255,255,.88);
    --p-card-bg-2: rgba(255,255,255,.64);
    --p-card-hover: #ffffff;
    --p-card-border: rgba(67,88,120,.14);
    --p-card-shadow: 0 8px 16px rgba(67,88,120,.10);
    --p-card-shadow-hover: 0 13px 24px rgba(67,88,120,.16);
    --p-poster-bg: #dadde2;
    --p-poster-border: rgba(67,88,120,.16);
    --p-text: #171d26;
    --p-muted: #5d6977;
    --p-gold: #d06070;
    --p-red: #435878;
    --p-focus: rgba(208,96,112,.22);
    --pm-bg: #ffffff;
    --pm-bg-2: #f0f0f0;
    --pm-border: rgba(67,88,120,.18);
    --pm-text: #171d26;
    --pm-muted: #5d6977;
    --pm-chip: rgba(67,88,120,.08);
    --pm-chip-hover: rgba(208,96,112,.15);
    --pm-overlay: rgba(22,28,38,.5);
}

body.light2-is-active {
    --p-section-bg: #ffffff;
    --p-section-bg-2: #f0f6fd;
    --p-section-tint: rgba(25,118,210,.10);
    --p-section-border: rgba(25,118,210,.18);
    --p-section-shadow: 0 12px 24px rgba(25,118,210,.10), inset 0 1px 0 rgba(255,255,255,.78);
    --p-card-bg: rgba(255,255,255,.9);
    --p-card-bg-2: rgba(244,249,255,.76);
    --p-card-hover: #ffffff;
    --p-card-border: rgba(25,118,210,.17);
    --p-card-shadow: 0 8px 16px rgba(25,118,210,.09);
    --p-card-shadow-hover: 0 13px 24px rgba(25,118,210,.15);
    --p-poster-bg: #edf4fb;
    --p-poster-border: rgba(25,118,210,.18);
    --p-text: #172233;
    --p-muted: #596b80;
    --p-gold: #1976d2;
    --p-red: #d06070;
    --p-focus: rgba(25,118,210,.22);
    --pm-bg: #ffffff;
    --pm-bg-2: #f0f6fd;
    --pm-border: rgba(25,118,210,.2);
    --pm-text: #172233;
    --pm-muted: #596b80;
    --pm-chip: rgba(25,118,210,.08);
    --pm-chip-hover: rgba(25,118,210,.16);
    --pm-overlay: rgba(15,32,52,.48);
}

body.old-is-active {
    --p-section-bg: #eeeeee;
    --p-section-bg-2: #dadde2;
    --p-section-tint: rgba(208,96,112,.08);
    --p-section-border: rgba(50,66,92,.2);
    --p-section-shadow: 0 1px 3px rgba(0,0,0,.18);
    --p-card-bg: rgba(255,255,255,.76);
    --p-card-bg-2: rgba(255,255,255,.48);
    --p-card-hover: #ffffff;
    --p-card-border: rgba(50,66,92,.18);
    --p-card-shadow: 0 1px 3px rgba(0,0,0,.14);
    --p-card-shadow-hover: 0 2px 7px rgba(0,0,0,.18);
    --p-poster-bg: #d2d6de;
    --p-poster-border: rgba(50,66,92,.2);
    --p-text: #222;
    --p-muted: #555;
    --p-gold: #d06070;
    --p-red: #435878;
    --p-focus: rgba(208,96,112,.18);
    --pm-bg: #f0f0f0;
    --pm-bg-2: #dadde2;
    --pm-border: rgba(50,66,92,.2);
    --pm-text: #222;
    --pm-muted: #555;
    --pm-chip: rgba(50,66,92,.09);
    --pm-chip-hover: rgba(208,96,112,.14);
    --pm-overlay: rgba(50,66,92,.46);
}

body.normal-is-active,
body:not(.light-is-active, .light2-is-active, .dark-is-active, .old-is-active) {
    --p-section-bg: #32425c;
    --p-section-bg-2: #28364c;
    --p-section-tint: rgba(202,185,145,.14);
    --p-section-border: rgba(255,255,255,.18);
    --p-card-hover: rgba(202,185,145,.13);
    --p-card-border: rgba(255,255,255,.15);
    --p-gold: #cab991;
    --p-red: #d06070;
    --pm-bg: #28364c;
    --pm-bg-2: #32425c;
}

.persons-section {
    --persons-surface: var(--p-section-bg);
    --persons-surface-2: var(--p-section-bg-2);
    --persons-card: var(--p-card-bg);
    --persons-card-hover: var(--p-card-hover);
    --persons-border: var(--p-section-border);
    --persons-text: var(--p-text);
    --persons-muted: var(--p-muted);
    --persons-accent: var(--p-red);
    color: var(--p-text);
    border-color: var(--p-section-border);
    background:
        radial-gradient(circle at 96% 0, var(--p-section-tint), transparent 34%),
        linear-gradient(180deg, var(--p-section-bg), var(--p-section-bg-2));
    box-shadow: var(--p-section-shadow);
}

.persons-block--crew {
    border-top-color: var(--p-section-border);
}

.persons-list {
    scrollbar-color: var(--p-muted) transparent;
}

.persons-list::-webkit-scrollbar-thumb {
    background: var(--p-muted);
}

.persons-label {
    color: var(--p-text);
}

.persons-label::before {
    background: linear-gradient(180deg, var(--p-gold), var(--p-red));
}

.persons-section .cast-item {
    color: var(--p-text);
    border-color: var(--p-card-border);
    background: linear-gradient(180deg, var(--p-card-bg), var(--p-card-bg-2));
    box-shadow: var(--p-card-shadow);
}

.persons-section .cast-item:hover,
.persons-section .cast-item:focus-visible {
    border-color: var(--p-gold);
    background: linear-gradient(180deg, var(--p-card-hover), var(--p-card-bg-2));
    box-shadow: var(--p-card-shadow-hover), 0 0 0 3px var(--p-focus);
}

.persons-section .cast-poster {
    border-color: var(--p-poster-border);
    background: var(--p-poster-bg);
}

.persons-section .cast-name {
    color: var(--p-text);
}

.person-modal {
    --pm-box-bg: linear-gradient(180deg, var(--pm-bg), var(--pm-bg-2));
}

.person-modal .person-modal__overlay {
    background: var(--pm-overlay) !important;
}

.person-modal .person-modal__box {
    border-color: var(--pm-border) !important;
    background: var(--pm-box-bg) !important;
    color: var(--pm-text) !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.42) !important;
}

.person-modal .person-modal__close {
    background: var(--pm-chip) !important;
    color: var(--pm-text) !important;
}

.person-modal .person-modal__meta,
.person-modal .person-modal__details dt {
    color: var(--pm-muted) !important;
}

.person-modal .person-modal__photo {
    background: var(--p-poster-bg) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.28) !important;
}

.person-modal .person-modal__movies a {
    background: var(--pm-chip) !important;
    color: var(--pm-text) !important;
}

.person-modal .person-modal__movies a:hover {
    background: var(--pm-chip-hover) !important;
}

/* codex person hub redesign 2026-06 */
:root {
    --fp-page-bg: #f0f0f0;
    --fp-surface: #ffffff;
    --fp-surface-2: #dadde2;
    --fp-tint: rgba(208,96,112,.12);
    --fp-line: rgba(67,88,120,.16);
    --fp-text: #171d26;
    --fp-muted: #5d6977;
    --fp-soft: rgba(67,88,120,.08);
    --fp-accent: #d06070;
    --fp-accent-2: #435878;
    --fp-good: #2f9c65;
    --fp-mid: #c58a28;
    --fp-low: #c75f5f;
}

body.dark-is-active {
    --fp-page-bg: #141414;
    --fp-surface: #1c1c1c;
    --fp-surface-2: #242a33;
    --fp-tint: rgba(25,118,210,.15);
    --fp-line: rgba(148,172,194,.16);
    --fp-text: #ffffff;
    --fp-muted: #94acc2;
    --fp-soft: rgba(255,255,255,.07);
    --fp-accent: #1976d2;
    --fp-accent-2: #d06070;
    --fp-good: #75c783;
    --fp-mid: #e0b15b;
    --fp-low: #e38383;
}

body.normal-is-active,
body:not(.light-is-active, .light2-is-active, .dark-is-active, .old-is-active) {
    --fp-page-bg: #435878;
    --fp-surface: #32425c;
    --fp-surface-2: #28364c;
    --fp-tint: rgba(202,185,145,.16);
    --fp-line: rgba(255,255,255,.18);
    --fp-text: #ffffff;
    --fp-muted: #c4cacf;
    --fp-soft: rgba(255,255,255,.08);
    --fp-accent: #cab991;
    --fp-accent-2: #d06070;
}

body.light2-is-active {
    --fp-accent: #1976d2;
    --fp-accent-2: #d06070;
    --fp-tint: rgba(25,118,210,.10);
}

.fpageactors {
    width: 100%;
    min-width: 0;
    padding: 0 0 24px;
    color: var(--fp-text);
}

.fp-hero {
    position: relative;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 28px;
    align-items: stretch;
    margin: 0 0 28px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid var(--fp-line);
    border-radius: 8px;
    background:
        radial-gradient(circle at 88% 12%, var(--fp-tint), transparent 34%),
        linear-gradient(135deg, var(--fp-surface), var(--fp-surface-2));
    box-shadow: 0 18px 42px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.06);
}

.fp-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--fp-accent), var(--fp-accent-2));
}

.fp-hero-photo {
    position: relative;
    z-index: 1;
    width: 250px;
    max-width: 100%;
}

.fp-hero-photo::after {
    content: "";
    position: absolute;
    inset: 10px -10px -10px 10px;
    z-index: -1;
    border: 1px solid var(--fp-line);
    border-radius: 8px;
    background: var(--fp-soft);
}

.fp-hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 200 / 317;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    object-fit: cover;
    object-position: center top;
    box-shadow: 0 18px 34px rgba(0,0,0,.34);
}

.fp-hero-info {
    position: relative;
    z-index: 1;
    min-width: 0;
    align-self: center;
}

.fp-profession {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin: 0 0 12px;
    padding: 0 12px;
    border: 1px solid var(--fp-line);
    border-radius: 999px;
    background: var(--fp-soft);
    color: var(--fp-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
}

.fp-name {
    margin: 0 0 6px;
    color: var(--fp-text);
    font-size: 38px;
    font-weight: 800;
    line-height: 1.08;
}

.fp-name-en {
    margin: 0 0 20px;
    color: var(--fp-muted);
    font-size: 15px;
    line-height: 1.35;
}

.fp-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.fp-meta-row {
    display: block;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--fp-line);
    border-radius: 8px;
    background: var(--fp-soft);
}

.fp-meta-row dt {
    margin: 0 0 4px;
    color: var(--fp-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0;
}

.fp-meta-row dd {
    margin: 0;
    color: var(--fp-text);
    font-size: 14px;
    line-height: 1.35;
}

.fp-meta-note {
    display: inline-block;
    margin-left: 7px;
    color: var(--fp-muted);
    font-size: 12px;
}

.fp-best,
.fp-bio,
.fp-facts,
.fp-filmography {
    margin-top: 28px;
}

.fp-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--fp-text);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
}

.fp-section-title::before {
    content: "";
    display: block;
    width: 4px;
    height: 22px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--fp-accent), var(--fp-accent-2));
}

.fp-best-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fp-best-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    min-height: 88px;
    padding: 14px;
    border: 1px solid var(--fp-line);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--fp-surface), var(--fp-soft));
    color: var(--fp-text);
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.16);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

a.fp-best-item:hover,
a.fp-best-item:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(208,96,112,.56);
    box-shadow: 0 15px 30px rgba(0,0,0,.22);
    color: var(--fp-text);
    outline: none;
}

.fp-best-num {
    display: flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fp-accent), var(--fp-accent-2));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

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

.fp-best-name {
    display: -webkit-box;
    overflow: hidden;
    color: var(--fp-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.fp-best-year,
.fp-fl-role {
    color: var(--fp-muted);
    font-size: 12px;
}

.fp-facts-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fp-facts-list li {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 13px 14px 13px 34px;
    border: 1px solid var(--fp-line);
    border-radius: 8px;
    background: var(--fp-soft);
    line-height: 1.48;
}

.fp-facts-list li::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 20px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fp-accent);
    box-shadow: 0 0 0 4px var(--fp-tint);
}

.fp-bio-body {
    max-height: 150px;
    overflow: hidden;
    color: var(--fp-text);
    line-height: 1.6;
}

.fp-bio-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-top: 10px;
    padding: 0 12px;
    border: 1px solid var(--fp-line);
    border-radius: 999px;
    background: var(--fp-soft);
    color: var(--fp-text);
    cursor: pointer;
}

.fp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.fp-tab-lbl.xfilter__group-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--fp-line);
    border-radius: 999px;
    background: var(--fp-soft);
    color: var(--fp-text);
    cursor: pointer;
    white-space: nowrap;
}

.fp-tab-lbl.xfilter__group-item::before {
    display: none;
}

.fp-tab-lbl em {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--fp-surface);
    color: var(--fp-muted);
    font-style: normal;
    text-align: center;
}

#fp-tab-film:checked ~ label[for="fp-tab-film"],
#fp-tab-series:checked ~ label[for="fp-tab-series"],
#fp-tab-cartoon:checked ~ label[for="fp-tab-cartoon"] {
    border-color: rgba(208,96,112,.58);
    background: linear-gradient(135deg, var(--fp-accent), var(--fp-accent-2));
    color: #fff;
}

#fp-tab-film:checked ~ label[for="fp-tab-film"] em,
#fp-tab-series:checked ~ label[for="fp-tab-series"] em,
#fp-tab-cartoon:checked ~ label[for="fp-tab-cartoon"] em {
    background: rgba(255,255,255,.18);
    color: #fff;
}

.fp-tab-content {
    flex: 0 0 100%;
    min-width: 100%;
    overflow-x: auto;
    padding-top: 4px;
}

.fp-filmlist {
    width: 100%;
    min-width: 620px;
    border-collapse: separate;
    border-spacing: 0 7px;
}

.fp-filmlist th {
    padding: 0 12px 6px;
    color: var(--fp-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0;
}

.fp-filmlist td {
    padding: 12px;
    border-top: 1px solid var(--fp-line);
    border-bottom: 1px solid var(--fp-line);
    background: var(--fp-soft);
    vertical-align: middle;
}

.fp-filmlist td:first-child {
    border-left: 1px solid var(--fp-line);
    border-radius: 8px 0 0 8px;
}

.fp-filmlist td:last-child {
    border-right: 1px solid var(--fp-line);
    border-radius: 0 8px 8px 0;
}

.fp-fl-row--linked:hover td {
    border-color: rgba(208,96,112,.50);
    background: var(--fp-tint);
}

.fp-fl-year {
    width: 62px;
    color: var(--fp-muted);
    font-weight: 700;
    white-space: nowrap;
}

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

.fp-fl-title a {
    color: var(--fp-text);
    text-decoration: none;
}

.fp-fl-title a:hover,
.fp-fl-title a:focus-visible {
    color: var(--fp-accent);
    outline: none;
}

.fp-fl-r {
    width: 58px;
    color: var(--fp-muted);
    font-weight: 800;
    text-align: right;
}

.fp-r--hi { color: var(--fp-good); }
.fp-r--mid { color: var(--fp-mid); }
.fp-r--lo { color: var(--fp-low); }

@media (max-width: 980px) {
    .fp-hero {
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 22px;
        padding: 20px;
    }

    .fp-hero-photo {
        width: 210px;
    }

    .fp-best-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .fp-hero {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .fp-hero-photo {
        width: 172px;
    }

    .fp-name {
        font-size: 30px;
    }

    .fp-meta,
    .fp-facts-list,
    .fp-best-grid {
        grid-template-columns: 1fr;
    }

    .fp-section-title {
        font-size: 19px;
    }
}

@media (max-width: 480px) {
    .fp-hero {
        padding: 16px;
    }

    .fp-hero-photo {
        width: 148px;
    }

    .fp-name {
        font-size: 27px;
    }

    .fp-profession {
        max-width: 100%;
        white-space: normal;
    }

    .fp-best-item {
        min-height: 76px;
    }
}

/* codex cast-photo lock default 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: 112px;
    min-height: 190px;
    grid-template-rows: 127px minmax(34px, 1fr);
}

.persons-section .persons-list--crew .cast-poster {
    width: 94px;
    height: 127px;
    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: 96px;
        min-height: 166px;
        grid-template-rows: 111px minmax(30px, 1fr);
    }

    .persons-section .persons-list--crew .cast-poster {
        width: 82px;
        height: 111px;
    }
}
