/* ===========================================================================
 * kanju 主题 · 短剧
 *   列表页 /short-drama    ← kanju41-mirror/screenshots/short-drama-list.png
 *   播放页 /short-drama/:id ← kanju41-mirror/screenshots/short-drama.png
 * 数值均为 1440x900 参照截图逐像素量取的结果（见 openspec 任务 3.5 备注）。
 * 单位一律 px（.cursor/rules/css-use-px.mdc）。
 * ========================================================================= */

/* 满视口高的页面要吃满高度：#app-main 自带底部留白（桌面 1.25rem，给内容收尾用），
   于是 100dvh 的舞台把整页撑到 100dvh+留白，凭空多出竖向滚动条（实测 920）。
   用 :has() 按页面内容抵消，而不是给 body 加类 —— body 属性不在 htmx 的替换范围内，
   换页时不会更新（这正是 shell_layout 那个坑）。老浏览器不支持 :has() 时只是多 20px 滚动，可接受。 */
#app-main:has(> .k-short),
#app-main:has(> .k-sd) {
    padding-bottom: 0;
}

/* ───────────────────────── 列表页：满高竖屏 feed ───────────────────────── */
/* 参照把舞台居中于**整页**（1440 下 432–1008），而不是右侧内容列。
   #k-main 自栏宽处起步，故显式左移一个栏宽并等量加宽，把容器拉回整页宽；
   负左距 + 等量加宽不改变文档总宽，不会产生横向滚动。 */
.k-short {
    position: relative;
    display: block;
    min-height: 100dvh;
    height: 100dvh;
    margin-left: calc(-1 * var(--k-sidebar-w));
    width: calc(100% + var(--k-sidebar-w));
    overflow: hidden;
}
.k-short > .k-short__pager {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.k-short > .k-short__switch {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

/* 列表页沉浸背景：同海报模糊铺底（对照 mirror short-drama-video-backdrop） */
.k-short__bg {
    position: absolute;
    inset: -60px;
    z-index: 0;
    background-position: center;
    background-size: cover;
    filter: blur(40px) saturate(1.05);
    opacity: 0.45;
    pointer-events: none;
}
.k-short__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(9 10 12 / 58%);
}
.k-short > .k-short__stage {
    z-index: 1;
}
.k-short > .k-short__switch {
    z-index: 2;
}

/* 舞台：满视口高、宽 = 高 × 0.64（参照量得 576/900 = 16:25），以整页居中 */
.k-short__stage {
    position: relative;
    height: 100dvh;
    aspect-ratio: 16 / 25;
    overflow: hidden;
    background: #000;
}

.k-short__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.k-short__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 26%);
    color: #fff;
    text-indent: 2px;
    cursor: pointer;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

/* 全屏钮：参照在舞台高的 72.8% 处、水平居中（不是右下角） */
.k-short__fullscreen {
    position: absolute;
    left: 50%;
    top: 72.8%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    min-width: 60px;
    padding: 0 8px;
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 999px;
    background: rgb(5 12 15 / 72%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* 左下信息块：标题/集数/热度。左内缩 35px、底距 54px（量取值） */
.k-short__info {
    position: absolute;
    left: 35px;
    bottom: 54px;
    z-index: 2;
    max-width: calc(100% - 230px);
}

.k-short__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 8px rgb(0 0 0 / 65%);
}

.k-short__ep {
    margin: 8px 0 0; /* 压标题→热度间距，让标题落到参照 y757 且热度仍 y818 */
    font-size: 13px;
    line-height: 1;
    color: rgb(255 255 255 / 82%);
    text-shadow: 0 1px 6px rgb(0 0 0 / 60%);
}

.k-short__heat {
    display: inline-block;
    margin-top: 11px;
    padding: 0 12px;
    height: 28px;
    border-radius: 14px;
    background: rgb(255 255 255 / 14%);
    color: rgb(255 255 255 / 88%);
    font-size: 12px;
    line-height: 28px;
    white-space: nowrap;
    transition: background 0.15s ease;
}

/* 右下两个按钮：右内缩 6px、底距 57px、间距 18px */
.k-short__actions {
    position: absolute;
    right: 2px; /* 参照组左缘 x805（原 right:6 → 实测 x801） */
    bottom: 57px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 18px;
}

.k-short__btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid rgb(255 255 255 / 22%);
    border-radius: 18px;
    background: rgb(0 0 0 / 42%);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    transition: border-color 0.15s ease, background 0.15s ease, filter 0.15s ease;
}

