/* ============================================================================
   角色剧照 · 样式（v2 · 2026-11-16 重做弹窗 UI）
   参考：豆瓣（入口形态）+ 电视猫（版权声明）
   ★独立文件，不动 koubei_role.css，不升全站 ?v= 版本号（铁律 §13）
   ============================================================================ */

/* ---------- 豆瓣式图片卡片 ---------- */
/* RP_CREDIT_FIX_V7 position:relative 让版权弹窗以整个图片卡为定位基准 */
.rp-figure {
    flex: 0 0 auto;
    width: 170px;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    z-index: 2;
}
@media (max-width: 768px) {
    .rp-figure { width: 120px; }
    /* 手机端图下按钮加大，手指好点 */
    .rp-figure__act { padding: 9px 4px; font-size: 12px; }
}

.rp-figure__box {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #0A1616;
    line-height: 0;
}
.rp-figure__box .role-profile__pic {
    display: block;
    width: 100%;
    height: 226px;
    border-radius: 0;
    transition: filter .2s ease;
}
@media (max-width: 768px) { .rp-figure__box .role-profile__pic { height: 160px; } }

/* hover 浮现「去修改」 */
.rp-figure__mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .42);
    opacity: 0;
    transition: opacity .18s ease;
    line-height: 1.4;
    text-decoration: none;
    pointer-events: none;
}
.rp-figure__box:hover .rp-figure__mask,
.rp-figure__box:focus-within .rp-figure__mask { opacity: 1; pointer-events: auto; }
.rp-figure__mask .rp-btn-edit {
    display: inline-block;
    padding: 7px 16px;
    background: #2E8B2E;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.rp-figure__mask .rp-btn-edit:hover { background: #37A637; }

/* ============================================================================
   RP_MOBILE_FIX 触屏设备：不显示 hover 遮罩
   ★原因：手机没 hover，遮罩常显会盖住剧照、还和「图片版权」小字重叠成一团。
     手机端入口用图下的「上传角色剧照」按钮就够了（本来就够大、好点）。
   ============================================================================ */
@media (hover: none) {
    .rp-figure__mask { display: none !important; }
}

/* 图下「增改资料和作品」 */
.rp-figure__act {
    display: block;
    margin-top: 0;
    padding: 7px 6px;
    border: 1px solid #2a5b57;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #0E2222;
    color: #A8D5D5 !important;
    font-size: 12.5px;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .15s, color .15s;
}
.rp-figure__act:hover { background: #143030; color: #00CEC9 !important; }
.rp-figure .role-profile__pic.is-role-photo { border: 0; box-shadow: none; }

/* ---------- 图片版权（电视猫式：右下角小字 → 白卡弹窗） ---------- */
/* ============================================================================
   RP_CREDIT_FIX_V7 图片版权
   ★原来挂在 .rp-figure__box 里，而 box 有 overflow:hidden（裁图片圆角）→
     弹窗被裁成半截、文字截断。现在挪到 .rp-figure 下，
     以整个图片卡为基准，向上展开，不再被裁。
   ============================================================================ */
/* 「图片版权」小字：压在图片右下角（视觉上还在图里，但它是 .rp-figure 的子元素） */
.rp-figure > .rp-credit {
    position: absolute;
    right: 4px;
    /* 图片高度 226 + 按钮条约 34 → 小字落在图片下边缘 */
    top: calc(226px - 22px);
    z-index: 6;
    line-height: 1;
}
@media (max-width: 768px) {
    /* 手机端：图片高 160，小字压在图片右下角内侧 6px */
    .rp-figure > .rp-credit { top: auto; bottom: 40px; right: 4px; }
    .rp-figure > .rp-credit > summary { padding: 2px 5px; font-size: 10px; }
}

/* 弹窗本体：白底卡片，向上展开到图片上方，不再被裁 */
/* 弹窗：以图片卡为基准，左对齐（图片在卡片左侧，向左展开会出屏），
       宽度 300，max-width 防小屏溢出 */
.rp-figure > .rp-credit > .rp-credit__box {
    position: absolute;
    left: 0;
    right: auto;
    bottom: 22px;
    z-index: 900;
    width: 300px;
    max-width: 82vw;
    padding: 14px 16px 16px;
    background: #fff;
    border: 1px solid #d7d7d7;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
    border-radius: 3px;
    color: #333;
    font-size: 13px;
    line-height: 1.85;
    text-align: left;
    white-space: normal;
}
.rp-credit > summary { list-style: none; user-select: none; cursor: pointer; }
.rp-credit > summary::-webkit-details-marker { display: none; }
.rp-credit__link {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .55);
    color: #9fd8ff;
    font-size: 11px;
    white-space: nowrap;
}
.rp-credit__link:hover { color: #fff; background: rgba(0, 0, 0, .72); }
.rp-credit__box {
    position: absolute;
    right: 0;
    bottom: 26px;
    z-index: 40;
    width: 320px;
    max-width: 86vw;
    padding: 16px 18px 18px;
    background: #fff;
    border: 1px solid #d7d7d7;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .28);
    border-radius: 2px;
    color: #333;
    font-size: 13px;
    line-height: 1.85;
    text-align: left;
}
.rp-credit__title { display: block; text-align: center; color: #000; font-size: 15px; font-weight: 700; margin: 2px 0 10px; }
.rp-credit__box p { margin: 0; color: #333; }
.rp-credit__box .rp-credit__mail { color: #00a000; text-decoration: none; }
.rp-credit__box .rp-credit__mail:hover { text-decoration: underline; }
.rp-credit__box .rp-credit__close { position: absolute; top: 6px; right: 10px; color: #999; font-size: 18px; line-height: 1; pointer-events: none; }
@media (max-width: 768px) {
    .rp-credit__box { position: fixed; left: 50%; right: auto; bottom: 22%; transform: translateX(-50%); width: 88vw; max-width: 400px; }
}

/* ============================================================================
   弹窗 UI v2
   ============================================================================ */
/* ★z-index 必须低于 main.js 里「版权投诉」悬浮按钮的 9998，否则会盖住它 */
.rp-modal {
    position: fixed;
    inset: 0;
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font: 14px/1.65 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}
.rp-modal * { box-sizing: border-box; }
.rp-modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 12, .72);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: rpFade .18s ease;
}
@keyframes rpFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rpPop { from { opacity: 0; transform: translateY(10px) scale(.98) } to { opacity: 1; transform: none } }

.rp-modal__box {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #102727 0%, #0C1E1E 100%);
    border: 1px solid #294f4d;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 206, 201, .06);
    padding: 22px 22px 16px;
    color: #DDE8E8;
    text-align: left;
    animation: rpPop .22s cubic-bezier(.2, .8, .3, 1);
}

/* 关闭按钮 */
.rp-modal__x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .04);
    border: 0;
    border-radius: 50%;
    color: #7f9f9d;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.rp-modal__x:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* 头部 */
.rp-modal__hd { display: flex; align-items: center; gap: 12px; padding-right: 34px; margin-bottom: 16px; }
.rp-modal__avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00CEC9 0%, #0a7c79 100%);
    color: #04211f;
    font-size: 19px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0;
}
.rp-modal__title { font-size: 16.5px; font-weight: 700; color: #fff; line-height: 1.35; }
.rp-modal__meta { font-size: 12.5px; color: #8fb0af; margin-top: 1px; }

/* ---------- 拖放区 ---------- */
.rp-drop {
    border: 2px dashed #2c5754;
    border-radius: 12px;
    background: rgba(0, 206, 201, .025);
    padding: 30px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .16s, background .16s, transform .1s;
    outline: none;
    color: #9fc6c4;
}
.rp-drop:hover, .rp-drop:focus-visible { border-color: #00CEC9; background: rgba(0, 206, 201, .07); }
.rp-drop.is-over { border-color: #00CEC9; background: rgba(0, 206, 201, .12); transform: scale(1.012); }
.rp-drop__icon { color: #00CEC9; opacity: .85; margin-bottom: 8px; }
.rp-drop__t { font-size: 14.5px; color: #e2f1f0; font-weight: 600; }
.rp-drop__s { font-size: 12.5px; color: #7f9f9d; margin-top: 5px; }

/* ---------- 预览 ---------- */
.rp-prev {
    position: relative;
    width: 100%;
    max-height: 260px;
    border-radius: 12px;
    overflow: hidden;
    background: #061010;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rp-prev img { max-width: 100%; max-height: 260px; display: block; object-fit: contain; }
.rp-prev__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 9px;
    border-radius: 99px;
    background: rgba(0, 0, 0, .62);
    color: #00CEC9;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
}
.rp-previnfo { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; align-items: baseline; }
.rp-previnfo__name {
    font-size: 13px;
    color: #cfe6e6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-previnfo__size { font-size: 12px; color: #7f9f9d; white-space: nowrap; flex: 0 0 auto; }
.rp-again {
    margin-top: 10px;
    background: none;
    border: 0;
    color: #00CEC9;
    font-size: 12.5px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.rp-again:hover { color: #6ff5f0; }

/* ---------- 上传中 ---------- */
.rp-stage--upload { text-align: center; padding: 26px 0 20px; }
.rp-spin {
    width: 36px;
    height: 36px;
    margin: 0 auto 12px;
    border: 3px solid rgba(0, 206, 201, .18);
    border-top-color: #00CEC9;
    border-radius: 50%;
    animation: rpSpin .8s linear infinite;
}
@keyframes rpSpin { to { transform: rotate(360deg) } }
.rp-uploadtext { color: #b8d8d6; font-size: 13.5px; }
.rp-bar { width: 70%; height: 3px; margin: 14px auto 0; border-radius: 99px; background: rgba(0, 206, 201, .14); overflow: hidden; }
.rp-bar i { display: block; height: 100%; width: 40%; border-radius: 99px; background: #00CEC9; animation: rpSlide 1.1s ease-in-out infinite; }
@keyframes rpSlide { 0% { margin-left: -40% } 100% { margin-left: 100% } }

/* ---------- 成功 ---------- */
.rp-stage--done { text-align: center; padding: 10px 0 6px; }
.rp-done-ico { color: #3ddc84; margin-bottom: 8px; }
.rp-done-thumb { width: 108px; border-radius: 10px; display: block; margin: 0 auto 12px; border: 1px solid #2a5b57; }
.rp-done-t { font-size: 16px; font-weight: 700; color: #fff; }
.rp-done-s { font-size: 13px; color: #8fb0af; margin-top: 5px; line-height: 1.7; }
.rp-done-btn { margin-top: 16px; width: 100%; }

/* ---------- 底部 ---------- */
.rp-modal__foot { margin-top: 15px; }
.rp-nick { display: block; }
.rp-nick__lb { display: block; font-size: 12.5px; color: #7f9f9d; margin-bottom: 5px; }
.rp-nick input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid #294f4d;
    background: #071414;
    color: #e2f1f0;
    font-size: 14px;
    outline: none;
    transition: border-color .15s;
}
.rp-nick input:focus { border-color: #00CEC9; }
.rp-nick input::placeholder { color: #4d6f6d; }

.rp-msg { margin-top: 9px; font-size: 13px; min-height: 19px; color: #8fb0af; }
.rp-msg.is-ok { color: #3ddc84; }
.rp-msg.is-err { color: #ff8b8b; }

.rp-btns { display: flex; gap: 10px; margin-top: 11px; }
.rp-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.rp-btn--ghost { background: transparent; border-color: #294f4d; color: #9fc6c4; }
.rp-btn--ghost:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.rp-btn--main {
    background: linear-gradient(180deg, #00CEC9 0%, #00a8a4 100%);
    color: #04211f;
    box-shadow: 0 4px 14px rgba(0, 206, 201, .28);
}
.rp-btn--main:hover { filter: brightness(1.08); }
.rp-btn--main:disabled {
    background: #1c3332;
    color: #4d6f6d;
    box-shadow: none;
    cursor: not-allowed;
}

.rp-law {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(41, 79, 77, .5);
    color: #5c7d7b;
    font-size: 11.5px;
    line-height: 1.75;
}

/* ---------- 手机：底部抽屉 ---------- */
@media (max-width: 560px) {
    .rp-modal { padding: 0; align-items: flex-end; }
    .rp-modal__box {
        max-width: none;
        max-height: 94vh;
        border-radius: 18px 18px 0 0;
        border-bottom: 0;
        padding: 20px 18px 18px;
        animation: rpUp .24s cubic-bezier(.2, .8, .3, 1);
    }
    @keyframes rpUp { from { transform: translateY(24px); opacity: .6 } to { transform: none; opacity: 1 } }
    .rp-prev img { max-height: 210px; }
    .rp-drop { padding: 24px 14px; }
}

/* ============================================================================
   审核后台
   ============================================================================ */
.rpa-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    font: 14px/1.7 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
    color: #e8eeee;
}
.rpa-wrap h1 { font-size: 20px; margin: 0 0 6px; }
.rpa-sub { color: #8fb0af; font-size: 13px; margin-bottom: 16px; }
.rpa-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.rpa-tab { padding: 7px 16px; border-radius: 8px; background: #12292a; border: 1px solid #23484a; color: #cfe6e6; text-decoration: none; font-size: 13.5px; }
.rpa-tab.is-on { background: #00CEC9; color: #062020; font-weight: 700; border-color: #00CEC9; }
.rpa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.rpa-card { background: #12292a; border: 1px solid #23484a; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.rpa-card__pic { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: #0A1616; }
.rpa-card__body { padding: 10px 12px 12px; }
.rpa-card__role { font-weight: 700; font-size: 15px; }
.rpa-card__meta { color: #8fb0af; font-size: 12px; line-height: 1.6; word-break: break-all; }
.rpa-card__acts { display: flex; gap: 8px; margin-top: 9px; }
.rpa-btn { flex: 1; text-align: center; padding: 6px 0; border-radius: 7px; text-decoration: none; font-size: 13px; border: 0; cursor: pointer; }
.rpa-btn--ok { background: #2E8B2E; color: #fff; }
.rpa-btn--no { background: #7a2b2b; color: #fff; }
.rpa-btn--del { background: #333f3f; color: #d6e6e6; }
.rpa-empty { padding: 40px; text-align: center; color: #8fb0af; }
.rpa-flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; }
.rpa-flash.ok { background: #123c22; border: 1px solid #2E8B2E; }
.rpa-flash.err { background: #3c1414; border: 1px solid #7a2b2b; }

/* 小屏（≤768）：版权弹窗固定在屏幕中间，绝不出屏 */
@media (max-width: 768px) {
    .rp-figure > .rp-credit > .rp-credit__box {
        position: fixed;
        left: 50%;
        right: auto;
        top: auto;
        bottom: 20%;
        transform: translateX(-50%);
        width: 86vw;
        max-width: 380px;
    }
}

/* ============================================================================
   RP_FIX_V8 图片版权弹窗（用 JS 控制开合，× 可点关闭）
   ★原来用 <details>：× 只是装饰、点不了；而且 details 不会自动关。
     现在由 role_photo.js 接管：点「图片版权」开，点 × / 点遮罩 / 按 ESC 关。
   ============================================================================ */
.rp-credit { position: static; }
.rp-credit > summary { list-style: none; cursor: pointer; }
.rp-credit > summary::-webkit-details-marker { display: none; }

/* 弹窗：默认隐藏，.is-open 才显示 */
.rp-credit > .rp-credit__box { display: none; }
.rp-credit.is-open > .rp-credit__box { display: block; }

/* 真正可点的 × */
.rp-credit > .rp-credit__box > .rp-credit__close {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: #999;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    pointer-events: auto;
}
.rp-credit > .rp-credit__box > .rp-credit__close:hover { color: #333; }

/* 「联系我们」：绿色链接，可点 */
.rp-credit > .rp-credit__box .rp-credit__mail {
    color: #00a000;
    text-decoration: none;
    cursor: pointer;
}
.rp-credit > .rp-credit__box .rp-credit__mail:hover { text-decoration: underline; }

/* 点弹窗外部时用来接住点击的透明层（可选，用 JS 实现）*/

/* ============================================================================
   RP_AVATAR_V12 弹窗头像：角色首字 → 演员真实头像
   ============================================================================ */
.rp-modal__avatar { overflow: hidden; position: relative; }
.rp-modal__avatar.has-img { background: #0A1616; }
.rp-modal__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* ============================================================================
   RP_MOBILE_V2 手机端布局重做（2026-11-16）
   老板反馈：120×160 太小，剧照看不清。
   新方案：横排 —— 剧照 132×176 在左，姓名/身份在右，节省纵向空间。
   ============================================================================ */
@media (max-width: 768px) {
    /* ★RP_HASPHOTO_V35 2026-11-16：这条原本是「全站横排」，现在只管有剧照的卡。
       没剧照的卡不匹配 → 原样走 koubei_role.css 的「小图居中」。 */
    .role-profile--has-photo {
        flex-direction: row !important;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 12px !important;
    }
    /* 剧照卡片：132 宽 */
    .role-profile .rp-figure {
        width: 132px !important;
        flex: 0 0 132px !important;
        text-align: center;
    }
    .role-profile .rp-figure__box .role-profile__pic {
        width: 132px !important;
        height: 176px !important;
    }
    /* 右侧文字区 */
    .role-profile__body {
        flex: 1 1 auto !important;
        min-width: 0;
        text-align: left !important;
    }
    .role-profile__name { font-size: 18px !important; }
    .role-profile__role { font-size: 12.5px !important; }
    .role-profile__identity { font-size: 12.5px !important; margin-top: 5px !important; }
    .role-profile__facts {
        font-size: 12px !important;
        line-height: 1.75 !important;
        text-align: left !important;
        margin-top: 6px !important;
    }
    .role-profile__bio {
        font-size: 12.5px !important;
        line-height: 1.75 !important;
        text-align: left !important;
    }

    /* 「图片版权」压在剧照右下角内侧 */
    .role-figure .rp-credit,
    .role-profile .rp-credit { position: static; }

    .role-profile .rp-figure > .rp-credit {
        position: absolute;
        right: 3px;
        bottom: 37px;      /* 压在图片底部上方（图片 176 高，按钮条在下面） */
        top: auto;
        z-index: 6;
    }
    .role-profile .rp-figure > .rp-credit > summary {
        padding: 2px 5px;
        font-size: 10px;
        background: rgba(0, 0, 0, .6);
        border-radius: 3px;
    }

    /* 「上传角色剧照」按钮 */
    .role-profile .rp-figure__act {
        display: block !important;
        margin-top: 0 !important;
        padding: 8px 2px !important;
        font-size: 12px !important;
        white-space: nowrap;
        letter-spacing: -.2px;
    }

    /* 关系卡片的圆形头像保持原样（不受影响） */
    .rel-card__ava { flex: 0 0 auto; }
}

/* 超小屏（≤360）：剧照再缩一点，保证文字有空间 */
@media (max-width: 360px) {
    .role-profile .rp-figure { width: 112px !important; flex: 0 0 112px !important; }
    .role-profile .rp-figure__box .role-profile__pic { width: 112px !important; height: 149px !important; }
    .role-profile .rp-figure > .rp-credit { bottom: 34px; }
    .role-profile .rp-figure__act { font-size: 11px !important; padding: 7px 1px !important; }
}

/* ============================================================================
   RP_MOBILE_V3 手机端文字细节修正
   · 概况行允许正常换行（原来被截断成「166 cm · 天秤座·」）
   · 名字/身份行缩小间距
   ============================================================================ */
@media (max-width: 768px) {
    .role-profile__facts {
        white-space: normal !important;
        word-break: break-word !important;
        overflow: visible !important;
        font-size: 11.5px !important;
        line-height: 1.7 !important;
    }
    .role-profile__facts b {
        display: inline !important;
        font-size: 11.5px !important;
    }
    .role-profile__name {
        line-height: 1.3 !important;
        margin-bottom: 2px;
    }
    .role-profile__identity {
        line-height: 1.4 !important;
        margin-bottom: 4px;
    }
    /* 简介：限制行数，避免占太多屏 */
    .role-profile__bio {
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    details.role-bio { margin-top: 6px !important; }
    details.role-bio > summary {
        font-size: 12.5px !important;
        padding: 4px 0 !important;
    }
}

/* ============================================================================
   RP_FULLWIDE_CSS 通栏剧照（电视猫做法，2026-11-16）
   老板要求：剧照独立成一整块，占满内容宽度，不要挤在左边小方图。
   方案 B：宽度拉满 + 固定高度 260 + object-fit:cover 裁切（保留中间，上下裁掉）
   ============================================================================ */
.rp-wide-wrap {
    margin: 14px 0 4px;
}

.rp-wide {
    display: block !important;
    width: 100% !important;
    flex: none !important;
    text-align: center;
}

.rp-wide__box {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #0A1616;
    line-height: 0;
}

.rp-wide__img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center 30%;      /* 偏上一点，人脸不容易被裁 */
    border-radius: 0;
}

/* hover「去修改」遮罩（桌面端） */
.rp-wide .rp-figure__mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .42);
    opacity: 0;
    transition: opacity .18s ease;
    line-height: 1.4;
    text-decoration: none;
    pointer-events: none;
}
.rp-wide__box:hover .rp-figure__mask { opacity: 1; pointer-events: auto; }

/* 「图片版权」压在大图右下角 */
.rp-wide .rp-credit {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 6;
    line-height: 1;
    top: auto;
}
.rp-wide .rp-credit__link {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .6);
    color: #cde8ff;
    font-size: 11px;
    white-space: nowrap;
}
.rp-wide .rp-credit__link:hover { color: #fff; background: rgba(0, 0, 0, .78); }

/* 图下「上传角色剧照」通栏按钮 */
.rp-wide__act {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 0 !important;
    border: 1px solid #2a5b57;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #0E2222;
    color: #A8D5D5 !important;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
}
.rp-wide__act:hover { background: #143030; color: #00CEC9 !important; }

/* 手机端：高度降到 200，图下按钮加大 */
@media (max-width: 768px) {
    .rp-wide__img { height: 200px; object-position: center 25%; }
    .rp-wide__act { padding: 11px 0 !important; font-size: 13.5px; }
    .rp-wide .rp-credit__link { padding: 2px 6px; font-size: 10px; }
    .rp-wide-wrap { margin: 10px 0 2px; }
}

/* 手机端不显示 hover 遮罩（没 hover，触摸设备用图下按钮） */
@media (hover: none) {
    .rp-wide .rp-figure__mask { display: none !important; }
}

/* ============================================================================
   RP_3TO4_V2 剧照按 3:4 竖向卡片居中显示（2026-11-16 方案 B）
   ★为什么不用通栏：用户传的是竖图（659×1080，比例 0.61），
     通栏横条 1336×260（比例 5.14）会把竖图裁掉 92%，只剩中间一条。
   ★3:4 比例 0.75 接近竖图，裁切很少，人脸不受影响。

   桌面：320×427 居中
   手机：宽 100%（最大 362），高 = 宽 × 4/3
   ============================================================================ */

/* 外层：居中容器 */
.rp-wide-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 18px 0 6px;
}

/* 卡片：固定 320 宽 */
.rp-wide {
    display: block !important;
    width: 320px !important;
    max-width: 100%;
    flex: none !important;
    text-align: center;
    margin: 0 auto;
}

.rp-wide__box {
    position: relative;
    width: 100%;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: #0A1616;
    line-height: 0;
}

/* 图片：3:4 竖向，cover 裁切（竖图裁上下很少） */
.rp-wide__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;      /* 顶对齐，人脸在上半部 */
    border-radius: 0;
}

/* hover「去修改」遮罩（桌面） */
.rp-wide .rp-figure__mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .42);
    opacity: 0;
    transition: opacity .18s ease;
    line-height: 1.4;
    text-decoration: none;
    pointer-events: none;
}
.rp-wide__box:hover .rp-figure__mask { opacity: 1; pointer-events: auto; }

/* 「图片版权」压在大图右下角 */
.rp-wide .rp-credit {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 6;
    line-height: 1;
    top: auto;
}
.rp-wide .rp-credit__link {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .6);
    color: #cde8ff;
    font-size: 11px;
    white-space: nowrap;
}
.rp-wide .rp-credit__link:hover { color: #fff; background: rgba(0, 0, 0, .78); }

/* 图下「上传角色剧照」 */
.rp-wide__act {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 0 !important;
    border: 1px solid #2a5b57;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background: #0E2222;
    color: #A8D5D5 !important;
    font-size: 13.5px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}
.rp-wide__act:hover { background: #143030; color: #00CEC9 !important; }

/* 手机端：宽拉满（不超 362），高度按 3:4 自动 */
@media (max-width: 768px) {
    .rp-wide-wrap { margin: 12px 0 4px; }
    .rp-wide { width: 100% !important; max-width: 362px; }
    .rp-wide__act { padding: 12px 0 !important; font-size: 14px; border-radius: 0 0 8px 8px; }
    .rp-wide .rp-credit__link { padding: 2px 7px; font-size: 10.5px; }
}

/* ============================================================================
   鈽匯P_FINAL_V35 涓ょ鐘舵€侊紝娓呮竻妤氭锛?026-11-16 鑰佹澘浜茶嚜纭瀹氱锛?   ============================================================================
   鑰佹澘鍘熻瘽锛?     銆屾病鏈夌敤鎴蜂笂浼犺繃鐨?鐢ㄧ殑榛樿婕斿憳鍥?杩欎釜鍥炬墜鏈虹鏄浘1杩欑鏍峰瓙
       璇锋敞鎰?鍙湁 鐢ㄦ埛涓婁紶鍚?鍥炬墠鍙樻垚 鍥?鑼冮棽杩欑鏍峰瓙銆?
   鐘舵€?A 鈥斺€?娌″墽鐓э紙榛樿婕斿憳鍥撅級锛氥€屽浘1銆?       路 鎵嬫満绔細灏忓浘灞呬腑銆佹枃瀛楀眳涓紙璧?koubei_role.css 鐨勮€佹牱寮忥紝涓€涓儚绱犻兘涓嶆敼锛?       路 涓嶈緭鍑恒€屼笂浼犮€岃鑹层€嶇殑瑙掕壊鍓х収銆嶆寜閽紝涓嶈緭鍑哄浘浣嶅鍣?       路 鍙湪瑙掕壊鍚嶅悗闈㈢暀涓€涓笉鍗犱綅鐨勩€屼笂浼犲墽鐓с€嶅皬瀛楀叆鍙?
   鐘舵€?B 鈥斺€?鏈夊墽鐓э細銆屽浘2銆嶏紙鑼冮棽閭ｆ牱锛?       路 妗岄潰锛氬浘 170脳226 鍦ㄥ乏锛屾寜閽?170 瀹借创鍦ㄥ浘姝ｄ笅鏂?       路 鎵嬫満锛氬ぇ鍥炬弧鍗″鍦ㄤ笂锛屾枃瀛楀眳涓湪涓嬶紝鎸夐挳鍦ㄥ浘涓嬮潰
       路 鍥句笂 hover 鍑恒€屽幓淇敼銆嶉伄缃?
   鈽呭垽鎹彧鐢ㄤ竴涓€屾爣璁扮被銆嶏細.role-profile--has-photo
       鈥斺€?鐢辨ā鏉匡紙鏂伴〉闈級鎴?role_photo_auto.js锛堣€侀〉闈級鎸夌湡瀹炴暟鎹墦涓娿€?       鈥斺€?涓嶅啀鐢?:has() 鐚滐紝涓嶅啀闈犮€屽悗闈㈣鐩栧墠闈€嶆墦鏋躲€?   鈽呮湰娈典箣鍓嶇殑鎵€鏈?role-profile 鎺掔増琛ヤ竵锛圴14/V16/V17/V18/V20/V21/V22/
     V23/V24/V27/V28/V31/V32/V33锛夊凡鍏ㄩ儴鍒犻櫎锛屼綔鐢ㄥ煙瑙佷笅鏂?A / B 涓ゆ銆?   ============================================================================ */

/* ---------- 鐘舵€?A锛氭病鍓х収 鈥斺€?涓€涓儚绱犻兘涓嶇 ----------
   杩欓噷**鏁呮剰涓嶅啓浠讳綍** .role-profile / .role-profile__pic / .role-profile__body
   鐨勬帓鐗堣鍒欙紝璁╁畠鍘熸牱璧?koubei_role.css 鐨勮€佹牱寮忥細
       妗岄潰 170脳226 鍥惧乏鏂囧彸 路 鎵嬫満 120脳160 灏忓浘灞呬腑 + 鏂囧瓧灞呬腑
   鈽呭敮涓€渚嬪锛氥€屽幓淇敼銆嶉伄缃╁湪瑙︽懜璁惧涓婇殣钘忥紙鑰佽鍒欙紝涓庡竷灞€鏃犲叧锛夈€?*/
/* ★RP_EDIT_MASK_V37（2026-11-16 老板：「图1 图中的 去修改也没了」）
   没剧照的页面也要有「去修改」悬浮遮罩（点图就能上传）。
   之前这里写了 display:none !important 把它强行隐藏了 → 现在改回「和有剧照完全一样」的悬浮样式。 */
.role-profile:not(.role-profile--has-photo) .role-profile__pic-link .rp-btn-edit {
    display: inline-block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 7px 16px;
    border-radius: 6px;
    background: #37A637;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .18s ease;
    pointer-events: none;
    z-index: 5;
}
.role-profile:not(.role-profile--has-photo) .role-profile__pic-link:hover .rp-btn-edit,
.role-profile:not(.role-profile--has-photo) .role-profile__pic-link:focus-within .rp-btn-edit {
    opacity: 1;
}

/* ============================================================================
   鐘舵€?B锛氭湁鍓х収 鈥斺€?.role-profile--has-photo
   ============================================================================ */

/* 鍥句綅瀹瑰櫒锛氭闈㈣窡鍘熸紨鍛樼収鍚屽锛岀旱鍚戞帓锛堝浘 鈫?鐗堟潈 鈫?鎸夐挳锛?*/
.role-profile--has-photo .role-profile__figure {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 170px;
    line-height: 0;
}

/* 鍥句綅澶栨锛氭闈?170脳226 */
.role-profile--has-photo .role-profile__pic-link {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 170px;
    height: 226px;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    text-decoration: none;
    background: #0A1616;
}

/* 鍓х収锛氶摵婊″浘浣嶃€乧over 瑁佸垏锛岀劍鐐瑰亸涓婁笉鍒囦汉澶?*/
.role-profile--has-photo .role-profile__pic.is-role-photo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    min-height: 0;
    object-fit: cover;
    object-position: center 20%;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
}

/* ---------- 銆屼笂浼犮€岃鑹层€嶇殑瑙掕壊鍓х収銆嶆寜閽細鍙湪鏈夊墽鐓ф椂鍑虹幇 ---------- */
.role-profile--has-photo .role-profile__act {
    display: block;
    box-sizing: border-box;
    width: 170px;                  /* 妗岄潰涓婅窡鍥惧悓瀹?*/
    max-width: 100%;
    margin: 6px 0 0;
    padding: 9px 0;
    border: 1px solid #2a5b57;
    border-radius: 6px;
    background: #0E2222;
    color: #A8D5D5 !important;
    font-size: 12.5px;
    line-height: 1.4;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -.2px;
    cursor: pointer;
}
.role-profile--has-photo .role-profile__act:hover,
.role-profile--has-photo .role-profile__act:focus {
    background: #143030;
    color: #00CEC9 !important;
    border-color: #00CEC9;
}

/* ---------- 銆屽幓淇敼銆嶉伄缃╋細鍙湪鏈夊墽鐓х殑鍥句笂 ---------- */
.role-profile--has-photo .role-profile__pic-link .rp-btn-edit {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 7px 16px;
    border-radius: 6px;
    background: #37A637;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .18s ease;
    pointer-events: none;
}
.role-profile--has-photo .role-profile__pic-link:hover .rp-btn-edit,
.role-profile--has-photo .role-profile__pic-link:focus-within .rp-btn-edit {
    opacity: 1;
}
/* 瑙︽懜璁惧娌℃湁 hover锛氫笉鏄剧ず閬僵锛堢偣鍥炬湰韬氨鑳芥墦寮€涓婁紶寮圭獥锛?*/
@media (hover: none) {
    .role-profile--has-photo .role-profile__pic-link .rp-btn-edit {
        display: none !important;
    }
}

/* ---------- 銆屽浘鐗囩増鏉冦€嶈创鍦ㄥ墽鐓у彸涓嬭 ---------- */
/* ★RP_CREDIT_IN_IMG_V35 版权小字必须贴在「图片」右下角里侧，不能压到图下面那个按钮。
   绝对定位基准改成 .role-profile__pic-link（图本身的框），
   而不是整个 .role-profile__figure（盖图+按钮）。 */
.role-profile--has-photo .role-profile__pic-link {
    position: relative !important;
}
.role-profile--has-photo .role-profile__figure > .rp-credit {
    position: absolute;
    right: 4px;
    /* 图片高 226 + 图与按钮间距 6 → 距图框底部还有 38px（按钮高）。
       所以从底部往上 38px，再进图 4px，就贴在图片内侧了。
       实题：按钮由 .role-profile__act 自身高度决定，这里用「距离」而不是「百分比」
       避免按钮高小变化时错位。 */
    bottom: 42px;
    z-index: 6;
    line-height: 1;
}

/* ============================================================================
   鏈夊墽鐓?路 鎵嬫満绔紙鈮?68锛夛細銆屽浘2銆嶅ぇ鍥惧湪涓娿€佹枃瀛楀眳涓湪涓嬶紝鎸夐挳鍦ㄥ浘涓嬮潰
   ============================================================================ */
@media (max-width: 768px) {
    .role-profile--has-photo {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        gap: 0 !important;
    }

    .role-profile--has-photo .role-profile__figure {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        align-self: stretch !important;
    }

    .role-profile--has-photo .role-profile__pic-link {
        width: 100% !important;
        max-width: 100% !important;
        height: 220px !important;
        min-height: 220px !important;
        border-radius: 8px;
    }

    .role-profile--has-photo .role-profile__pic.is-role-photo {
        width: 100% !important;
        max-width: 100% !important;
        height: 220px !important;
        max-height: 220px !important;
        min-height: 220px !important;
        flex: 0 0 auto !important;
        object-fit: cover !important;
        object-position: center 22% !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    /* 鎸夐挳锛氭墜鏈虹婊″崱瀹斤紝璐村湪鍥句笅闈?*/
    .role-profile--has-photo .role-profile__act {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px 0 0 !important;
        padding: 11px 0 !important;
        font-size: 13.5px !important;
        white-space: normal !important;
    }

    /* 鐗堟潈灏忓瓧鍘嬪湪鍥句笂锛屼笉鍘嬫寜閽?*/
    .role-profile--has-photo .role-profile__figure > .rp-credit {
        right: 0px !important;
        bottom: 50px !important;
    }

    /* 鏂囧瓧鍖?*/
    .role-profile--has-photo .role-profile__body {
        width: 100% !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        text-align: center !important;
        padding: 12px 0 0 !important;
    }
    .role-profile--has-photo .role-profile__name,
    .role-profile--has-photo .role-profile__identity,
    .role-profile--has-photo .role-profile__facts,
    .role-profile--has-photo .role-profile__bio,
    .role-profile--has-photo details.role-bio > summary,
    .role-profile--has-photo .role-rating {
        text-align: center !important;
    }
    .role-profile--has-photo .role-profile__facts {
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.8 !important;
    }
}

/* ============================================================================
   鏈夊墽鐓?路 瓒呭皬灞忥紙鈮?60锛?   ============================================================================ */
@media (max-width: 360px) {
    .role-profile--has-photo .role-profile__pic-link,
    .role-profile--has-photo .role-profile__pic.is-role-photo {
        height: 190px !important;
        min-height: 190px !important;
        max-height: 190px !important;
    }
    .role-profile--has-photo .role-profile__act {
        font-size: 12.5px !important;
        padding: 10px 0 !important;
    }
    .role-profile--has-photo .role-profile__figure > .rp-credit {
        bottom: 50px !important;
    }
}

/* ============================================================================
   銆屼笂浼犲墽鐓с€嶈交閲忓叆鍙ｏ紙娌″墽鐓ф椂鎵嶆湁锛夆€斺€斾笉鍗犲竷灞€銆佷笉鎾戦珮鍥句綅
   ============================================================================ */
.role-profile__lite-entry {
    display: inline-block;
    margin: 0 0 0 8px;
    padding: 1px 8px;
    border: 1px solid #2a5b57;
    border-radius: 10px;
    background: transparent;
    color: #6B9999 !important;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 400;
    text-decoration: none;
    vertical-align: middle;
    white-space: nowrap;
    cursor: pointer;
}
.role-profile__lite-entry:hover,
.role-profile__lite-entry:focus {
    color: #00CEC9 !important;
    border-color: #00CEC9;
}
/* 鏈夊墽鐓ф椂涓嶆樉绀鸿交閲忓叆鍙ｏ紙姝ｅ父鎯呭喌妯℃澘/JS 涓嶄細杈撳嚭锛岃繖閲屽厹搴曪級 */
.role-profile--has-photo .role-profile__lite-entry { display: none !important; }



/* ============================================================================
   ★RP_NO_PHOTO_WRAP_V35 补一个漏洞（2026-11-16）
   没剧照时模板也会把演员照包进 .role-profile__pic-link（为了点图能上传）。
   上面状态 A 不写任何排版规则，但这个包裹层本身需要「就是原演员照的尺寸」，
   否则 <a> 是行内元素、宽度塌成 28px，图被挤扁 —— 这就是「图1」必须原样的地方。
   这里只给包裹层尺寸，不改任何布局方向/对齐/文字。
   桌面 170×226（= koubei_role.css 的 .role-profile__pic）· 手机 120×160（原样）· 超小屏 112×149
   —— 注意：手机端原样式是 120×160，不是 132×176，这里严格照原样。
   ============================================================================ */
.role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback {
    position: relative;
    flex: 0 0 auto;
    line-height: 0;
}
.role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 170px;
    height: 226px;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    text-decoration: none;
    background: #0A1616;
}
.role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link .role-profile__pic {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    min-height: 0;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 0;
    margin: 0;
}
@media (max-width: 768px) {
    /* 手机端原样式：120×160，图居中、文字居中（=「图1」） */
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link {
        width: 160px;
        height: 160px;
    }
}
@media (max-width: 360px) {
    /* 超小屏原样式：112×149 */
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link {
        width: 112px;
        height: 149px;
    }
}


/* ============================================================================
   ★RP_NO_PHOTO_CENTER_V35 没剧照的手机端：图居中（「图1」）
   原样式（koubei_role.css @media max-width 640）是
       .role-profile{flex-direction:column; align-items:center; text-align:center}
   图片作为圆的「孙元素」被包进 .role-profile__figure--fallback 后，
   align-items:center 只让包裹层居中，不会再管里面的图 —— 所以这里补一句
   text-align:center，让包裹层里的行内内容居中（不改高度/尺寸）。
   ============================================================================ */
@media (max-width: 768px) {
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
}

/* ============================================================================
   ★RP_NO_PHOTO_BASELINE_V35 没剧照：手机端严格还原原样式（「图1」）
   koubei_role.css 里原本就有的两条：
       @media(max-width:640px){ .role-profile__pic{width:120px;height:160px} }
   但我们这条老板规则是「手机端」≤768，所以 641~768 这 128px 区间会掉回
   桌面 170px —— 这里补齐，让 768 以下一律 120×160，和原样式一致。
   ★不动布局方向/对齐/文字，只补图尺寸。
   ============================================================================ */
@media (min-width: 641px) and (max-width: 768px) {
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link {
        width: 160px;
        height: 160px;
    }
}

/* ============================================================================
   ★RP_LEGACY_360_V35 老页面在超小屏（≤360）的图尺寸补齐
   老静态页（如范建）图直接挂在 .role-profile 下，没有图位包裹层，
   koubei_role.css 只在≤640 写了 120×160，没写≤360 的 112×149，
   导致超小屏上比其他页大一圈。这里按原设计（≤360 → 112×149）补上，
   只限没剧照的卡，不动有剧照的。
   ============================================================================ */
@media (max-width: 360px) {
    .role-profile:not(.role-profile--has-photo) > .role-profile__pic {
        width: 112px !important;
        height: 149px !important;
    }
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link,
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link .role-profile__pic {
        width: 112px !important;
        height: 149px !important;
    }
}

/* ============================================================================
   ★RP_NO_PHOTO_CENTER_V36 没剧照的手机端：文字必须真正居中（2026-11-16 老板第二次反馈）
   原因：koubei_role.css 第 134 行写了
       @media(max-width:640px){ .role-profile__facts,.role-profile__works{text-align:right} }
   这条拒绝了父容器的 text-align:center，所以「概况」那一行还是靠左/靠右。
   这里把它改回居中（只限没剧照的卡，有剧照的卡本来就已经居中）。
   ★只改对齐方式，不动字号/行高/间距/颜色。
   ============================================================================ */
@media (max-width: 768px) {
    .role-profile:not(.role-profile--has-photo) .role-profile__body {
        text-align: center !important;
        width: 100% !important;
    }
    .role-profile:not(.role-profile--has-photo) .role-profile__name,
    .role-profile:not(.role-profile--has-photo) .role-profile__role,
    .role-profile:not(.role-profile--has-photo) .role-profile__identity,
    .role-profile:not(.role-profile--has-photo) .role-profile__facts,
    .role-profile:not(.role-profile--has-photo) .role-profile__facts b,
    .role-profile:not(.role-profile--has-photo) .role-profile__works,
    .role-profile:not(.role-profile--has-photo) .role-profile__bio,
    .role-profile:not(.role-profile--has-photo) details.role-bio > summary,
    .role-profile:not(.role-profile--has-photo) .role-rating {
        text-align: center !important;
    }
    /* 「概况 1990年9月5日 · 171 cm · ...」一行满时换行也要居中，不要被拆得东一个西一个 */
    .role-profile:not(.role-profile--has-photo) .role-profile__facts,
    .role-profile:not(.role-profile--has-photo) .role-profile__works {
        white-space: normal !important;
        word-break: break-word !important;
    }
}

/* ============================================================================
   ★RP_ACT_FALLBACK_V36 没剧照的「上传「角色」的角色剧照」按钮（2026-11-16 老板定调）
   老板：「都应该出现上传 XX 的角色剧照按钮啊 不然用户怎么上传剧照啊」
   → 每个角色页都有这个按钮；没剧照的放在小图下面，和图同宽。
   ★图尺寸不变（没剧照仍是小图居中），只是多了一个按钮。
   ============================================================================ */
.role-profile__act--fallback {
    display: block;
    box-sizing: border-box;
    width: 170px;
    max-width: 100%;
    margin: 6px auto 0;
    padding: 8px 0;
    border: 1px solid #2a5b57;
    border-radius: 6px;
    background: #0E2222;
    color: #A8D5D5 !important;
    font-size: 12.5px;
    line-height: 1.4;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -.2px;
    cursor: pointer;
}
.role-profile__act--fallback:hover,
.role-profile__act--fallback:focus {
    background: #143030;
    color: #00CEC9 !important;
    border-color: #00CEC9;
}

@media (max-width: 768px) {
    /* 没剧照：按钮和小图（120 宽）同宽、居中、贴在图下 */
    .role-profile__act--fallback {
        width: 170px !important;
        max-width: 100% !important;
        margin: 8px auto 0 !important;
        padding: 7px 4px !important;
        font-size: 12px !important;
        white-space: normal !important;
    }
    /* 图没剧照时不装图位包装层的页面（真老结构），按钮直接跟图同宽就好 */
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
@media (max-width: 360px) {
    .role-profile__act--fallback {
        width: 150px !important;
        font-size: 11.5px !important;
    }
}

/* ============================================================================
   ★RP_UNIFY_160_V39 全量一致（2026-11-16 老板：「给我搞的全量一致啊」）
   ============================================================================
   问题：没剧照的页面刷新时会从 120 跳到 160。
   原因：老静态页的图是裸 <img> 直接挂在 .role-profile 下，
        命中 koubei_role.css 的 120×160；
        等 auto.js 运行完把它包进 .role-profile__pic-link 后，才命中 160×160。
        两条路径宽度不一致 → 看到“先 120 后变 160”。

   修法：没剧照的手机端，不管有没有包装层，一律 160×160。
        这样「包装前」和「包装后」完全一致，不再跳。
   ============================================================================ */
@media (max-width: 768px) {

    /* ① 裸 <img> 直接挂在 .role-profile 下（老页面未注入时的状态）→ 160×160 */
    .role-profile:not(.role-profile--has-photo) > .role-profile__pic {
        width: 160px !important;
        max-width: 160px !important;
        height: 160px !important;
        max-height: 160px !important;
        flex: 0 0 160px !important;
        object-fit: cover;
        object-position: center 20%;
        border-radius: 8px;
        margin: 0 auto !important;
        display: block !important;
    }

    /* ② 包装层里的图（auto.js 注入后 / 新模板生成）→ 同样 160×160 */
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
        height: 160px !important;
        min-height: 160px !important;
        max-height: 160px !important;
        margin: 0 auto !important;
    }
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link .role-profile__pic {
        width: 160px !important;
        max-width: 160px !important;
        height: 160px !important;
        max-height: 160px !important;
        min-height: 0 !important;
    }
}

/* 超小屏（≤360）也要一致：统一缩到 150×150，两条路径都一样 */
@media (max-width: 360px) {
    .role-profile:not(.role-profile--has-photo) > .role-profile__pic {
        width: 150px !important;
        max-width: 150px !important;
        height: 150px !important;
        max-height: 150px !important;
        flex: 0 0 150px !important;
    }
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link,
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link .role-profile__pic {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
    }
}

/* ============================================================================
   ★RP_KILL120_V40 彻底消灭 120（2026-11-16）
   ============================================================================
   跳变真正原因：
     koubei_role.css 第 132 行  @media(max-width:640px){ .role-profile__pic{width:120px;height:160px} }
     这条在「auto.js 还没执行」的空窗期里先生效 → 图先是 120×160；
     等 auto.js 把图包进 .role-profile__pic-link 后，才命中 160×160 → 看到跳变。
   修法：在本文件里用更高特异性把 120 直接覆盖成 160，
        不等 JS，一加载就是 160 → 全程一致，不再跳。
   ★只管「没剧照」的卡；有剧照的卡自己有尺寸规则。
   ============================================================================ */
@media (max-width: 768px) {
    /* 层级 1：裸图（auto.js 执行前，图直接在 .role-profile 下） */
    .role-profile:not(.role-profile--has-photo) > .role-profile__pic,
    .role-profile:not(.role-profile--has-photo) .role-profile__body ~ .role-profile__pic {
        width: 160px !important;
        max-width: 160px !important;
        height: 160px !important;
        max-height: 160px !important;
        flex: 0 0 160px !important;
        object-fit: cover !important;
        object-position: center 20% !important;
        border-radius: 8px !important;
        margin: 0 auto !important;
        display: block !important;
    }

    /* 层级 2：包装后（auto.js 执行后 / 新模板） */
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link,
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link .role-profile__pic,
    .role-profile:not(.role-profile--has-photo) .role-profile__pic-link .role-profile__pic {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
        height: 160px !important;
        min-height: 160px !important;
        max-height: 160px !important;
    }
}

/* 超小屏也一致 */
@media (max-width: 360px) {
    .role-profile:not(.role-profile--has-photo) > .role-profile__pic {
        width: 150px !important;
        max-width: 150px !important;
        height: 150px !important;
        max-height: 150px !important;
        flex: 0 0 150px !important;
    }
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link,
    .role-profile:not(.role-profile--has-photo) .role-profile__figure--fallback .role-profile__pic-link .role-profile__pic,
    .role-profile:not(.role-profile--has-photo) .role-profile__pic-link .role-profile__pic {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
    }
}