.k-short__btn--primary {
    border-color: transparent;
    background: var(--k-primary);
    color: var(--k-primary-ink, #07140f);
    font-weight: 600;
    padding: 0 30px;   /* 参照「查看更多」宽 118px */
}

/* 底部进度线：左右内缩 28px、底距 30px */
.k-short__progress {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 30px;
    height: 2px;
    border-radius: 1px;
    background: rgb(255 255 255 / 26%);
    overflow: visible; /* 允许 ::after 命中区溢出 */
}

.k-short__progress-fill {
    display: block;
    width: 0;
    height: 100%;
    background: #fff;
}

/* 舞台右侧：上下切换 + 计数。
   旧值 left:50%+332px 只在 1440 校准；1920 下会叠进舞台（实测 gap=-42）。
   改为贴舞台右缘外侧：舞台宽 = 100dvh × 16/25（与 .k-short__stage 一致）。 */
.k-short__switch {
    position: absolute;
    left: calc(50% + (100dvh * 16 / 25) / 2 + 16px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    z-index: 3;
}

.k-short__switch > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 8%);
    color: rgb(255 255 255 / 78%);
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease;
}

.k-short__switch > button:hover {
    color: #fff;
    background: rgb(255 255 255 / 12%);
}

.k-short__count {
    font-size: 13px;
    line-height: 1;
    color: rgb(255 255 255 / 72%);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    min-width: 3.5rem;
    text-align: center;
}

/* ───────────────────────── 播放页：单条沉浸 ───────────────────────── */
.k-sd {
    position: relative;
    min-height: 100dvh;
    height: 100dvh;
    /* 背景用负 inset 铺满（模糊会吃掉边缘），不加这行会伸出文档外：
       实测整页 scrollWidth/Height 变成 1500x960（视口 1440x900）。整幅页无外部内容，直接收住。 */
    overflow: hidden;
    /* 上下留白各 (100vh-540)/2（参照 180）走 padding 而不是 frame 的 margin-top：
       margin 会穿透折叠到 .k-sd 自己（把 .k-sd 推下 180），于是绝对定位的返回钮与
       右侧浮标也跟着偏移 180（实测返回钮落在 y=198、浮标溢出屏外）。
       **不加对称的下留白**：加了盒子被撑到 180+692+180=1052，`bottom` 就从更高的盒子
       算起，浮标底边落到 964（参照 814）。参照页本身就是"内容到 870 就结束"。 */
    padding-top: max(0px, calc((100dvh - 540px) / 2));
}

/* 背景 = 同一张海报放大模糊铺满；压暗一档避免抢主体 */
.k-sd__bg {
    position: absolute;
    inset: -60px;
    background-position: center;
    background-size: cover;
    filter: blur(40px) saturate(1.05);
    opacity: 0.5;
}

.k-sd__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(9 10 12 / 55%);
}

/* 左上 40px 圆形返回：左 160、上 18（量取值） */
.k-sd__back {
    position: absolute;
    left: 160px;
    top: 18px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgb(30 31 34 / 72%);
    color: #fff;
    text-decoration: none;
    transition: background 0.15s ease;
}

.k-sd__inner {
    position: relative;
    width: 100%;
    max-width: 1088px;
    margin: 0 auto;
}

/* 播放盒：满容器宽、高 540，黑底；上下留白各 (100vh-540)/2 → 与参照同为 180 */
.k-sd__frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 540px;
    background: #000;
}

/* 盒内竖版画面：高撑满、2:3（量得 360x540），左右留黑边 */
.k-sd__media {
    height: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.k-sd__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 26%);
    color: #fff;
    text-indent: 2px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

/* 全屏钮：盒内底边中央偏上（参照 y=712，盒底 720） */
.k-sd__fullscreen {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 9px;
    border: 0;
    border-radius: 5px;
    background: rgb(0 0 0 / 52%);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

/* 左下信息块：与容器左对齐；标题距盒底 35px（参照 755 − 720） */
.k-sd__meta {
    margin-top: 35px;
}

.k-sd__title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.k-sd__ep {
    margin: 11px 0 0;
    font-size: 13px;
    line-height: 1;
    color: rgb(255 255 255 / 78%);
}

.k-sd__heat {
    display: inline-block;
    margin-top: 11px;
    padding: 0 12px;
    height: 28px;
    border-radius: 14px;
    background: rgb(255 255 255 / 14%);
    color: rgb(255 255 255 / 88%);
    font-size: 12px;
    line-height: 28px;
    transition: background 0.15s ease, color 0.15s ease;
}

/* 底部进度线：距热度条 22px（参照 y=868） */
.k-sd__progress {
    height: 2px;
    margin-top: 22px;
    border-radius: 1px;
    background: rgb(255 255 255 / 26%);
    overflow: hidden;
}

.k-sd__progress-fill {
    display: block;
    width: 0;
    height: 100%;
    background: #fff;
}

/* 右侧竖排五浮标：右 176（=容器右）、底 86；每格 52x52、间距 7 */
.k-sd__tools {
    position: absolute;
    right: 176px;
    bottom: 86px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.k-sd__tool {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgb(38 39 43 / 86%);
    color: rgb(255 255 255 / 88%);
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.k-sd__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--k-primary);
    color: var(--k-primary-ink, #07140f);
    font-size: 10px;
    font-style: normal;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 0 rgb(var(--k-primary-rgb) / 40%);
    animation: k-sd-badge-pulse 2.4s ease-out infinite;
}

@keyframes k-sd-badge-pulse {
    0% { box-shadow: 0 0 0 0 rgb(var(--k-primary-rgb) / 35%); }
    70% { box-shadow: 0 0 0 6px rgb(var(--k-primary-rgb) / 0%); }
    100% { box-shadow: 0 0 0 0 rgb(var(--k-primary-rgb) / 0%); }
}

@media (prefers-reduced-motion: reduce) {
    .k-sd__badge { animation: none; }
}



/* 短剧播放交互：浮标 / 全屏 / 进度 affordance（对照 mirror landscape） */
.k-sd__tool:hover {
    background: rgb(55 56 62 / 92%);
    color: #fff;
}
.k-sd__tool > span {
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.02em;
    opacity: 0.92;
}


.k-sd__tool[data-k-sd-rate]:active span {
    color: var(--k-primary, #16e09d);
}

/* 浮标打开对应面板时：工具钮保持抬亮（JS 可加 aria-expanded） */
.k-sd__tool[aria-expanded="true"] {
    background: rgb(55 56 62 / 96%);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgb(var(--k-primary-rgb) / 36%);
}



.k-sd__tool:active {
    transform: scale(0.96);
}

.k-sd__fullscreen {
    height: 30px;
    min-width: 60px;
    padding: 0 8px; /* 收边：62/64→≈60 */
    border-radius: 6px;
    font-size: 12px;
    gap: 5px;
    transition: background 0.15s ease, transform 0.1s ease;
}

.k-sd__fullscreen:hover {
    background: rgb(0 0 0 / 72%);
}

.k-sd__play:hover {
    background: rgb(255 255 255 / 38%);
}

/* 进度条：扩大命中区但不改视觉起点（参照 y868）；hover 加粗 + 主色 fill */
.k-sd__progress {
    position: relative;
    height: 2px;
    cursor: pointer;
    z-index: 2;
}

.k-sd__progress::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -8px;
    bottom: -8px;
}

.k-sd__progress:hover {
    height: 4px;
    background: rgb(255 255 255 / 34%);
}

.k-sd__progress:hover .k-sd__progress-fill {
    background: var(--k-primary, #16e09d);
}

.k-short__btn:hover {
    border-color: rgb(255 255 255 / 40%);
    background: rgb(0 0 0 / 58%);
}

.k-short__btn--primary:hover {
    filter: brightness(1.06);
}

.k-short__fullscreen:hover {
    background: rgb(0 0 0 / 68%);
}

.k-short__progress {
    cursor: pointer;
    z-index: 2;
}

.k-short__progress::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -8px;
    bottom: -8px;
}

.k-short__progress:hover {
    height: 4px;
    background: rgb(255 255 255 / 34%);
}

.k-short__progress:hover .k-short__progress-fill {
    background: var(--k-primary, #16e09d);
}


/* 全屏钮：参照 mirror landscape 胶囊边框/模糊，尺寸仍锁约 60×30 地标 */
.k-sd__fullscreen {
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: rgb(5 12 15 / 72%);
    font-weight: 700;
}

.k-sd__back:hover {
    background: rgb(45 46 50 / 88%);
}

.k-sd__heat:hover {
    background: rgb(255 255 255 / 22%);
    color: #fff;
}

.k-short__heat:hover {
    background: rgb(255 255 255 / 22%);
}


.k-sd__tool:focus-visible,
.k-sd__fullscreen:focus-visible,
.k-sd__play:focus-visible,
.k-sd__back:focus-visible {
    outline: 2px solid var(--k-primary, #16e09d);
    outline-offset: 2px;
}


/* ───────────────────────── 选集 / 换源 面板内容（短剧浮标打开） ───────────────────────── */
.k-epgrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.k-ep {
    height: 34px;
    padding: 0 4px;
    border: 1px solid var(--k-interactive-border);
    border-radius: 6px;
    background: transparent;
    color: var(--k-text-muted);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.k-ep.is-current {
    border-color: transparent;
    background: var(--k-primary);
    color: var(--k-primary-ink, #07140f);
    font-weight: 600;
    padding: 0 30px;   /* 参照「查看更多」宽 118px */
}

.k-srclist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.k-src {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--k-interactive-border);
    border-radius: 8px;
    background: transparent;
    color: var(--k-text);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.k-src em {
    font-size: 12px;
    font-style: normal;
    color: var(--k-text-subtle);
}

.k-src.is-current {
    border-color: var(--k-primary);
    background: rgb(22 224 157 / 10%);
}

.k-src.is-current em {
    color: var(--k-primary);
}


/* 倍数切换瞬间抬亮 */

/* 播放中：进度条主色 + 播放钮稍亮 */
.k-sd__frame[data-k-playing="1"] .k-sd__play,
.k-short__stage[data-k-playing="1"] .k-short__play {
    background: rgb(255 255 255 / 42%);
}

.k-sd__frame[data-k-playing="1"] ~ .k-sd__progress .k-sd__progress-fill,
.k-sd__inner:has(.k-sd__frame[data-k-playing="1"]) .k-sd__progress-fill,
.k-short__stage[data-k-playing="1"] .k-short__progress-fill {
    background: var(--k-primary, #16e09d);
}

.k-sd__inner:has(.k-sd__frame[data-k-playing="1"]) .k-sd__progress {
    background: rgb(255 255 255 / 34%);
}


/* show 页切条动画复用列表 keyframes */
.k-sd__media.is-switching {
    animation: k-short-switch 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
    .k-sd__media.is-switching { animation: none; }
}

/* 沉浸页右侧：上下切换（贴工具条左侧，避免叠进 frame） */
.k-sd__switch {
    position: absolute;
    right: 88px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 4;
}

.k-sd__switch > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 10%);
    color: rgb(255 255 255 / 82%);
    cursor: pointer;
    transition: color 0.12s ease, background 0.12s ease;
}

.k-sd__switch > button:hover {
    color: #fff;
    background: rgb(255 255 255 / 16%);
}

.k-sd__count {
    font-size: 13px;
    line-height: 1;
    color: rgb(255 255 255 / 72%);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    min-width: 3.5rem;
    text-align: center;
}

.k-sd__count.is-tick {
    color: #fff;
}

@media (max-width: 720px) {
    .k-sd__switch {
        right: 72px;
        gap: 10px;
    }
    .k-sd__switch > button {
        width: 32px;
        height: 32px;
    }
}

.k-short__media.is-switching {
    animation: k-short-switch 0.18s ease;
}

@keyframes k-short-switch {
    0% { opacity: 0.35; }
    100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .k-short__media.is-switching { animation: none; }
}

.k-sd__tool.is-flash {
    animation: k-sd-flash 0.45s ease;
}

@keyframes k-sd-flash {
    0% { box-shadow: inset 0 0 0 1px rgb(var(--k-primary-rgb) / 55%); color: var(--k-primary, #16e09d); }
    100% { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
    .k-sd__tool.is-flash { animation: none; }
}


.k-ov__panel--side .k-epgrid {
    gap: 10px;
}

.k-ov__panel--side .k-ep {
    height: 36px;
    font-size: 13px;
}

.k-ep:hover:not(.is-current) {
    border-color: var(--k-interactive-border-hover);
    color: var(--k-text);
}

.k-src:hover:not(.is-current) {
    border-color: var(--k-interactive-border-hover);
}


/* ───────────────────────── 窄屏：手机竖屏 ───────────────────────── */
@media (max-width: 1023.98px) {
    /* 列表页：破出 #app-main 左右页边，竖屏 feed 满宽 */
    #app-main:has(> .k-short) {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 0;
    }

    .k-short {
        margin-left: 0;
        width: 100%;
    }

    .k-short__stage {
        width: 100%;
        height: 100dvh;
        aspect-ratio: auto;
    }

    /* 抬高信息/动作，避开底部胶囊 tabbar（约 62px + 8px） */
    .k-short__info {
        left: 16px;
        bottom: calc(136px + env(safe-area-inset-bottom, 0px));
        max-width: calc(100% - 48px);
        z-index: 3;
    }

    .k-short__title {
        font-size: 20px;
        text-shadow: 0 2px 10px rgb(0 0 0 / 65%);
    }

    .k-short__actions {
        right: 16px;
        bottom: calc(148px + env(safe-area-inset-bottom, 0px));
        z-index: 3;
    }

    .k-short__progress {
        left: 16px;
        right: 16px;
        bottom: calc(128px + env(safe-area-inset-bottom, 0px));
        width: auto;
        z-index: 3;
    }

    .k-short__progress::after {
        top: -12px;
        bottom: -12px;
    }

    .k-short__switch {
        left: auto;
        right: 10px;
        top: 46%;
        z-index: 4;
    }

    .k-short__fullscreen {
        top: 68%;
    }

    /* ── 播放页 H5 沉浸：满屏竖版（对照 mirror short-drama 手机）──
       废掉桌面「(100dvh-540)/2 顶留白 + 1088×540 横盒 + 2:3 片中黑边」：
       那套在窄屏会顶空、舞台变矮横条、底半空白，右侧浮标也像「没出来」。 */
    .k-sd {
        padding-top: 0;
        min-height: 100dvh;
        height: 100dvh;
    }

    .k-sd__inner {
        max-width: none;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .k-sd__frame {
        flex: 1 1 auto;
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: auto;
        margin-top: 0;
        background: #000;
    }

    .k-sd__media {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        object-fit: cover;
        object-position: center;
    }

    .k-sd__back {
        left: max(12px, env(safe-area-inset-left, 0px));
        top: max(12px, env(safe-area-inset-top, 0px));
    }

    /* 标题/热度叠在画面底部，给右侧浮标让出约 64px */
    .k-sd__meta {
        position: absolute;
        left: 16px;
        right: 72px;
        bottom: calc(28px + env(safe-area-inset-bottom, 0px));
        z-index: 2;
        margin: 0;
        pointer-events: none;
    }

    .k-sd__title {
        font-size: 22px;
        text-shadow: 0 2px 12px rgb(0 0 0 / 70%);
    }

    .k-sd__ep,
    .k-sd__heat {
        text-shadow: 0 1px 8px rgb(0 0 0 / 60%);
    }

    .k-sd__progress {
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 2;
        margin: 0;
        width: auto;
    }

    .k-sd__progress::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -14px;
        bottom: -10px;
    }

    .k-sd__tools {
        right: max(10px, env(safe-area-inset-right, 0px));
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        gap: 8px;
        z-index: 4;
    }

    .k-sd__tool {
        width: 48px;
        height: 48px;
        background: rgb(20 21 24 / 72%);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    .k-sd__tool:active {
        transform: scale(0.94);
        background: rgb(20 21 24 / 88%);
    }

    /* 已是满屏沉浸，隐藏桌面「全屏」钮，避免压住进度条 */
    .k-sd__fullscreen {
        display: none;
    }
}


/* ── 17:05 短剧打磨：H5 列表藏全屏、播放页底渐变、工具触感 ── */
@media (max-width: 1023.98px) {
    /* 列表已是满屏竖版；全屏钮与沉浸重复，藏掉（桌面仍显） */
    .k-short__fullscreen {
        display: none;
    }

    .k-short__switch > button {
        width: 40px;
        height: 40px;
        background: rgb(0 0 0 / 28%);
        color: rgb(255 255 255 / 82%);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }

    .k-short__switch > button:active {
        background: rgb(0 0 0 / 48%);
        color: #fff;
    }

    .k-short__count {
        font-size: 12px;
        font-weight: 600;
        color: rgb(255 255 255 / 88%);
        text-shadow: 0 1px 6px rgb(0 0 0 / 55%);
    }

    /* 播放页：画面底渐变，压住占位海报上的装饰字，让 meta 更干净 */
    .k-sd__frame::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 48%;
        background: linear-gradient(to top, rgb(0 0 0 / 78%) 0%, rgb(0 0 0 / 36%) 50%, transparent 100%);
        pointer-events: none;
        z-index: 1;
    }

    .k-sd__play {
        z-index: 2;
    }

    .k-sd__meta {
        pointer-events: auto;
    }

    .k-sd__title {
        font-size: 20px;
        line-height: 1.25;
    }

    .k-sd__tools {
        gap: 10px;
    }

    .k-sd__tool {
        width: 50px;
        height: 50px;
        border-radius: 14px;
        background: rgb(16 17 20 / 68%);
        box-shadow: 0 2px 10px rgb(0 0 0 / 28%);
    }

    .k-sd__tool > span {
        font-size: 10px;
        font-weight: 500;
    }

    /* 列表信息区加轻渐变底托，标题更易读 */
    .k-short__stage::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 38%;
        background: linear-gradient(to top, rgb(0 0 0 / 68%) 0%, rgb(0 0 0 / 22%) 60%, transparent 100%);
        pointer-events: none;
        z-index: 1;
    }

    .k-short__play,
    .k-short__info,
    .k-short__actions,
    .k-short__progress,
    .k-short__switch {
        z-index: 3;
    }
}

/* 桌面播放：工具 hover 抬升更明显 */
.k-sd__tool:hover {
    transform: translateY(-1px);
}

.k-sd__tool:active {
    transform: scale(0.96);
}

/* 列表切条时计数微闪 */
.k-short__count.is-tick {
    color: #fff;
}

/* 工具浮标内联 SVG 与 icon.twig 同尺寸 */
.k-sd__tool > svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

/* 打开态描边更贴 mirror 玻璃浮标 */
.k-sd__tool[aria-expanded="true"] {
    background: rgb(55 56 62 / 96%);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgb(var(--k-primary-rgb) / 42%);
}


/* ── 短剧真播放挂载（ArtPlayer）── */
.k-short__player,
.k-sd__player {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000;
}
.k-short__player[hidden],
.k-sd__player[hidden] { display: none !important; }
.k-short__player .art-video-player,
.k-sd__player .art-video-player {
    width: 100%;
    height: 100%;
}
.k-short__stage.is-live .k-short__media,
.k-sd__frame.is-live .k-sd__media {
    opacity: 0;
    pointer-events: none;
}
.k-short__stage.is-live .k-short__play,
.k-sd__frame.is-live .k-sd__play {
    opacity: 0;
    pointer-events: none;
}
.k-short__stage.is-live:hover .k-short__play,
.k-sd__frame.is-live:hover .k-sd__play,
.k-short__stage.is-paused .k-short__play,
.k-sd__frame.is-paused .k-sd__play {
    opacity: 1;
    pointer-events: auto;
}


/* ===========================================================================
 * 真视频沉浸 + scroll-snap 竖滑（对照 mirror short-drama-detail-snap-pager）
 * 不用 ArtPlayer；原生 video.short-drama-video + hls.js
 * ========================================================================= */
.k-short__pager,
.k-sd__pager {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.k-short__pager::-webkit-scrollbar,
.k-sd__pager::-webkit-scrollbar {
    display: none;
}

.k-short__slide,
.k-sd__slide {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    display: flex;
    justify-content: center;
    contain: layout paint;
}

/* 列表页：每条 slide 内舞台仍按 16:25 居中；H5 满宽 */
.k-short__slide .k-short__stage {
    height: 100dvh;
    aspect-ratio: 16 / 25;
    max-width: 100%;
}
.k-short__slide .k-short__bg {
    position: absolute;
    inset: -60px;
    z-index: 0;
    background-position: center;
    background-size: cover;
    filter: blur(40px) saturate(1.05);
    opacity: 0.45;
    pointer-events: none;
}

.k-short__video,
.k-sd__video,
video.short-drama-video {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    opacity: 0;
    pointer-events: none;
}
.k-short__stage.is-live .k-short__video,
.k-sd__frame.is-live .k-sd__video,
.k-short__stage.is-live video.short-drama-video,
.k-sd__frame.is-live video.short-drama-video {
    opacity: 1;
    pointer-events: auto;
}
.k-short__stage.is-live .k-short__media,
.k-sd__frame.is-live .k-sd__media {
    opacity: 0;
    pointer-events: none;
}

/* show 页：slide 内 inner 满高；桌面横盒逻辑在 ≤1023 被沉浸覆盖 */
.k-sd .k-sd__pager {
    position: absolute;
    inset: 0;
}
.k-sd__slide .k-sd__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.k-sd__slide .k-sd__bg {
    position: absolute;
    inset: -40px;
    z-index: 0;
    background-position: center;
    background-size: cover;
    filter: blur(36px);
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 1023.98px) {
    .k-short {
        margin-left: 0;
        width: 100%;
    }
    .k-short__slide .k-short__stage {
        width: 100%;
        aspect-ratio: auto;
        height: 100dvh;
    }
    .k-short__video,
    .k-sd__video,
    video.short-drama-video {
        object-fit: cover;
    }
    .k-sd__slide .k-sd__frame {
        width: 100%;
        height: 100%;
        max-height: none;
        flex: 1;
    }
    .k-sd__slide .k-sd__inner {
        padding: 0;
        justify-content: stretch;
    }
    .k-sd__slide .k-sd__meta {
        position: absolute;
        left: 16px;
        right: 72px;
        bottom: 72px;
        z-index: 3;
    }
    .k-sd__slide .k-sd__progress {
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: 48px;
        z-index: 3;
    }
    .k-short__switch,
    .k-sd__switch {
        /* H5 竖滑为主，按钮弱化为边缘提示 */
        opacity: 0.35;
        pointer-events: auto;
    }
}

/* 旧 ArtPlayer 挂载点样式保留无害；真播用 video */
.k-short__player,
.k-sd__player { display: none !important; }
