/* ===========================================================================
 * kanju 主题 · 片单 / 追剧日历 / 午夜剧场 页面级样式
 * 规格来自 kanju41-mirror/screenshots/{my-playlists,playlist-explore,playlist-detail,
 * playlist-share-code,updates,midnight-theater,midnight-content,midnight-unlocked}.png
 * ========================================================================= */

/* ── 通用小件 ── */
.k-btn--sm {
    min-height: 2rem;
    padding: 0 0.75rem;
    font-size: var(--k-fs-md);
}

.k-btn--inline {
    width: auto;
    min-width: 0;
    padding: 0 1.5rem;
}

.k-inline-link {
    margin-left: 0.5rem;
    color: var(--k-primary);
}

.k-note {
    margin: 0.5rem 0 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--k-radius);
    border: 1px solid var(--k-border);
    background: rgb(var(--k-primary-rgb) / 6%);
    color: var(--k-text-muted);
    font-size: var(--k-fs-md);
}

/* 下划线 tab 组（片单页 / 午夜剧场） */
.k-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--k-border-soft);
    margin-bottom: 0.75rem;
}

.k-tabs--sub {
    margin-top: 1rem;
}

.k-tabs__group {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.k-tabs__group > a,
.k-tabs__group > button {
    appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    position: relative;
    padding: 0.5rem 0;
    font-size: var(--k-fs-base);
    color: var(--k-text-subtle);
}

.k-tabs__group > a.is-active,
.k-tabs__group > button.is-active {
    color: var(--k-primary);
    font-weight: 600;
}

.k-tabs__group > a.is-active::after,
.k-tabs__group > button.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--k-primary);
    border-radius: 2px;
}

/* ── 我的片单：整行条目 ── */
.k-plrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--k-radius);
    border: 1px solid var(--k-interactive-border);
    background: var(--k-card);
    margin-bottom: 0.5rem;
}

.k-plrow__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: rgb(var(--k-primary-rgb) / 12%);
    color: var(--k-primary);
}

.k-plrow__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.k-plrow__text strong {
    font-size: var(--k-fs-base);
    font-weight: 600;
    color: var(--k-text);
}

.k-plrow__text span {
    font-size: var(--k-fs-sm);
    color: var(--k-text-subtle);
}

.k-plrow__badge {
    margin-left: 0.375rem;
    padding: 0.0625rem 0.375rem;
    border-radius: 0.25rem;
    background: rgb(var(--k-primary-rgb) / 14%);
    color: var(--k-primary);
    font-size: var(--k-fs-xs);
    font-style: normal;
}

.k-plrow__arrow { color: var(--k-text-subtle); }

/* ── 片单广场 / 分享码：卡片网格 ── */
.k-pltoolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.k-pltoolbar__form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.k-pltoolbar__input {
    height: 2rem;
    width: 12rem;
    max-width: 50vw;
    border-radius: 0.375rem;
    border: 1px solid var(--k-interactive-border);
    background: var(--k-tint);
    color: var(--k-text);
    font-family: inherit;
    font-size: var(--k-fs-md);
    padding: 0 0.625rem;
}

.k-plgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(10rem, 100%), 1fr));
    gap: 1rem;
}

.k-plcard {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.k-plcard__cover {
    aspect-ratio: var(--k-cover-ratio); /* 默认跟 --k-cover-ratio；分类可覆盖 */
    border-radius: 0.625rem;
    overflow: hidden;
    background: var(--k-card-inner);
}

.k-plcard__cover img { width: 100%; height: 100%; object-fit: contain; }

.k-plcard__title {
    font-size: var(--k-fs-base);
    font-weight: 500;
    color: var(--k-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.k-plcard__meta {
    margin: 0;
    font-size: var(--k-fs-sm);
    color: var(--k-text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── 片单详情头 ── */
.k-pldetail__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.k-pldetail__head .k-page__title { margin: 0.375rem 0 0.25rem; }

.k-pldetail__actions { display: flex; gap: 0.5rem; }

/* ── 午夜剧场：三态门 ── */
.k-gate {
    min-height: calc(100dvh - 3rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.5rem 1.25rem;
    text-align: center;
}

.k-gate--login {
    gap: 0.5rem;
    max-width: 28rem;
    margin: 0 auto;
}

.k-gate--age {
    gap: 0;
    max-width: 28rem;
    margin: 0 auto;
}

.k-gate__kicker {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: var(--k-primary);
}

.k-gate__title {
    margin: 0.75rem 0 0;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--k-text);
    line-height: 1.2;
}

.k-gate__title--sm {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0;
}

.k-gate__desc {
    margin: 1.25rem 0 0;
    max-width: 32rem;
    font-size: 0.875rem;
    line-height: 1.75;
    color: var(--k-text-muted);
}

.k-gate--login .k-gate__desc {
    margin-top: 0.5rem;
}

.k-gate__login-btn {
    margin-top: 1.5rem;
    height: 2.5rem;
    padding: 0 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.k-gate__enter {
    margin-top: 2.25rem;
    height: 3rem;
    width: 100%;
    max-width: 20rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 900;
    box-shadow: 0 10px 28px rgb(var(--k-primary-rgb) / 32%);
}

.k-gate__exit {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--k-text-muted);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.k-gate__exit:hover { color: var(--k-text); }

/* immersive 顶栏返回（对照 mirror midnight-theater-top-chrome） */
.k-midnight-shell {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 18% 0%, rgb(var(--k-primary-rgb) / 14%), transparent 32%),
        linear-gradient(180deg, var(--k-surface), var(--k-bg) 48%, var(--k-bg));
}
.k-midnight__chrome {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 5rem minmax(0, 15rem) 5rem;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0.65rem 0.75rem 0.35rem;
    background: linear-gradient(to bottom, rgb(0 0 0 / 55%), transparent);
}
@media (max-width: 480px) {
    .k-midnight__chrome {
        grid-template-columns: 5rem minmax(0, 12rem) 5rem;
        gap: 0.4rem;
    }
}
.k-midnight-shell:not(.is-app) .k-midnight__chrome {
    display: flex;
    justify-content: flex-start;
}
.k-midnight__back {
    grid-column: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--k-border-soft);
    background: rgb(0 0 0 / 35%);
    color: var(--k-text);
}
.k-midnight__back:hover {
    background: rgb(0 0 0 / 55%);
}
.k-midnight__chrome-spacer { width: 2.25rem; height: 1px; }
.k-midnight-shell > .k-gate {
    flex: 1;
    min-height: 0;
}

/* ── 午夜剧场：生成器（对照 midnight-unlocked）── */
.k-midnight {
    width: 100%;
    max-width: 42rem; /* ~672 */
    margin: 0 auto;
    padding: 0.75rem 0.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: max(0.75rem, min(2vh, 1.5rem)); /* 对照源站 midnight-generation-with-ads */
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
}
.k-midnight::-webkit-scrollbar { display: none; }

.k-midnight__tabs {
    grid-column: 2;
    justify-self: center;
    width: 15rem;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    gap: 0;
    padding: 0.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.52);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    backdrop-filter: blur(14px) saturate(1.15);
}
.k-midnight__tabs > button,
.k-midnight__tabs > a {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
    min-height: 2.35rem;
    min-width: 0;
    padding: 0;
    line-height: 1;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.64);
    font-family: inherit;
    transition: color 0.16s, background-color 0.16s;
}
.k-midnight__tabs > button:hover,
.k-midnight__tabs > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.k-midnight__tabs > .is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
@media (max-width: 480px) {
    .k-midnight__tabs { width: 12rem; }
}

/* showcase 广告方格 */
.k-midnight-showcase { width: 100%; margin-top: 0.7rem; }
.k-midnight-showcase__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.35rem;
}
.k-midnight-showcase__head strong {
    font-size: 0.8125rem;
    font-weight: 900;
    color: var(--k-text);
}
.k-midnight-showcase__badge {
    border-radius: 999px;
    border: 1px solid var(--k-border-soft);
    padding: 0.1rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--k-text-muted);
}
.k-midnight-showcase__grid {
    margin-top: 0.4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(3rem, 4.5rem));
    justify-content: center;
    gap: 0.35rem 0.4rem;
    padding: 0 0.25rem;
}
.k-midnight-showcase__card {
    min-width: 0;
    display: block;
    border-radius: 0.375rem;
    color: inherit;
    text-decoration: none;
}
.k-midnight-showcase__thumb {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.375rem;
    border: 1px solid var(--k-border-soft);
    background: var(--k-surface);
    box-shadow: 0 8px 20px rgb(0 0 0 / 22%);
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.k-midnight-showcase__thumb > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .22s;
}
.k-midnight-showcase__card:hover .k-midnight-showcase__thumb {
    border-color: var(--k-primary);
    box-shadow: 0 10px 24px rgb(var(--k-primary-rgb) / 28%);
    transform: translateY(-2px);
}
.k-midnight-showcase__card:hover .k-midnight-showcase__thumb > img {
    transform: scale(1.035);
}
.k-midnight-showcase__label {
    display: block;
    margin-top: 0.25rem;
    text-align: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--k-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 640px) {
    .k-midnight-showcase__label { font-size: 0.75rem; }
    .k-midnight-showcase__grid { gap: 0.4rem 0.5rem; padding: 0 0.5rem; }
}

/* 账户成长卡 */
.k-midnight__acct {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 1rem; /* 源站 level-card mt-4 */
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--k-interactive-border);
    background:
        linear-gradient(135deg, rgb(var(--k-primary-rgb) / 8%), transparent 42%),
        var(--k-card);
}
.k-midnight__acct-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.k-midnight__acct-icon {
    flex: none;
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background: rgb(var(--k-primary-rgb) / 16%);
    color: var(--k-primary);
}
.k-midnight__acct-name {
    flex: none;
    font-size: 0.875rem;
    font-weight: 900;
    color: var(--k-text);
}
.k-midnight__acct-bar {
    flex: 1;
    min-width: 2.5rem;
    height: 0.375rem;
    border-radius: 999px;
    background: var(--k-surface);
    overflow: hidden;
}
.k-midnight__acct-bar > i,
.k-midnight__acct-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--k-primary), #7dffd0, var(--k-primary));
}
.k-midnight__acct-pct {
    flex: none;
    font-size: 0.6875rem;
    font-weight: 900;
    color: var(--k-primary);
}
.k-midnight__acct-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--k-text-subtle);
}
.k-midnight__acct-stats b { color: var(--k-primary); font-weight: 700; }
.k-midnight__acct-sep {
    width: 1px;
    height: 0.85rem;
    background: var(--k-interactive-border);
}
.k-midnight__invite {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.55rem;
    border-radius: 0.375rem;
    border: 1px solid rgb(var(--k-primary-rgb) / 34%);
    background: rgb(var(--k-primary-rgb) / 10%);
    color: var(--k-primary);
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.k-midnight__mine-btn {
    width: 100%;
    min-height: 2.75rem;
    margin-top: 0.75rem; /* 源站 my-3 */
    margin-bottom: 0; /* 与生成卡 mt-3 组合，flex 下避免叠成 1.5rem */
    border-radius: 0.75rem;
    font-weight: 600;
    justify-content: center;
}

.k-midnight__card {
    margin-top: 0.75rem; /* 源站 composer mt-3 */
    border-radius: 1rem;
    border: 1px solid var(--k-interactive-border);
    background: var(--k-card);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 12px 36px rgb(0 0 0 / 28%);
}
@media (min-width: 768px) {
    .k-midnight__card { padding: 0.75rem; }
}

.k-midnight__modes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 0.75rem;
    background: var(--k-surface);
}
.k-midnight__modes > button,
.k-midnight__modes > a {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    min-height: 2.25rem;
    min-width: 0;
    padding: 0.5rem 0.15rem;
    text-align: center;
    border-radius: 0.5rem;
    color: var(--k-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: inherit;
}
.k-midnight__modes > .is-active {
    background: rgb(var(--k-primary-rgb) / 12%);
    color: var(--k-primary);
    box-shadow: inset 0 0 0 1px rgb(var(--k-primary-rgb) / 35%);
}

.k-midnight__input {
    width: 100%;
    min-height: 9rem;
    resize: none;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--k-text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.75rem;
    padding: 0.75rem;
    outline: none;
}
.k-midnight__input::placeholder { color: var(--k-text-subtle); }

.k-midnight__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem 0.15rem;
    border-top: 1px solid var(--k-border);
    font-size: 0.75rem;
    color: var(--k-text-subtle);
}
.k-midnight__foot .k-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.k-midnight__quick {
    margin-top: 1rem; /* 源站 midnight-preset-actions mt-4 */
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 640px) {
    .k-midnight__quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.k-midnight__preset {
    appearance: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-height: 3rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--k-interactive-border);
    background: linear-gradient(145deg, var(--k-card), rgb(var(--k-primary-rgb) / 12%));
    color: var(--k-text);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .18s, background-color .18s, transform .18s;
}
.k-midnight__preset:hover {
    transform: translateY(-1px);
    border-color: var(--k-primary);
}
.k-midnight__preset-cost {
    flex: none;
    color: var(--k-primary);
    font-size: 0.75rem;
    font-weight: 900;
}

.k-midnight__discover {
    margin-top: 1.5rem; /* 源站 mb-6 mt-6 … border-t pt-5 */
    margin-bottom: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--k-border);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 640px) {
    .k-midnight__discover {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem; /* 源站 sm:gap-4 */
        margin-bottom: 2rem; /* 源站 sm:mb-8 */
    }
}
.k-midnight__disc {
    appearance: none;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-height: 6rem;
    padding: 0.85rem 1rem;
    text-align: left;
    border-radius: 1rem;
    border: 1px solid var(--k-interactive-border);
    background: var(--k-card);
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: transform .18s, border-color .18s, background .18s;
}
.k-midnight__disc:hover {
    transform: translateY(-2px);
    border-color: rgb(var(--k-primary-rgb) / 40%);
    background: var(--k-surface);
}
.k-midnight__disc-ico {
    flex: none;
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid var(--k-border-soft);
    background: var(--k-surface);
    color: var(--k-primary);
}
.k-midnight__disc-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.k-midnight__disc-body strong {
    font-size: 0.9375rem;
    font-weight: 900;
    color: var(--k-text);
}
.k-midnight__disc-body span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.6875rem;
    color: var(--k-text-subtle);
}
.k-midnight__disc-body em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-midnight__disc-body b { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.k-midnight__disc-chev {
    flex: none;
    margin-top: 0.15rem;
    color: var(--k-text-subtle);
}
.k-midnight__disc:hover .k-midnight__disc-chev {
    color: var(--k-text);
    transform: translateX(2px);
}

.k-midnight__panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}
.k-midnight__panel[hidden] { display: none !important; }

/* ── AI 推荐独立页：生成环 → 同页沉浸播控 ── */
.k-midnight-shell.is-gen,
.k-midnight-shell.is-playing {
    background: #000;
}
.k-midnight-shell.is-gen .k-midnight__chrome,
.k-midnight-shell.is-playing .k-midnight__chrome {
    display: none !important;
}
.k-midnight-shell.is-gen .k-midnight,
.k-midnight-shell.is-playing .k-midnight {
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    min-height: 100dvh;
}
.k-midnight-shell.is-gen [data-k-mid-panel],
.k-midnight-shell.is-playing [data-k-mid-panel] {
    display: none !important;
}
.k-midnight-ai {
    display: none;
    flex-direction: column;
    width: 100%;
    min-height: 100dvh;
    background: #050607;
    color: #fff;
}
.k-midnight-shell.is-gen .k-midnight-ai,
.k-midnight-shell.is-playing .k-midnight-ai,
.k-midnight-ai:not([hidden]) {
    display: flex;
}
.k-midnight-ai[hidden] { display: none !important; }
.k-midnight-ai .k-midnight__gen,
.k-midnight-ai .k-midnight-player {
    flex: 1;
    min-height: 100dvh;
    width: 100%;
}

.k-midnight__gen {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-items: center;
    gap: max(0.5rem, min(2vh, 1.5rem));
    min-height: 100dvh;
    padding: 0.75rem;
    border-radius: 0;
    border: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 46%, rgb(var(--k-primary-rgb) / 22%), transparent 42%),
        linear-gradient(165deg, #010304 0%, #11191d 48%, #010304 100%);
    color: #fff;
}
.k-midnight__gen::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 24%, rgba(1, 3, 4, 0.66) 78%);
}
.k-midnight__gen[hidden] { display: none !important; }
.k-midnight__gen-ads {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 4.5rem));
    justify-content: center;
    gap: 0.45rem;
    width: min(100%, 52rem);
    padding: 0.5rem;
    border-radius: 0.85rem;
    background: rgba(1, 3, 4, 0.84);
}
.k-midnight__gen-ads a,
.k-midnight__gen-ads span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: rgb(255 255 255 / 78%);
    font-size: 0.65rem;
}
.k-midnight__gen-ads img,
.k-midnight__gen-ads i {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.65rem;
    object-fit: cover;
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgb(255 255 255 / 10%);
}
.k-midnight__gen-hero {
    position: relative;
    z-index: 3;
    display: block;
    width: min(100%, 760px);
    height: 100%;
    min-height: 22rem;
    text-align: center;
}
.k-midnight__gen-ring {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.k-midnight__gen-ring > span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: max(76px, min(23vw, 112px));
    height: max(114px, min(34.5vw, 168px));
    aspect-ratio: 2 / 3;
    border-radius: 0.85rem;
    border: 1px solid rgb(var(--k-primary-rgb) / 36%);
    background: #11191d center / cover no-repeat;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), 0 0 26px rgb(var(--k-primary-rgb) / 8%);
    transform-origin: 50% 50%;
    animation: k-mid-cover-orbit 5.8s ease-in-out var(--midnight-cover-delay, 0s) infinite;
    overflow: hidden;
}
.k-midnight__gen-ring > span.is-pending {
    background-image: linear-gradient(130deg, rgb(var(--k-primary-rgb) / 5%), rgba(255, 255, 255, 0.1), rgb(var(--k-primary-rgb) / 3%));
}
.k-midnight__gen-copy {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    width: min(82vw, 430px);
    transform: translate(-50%, -50%);
    text-align: center;
}
.k-midnight__gen-spin {
    width: 1.8rem;
    height: 1.8rem;
    margin: 0 auto 0.65rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--k-primary);
    box-shadow: 0 0 24px rgb(var(--k-primary-rgb) / 20%);
    animation: k-mid-spin 0.9s linear infinite;
}
.k-midnight__gen-kicker {
    margin: 0.9rem 0 0;
    font-size: 0.76rem;
    font-weight: 700;
    color: rgb(var(--k-primary-rgb) / 76%);
}
.k-midnight__gen-title {
    margin: 0.75rem 0 0;
    font-size: max(1.4rem, min(6vw, 2.35rem));
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.75);
}
.k-midnight__gen-cancel {
    appearance: none;
    margin-top: 1.25rem;
    min-height: 2.75rem;
    border-radius: 999px;
    border: 1px solid var(--k-border);
    padding: 0 1.25rem;
    background: rgb(17 25 29 / 82%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
}
.k-midnight__gen-cancel[hidden] { display: none !important; }
.k-midnight__gen-cancel:hover { background: rgb(255 255 255 / 9%); }
@keyframes k-mid-cover-orbit {
    0%, 100% {
        opacity: 0.78;
        transform: translate3d(calc(-50% + var(--midnight-cover-x)), calc(-50% + var(--midnight-cover-y)), 0) rotate(var(--midnight-cover-rotate)) scale(var(--midnight-cover-scale));
    }
    50% {
        opacity: 1;
        transform: translate3d(calc(-50% + var(--midnight-cover-x) + var(--midnight-cover-drift-x)), calc(-50% + var(--midnight-cover-y) + var(--midnight-cover-drift-y)), 0) rotate(var(--midnight-cover-rotate)) scale(calc(var(--midnight-cover-scale) + 0.06));
    }
}
@media (max-width: 420px) {
    .k-midnight__gen-ring { transform: scale(0.88); }
    .k-midnight__gen-copy { width: 62vw; transform: translate(-50%, -58%); }
}
@media (prefers-reduced-motion: reduce) {
    .k-midnight__gen-ring > span,
    .k-midnight__gen-spin { animation-duration: 1ms; animation-iteration-count: 1; }
}

/* 沉浸播控 —— 整页横屏电影感（非动态竖屏 / 非 9:16 stage） */
.k-midnight-player {
    position: relative;
    display: block;
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    background: #000;
    color: #fff;
}
.k-midnight-player[hidden] { display: none !important; }
.k-midnight-player__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    overflow: hidden;
    background: #000;
}
.k-midnight-player__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #000;
    user-select: none;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.2s ease;
}
.k-midnight-player__poster.is-dim {
    opacity: 0;
}
.k-midnight-player__apt {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000;
}
.k-midnight-player__apt[hidden] {
    display: none !important;
}
.k-midnight-player__mount {
    width: 100%;
    height: 100%;
}
.k-midnight-player__mount .art-video-player {
    width: 100% !important;
    height: 100% !important;
}
/* 午夜片单自有居中暂停钮 + 底栏，勿叠 ArtPlayer 自带 state / 控制条 */
.k-midnight-player__mount .art-state,
.k-midnight-player__mount .art-controls,
.k-midnight-player__mount .art-progress,
.k-midnight-player__mount .art-bottom {
    display: none !important;
}
.k-midnight-player__hit {
    position: absolute;
    top: 12%;
    bottom: 32%;
    width: 28%;
    z-index: 2;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.k-midnight-player__hit--prev { left: 0; }
.k-midnight-player__hit--next { right: 0; }
.k-midnight-player__top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: 2.75rem 1fr 2.75rem;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem 2rem;
    background: linear-gradient(to bottom, rgb(0 0 0 / 72%), transparent);
}
.k-midnight-player__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgb(0 0 0 / 65%);
}
.k-midnight-player__iconbtn {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: rgb(0 0 0 / 35%);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.k-midnight-player__pause {
    position: absolute;
    left: 50%;
    top: 58%;
    z-index: 3;
    width: 4rem;
    height: 4rem;
    margin: -2rem 0 0 -2rem;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 22%);
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.k-midnight-player.is-paused .k-midnight-player__pause {
    opacity: 1;
    pointer-events: auto;
}
.k-midnight-player__bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 2.5rem clamp(0.75rem, 3vw, 1.75rem) 1rem;
    background: linear-gradient(to top, rgb(0 0 0 / 88%) 35%, transparent);
}
.k-midnight-player__plbtn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    background: rgb(0 0 0 / 50%);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}
.k-midnight-player__bar { width: 100%; cursor: pointer; }
.k-midnight-player__bar-track {
    position: relative;
    height: 3px;
    border-radius: 999px;
    background: rgb(255 255 255 / 28%);
    overflow: hidden;
}
.k-midnight-player__bar-track > i {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: #fff;
}
.k-midnight-player__bar-segs { display: none; }
.k-midnight-player__times {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: rgb(255 255 255 / 82%);
}
.k-midnight-player__tools {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.15rem;
    max-width: 42rem;
    width: 100%;
    margin: 0.15rem auto 0;
}
.k-midnight-player__tools > button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 0.6875rem;
    cursor: pointer;
    padding: 0.35rem 0.15rem;
    min-height: 3.25rem;
}
.k-midnight-player__tools > button svg { opacity: 0.95; }
.k-midnight-player__tools-play {
    font-weight: 700;
}
.k-midnight-player__tools-play svg {
    width: 1.35rem;
    height: 1.35rem;
}
@media (min-width: 900px) {
    .k-midnight-player__tools {
        max-width: 36rem;
    }
    .k-midnight-player__bottom {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.k-midnight__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.5rem 1rem;
    text-align: center;
}
.k-midnight__empty-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--k-text);
}
.k-midnight__empty-desc {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--k-text-muted);
}
.k-midnight-ml__desc {
    margin: 0;
    padding: 0 1.1rem 0.6rem;
    font-size: 0.8125rem;
    color: var(--k-text-muted);
}
.k-midnight-ml__body {
    padding-top: 0.25rem;
    flex: 1;
}
.k-midnight-ml__empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 16rem;
    margin: 0.5rem 0 1rem;
    padding: 2rem 1.25rem;
    text-align: center;
}
.k-midnight-ml__empty[hidden] { display: none !important; }
.k-midnight-ml__empty-mark {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    color: var(--k-primary);
    background: rgb(var(--k-primary-rgb) / 12%);
    border: 1px solid rgb(var(--k-primary-rgb) / 28%);
}
.k-midnight-ml__empty p {
    margin: 0;
    max-width: 14rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--k-text-muted);
}
.k-midnight-ml__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.k-midnight-ml__card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
    padding: 0.55rem;
    border-radius: 0.9rem;
    border: 1px solid var(--k-border);
    background: var(--k-bg-elevated, var(--k-surface));
    color: inherit;
    text-decoration: none;
}
.k-midnight-ml__card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 0.65rem;
    background: var(--k-surface);
}
.k-midnight-ml__card strong {
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--k-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.k-midnight-ml__card span {
    font-size: 0.75rem;
    color: var(--k-text-muted);
}
.k-midnight-ml__card .k-btn {
    width: 100%;
    justify-content: center;
}
.k-midnight-ml__more {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--k-text-subtle);
}

.k-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── 动态：沉浸短视频（类抖音）── */
.k-midnight__feed-sort {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    box-sizing: border-box;
    height: 2.75rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.34);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8125rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    backdrop-filter: blur(14px) saturate(1.15);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    transition: background-color 0.16s, border-color 0.16s, transform 0.16s;
}
.k-midnight__feed-sort:hover { background: rgba(0, 0, 0, 0.56); border-color: rgba(255, 255, 255, 0.32); }
.k-midnight__feed-sort:active { transform: scale(0.97); }
.k-midnight__feed-sort[hidden] { display: none !important; }
.k-midnight-shell.is-feed {
    background: #000;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}
.k-midnight-shell.is-app {
    height: 100dvh;
}
.k-midnight-shell.is-feed .k-midnight {
    max-width: none;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}
.k-midnight-shell.is-feed .k-midnight__chrome {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(to bottom, rgb(0 0 0 / 55%), transparent);
    pointer-events: none;
}
.k-midnight-shell.is-feed .k-midnight__chrome > * {
    pointer-events: auto;
}
.k-midnight__panel--feed {
    position: relative;
    flex: 1;
    min-height: 0;
    height: 100%;
    padding: 0;
    margin: 0;
}
.k-midnight-feed {
    position: absolute;
    inset: 0;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #050505;
    color: #fff;
    overflow: hidden;
}
.k-midnight-feed__ambient {
    position: absolute;
    inset: -10%;
    z-index: 0;
    background-position: 50%;
    background-size: cover;
    filter: blur(76px) saturate(0.9) brightness(0.46);
    opacity: 0.42;
    transform: scale(1.18);
    pointer-events: none;
}
/* 对照 kanju41 .community-post-feed-viewport：整屏高，最宽 576px，水平居中 */
.k-midnight-feed__stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    background: rgb(0 0 0 / 76%);
    overflow: hidden;
}
@media (min-width: 768px) and (orientation: portrait), (min-width: 1024px) {
    .k-midnight-feed__stage {
        left: 50%;
        right: auto;
        width: min(36rem, 100%);
        max-width: min(36rem, 100%);
        height: 100%;
        transform: translateX(-50%);
        box-shadow: 0 24px 58px rgba(0, 0, 0, 0.36);
    }
}

/* 对照 .community-feed-position-controls：默认隐藏，桌面在栏外右侧垂直居中 */
.k-midnight-feed__switch {
    display: none;
    position: absolute;
    z-index: 36;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgb(255 255 255 / 72%);
    font-size: 0.7rem;
    font-weight: 700;
    pointer-events: auto;
    top: 50%;
    right: max(1rem, calc(50% - 20rem));
    left: auto;
    bottom: auto;
    transform: translateY(-50%);
}
@media (min-width: 768px) and (orientation: portrait), (min-width: 1024px) {
    .k-midnight-feed__switch { display: flex; }
}
.k-midnight-feed__switch > button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 1px solid rgb(255 255 255 / 16%);
    background: rgb(0 0 0 / 42%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
}
.k-midnight-feed__switch > button:disabled {
    opacity: 0.28;
    cursor: default;
}
.k-midnight-feed__switch > span {
    font-size: 0.7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: rgb(255 255 255 / 72%);
}
.k-midnight-feed__pager {
    position: absolute;
    inset: 0;
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: auto;
    scroll-padding: 0;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.k-midnight-feed__pager::-webkit-scrollbar { display: none; }
.k-midnight-feed__slide {
    position: relative;
    width: 100%;
    height: var(--k-mid-snap-h, 100%);
    min-height: var(--k-mid-snap-h, 100%);
    flex: 0 0 var(--k-mid-snap-h, 100%);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    background: #121212;
    contain: layout paint;
}
.k-midnight-feed__slide::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to top, rgb(0 0 0 / 72%) 0%, rgb(0 0 0 / 28%) 45%, transparent 100%);
}
.k-midnight-feed__media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}
.k-midnight-feed__backdrop {
    position: absolute;
    inset: -7%;
    z-index: 0;
    background-position: 50%;
    background-size: cover;
    filter: blur(30px) brightness(0.52) saturate(0.88);
    opacity: 0.86;
    transform: scale(1.12);
    pointer-events: none;
}
.k-midnight-feed__media > img,
.k-midnight-feed__media > video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
}
.k-midnight-feed__media > img {
    position: absolute;
    inset: 0;
    z-index: 2;
    transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.k-midnight-feed__media > video[data-orientation="landscape"] {
    object-fit: contain;
}
@media (min-width: 1024px) {
    .k-midnight-feed__media > img,
    .k-midnight-feed__media > video {
        object-fit: contain;
    }
}
.k-midnight-feed__media > video {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
}
.k-midnight-feed__media.is-live > img {
    opacity: 0;
    pointer-events: none;
}
/* short.css 把 video.short-drama-video 默认 opacity:0，只在短剧舞台 is-live 时揭开。
   动态页的舞台是 .k-midnight-feed__media，不命中那条规则，画面会一直藏在海报下面。 */
.k-midnight-feed__media.is-live > video.short-drama-video {
    opacity: 1;
}
.k-midnight-feed__play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.46);
    color: #fff;
    transform: translate(-50%, -50%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.36);
    cursor: pointer;
}
.k-midnight-feed__play svg {
    display: block;
    width: 1.45rem;
    height: 1.45rem;
    transform: translateX(0.08rem);
}
.k-midnight-feed__video::-webkit-media-controls-start-playback-button,
.k-midnight-feed__video::-webkit-media-controls-overlay-play-button {
    display: none !important;
    -webkit-appearance: none;
}
.k-midnight-feed__media[data-k-playing="1"] .k-midnight-feed__play {
    opacity: 0;
    pointer-events: none;
}
.k-midnight-feed__spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2.25rem;
    height: 2.25rem;
    margin: -1.125rem 0 0 -1.125rem;
    border-radius: 999px;
    border: 2px solid rgb(255 255 255 / 25%);
    border-top-color: #fff;
    animation: k-mid-spin 0.8s linear infinite;
    z-index: 2;
    pointer-events: none;
}
.k-midnight-feed__spinner[hidden] { display: none !important; }
@keyframes k-mid-spin { to { transform: rotate(360deg); } }

.k-midnight-feed__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.43rem;
    z-index: 32;
    height: 1rem;
    padding: 0 0.9rem;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.k-midnight-feed__progress-track {
    position: relative;
    display: block;
    width: 100%;
    height: 0.24rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
}
.k-midnight-feed__progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--k-primary);
    box-shadow: 0 0 12px rgb(var(--k-primary-rgb) / 58%);
}
.k-midnight-feed__content {
    position: absolute;
    left: 50%;
    bottom: calc(0.35rem + 1.2rem);
    z-index: 20;
    width: min(100%, 32rem);
    padding: 0 5.5rem 0 1.1rem;
    transform: translateX(-50%);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}
.k-midnight-feed__author {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
}
.k-midnight-feed__rail {
    position: absolute;
    right: -4.4rem;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    pointer-events: auto;
}
.k-midnight-feed__act {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 3.25rem;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.82);
}
.k-midnight-feed__act-ico {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}
.k-midnight-feed__act.is-on {
    color: #fb7185;
}
.k-midnight-feed__act.is-on .k-midnight-feed__act-ico svg {
    fill: currentColor;
    stroke: currentColor;
}
.k-midnight-feed__act.is-muted .k-midnight-feed__act-ico {
    opacity: 0.85;
}
.k-midnight-feed__act > b,
.k-midnight-feed__act > span {
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.15;
    max-width: 3.25rem;
    text-align: center;
}
.k-midnight-feed__av {
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: #333;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}
.k-midnight-feed__who {
    min-width: 0;
    flex: 1;
}
.k-midnight-feed__who strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 900;
}
@media (min-width: 640px) {
    .k-midnight-feed__who strong { font-size: 1rem; }
}
.k-midnight-feed__who time {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
}
.k-midnight-feed__cap {
    margin: 0.45rem 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 上下翻：贴内容柱右上内侧（与互动栏同柱） */

.k-midnight-feed__empty {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.5rem;
    text-align: center;
    background: #0b0c0e;
    color: #fff;
}
.k-midnight-feed__empty[hidden] { display: none !important; }

.k-mfc__item {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.55rem 0.65rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--k-border-soft);
}
.k-mfc__item:last-child { border-bottom: 0; }
.k-mfc__av {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--k-primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
}
.k-mfc__body strong {
    display: block;
    font-size: 0.8125rem;
    color: var(--k-text);
}
.k-mfc__body time {
    font-size: 0.7rem;
    color: var(--k-text-subtle);
}
.k-mfc__body p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--k-text);
}

/* ── 伦理：对照源站 MidnightEthicsCatalog-wcsEjSnb.css ── */
.k-midnight-shell.is-ethics .k-midnight {
    max-width: none;
    margin: 0;
    padding: 0 0 1rem;
    gap: 0;
}
.k-midnight__panel--ethics {
    gap: 0;
    min-height: 0;
}
.k-midnight-eth__filters {
    flex: none;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--k-border-soft);
}
.k-midnight-eth__search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.k-midnight-eth__search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--k-border);
    border-radius: 0.5rem;
    background: var(--k-surface);
    color: var(--k-text-muted);
}
.k-midnight-eth__search-box:focus-within { border-color: var(--k-primary); }
.k-midnight-eth__search-ico {
    flex: none;
    display: grid;
    place-items: center;
}
.k-midnight-eth__search-box input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--k-text);
    font-size: 1rem;
}
.k-midnight-eth__search-box input::placeholder { color: var(--k-text-subtle); }
.k-midnight-eth__submit {
    width: auto;
    flex: none;
    min-height: 2.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}
.k-midnight-eth__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.k-midnight-eth__sort,
.k-midnight-eth__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.k-midnight-eth__tags { margin-top: 0.5rem; }
.k-midnight-eth__sort > button,
.k-midnight-eth__tags > button {
    appearance: none;
    height: 2rem;
    padding: 0 0.75rem;
    border: 1px solid var(--k-border-soft);
    border-radius: 0.25rem;
    background: var(--k-surface);
    color: var(--k-text);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}
.k-midnight-eth__sort > button:hover,
.k-midnight-eth__tags > button:hover { border-color: var(--k-border); }
.k-midnight-eth__sort > button.is-active,
.k-midnight-eth__tags > button.is-active {
    border-color: var(--k-primary);
    background: var(--k-primary);
    color: var(--k-primary-ink, #07140f);
}
.k-midnight-eth__selects {
    flex: 1;
    min-width: 12rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}
.k-eth-select { min-width: 0; }
.k-eth-select__btn {
    width: 100%;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--k-border);
    border-radius: 0.5rem;
    background: var(--k-surface);
    color: var(--k-text);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.k-eth-select__btn > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.k-eth-select__btn svg { flex: none; color: var(--k-text-muted); }
.k-eth-select.is-open .k-eth-select__btn {
    border-color: var(--k-primary);
    outline: 2px solid var(--k-primary);
    outline-offset: 2px;
}
.k-eth-select__menu {
    z-index: 280;
    margin: 0;
    padding: 0.25rem;
    overflow: auto;
    border: 1px solid var(--k-border);
    border-radius: 0.75rem;
    background: var(--k-bg-elevated);
    color: var(--k-text);
    box-shadow: 0 12px 32px rgb(0 0 0 / 24%);
}
.k-eth-select__menu[hidden] { display: none !important; }
.k-eth-select__menu [role="option"] {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 0;
    border-radius: 0.4rem;
    background: transparent;
    color: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.k-eth-select__menu [role="option"]:hover,
.k-eth-select__menu [role="option"]:focus-visible {
    background: var(--k-surface);
    outline: none;
}
.k-eth-select__menu [role="option"].is-selected {
    background: rgb(var(--k-primary-rgb) / 18%);
    color: var(--k-primary);
    font-weight: 700;
}
.k-midnight-eth__results {
    padding: 0.5rem 0.75rem 1rem;
}
.k-midnight-eth__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(9rem, 100%), 1fr));
    gap: 0.625rem;
}
.k-midnight-eth__list:empty { display: none; }
@media (min-width: 640px) {
    .k-midnight-eth__list {
        grid-template-columns: repeat(auto-fill, minmax(min(10.5rem, 100%), 1fr));
        gap: 1rem;
    }
}
.k-midnight-eth__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 12rem;
    padding: 2rem 1rem;
    text-align: center;
}
.k-midnight-eth__empty[hidden] { display: none !important; }
@media (max-width: 600px) {
    .k-midnight-eth__search { gap: 0.35rem; }
    .k-midnight-eth__submit { padding-left: 0.55rem; padding-right: 0.55rem; }
}




@media (max-width: 1023.98px) {
    .k-midnight { padding: 0.5rem 0.75rem 1.5rem; }
    .k-midnight__modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023.98px) {
    .k-pltoolbar__input { width: 8rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   片单广场 —— 数值取自参照 playlists-explore.png（1440x900 量取）
   工具区：热门/最新 居中成组 + 右侧「输入分享码」胶囊；搜索框 618x54 内嵌绿钮
   网格：7 列、封面比例 2:3（同首页 .k-card）、列距 14
   ══════════════════════════════════════════════════════════════════════════ */

.k-pltoolbar {
    display: flex;
    flex-direction: column;
    /* 必须把旧规则（第 133 行那套 align-items:center/justify-content:space-between）覆盖干净：
       只写 flex-direction 的话 align-items:center 仍然生效，子元素会被压成收缩宽度并居中
       （实测：胶囊落在 x809、搜索框落在 547，而不是右缘/左缘）。 */
    align-items: stretch;
    justify-content: flex-start;
    margin-bottom: 0;
    gap: 18px;
}

.k-pltoolbar__row {
    position: relative;
    display: flex;
    align-items: center;
    /* 左对齐到定宽列；「输入分享码」仍 absolute right:0 贴内容区右缘（1920 参照 ~1770） */
    justify-content: flex-start;
    min-height: 40px;
}

.k-tabs__group {
    display: flex;
    justify-content: center;
    gap: 38px;
    /* 定宽列与网格同宽同起点：1440 → x300；1920 → x406（参照封面列量取）
       #app-main 内容起点实测 288；列偏移见下方 margin-left。
       组内 justify-center 让「热门/最新」落在列中心（1920 中心 ~952）。 */
    width: 1092px;
    max-width: 100%;
    margin-left: 12px; /* 288+12=300 */
    box-sizing: border-box;
}

.k-tabs__group > a,
.k-tabs__group > button {
    appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
    padding: 0 0 8px;
    font: inherit;
    font-size: 14px;
    color: var(--k-text-muted);
    text-decoration: none;
}

.k-tabs__group > a.is-active,
.k-tabs__group > button.is-active {
    color: var(--k-primary);
    font-weight: 600;
}

.k-tabs__group > a.is-active::after,
.k-tabs__group > button.is-active::after {
    content: "";
    position: absolute;
    left: -6px;
    right: -6px;
    bottom: 0;
    height: 2px;
    border-radius: 1px;
    background: var(--k-primary);
}

/* 输入分享码：右对齐胶囊（参照 121x40，右缘距内容右边 17） */
.k-pltoolbar__code {
    position: absolute;
    right: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 20px;
    background: var(--k-primary);
    color: var(--k-primary-ink, #07140f);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.k-pltoolbar__code::before {
    content: "+";
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

/* 搜索框：圆角 27，右端内嵌绿色按钮 */
.k-plsearch {
    position: relative;
    display: flex;
    align-items: center;
    width: 618px;
    max-width: 100%;
    height: 54px;
    margin-left: 12px; /* 与网格同列起点 */
    padding: 0 6px 0 40px;
    border-radius: 27px;
    background: var(--k-tint);
    border: 1px solid var(--k-border-soft);
}

.k-plsearch__icon {
    position: absolute;
    left: 16px;
    display: inline-flex;
    color: var(--k-text-subtle);
}

.k-plsearch__input {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--k-text);
    font: inherit;
    font-size: 14px;
    outline: none;
}

.k-plsearch__input::-webkit-search-cancel-button,
.k-plsearch__input::-webkit-search-decoration {
    -webkit-appearance: none;
    display: none;
}

.k-plsearch__input::placeholder {
    color: var(--k-text-subtle);
}

.k-plsearch__submit {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    height: 40px;
    padding: 0 26px;
    border: 0;
    border-radius: 20px;
    background: var(--k-primary);
    color: var(--k-primary-ink, #07140f);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.k-plsearch__submit:hover {
    background: linear-gradient(rgb(255 255 255 / 14%), rgb(255 255 255 / 14%)), var(--k-primary);
}

/* 网格：**固定 7 列、固定列宽 152**（封面因此固定 144 宽、列距 158）——
   参照在 1440 与 1920 两种宽度下都是 7 列 / 144 宽（不是等分放大：
   实测 1920 那份封面仍是 144）。用 1fr 等分会把 1920 下的封面拉到 223。 */
.k-plgrid {
    display: grid;
    /* 参照：7 列 × 144 宽、列距 158（间距 14）、总宽 1092、行距 294 */
    grid-template-columns: repeat(7, 144px);
    justify-content: start;
    column-gap: 14px;
    /* 行距：封面高≈247 + 标题/meta≈39 + 行间距≈8 → 节距≈294（原先 gap:14 节距≈310） */
    row-gap: 8px;
    width: 1092px;
    max-width: calc(100% - 12px);
    margin-left: 12px;
    margin-top: 26px;
    box-sizing: border-box;
}

.k-plcard {
    gap: 4px; /* 压标题/meta 与封面间距，配合 row-gap 对齐行距 294 */
}

.k-plcard__cover {
    aspect-ratio: var(--k-cover-ratio);
}

.k-plcard__title {
    font-size: 14px;
    font-weight: 500;
}

.k-plcard__meta {
    font-size: 11px;
}

/* 分享码弹层里的「输入框 + 粘贴」 */
.k-codefield {
    display: flex;
    align-items: center;
    gap: 8px;
}

.k-codefield .k-ov__input {
    flex: 1;
    min-width: 0;
}

/* 1920 参照：网格起点 ~406（288+118）。分享码仍贴 #app-main 右缘，不加进定宽列。 */
@media (min-width: 1600px) {
    .k-tabs__group,
    .k-plsearch,
    .k-plgrid {
        margin-left: 118px;
    }

    .k-plgrid {
        max-width: 1092px;
    }
}

/* 移动端：7 列压成 3 列，工具区改为可换行 */
@media (max-width: 1023.98px) {
    .k-pltoolbar__row {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .k-pltoolbar__code {
        position: static;
        margin-left: auto;
    }

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

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

    .k-plgrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px 10px;
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-top: 16px;
    }
}

/* 片单广场 explore：单列对齐（工具条 / 搜索 / 网格同宽同左缘） */
.k-plpage--explore {
    --k-pl-col-w: min(1092px, 100%);
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
}

.k-plpage--explore .k-pltoolbar,
.k-plpage--explore .k-plsort-panel {
    width: var(--k-pl-col-w);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* 覆盖上方「量取参照」里的 margin-left:12/118、定宽 1092 等，避免与居中列叠出错位 */
.k-plpage--explore .k-tabs__group,
.k-plpage--explore .k-plsearch,
.k-plpage--explore .k-plgrid {
    margin-left: 0;
    margin-right: 0;
}

.k-plpage--explore .k-pltoolbar {
    padding: 0;
}

.k-plpage--explore .k-pltoolbar__row {
    position: static;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 44px;
}

.k-plpage--explore .k-tabs__group {
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 0;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--k-border-soft);
    background: rgb(var(--k-hover-rgb) / 35%);
}

.k-plpage--explore .k-tabs__group > button {
    padding: 8px 26px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--k-text-muted);
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.k-plpage--explore .k-tabs__group > button.is-active {
    color: var(--k-primary-ink, #07140f);
    background: var(--k-primary);
    box-shadow: 0 6px 18px rgb(var(--k-primary-rgb) / 28%);
}

.k-plpage--explore .k-tabs__group > button.is-active::after {
    display: none;
}

.k-plpage--explore .k-pltoolbar__code {
    position: static;
    flex-shrink: 0;
    margin-left: auto;
    box-shadow: 0 8px 20px rgb(var(--k-primary-rgb) / 22%);
}

.k-plpage--explore .k-pltoolbar__code:hover {
    filter: brightness(1.06);
}

.k-plpage--explore .k-plsearch {
    width: 100%;
    max-width: none;
    border-color: rgb(var(--k-primary-rgb) / 12%);
    background: rgb(var(--k-hover-rgb) / 28%);
    box-shadow: 0 10px 28px rgb(0 0 0 / 16%);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.k-plpage--explore .k-plsearch:focus-within {
    border-color: rgb(var(--k-primary-rgb) / 42%);
    box-shadow: 0 0 0 1px rgb(var(--k-primary-rgb) / 22%), 0 12px 32px rgb(0 0 0 / 20%);
}

.k-plpage--explore .k-plgrid {
    width: 100%;
    max-width: none;
    margin-top: 24px;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    column-gap: 14px;
    row-gap: 20px;
    justify-content: stretch;
}

@media (min-width: 1200px) {
    .k-plpage--explore .k-plgrid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

.k-plpage--explore .k-plcard {
    text-decoration: none;
    transition: transform 0.18s ease;
}

.k-plpage--explore .k-plcard:hover {
    transform: translateY(-4px);
}

.k-plpage--explore .k-plcard__cover {
    position: relative;
    aspect-ratio: var(--k-cover-ratio);
    border-radius: 0.625rem;
    border: 1px solid rgb(var(--k-primary-rgb) / 10%);
    box-shadow: 0 14px 32px rgb(0 0 0 / 24%);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.k-plpage--explore .k-plcard:hover .k-plcard__cover {
    border-color: rgb(var(--k-primary-rgb) / 38%);
    box-shadow: 0 18px 40px rgb(0 0 0 / 30%);
}

.k-plpage--explore .k-plcard__shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgb(0 0 0 / 0%) 42%, rgb(0 0 0 / 58%) 100%);
}

.k-plpage--explore .k-plcard__badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 1;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    background: rgb(0 0 0 / 52%);
    backdrop-filter: blur(8px);
}

.k-plpage--explore .k-plcard__body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 6px 2px 0;
    min-width: 0;
}

.k-plpage--explore .k-plcard__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--k-text);
    min-height: 2.6em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.k-plpage--explore .k-plcard__meta {
    font-size: 11px;
    color: var(--k-text-subtle);
}

.k-plpage--explore .k-plsort-panel .k-rail-empty {
    width: 100%;
    margin: 24px 0 0;
    padding: 20px 16px;
    text-align: center;
    align-items: center;
}

@media (max-width: 1023.98px) {
    .k-plpage--explore .k-pltoolbar__row {
        flex-wrap: wrap;
    }

    .k-plpage--explore .k-pltoolbar__code {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .k-plpage--explore .k-plgrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 16px;
    }
}

/* ── 提示页（作品不存在 / 通用 404）：播放器区域内居中一张错误卡 ──
   参照 player-404 基线量取：卡宽约 446、水平居中于播放器区、垂直居中 */
.k-player--error .k-player__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    /* 参照的缺失态里播放区是**整列高**（左列被右侧信息栏撑起来，卡居中在 y≈465），
       所以这里不用 16:9，改成随视口高（实测参照播区 ~786 = 900 − 顶部约 114）。 */
    aspect-ratio: auto;
    min-height: calc(100dvh - 7.5rem);
}

.k-errbox {
    width: 446px; /* 参照 player-404 亮区约 446 宽 */
    max-width: calc(100% - 2rem);
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-card);
    text-align: center;
}

.k-errbox__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--k-text);
}

.k-errbox__desc {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--k-text-subtle);
}

.k-errbox__acts {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

/* 重新读取：就地刷新（无服务端交互，纯前端动作） */
.k-errbox__acts .k-btn--primary {
    min-width: 88px;
}

/* ══════════════════════════════════════════════════════════════════════════
   会员中心 · 播放历史 / 我的收藏（手写页，替代原先生成的空壳）
   参照 lib-history-full：顶部居中标题（壳层另带胶囊导航）、右上工具栏、
   按日期分组的条目行（封面 + 名称 + 进度条 + 百分比）
   ══════════════════════════════════════════════════════════════════════════ */

.k-hist__tools {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 10px;
}

.k-hist__date {
    margin: 18px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--k-text-subtle);
}

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

.k-hist__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-tint);
    text-decoration: none;
}

.k-hist__item:hover {
    border-color: var(--k-interactive-border-hover);
}

.k-hist__cover {
    flex: 0 0 auto;
    width: 96px;
    height: 60px;
    border-radius: 6px;
    object-fit: contain;
    background: var(--k-card-inner);
}

.k-hist__text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.k-hist__text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--k-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.k-hist__prog {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
}

.k-hist__prog::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: 4px;
    border-radius: 2px;
    background: rgb(255 255 255 / 12%);
}

.k-hist__prog > i {
    position: relative;
    display: block;
    width: 0;
    max-width: 150px;
    height: 4px;
    border-radius: 2px;
    background: var(--k-primary);
}

.k-hist__prog > b {
    margin-left: 160px;
    font-size: 12px;
    font-weight: 600;
    color: var(--k-text-subtle);
    font-variant-numeric: tabular-nums;
}

/* 下载记录：右侧时间（只读，无进度条） */
.k-hist__time {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--k-text-subtle);
    font-variant-numeric: tabular-nums;
}

/* ── 会员片库三页（播放历史 / 收藏 / 会话）共用壳 ── */

.k-page.k-hist,
.k-page.k-favs,
.k-page.k-sess {
    /* 移动顶栏 sticky 已占位；桌面 #k-topnav 浮层见下方 min-width 规则 */
    padding-top: 0.125rem;
}

/* 顶栏：仅左侧返回；样式对齐 .k-ais--chat 圆形 secondary（非通用 .k-ais__bar 2.5rem 方钮） */
.k-page.k-hist > .k-page__bar--lib.k-ais__bar,
.k-page.k-favs > .k-page__bar--lib.k-ais__bar,
.k-page.k-sess > .k-page__bar--lib.k-ais__bar {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 0;
    margin: 0 0 0.625rem;
    padding: 0;
}

.k-page.k-hist > .k-page__bar--lib .k-ais__ctrl.k-ais__back,
.k-page.k-favs > .k-page__bar--lib .k-ais__ctrl.k-ais__back,
.k-page.k-sess > .k-page__bar--lib .k-ais__ctrl.k-ais__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 0.5rem;
    border: 1px solid var(--k-interactive-border, rgb(255 255 255 / 14%));
    background: var(--k-surface, #25262b);
    color: var(--k-text-muted, #9aa3b2);
    box-shadow: 0 1px 2px rgb(0 0 0 / 18%);
    line-height: 0;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.k-page.k-hist > .k-page__bar--lib .k-ais__ctrl.k-ais__back:hover,
.k-page.k-favs > .k-page__bar--lib .k-ais__ctrl.k-ais__back:hover,
.k-page.k-sess > .k-page__bar--lib .k-ais__ctrl.k-ais__back:hover {
    color: var(--k-text);
    border-color: var(--k-interactive-border-hover, rgb(255 255 255 / 22%));
    background: color-mix(in srgb, var(--k-primary, #16e09d) 8%, var(--k-surface, #25262b));
}

.k-page.k-hist > .k-page__bar--lib .k-ais__back svg,
.k-page.k-favs > .k-page__bar--lib .k-ais__back svg,
.k-page.k-sess > .k-page__bar--lib .k-ais__back svg {
    width: 1rem;
    height: 1rem;
}

.k-lib__tabs {
    margin-top: 0;
}

.k-lib__tab {
    min-height: 36px;
    padding: 0 14px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.k-lib__tab:hover {
    border-color: var(--k-interactive-border-hover);
    color: var(--k-text);
}

.k-lib__head {
    margin: 0.875rem 0 0;
}

.k-lib__panel,
.k-favs__panel {
    margin-top: 0.75rem;
    padding: 8px 12px 12px;
    border-radius: 14px;
    border: 1px solid var(--k-interactive-border);
    background: var(--k-card);
}

.k-lib__empty {
    margin: 0;
    padding: 28px 12px;
    text-align: center;
    font-size: 14px;
    color: var(--k-text-subtle);
}

.k-lib__panel .k-hist__date {
    margin: 12px 4px 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--k-text-subtle);
}

.k-lib__panel .k-hist__date:first-child {
    margin-top: 4px;
}

.k-lib__panel .k-hist__list {
    gap: 6px;
}

.k-lib__panel .k-hist__item {
    padding: 8px 10px;
    border-color: var(--k-border-soft);
    background: rgb(var(--k-hover-rgb) / 28%);
}

.k-lib__panel .k-hist__item:hover {
    border-color: rgb(var(--k-primary-rgb) / 35%);
    background: rgb(var(--k-primary-rgb) / 8%);
}

.k-favs__panel .k-hist__cover {
    width: 52px;
    height: auto;
    aspect-ratio: var(--k-cover-ratio);
    border-radius: 6px;
}

.k-hist__panel:not(.k-favs__panel) .k-hist__cover {
    width: 96px;
    height: 60px;
}

.k-favs__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 我的收藏：搜索条（仅收藏页） */
.k-favs__search {
    position: relative;
    display: flex;
    align-items: center;
    height: 44px;
    margin-top: 12px;
    border-radius: 22px;
    border: 1px solid var(--k-interactive-border);
    background: var(--k-tint);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.k-favs__search:focus-within {
    border-color: rgb(var(--k-primary-rgb) / 45%);
    box-shadow: 0 0 0 3px rgb(var(--k-primary-rgb) / 12%);
}

.k-favs__search-icon {
    display: inline-flex;
    margin-left: 16px;
    color: var(--k-text-subtle);
}

.k-favs__search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 16px 0 10px;
    border: 0;
    background: transparent;
    color: var(--k-text);
    font-size: 14px;
    outline: none;
}

.k-favs__panel {
    min-height: 88px;
}

.k-favs__empty {
    margin: 0;
    padding: 28px 12px;
    text-align: center;
    font-size: 14px;
    color: var(--k-text-subtle);
}

.k-favs__nomatch {
    margin: 0;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--k-text-subtle);
}

/* 会员库分段 + 头行计数（对照 mirror library-page-header） */
.k-lib__tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.k-lib__tabs::-webkit-scrollbar { display: none; }
.k-lib__tab {
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-surface, var(--k-card));
    color: var(--k-text-muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.k-lib__tab.is-active,
.k-lib__tab[aria-current="page"] {
    border-color: rgb(var(--k-primary-rgb) / 50%);
    background: rgb(var(--k-primary-rgb) / 10%);
    color: var(--k-primary);
    box-shadow: 0 0 0 1px rgb(var(--k-primary-rgb) / 18%);
}
.k-lib__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.k-lib__head-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--k-text);
}
.k-lib__count {
    display: inline-flex;
    align-items: center;
    height: 1.375rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-surface, var(--k-card));
    color: var(--k-text-muted);
    font-size: 0.6875rem;
    font-weight: 800;
}
.k-hist__tools { margin: 0; } /* override prior top margin when inside k-lib__head */

.k-sess__tools {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.k-sess__cloud {
    display: inline-flex;
    align-items: center;
    height: 1.75rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--k-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}
.k-sess__cloud.is-active {
    border-color: rgb(var(--k-primary-rgb) / 40%);
    background: rgb(var(--k-primary-rgb) / 12%);
    color: var(--k-primary);
}
.k-sess__list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.k-sess__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-tint);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, background-color 0.15s;
}
.k-sess__item:hover {
    border-color: var(--k-interactive-border-hover);
    background: rgb(var(--k-primary-rgb) / 6%);
}
.k-sess__item-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}
.k-sess__item strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--k-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.k-sess__item em {
    font-style: normal;
    font-size: 12px;
    color: var(--k-text-subtle);
}
.k-sess__item-chev {
    flex: 0 0 auto;
    color: var(--k-text-subtle);
    line-height: 0;
}
.k-sess__panel {
    min-height: 120px;
}

.k-sess__panel .k-sess__list {
    margin-top: 0;
}

.k-sess__panel .k-sess__item {
    background: rgb(var(--k-hover-rgb) / 28%);
    border-color: var(--k-border-soft);
}

.k-sess__empty {
    margin: 0;
    padding: 28px 12px;
    border: 0;
    background: transparent;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.k-sess__empty[hidden] {
    display: none !important;
}
.k-sess__list[hidden] {
    display: none !important;
}
.k-sess__empty-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--k-text);
}
.k-sess__empty-desc {
    margin: 0.5rem 0 1rem;
    font-size: 0.8125rem;
    color: var(--k-text-muted);
}

/* 满态行式列表复用 .k-hist__*（同族），仅去掉进度列 */

@media (max-width: 1023.98px) {
    .k-hist__cover { width: 72px; height: 46px; }
    .k-hist__prog { min-width: 96px; }
    .k-hist__prog::before { width: 64px; }
    .k-hist__prog > i { max-width: 64px; }
    .k-hist__prog > b { margin-left: 72px; }
    .k-favs__grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   AI 搜索结果页（/ai-search）—— 数值取自参照 ai-search-submit（1440x900 量取）
   内容宽 352–1383（≈1031）；状态行 + 摘要行；结果大卡（筛选 chips + 两列结果行）
   底部常驻 composer + 配额条（裁定 22：静态占位）
   ══════════════════════════════════════════════════════════════════════════ */

.k-ais {
    /* 参照 1440：内容列宽 1031。宽屏用 auto 居中，避免 margin-left:64 把列钉死在左侧、
       右侧留出大片空白（用户 PC /search 反馈）。移动端见下方 media 取消定宽。 */
    width: 100%;
    max-width: 1031px;
    margin-inline: auto;
}

/* composer 通栏（与内容同宽），不像首页 hero 那样定宽 */

/* /search 空态热词：容器必须 100% 宽，justify-content:center 才真正居中
   （原先 shrink-to-fit 只把整组顶在卡片左侧） */
.k-ais .k-chips--center {
    width: 100%;
    max-width: none; /* 覆盖 home.css 的 48.125rem，否则热词组被钉在卡片左侧 */
    margin-top: 0;
    justify-content: center;
    flex-wrap: wrap;
}

/* /search 热词是标签，不要首页推荐 chips 的播放三角 */
.k-ais .k-chips > a::before {
    content: none;
    display: none;
}


.k-ais__composer.k-composer {
    max-width: none;
}

.k-ais__edit {
    position: absolute;
    right: 0;
    top: 0;
    display: inline-flex;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--k-interactive-border);
    color: var(--k-text-muted);
    text-decoration: none;
}

.k-ais__edit:hover {
    color: var(--k-text);
    border-color: var(--k-interactive-border-hover);
    background: rgb(255 255 255 / 4%);
}


.k-ais__status {
    margin: 26px 0 0;
}

.k-ais__state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 13px;
    border-radius: 15px;
    border: 1px solid rgb(22 224 157 / 36%);
    background: rgb(22 224 157 / 10%);
    color: var(--k-primary);
    font-size: 13px;
}

.k-ais__sum {
    margin: 14px 0 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--k-text);
}

.k-ais__mode {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 9px;
    border-radius: 9px;
    border: 1px solid rgb(22 224 157 / 36%);
    background: rgb(22 224 157 / 10%);
    color: var(--k-primary);
    font-size: 12px;
    font-weight: 600;
}

.k-ais__sum b {
    font-weight: 700;
    color: var(--k-text);
}

/* 结果大卡 */
.k-ais__card {
    margin-top: 22px;
    padding: 20px 22px 24px;
    border-radius: 12px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-tint);
}

.k-ais__cardhead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    list-style: none;
    cursor: pointer;
}
.k-ais__cardhead::-webkit-details-marker { display: none; }
.k-ais__card > summary.k-ais__cardhead { list-style: none; }
details.k-ais__card {
    /* keep existing .k-ais__card look */
}
details.k-ais__card:not([open]) > *:not(summary) {
    display: none !important;
}
.k-ais__sync {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--k-text-subtle);
    cursor: pointer;
}
.k-ais__sync-toggle {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.k-ais__cardhead h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--k-text);
}

.k-ais__cardhead small {
    font-size: 12px;
    font-weight: 500;
    color: var(--k-text-subtle);
}

/* 筛选 chips（带计数） */
.k-ais__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.k-ais__chips > a,
.k-ais__chips > button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 11px;
    border-radius: 14px;
    border: 1px solid var(--k-interactive-border);
    background: transparent;
    color: var(--k-text-muted);
    font: inherit;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.k-ais__chips > a > i,
.k-ais__chips > button > i {
    font-style: normal;
    color: var(--k-text-subtle);
}

.k-ais__chips > a[aria-current="true"],
.k-ais__chips > button[aria-current="true"],
.k-ais__chips > button.is-active {
    border-color: rgb(22 224 157 / 48%);
    background: rgb(22 224 157 / 12%);
    color: var(--k-primary);
    font-weight: 600;
}

.k-ais__chips > a[aria-current="true"] > i,
.k-ais__chips > button[aria-current="true"] > i {
    color: var(--k-primary);
}

.k-ais__row[hidden] {
    display: none !important;
}

.k-ais__sub {
    margin: 18px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--k-text);
}

.k-ais__sub em {
    margin-left: 6px;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    color: var(--k-text-subtle);
}

/* 结果行（海报 282 宽 + 信息块） */
.k-ais__rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.k-ais__row {
    display: flex;
    gap: 14px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-card);
}

.k-ais__row:hover {
    border-color: var(--k-interactive-border-hover);
    background: rgb(255 255 255 / 3%);
}


.k-ais__poster {
    position: relative;
    flex: 0 0 132px;
    width: 132px;
    height: auto;
    aspect-ratio: var(--k-cover-ratio);
    border-radius: 8px;
    overflow: hidden;
    background: var(--k-card-inner);
}

.k-ais__poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.k-ais__badge {
    position: absolute;
    left: 6px;
    bottom: 6px;
    height: 22px;
    padding: 0 9px;
    border-radius: 11px;
    border: 1px solid rgb(22 224 157 / 52%);
    background: rgb(8 9 10 / 78%);
    color: var(--k-primary);
    font-size: 11px;
    line-height: 22px;
}

.k-ais__info {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.k-ais__info h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--k-text);
}

.k-ais__info h3 a {
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.k-ais__more {
    margin-left: auto;
    padding: 2px;
    border: 0;
    background: transparent;
    color: var(--k-text-subtle);
    cursor: pointer;
}

.k-ais__meta {
    margin: 0;
    font-size: 12px;
    color: var(--k-text-subtle);
}

.k-ais__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.k-ais__tags span {
    height: 22px;
    padding: 0 9px;
    border-radius: 4px;
    background: rgb(255 255 255 / 7%);
    color: var(--k-text-muted);
    font-size: 11px;
    line-height: 22px;
}

.k-ais__ops {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.k-ais__src {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid var(--k-interactive-border);
    color: var(--k-text-muted);
    font-size: 12px;
}

.k-ais__play {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: var(--k-primary);
    color: var(--k-primary-ink, #07140f);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}


.k-ais__play:focus-visible,
.k-ais__more:focus-visible,
.k-composer__send:focus-visible,
.k-composer__plus:focus-visible,
.k-composer__mic:focus-visible {
    outline: 2px solid rgb(var(--k-primary-rgb) / 55%);
    outline-offset: 2px;
}

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

.k-ais__play:active {
    transform: scale(0.98);
}

.k-ais__more:hover {
    color: var(--k-text);
}

.k-ais__src:hover {
    border-color: var(--k-interactive-border-hover);
    color: var(--k-text);
}

.k-ais__chips a:hover {
    border-color: var(--k-interactive-border-hover);
    color: var(--k-text);
}

.k-ais__chips a[aria-current="true"] {
    border-color: rgb(var(--k-primary-rgb) / 42%);
    background: rgb(var(--k-primary-rgb) / 12%);
    color: var(--k-primary);
}


/* 底部配额条 + composer（配额按裁定 22：静态占位） */
.k-ais__quota {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-tint);
}

.k-ais__qleft {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--k-text);
    white-space: nowrap;
}

.k-ais__qbar {
    position: relative;
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: rgb(255 255 255 / 10%);
    overflow: hidden;
}

.k-ais__qbar > i {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--k-primary);
}

.k-ais__qright {
    font-size: 11px;
    color: var(--k-text-subtle);
    white-space: nowrap;
}

.k-ais__composer {
    margin-top: 10px;
}

/* AI 搜索底栏 dock：参照 mirror fixed inset-x-0 bottom-0 / md:sticky，常驻视口 */
.k-ais__dock {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 18px;
    padding: 10px 0 12px;
    border-top: 1px solid var(--k-border-soft);
    background: var(--k-bg, #111214);
    box-shadow: 0 -12px 24px rgb(0 0 0 / 28%);
    transition: box-shadow 0.15s ease;
}

.k-ais__dock .k-ais__quota {
    margin-top: 0;
}

.k-ais__dock .k-ais__composer {
    margin-top: 10px;
}


.k-ais__dock .k-composer__chip:hover {
    border-color: rgb(var(--k-primary-rgb) / 42%);
}

.k-ais__dock .k-ais__composer:focus-within {
    border-color: rgb(var(--k-primary-rgb) / 42%);
    box-shadow: 0 0 0 1px rgb(var(--k-primary-rgb) / 18%);
}


@media (max-width: 1023.98px) {
    .k-ais__dock {
        position: fixed;
        left: 0;
        right: 0;
        /* 抬到胶囊 tabbar 上方（tab 顶约距底 69px） */
        bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
        margin-top: 0;
        padding: 8px 12px 10px;
        border-top-color: var(--k-border-soft);
        border-radius: 14px 14px 0 0;
    }
    .k-ais__dock .k-ais__quota {
        padding: 6px 10px;
        gap: 8px;
    }
    .k-ais__dock .k-ais__composer {
        margin-top: 6px;
    }
    /* 给结果列表留底空：dock 高 + tabbar 区 */
    .k-ais {
        padding-bottom: calc(148px + 4.5rem);
    }

    /* AI 搜无底栏：composer/状态条贴底（对齐源站） */
    html[data-k-hide-tabbar] .k-ais__dock {
        bottom: env(safe-area-inset-bottom, 0px);
    }
    html[data-k-hide-tabbar] .k-ais {
        padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px));
    }
}


@media (max-width: 1023.98px) {
    .k-ais {
        max-width: none;
        margin-inline: 0;
    }
    .k-ais__poster { flex: 0 0 96px; width: 96px; height: auto; aspect-ratio: var(--k-cover-ratio); }
    .k-ais__card { padding: 14px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   大家都在看 / 为你推荐 —— 数值取自参照 collection-trending.png（1440x900 量取）
   6 列、卡宽 185、列距 14；卡内 = 海报 2:3（角标两枚）+ 标题 16 + 年份类型 13 + 标签 chip
   ══════════════════════════════════════════════════════════════════════════ */

.k-trend__title {
    /* 参照实测：标题 y75（28px 高）、副标题 y114、网格 y148 —— 行高 1、间距各 11 */
    margin: 1.6875rem 0 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--k-text);
}

.k-trend__sub {
    margin: 11px 0 0;
    font-size: 15px;
    line-height: 23px;
    color: var(--k-text-subtle);
}

.k-trend__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.k-trend__tab {
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--k-border-soft);
    background: transparent;
    color: var(--k-text-subtle);
    font-size: 13px;
    cursor: pointer;
}
.k-trend__tab.is-active,
.k-trend__tab[aria-selected="true"] {
    border-color: var(--k-primary);
    background: rgb(22 224 157 / 12%);
    color: var(--k-primary);
}
.k-trend__panel[hidden] { display: none !important; }


.k-trend__grid {
    display: grid;
    grid-template-columns: repeat(6, 185px);
    justify-content: start;
    gap: 20px 14px;
    margin-top: 11px;
}

.k-trend__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-tint);
    text-decoration: none;
    min-width: 0;
}

.k-trend__poster {
    position: relative;
    display: block;
    aspect-ratio: var(--k-cover-ratio);
    border-radius: 8px;
    overflow: hidden;
    background: var(--k-card-inner);
}

.k-trend__poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.k-trend__badge,
.k-trend__heat {
    position: absolute;
    top: 6px;
    height: 20px;
    padding: 0 7px;
    border-radius: 4px;
    background: rgb(8 9 10 / 72%);
    color: #fff;
    font-size: 10px;
    line-height: 20px;
    white-space: nowrap;
}

.k-trend__badge { left: 6px; }
.k-trend__heat { right: 6px; color: var(--k-primary); }

.k-trend__name {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--k-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.k-trend__meta {
    font-size: 13px;
    font-style: normal;
    color: var(--k-text-subtle);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.k-trend__tag {
    align-self: flex-start;
    margin-top: 2px;
    padding: 0 8px;
    height: 20px;
    border-radius: 4px;
    background: rgb(22 224 157 / 12%);
    color: var(--k-primary);
    font-size: 11px;
    line-height: 20px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1023.98px) {
    .k-trend__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px 10px;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   片单详情 —— 数值取自参照 playlist-detail-full.png（1920x929 量取）
   头部（公开 chip + 28px 标题 + 分享在右）/ 元信息 / 喜欢收藏行 / 分隔线 /
   6 列网格（卡宽 170 列距 12；海报 170x240 底部渐变叠标题；下方通栏加入片单钮 高38）
   ══════════════════════════════════════════════════════════════════════════ */

/* 参照实测（1920）：内容列 x454、宽 1092（与片单广场同族的定宽列）；chip/标题 y110 */
.k-pldet {
    max-width: 1092px;
    /* 1440 空态基线无额外左推：原先恒定 166px 会把 6 列网格推出视口（scrollWidth≈1534） */
    margin-left: 0;
}

@media (min-width: 1600px) {
    .k-pldet {
        /* 1920 参照内容列 x454 = 288 + 166 */
        margin-left: 166px;
    }
}

.k-pldet__empty {
    margin: 48px 12px 0;
    padding: 36px 20px;
    text-align: center;
    color: var(--k-text-subtle);
    font-size: 14px;
    border: 1px solid var(--k-border-soft);
    border-radius: 12px;
    background: var(--k-tint);
}


.k-pldet__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-top: 3.25rem;
}

.k-pldet__title {
    display: inline-block;
    margin: 10px 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--k-text);
    vertical-align: middle;
}

.k-pldet__head .k-lcard__tag {
    vertical-align: middle;
}

.k-pldet__meta {
    margin: 34px 0 0;
    font-size: 14px;
    color: var(--k-text-subtle);
}

.k-pldet__acts {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.k-pldet__acts .k-btn {
    min-width: 96px;
}

.k-pldet__acts [aria-pressed="true"] {
    border-color: rgb(22 224 157 / 52%);
    background: rgb(22 224 157 / 12%);
    color: var(--k-primary);
}

.k-pldet__hr {
    margin: 26px 0 0;
    border: 0;
    border-top: 1px solid var(--k-border-soft);
}

.k-pldet__grid {
    display: grid;
    grid-template-columns: repeat(6, 170px);
    justify-content: start;
    gap: 24px 12px;
    margin-top: 20px;
}

.k-pldet__cell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.k-pldet__poster {
    position: relative;
    display: block;
    height: 240px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--k-card-inner);
    text-decoration: none;
}

.k-pldet__poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.k-pldet__shade {
    position: absolute;
    inset: auto 0 0;
    height: 84px;
    background: linear-gradient(180deg, rgb(8 9 10 / 0%), rgb(8 9 10 / 82%));
}

.k-pldet__name {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 24px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.k-pldet__mt {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 6px;
    color: rgb(255 255 255 / 72%);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.k-pldet__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--k-interactive-border);
    background: var(--k-tint);
    color: var(--k-text-muted);
    font-size: 13px;
    cursor: pointer;
}

.k-pldet__add:hover {
    color: var(--k-text);
    border-color: var(--k-interactive-border-hover);
}

@media (max-width: 1023.98px) {
    .k-pldet__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px 10px;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   应用下载页 /download —— 双栏 App 卡（安卓 + iOS，357 宽）；TV/车机已下线
   按钮指向系统参数（theme('site_card')），没配的平台整卡隐藏（绝不放死按钮）
   ══════════════════════════════════════════════════════════════════════════ */

.k-dl__title {
    margin: 0.75rem 0 0;
    font-size: 34px;
    font-weight: 700;
    color: var(--k-text);
}

.k-dl__sub {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--k-text-subtle);
}

.k-dl__grid {
    display: grid;
    grid-template-columns: repeat(2, 357px);
    gap: 17px;
    margin-top: 30px;
}

.k-dl__grid--one {
    grid-template-columns: 357px;
}

.k-dl__grid--two {
    grid-template-columns: repeat(2, 357px);
}
.k-dl__hint {
    margin: 1rem 0 0;
    font-size: 13px;
    color: var(--k-text-subtle);
}
.k-dl__card--muted {
    opacity: 0.72;
}
.k-dl__na {
    margin-left: auto;
    height: 22px;
    padding: 0 9px;
    border-radius: 11px;
    border: 1px solid var(--k-border-soft);
    color: var(--k-text-subtle);
    font-size: 11px;
    line-height: 22px;
    white-space: nowrap;
}
.k-dl__tips {
    margin: 2rem 0 1.5rem;
    max-width: 40rem;
}
.k-dl__tips-title {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--k-text);
}
.k-dl__tips-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--k-text-muted);
    font-size: 13px;
    line-height: 1.75;
}

.k-dl__card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-tint);
}

.k-dl__cardhead {
    display: flex;
    align-items: center;
    gap: 10px;
}

.k-dl__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--k-interactive-border);
    background: var(--k-card);
    color: var(--k-text);
}

.k-dl__plat {
    font-size: 18px;
    font-weight: 600;
    color: var(--k-text);
}

.k-dl__ok {
    margin-left: auto;
    height: 22px;
    padding: 0 9px;
    border-radius: 11px;
    border: 1px solid rgb(22 224 157 / 48%);
    color: var(--k-primary);
    font-size: 11px;
    line-height: 22px;
    white-space: nowrap;
}

.k-dl__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--k-text-muted);
    min-height: 42px;
}

.k-dl__btn {
    margin-top: auto;
    height: 48px;
    border-radius: 8px;
    justify-content: center;
    font-size: 14px;
}

@media (max-width: 1023.98px) {
    .k-dl__grid, .k-dl__grid--one, .k-dl__grid--two { grid-template-columns: minmax(0, 1fr); }
}

/* ═══ reference-interactions（任务 2.1 / 5.3 / 5.4）═══ */

/* 通用列表壳：分页条 */
.k-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 22px 0 8px;
}
.k-pager__btn {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--k-interactive-border);
    color: var(--k-text);
    font-size: 13px;
    text-decoration: none;
}
.k-pager__btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}
.k-pager__btn:hover {
    border-color: var(--k-primary);
    color: var(--k-primary);
}
.k-pager__now {
    font-size: 13px;
    color: var(--k-text-subtle);
}

/* 筛选条：无链接的分类名与「全部」chip 的选中态 */
.k-chips__plain {
    color: var(--k-text-subtle);
    cursor: default;
}
.k-chips--filters a[aria-current="true"] {
    color: var(--k-primary);
    border-color: var(--k-primary);
}

/* 滚动分页（任务 2.1）：状态行与哨兵（不占版面） */
.k-inf__state {
    margin: 14px 0 6px;
    text-align: center;
    font-size: 12px;
    color: var(--k-text-subtle);
}
.k-inf__sentinel {
    height: 1px;
}
.k-inf__loading {
    margin: 12px 0 8px;
    text-align: center;
    font-size: 12px;
    color: var(--k-text-subtle);
}

/* 通用详情壳（任务 5.4）：标签行与不可用的弱化动作 */
.k-detail__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 0;
}
.k-detail__tags span {
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--k-interactive-border);
    font-size: 12px;
    color: var(--k-text-muted);
}


/* ── 我的片单：登录满态（搜索 + 空态 + 配额） ── */
.k-plquota {
    font-size: 12px;
    color: var(--k-text-subtle);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.k-tabs--sub {
    align-items: flex-end;
}

.k-plmine-panel {
    margin-top: 0;
}

.k-plempty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 220px;
    margin: 1rem 12px 2rem;
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 12px;
    border: 1px dashed var(--k-border-soft);
    background: var(--k-tint);
}

.k-plempty__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--k-text);
}

.k-plempty__desc {
    margin: 0 0 0.5rem;
    max-width: 22rem;
    font-size: 13px;
    line-height: 1.6;
    color: var(--k-text-subtle);
}

/* 空态 CTA：片单详情 / 我的片单共用（深色+浅色走 CSS 变量） */
.k-plempty .k-plpage__empty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgb(var(--k-primary-rgb) / 45%);
    background: transparent;
    color: var(--k-text);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.k-plempty .k-plpage__empty-btn:hover {
    border-color: var(--k-primary);
    background: rgb(var(--k-primary-rgb) / 8%);
}

.k-plempty .k-plpage__empty-btn svg {
    width: 16px;
    height: 16px;
}

/* 片单详情空态：占满内容列居中，不影响有影片时的 grid */
.k-pldet .k-pldet__empty-state {
    margin: 1.25rem 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

.k-plgrid--mine {
    /* 我的片单区沿用广场 7 列网格；卡片更少时左对齐即可 */
}

@media (max-width: 1023.98px) {
    .k-plempty { margin-left: 0; margin-right: 0; }
}


/* === kanju P0: search_hub browse + playlist loadmore === */
/* /search/hub —— collection-browse-search 海报墙密度 */
.k-shub {
    max-width: 1168px;
}

.k-shub__form {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(720px, 100%);
    height: 54px;
    margin: 0.75rem 0 1rem;
    padding: 0 8px 0 42px;
    border-radius: 27px;
    background: var(--k-tint);
    border: 1px solid var(--k-border-soft);
}

.k-shub__icon {
    position: absolute;
    left: 16px;
    display: inline-flex;
    color: var(--k-text-subtle);
}

.k-shub__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--k-text);
    font-size: 14px;
    outline: none;
}

.k-shub__input::placeholder { color: var(--k-text-subtle); }

.k-shub__ask {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--k-text-muted);
    white-space: nowrap;
    cursor: pointer;
}

.k-shub__ask input { accent-color: var(--k-primary); }

.k-shub__submit {
    flex: 0 0 auto;
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 20px;
    background: var(--k-primary);
    color: var(--k-primary-ink, #07140f);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.k-shub__hot { margin-bottom: 0.5rem; }

.k-shub__grid {
    margin-top: 0.75rem;
}

/* 片单广场 / 详情 / hub：加载更多条 */
.k-plmore {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 1.25rem 0 2rem;
}

.k-plmore .k-btn {
    min-width: 7.5rem;
}

.k-plmore[data-k-pl-more-done] .k-btn {
    display: none;
}

.k-plmore[data-k-pl-more-done] [data-k-inf-hint] {
    display: block;
}

@media (max-width: 1023.98px) {
    .k-shub__form {
        width: 100%;
        height: 48px;
        padding-left: 38px;
    }
    .k-shub__ask { display: none; }
}

/* /search 行式关键词壳（任务 search-vs-browse）：不碰海报墙密度 */
.k-srch__form { margin-bottom: 0.35rem; }
.k-srch__hint {
    margin: 0 0 1rem;
    font-size: 12px;
    color: var(--k-text-subtle);
}
.k-srch__askai {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--k-primary);
    white-space: nowrap;
    text-decoration: none;
}
.k-srch__askai:hover { text-decoration: underline; }
.k-srch__browse {
    margin-left: auto;
    font-size: 13px;
    color: var(--k-text-muted);
    text-decoration: none;
}
.k-srch__browse:hover { color: var(--k-primary); }
.k-srch__empty-ai {
    margin: 0.75rem 0 0;
    font-size: 13px;
    color: var(--k-text-muted);
    text-align: center;
}
.k-srch__empty-ai a { color: var(--k-primary); text-decoration: none; }
.k-srch__empty-ai a:hover { text-decoration: underline; }
.k-srch__empty-ai--pad { padding: 0.5rem 0 1rem; }
.k-ais__empty {
    margin-top: 14px;
    padding: 24px 18px 20px;
    border-radius: 12px;
    border: 1px solid var(--k-border-soft, rgb(255 255 255 / 8%));
    background: var(--k-tint, rgb(255 255 255 / 3%));
    text-align: center;
}
.k-ais__empty-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 999px;
    border: 1px solid rgb(148 163 184 / 28%);
    background: rgb(148 163 184 / 8%);
    color: var(--k-text-muted, #9aa3b2);
}
.k-ais__empty-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--k-text);
}
.k-ais__empty-desc {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--k-text-muted);
}
.k-page__bar .k-srch__browse { padding-right: 0.25rem; }

/* 搜索限流友好态（429 主题接管，不绕过冷却） */
.k-srch__rate {
  margin: 0.75rem 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--k-primary) 28%, transparent);
  background: color-mix(in srgb, var(--k-primary) 8%, var(--k-surface, #12141a));
}
.k-srch__rate-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.k-srch__rate-desc {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--k-muted, var(--k-text-subtle, #9aa3b2));
  line-height: 1.45;
}
.k-srch__rate-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}




/* ── 登录/注册/找回：整页闸门与弹层同壳（居中面板；login/reg 自动开弹层） ── */
.k-auth-gate {
    min-height: min(70vh, 640px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 3rem;
}
.k-auth-gate__fallback {
    text-align: center;
    max-width: 22rem;
}
.k-auth-gate__hint {
    margin: 0 0 1rem;
    color: var(--k-text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}
.k-auth-panel {
    width: min(100%, 28rem);
    background: var(--k-surface-1, var(--k-bg-elevated));
    border: 1px solid var(--k-border, rgba(255,255,255,.08));
    border-radius: 1rem;
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: 0 18px 48px rgba(0,0,0,.35);
}
.k-auth-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.k-auth-panel__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}
.k-auth-panel__desc {
    margin: 0.35rem 0 0;
    color: var(--k-text-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}
.k-auth-panel__x {
    flex: none;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--k-text-muted);
    text-decoration: none;
}
.k-auth-panel__x:hover { color: var(--k-text); background: var(--k-tint, rgba(255,255,255,.06)); }
.k-auth-panel .k-login { display: flex; flex-direction: column; gap: 0.75rem; }
.k-auth-panel .k-login__submit { width: 100%; }
.k-auth-panel__alt { width: 100%; margin-top: 0.25rem; }


/* ── /vod /type browse：对照 collection-browse movie-poster-card 密度 ── */
.k-browse .k-page__title {
    margin: 0.75rem 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}
.k-browse-chans {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
}
.k-browse-chans__item {
    display: inline-flex;
    align-items: center;
    height: 2rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--k-border, var(--k-interactive-border));
    background: var(--k-surface-1, var(--k-tint));
    color: var(--k-text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
    white-space: nowrap;
}
.k-browse-chans__item:hover,
.k-browse-chans__item.is-active {
    color: var(--k-text);
    border-color: rgb(var(--k-primary-rgb) / 45%);
    background: rgb(var(--k-primary-rgb) / 12%);
}
.k-browse__grid {
    /* mirror：内容列约 6 卡；卡片宽 ~9.25–11rem、2:3 */
    grid-template-columns: repeat(auto-fill, minmax(min(9.25rem, 100%), 1fr));
    gap: 1rem 0.875rem;
}
@media (min-width: 1280px) {
    .k-browse__grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}
@media (max-width: 1023.98px) {
    .k-browse__grid {
        grid-template-columns: repeat(auto-fill, minmax(min(7.5rem, 100%), 1fr));
        gap: 0.75rem 0.625rem;
    }
}

/* 本地收藏态：AI 结果卡「片单」pressed（不落库；样式放 pages 避开 ai-chat.css） */
.k-ais__fav.is-active,
.k-ais__fav[aria-pressed="true"] {
    color: var(--k-primary);
    border-color: rgb(var(--k-primary-rgb) / 52%);
    background: rgb(var(--k-primary-rgb) / 12%);
}

/* === member hub / sessions (library 心智) === */
.k-memberhub__hint {
    margin: 0.25rem 0 1rem;
    color: var(--k-muted, var(--k-text-subtle));
    font-size: 0.875rem;
    text-align: center;
}
.k-memberhub__hint .k-inline-link {
    margin-left: 0.35rem;
    color: var(--k-primary);
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}
.k-memberhub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(11.5rem, 100%), 1fr));
    gap: 0.75rem;
}
.k-memberhub__card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 0.95rem;
    border-radius: 0.9rem;
    border: 1px solid var(--k-border-soft, rgb(255 255 255 / 8%));
    background: var(--k-tint, rgb(255 255 255 / 3.5%));
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.k-memberhub__card:hover {
    border-color: rgb(var(--k-primary-rgb) / 40%);
    background: rgb(var(--k-primary-rgb) / 8%);
}
.k-memberhub__ico {
    display: inline-flex;
    color: var(--k-primary);
    margin-bottom: 0.15rem;
}
.k-memberhub__card strong {
    font-size: 0.95rem;
    font-weight: 600;
}
.k-memberhub__card em {
    font-style: normal;
    font-size: 0.78rem;
    color: var(--k-muted, var(--k-text-subtle));
    line-height: 1.35;
}
/* 站点地图 /map —— 紧凑更新清单（对照 default 地图「最近更新」） */
.k-map__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.75rem 0 0.5rem;
    flex-wrap: wrap;
}
.k-map__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--k-text);
}
.k-map__total {
    font-size: 0.8125rem;
    color: var(--k-text-subtle);
}
.k-map__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--k-border-soft);
}
.k-map__row {
    border-bottom: 1px solid var(--k-border-soft);
}
.k-map__link {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.65rem 0.15rem;
    color: inherit;
    text-decoration: none;
}
.k-map__link:hover .k-map__name { color: var(--k-primary); }
.k-map__idx {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--k-text-subtle);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.k-map__name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--k-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.k-map__type,
.k-map__time {
    font-size: 0.75rem;
    color: var(--k-text-subtle);
    white-space: nowrap;
}
@media (max-width: 640px) {
    .k-map__link {
        grid-template-columns: 2rem minmax(0, 1fr);
        grid-template-areas:
            "idx name"
            "idx meta";
    }
    .k-map__idx { grid-area: idx; }
    .k-map__name { grid-area: name; }
    .k-map__type, .k-map__time {
        grid-column: 2;
    }
}

/* 邀请推广 /user/invite */
.k-invite__card {
    margin-top: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-tint);
}
.k-invite__kicker {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--k-primary);
}
.k-invite__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.k-invite__code-line {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--k-text-muted);
}
.k-invite__code {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--k-text);
    font-variant-numeric: tabular-nums;
}
.k-invite__hint {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--k-text-subtle);
}
.k-invite__links {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.k-invite__linklab {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--k-text-muted);
}
.k-invite__linkbody {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.k-invite__href {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    color: var(--k-text);
}
.k-invite__stats {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-card);
}
.k-invite__stats-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--k-text);
}
.k-invite__stats-head strong {
    color: var(--k-primary);
    font-size: 1.25rem;
}
.k-invite__list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}
.k-invite__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--k-border-soft);
}
.k-invite__who {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.k-invite__who strong {
    font-size: 0.9375rem;
    color: var(--k-text);
}
.k-invite__who em {
    font-style: normal;
    font-size: 0.75rem;
    color: var(--k-text-subtle);
}
.k-invite__meta {
    grid-column: 1;
    font-size: 0.75rem;
    color: var(--k-text-muted);
}
.k-invite__time {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 0.75rem;
    color: var(--k-text-subtle);
    white-space: nowrap;
}
.k-invite__empty {
    margin-top: 0.75rem;
    padding: 1.5rem 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--k-text-muted);
}

/* 站内通知 /user/notify */
.k-notify__empty {
    margin-top: 2rem;
    padding: 2rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--k-border-soft);
    background: var(--k-tint);
    text-align: center;
}
.k-notify__ico {
    display: inline-flex;
    color: var(--k-primary);
    margin-bottom: 0.5rem;
}
.k-notify__empty-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--k-text);
}
.k-notify__empty-desc {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    color: var(--k-text-muted);
}
.k-notify__list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}
.k-notify__item {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--k-border-soft);
}
.k-notify__item strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--k-text);
}
.k-notify__item p {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--k-text-muted);
}
.k-notify__item time {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--k-text-subtle);
}

/* === form-beautify: fields / radios / page forms hooks === */
/* 会员资料 / 留言 / 绑定 / 头像 — 对齐 k-auth-panel + k-composer */
.k-formpage {
    max-width: 40rem;
    margin: 0 auto;
    padding: 0 0 2.5rem;
}
.k-formpage--wide {
    max-width: 48rem;
}
.k-formcard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(22, 224, 157, 0.14);
    background: rgb(26, 27, 30);
    box-shadow: 0 18px 48px rgba(0,0,0,.35);
}
.k-formcard__head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.k-formcard__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--k-text);
}
.k-formcard__desc {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--k-text-muted);
    line-height: 1.5;
}
.k-formstats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
}
.k-formstats__card {
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid var(--k-border-soft, rgba(255,255,255,.08));
    background: rgba(255,255,255,.03);
}
.k-formstats__label {
    display: block;
    font-size: 0.75rem;
    color: var(--k-text-subtle);
}
.k-formstats__val {
    display: block;
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--k-primary, #16e09d);
}
.k-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}
.k-form__row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
}
.k-form__row--stack {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.375rem;
}
.k-form__label {
    font-size: 0.8125rem;
    color: var(--k-text-subtle);
}
.k-form__static {
    font-size: 0.9375rem;
    color: var(--k-text);
}
.k-form__control {
    min-width: 0;
}
.k-form__control input,
.k-form__control textarea,
.k-form__control select {
    width: 100%;
    box-sizing: border-box;
    height: 2.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--k-interactive-border);
    background: var(--k-tint, rgba(255,255,255,.04));
    color: var(--k-text);
    font: inherit;
    font-size: 0.875rem;
    padding: 0 0.875rem;
    outline: none;
}
.k-form__control textarea {
    height: auto;
    min-height: 6.5rem;
    padding: 0.75rem 0.875rem;
    resize: vertical;
}
.k-form__control input:focus,
.k-form__control textarea:focus,
.k-form__control select:focus {
    border-color: rgb(22 224 157 / 48%);
    box-shadow: 0 0 0 3px rgb(22 224 157 / 12%);
}
.k-form__hint {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--k-text-subtle);
}
.k-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 0.35rem;
}
.k-form__actions .k-btn {
    min-width: 7.5rem;
}
.k-form__err {
    margin: 0;
    font-size: 0.8125rem;
    color: #ff7b7b;
}
.k-form__err[hidden] { display: none; }
.k-form__ok {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--k-primary, #16e09d);
}
.k-form__ok[hidden] { display: none; }
.k-form__pwdbox[hidden] { display: none; }
.k-form__pwdbox {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    padding: 0.85rem;
    border-radius: 0.75rem;
    border: 1px dashed rgba(255,255,255,.12);
    background: rgba(0,0,0,.18);
}
.k-form__bind {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.k-form__bind a {
    color: var(--k-primary, #16e09d);
    text-decoration: none;
    font-size: 0.8125rem;
}
.k-form__bind a:hover { text-decoration: underline; }

/* 留言本 */
.k-gbook {
    max-width: 44rem;
    margin: 0 auto;
    padding-bottom: 2.5rem;
}
.k-gbook__compose {
    margin-bottom: 1.25rem;
}
.k-gbook__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.75rem;
}
.k-gbook__meta h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--k-text);
}
.k-gbook__meta em {
    font-style: normal;
    font-size: 0.8125rem;
    color: var(--k-text-subtle);
}
.k-gbook__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.k-gbook__item {
    padding: 0.95rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid var(--k-border-soft, rgba(255,255,255,.08));
    background: rgba(255,255,255,.03);
}
.k-gbook__item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}
.k-gbook__item-head strong {
    font-size: 0.875rem;
    color: var(--k-text);
}
.k-gbook__item-head time {
    font-size: 0.75rem;
    color: var(--k-text-subtle);
}
.k-gbook__item-body {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--k-text-muted);
    white-space: pre-wrap;
    word-break: break-word;
}
.k-gbook__reply {
    margin: 0.65rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: 0.55rem;
    background: rgb(22 224 157 / 8%);
    border: 1px solid rgb(22 224 157 / 18%);
}
.k-gbook__reply strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    color: var(--k-primary, #16e09d);
}
.k-gbook__reply p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--k-text-muted);
    line-height: 1.5;
}
.k-gbook__captcha {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.k-gbook__captcha input {
    flex: 1;
    min-width: 7rem;
}
.k-gbook__captcha img {
    height: 2.5rem;
    border-radius: 0.4rem;
    border: 1px solid var(--k-interactive-border);
    cursor: pointer;
    background: var(--k-card-inner, var(--k-surface));
}
.k-gbook__remain {
    font-size: 0.75rem;
    color: var(--k-text-subtle);
}

/* 头像 */
.k-portrait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}
.k-portrait__preview {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgb(22 224 157 / 35%);
    background: rgba(255,255,255,.06);
}
.k-portrait__file {
    width: 100%;
}
.k-portrait__file input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px dashed rgba(255,255,255,.18);
    background: rgba(255,255,255,.03);
    color: var(--k-text-muted);
    font-size: 0.8125rem;
}

/* 绑定页发送码按钮行 */
.k-form__coderow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}
.k-form__coderow .k-btn {
    height: 2.75rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .k-form__row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        align-items: stretch;
    }
    .k-formstats {
        grid-template-columns: 1fr;
    }
    .k-formpage, .k-gbook {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   片单广场 · 桌面顶栏安全区
   #k-topnav 桌面是 absolute 浮层（不占流），explore 无 .k-page__bar，
   热门/最新与搜索会顶到视口上沿被右上 navpill 盖住（用户红箭头）。
   对照首页 .k-hero padding-top:3.625rem / 历史 .k-page__bar 总高约 3.25rem。
   移动端顶栏改为 sticky 回流，不再额外留位，避免双倍空白。
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
    .k-page.k-plpage--explore {
        /* 0.875rem topnav pad + ~2.35rem pill + 呼吸缝 ≈ 3.875rem（pill→tabs 约 12px+） */
        padding-top: 3.875rem;
    }

    /* 会员片库：与 explore 同口径，避免返回钮与 navpill 叠层 + 下方大块空白 */
    .k-page.k-hist,
    .k-page.k-favs,
    .k-page.k-sess {
        padding-top: 3.375rem;
    }

    .k-page.k-hist > .k-page__bar--lib.k-ais__bar,
    .k-page.k-favs > .k-page__bar--lib.k-ais__bar,
    .k-page.k-sess > .k-page__bar--lib.k-ais__bar {
        margin-bottom: 0.5rem;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   历史 / 片单内容安全区 —— 对齐首页 .k-home > .k-sec
   max-width:80rem + margin-inline:auto；页边仍吃壳层 --k-page-edge。
   大屏（1920）主列 ~1600，80rem=1280 → 左右各多约 160 呼吸区，不再贴左留右空。
   ══════════════════════════════════════════════════════════════════════════ */
.k-page.k-hist,
.k-page.k-favs,
.k-page.k-sess,
.k-page.k-plpage,
.k-page.k-pldet {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* 片单广场网格：去掉硬左偏（12px / 1600px→118px），改由 80rem 居中承担 */
.k-page.k-plpage .k-plgrid,
.k-page.k-pldet .k-plgrid {
    margin-left: 0;
    width: min(1092px, 100%);
    max-width: 100%;
}

@media (min-width: 1600px) {
    .k-page.k-plpage .k-tabs__group,
    .k-page.k-plpage .k-plsearch,
    .k-page.k-plpage .k-plgrid,
    .k-page.k-pldet .k-tabs__group,
    .k-page.k-pldet .k-plsearch,
    .k-page.k-pldet .k-plgrid {
        margin-left: 0;
    }
}

/* findpass: labeled fields inside auth panel */
.k-auth-panel .k-field > span { color: var(--k-text-subtle); }
.k-auth-panel .k-field .k-login__input { height: 2.75rem; }
.k-auth-panel .k-login { gap: 0.65rem; }


/* ══════════════════════════════════════════════════════════════════════════
   k-plpage--mine · 我的片单壳层（对齐源站 my-playlists / 用户目标截图）
   仅限 .k-plpage--mine 选择器，避免干扰历史会话宽度 / 广场页并行修改。
   ══════════════════════════════════════════════════════════════════════════ */
.k-page.k-plpage--mine > .k-page__title {
    display: none;
}

.k-plpage--mine .k-plnotice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0.5rem 0 1rem;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgb(var(--k-primary-rgb) / 28%);
    background: rgb(var(--k-primary-rgb) / 11%);
    color: var(--k-text);
}

.k-plpage--mine .k-plnotice[hidden] {
    display: none;
}

.k-plpage--mine .k-plnotice__icon {
    flex: 0 0 auto;
    display: inline-flex;
    color: var(--k-primary);
}

.k-plpage--mine .k-plnotice__copy {
    flex: 1;
    min-width: 0;
}

.k-plpage--mine .k-plnotice__copy strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--k-text);
}

.k-plpage--mine .k-plnotice__copy p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--k-text-muted);
}

.k-plpage--mine .k-plnotice__close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--k-text-muted);
    cursor: pointer;
}

.k-plpage--mine .k-plnotice__close:hover {
    color: var(--k-text);
    background: rgb(255 255 255 / 6%);
}

.k-plpage--mine .k-plpage__kinds {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
}

.k-plpage--mine .k-plpage__kind-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
}

.k-plpage--mine .k-plpage__kind-tabs > button {
    appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    position: relative;
    min-height: 44px;
    padding: 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--k-text-subtle);
}

.k-plpage--mine .k-plpage__kind-tabs > button.is-active {
    color: var(--k-text);
    font-weight: 700;
}

.k-plpage--mine .k-plpage__kind-tabs > button.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 22px;
    height: 3px;
    border-radius: 999px;
    background: var(--k-primary);
    transform: translateX(-50%);
}

.k-plpage--mine .k-plpage__new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 13px;
    border: 1px solid rgb(var(--k-primary-rgb) / 28%);
    background: rgb(var(--k-primary-rgb) / 11%);
    color: var(--k-text);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.k-plpage--mine .k-plpage__new:hover {
    border-color: var(--k-primary);
}

.k-plpage--mine .k-plpage__new svg {
    flex: none;
    width: 17px;
    height: 17px;
}

.k-plpage--mine .k-plsys {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    margin: 0 0 12px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgb(var(--k-primary-rgb) / 28%);
    background:
        radial-gradient(circle at 8% 15%, rgb(var(--k-primary-rgb) / 11%), transparent 38%),
        var(--k-card, rgb(255 255 255 / 4%));
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s, transform 0.18s;
}

.k-plpage--mine .k-plsys:hover {
    border-color: var(--k-primary);
    transform: translateY(-1px);
}

.k-plpage--mine .k-plsys__cover {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: rgb(var(--k-primary-rgb) / 12%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.k-plpage--mine .k-plsys__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.k-plpage--mine .k-plsys__cover--empty {
    color: var(--k-primary);
    background: linear-gradient(145deg, rgb(var(--k-primary-rgb) / 14%), rgb(255 255 255 / 4%));
}

.k-plpage--mine .k-plsys__cover--empty svg {
    width: 24px;
    height: 24px;
}

.k-plpage--mine .k-plsys__copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.k-plpage--mine .k-plsys__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.k-plpage--mine .k-plsys__title strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--k-text);
}

.k-plpage--mine .k-plsys__badge {
    padding: 2px 6px;
    border-radius: 999px;
    background: rgb(var(--k-primary-rgb) / 14%);
    color: var(--k-primary);
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
}

.k-plpage--mine .k-plsys__meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--k-text-subtle);
}

.k-plpage--mine .k-plsys__meta svg {
    width: 14px;
    height: 14px;
    flex: none;
}

.k-plpage--mine .k-plsys__arrow {
    padding: 0 8px;
    font-size: 26px;
    font-weight: 300;
    color: var(--k-text-subtle);
}

.k-plpage--mine .k-plpage__subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 8px;
}

.k-plpage--mine .k-plpage__subtabs {
    display: flex;
    align-items: center;
    gap: 18px;
}

.k-plpage--mine .k-plpage__subtabs > button {
    appearance: none;
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    position: relative;
    min-height: 40px;
    padding: 6px 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--k-text-subtle);
}

.k-plpage--mine .k-plpage__subtabs > button.is-active {
    color: var(--k-text);
    font-weight: 700;
}

.k-plpage--mine .k-plpage__subtabs > button.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 22px;
    height: 3px;
    border-radius: 999px;
    background: var(--k-primary);
    transform: translateX(-50%);
}

.k-plpage--mine .k-plsearch--mine {
    width: min(100%, 620px);
    margin: 8px 0 12px;
    margin-left: 0;
}

.k-plpage--mine .k-plempty {
    margin: 0.75rem 0 2rem;
    border: 1px solid var(--k-border-soft);
    border-style: solid;
    background: var(--k-tint);
}

.k-plpage--mine .k-plpage__empty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgb(var(--k-primary-rgb) / 45%);
    background: transparent;
    color: var(--k-text);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.k-plpage--mine .k-plpage__empty-btn:hover {
    border-color: var(--k-primary);
    background: rgb(var(--k-primary-rgb) / 8%);
}

.k-plpage--mine .k-plpage__empty-btn svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 639.98px) {
    .k-plpage--mine .k-plpage__new span {
        /* keep label; source H5 still shows 新建片单 */
    }
    .k-plpage--mine .k-plsys {
        grid-template-columns: 56px minmax(0, 1fr) auto;
    }
}


/* ═══ 追剧日历 /updates —— 对照 WatchCalendarRoute-DXvYCG2R.css ═══ */
.k-upd__content {
    width: 100%;
    max-width: 112rem;
    margin: 0 auto;
    padding: 0.25rem 0 5rem;
}

.k-upd__header {
    border-bottom: 1px solid var(--k-border-soft);
    padding: 0.25rem 0 1rem;
}

.k-upd__title-row,
.k-upd__title,
.k-upd__selected,
.k-upd__ghead,
.k-upd__loadmore {
    display: flex;
    align-items: center;
}

.k-upd__title-row {
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.k-upd__title {
    gap: 0.625rem;
    min-width: 0;
}

.k-upd__title > svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--k-primary-strong);
    flex: none;
}

.k-upd__title h1,
.k-upd__title p,
.k-upd__ghead h2,
.k-upd__ghead span,
.k-upd__copy h3,
.k-upd__copy p,
.k-upd__selected strong,
.k-upd__selected span {
    margin: 0;
}

.k-upd__title h1 {
    color: var(--k-text);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 2rem;
}

.k-upd__title p,
.k-upd__ghead > div > span,
.k-upd__more-hint,
.k-upd__copy p,
.k-upd__empty,
.k-upd__hint {
    color: var(--k-text-muted);
    font-size: 0.8125rem;
    line-height: 1.25rem;
}

.k-upd__title p {
    margin-top: 0.125rem;
}

.k-upd__meta {
    color: var(--k-text-muted);
    gap: 0.75rem;
    margin: 0.5rem 0 0 1.875rem;
    font-size: 0.75rem;
    line-height: 1.125rem;
    display: flex;
}

/* 七日 tab */
.k-upd__days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
    container-type: inline-size;
}

.k-upd__day {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.125rem;
    min-height: 5.25rem;
    padding: 0.375rem 0.25rem;
    border: 1px solid var(--k-border-soft);
    border-radius: 0.375rem;
    background: transparent;
    color: var(--k-text-muted);
    text-decoration: none;
    cursor: pointer;
}

.k-upd__day strong {
    color: var(--k-text);
    font-size: max(0.875rem, min(3cqi, 1rem));
    font-weight: 700;
}

.k-upd__day span,
.k-upd__day em {
    font-size: max(0.6875rem, min(2.2cqi, 0.75rem));
    font-style: normal;
    line-height: 1rem;
}

.k-upd__day em {
    min-height: 1rem;
    color: var(--k-text-subtle);
}

.k-upd__day[data-selected="true"] {
    border-color: var(--k-primary-strong);
    background: rgb(var(--k-primary-rgb) / 12%);
    color: var(--k-primary-strong);
}

.k-upd__day[data-selected="true"] strong,
.k-upd__day[data-selected="true"] em,
.k-upd__day[data-selected="true"] span {
    color: var(--k-primary-strong);
}

.k-upd__day:focus-visible {
    outline: 2px solid rgb(var(--k-primary-rgb) / 55%);
    outline-offset: 2px;
}

/* 当日标题 */
.k-upd__selected {
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.75rem;
}

.k-upd__selected > div {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
}

.k-upd__selected strong {
    color: var(--k-text);
    font-size: 1.125rem;
}

.k-upd__selected > span,
.k-upd__selected > div > span {
    color: var(--k-text-muted);
    font-size: 0.8125rem;
}

/* 分类 tab */
.k-upd__kinds {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.875rem;
    border-bottom: 1px solid var(--k-border-soft);
    container-type: inline-size;
}

.k-upd__kinds > a {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.25rem;
    padding: 0 0.125rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--k-text-muted);
    font-size: max(0.75rem, min(2.4cqi, 0.8125rem));
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.k-upd__kinds > a + a {
    margin-left: 0.875rem;
}

.k-upd__kinds > a[data-selected="true"],
.k-upd__kinds > a[aria-current="page"] {
    border-bottom-color: var(--k-primary-strong);
    color: var(--k-primary-strong);
}

/* 周切换 + 免责 */
.k-upd__controls {
    margin: 12px 0 20px;
}

.k-upd__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.k-upd__navbtn,
.k-upd__date,
.k-upd__sort {
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--k-border-soft);
    border-radius: 8px;
    background: var(--k-surface);
    color: var(--k-text);
    font: inherit;
    font-size: 0.8125rem;
    text-decoration: none;
    cursor: pointer;
}

.k-upd__navbtn:hover,
.k-upd__date:hover,
.k-upd__sort:hover {
    border-color: var(--k-primary-strong);
}

.k-upd__hint {
    opacity: 0.65;
    margin: 8px 0 0;
    font-size: 12px;
}

/* 分组 + 卡片网格 */
.k-upd__groups {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.k-upd__group {
    min-width: 0;
    padding-top: 0.875rem;
    border-top: 2px solid rgb(var(--k-primary-rgb) / 18%);
}

.k-upd__ghead {
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.k-upd__ghead > div {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.k-upd__ghead h2 {
    color: var(--k-text);
    font-size: 1rem;
    font-weight: 800;
}

.k-upd__more-hint {
    color: var(--k-primary-strong);
    font-size: 0.75rem;
}

.k-upd__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.k-upd__item {
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.k-upd__card {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr);
    gap: 0.625rem;
    min-width: 0;
}

.k-upd__poster {
    display: block;
    width: 100%;
    aspect-ratio: var(--k-cover-ratio);
    height: auto;
    border: 1px solid var(--k-border-soft);
    border-radius: 0.25rem;
    background: var(--k-bg-elevated);
    overflow: hidden;
}

.k-upd__poster > img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 与首页 k-mini__poster 一致：铺满槽、无黑边 */
    object-position: center 32%;
    display: block;
}

.k-upd__copy {
    min-width: 0;
    padding-top: 0.125rem;
}

.k-upd__copy h3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--k-text);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25rem;
}

.k-upd__copy p {
    margin-top: 0.375rem;
}

.k-upd__item:hover h3,
.k-upd__item:focus-visible h3 {
    color: var(--k-primary-strong);
}

.k-upd__empty {
    padding: 2rem 0;
}

.k-upd__loadmore {
    justify-content: center;
    margin-top: 1rem;
    min-height: 2.25rem;
    color: var(--k-text-subtle);
    font-size: 0.75rem;
}

.k-upd__loadmore--done {
    display: flex;
}

.k-upd__loadmore button {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 12rem;
    min-height: 2.25rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--k-border);
    border-radius: 0.5rem;
    background: var(--k-surface);
    color: var(--k-text);
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.16s, border-color 0.16s, transform 0.16s;
}

.k-upd__loadmore button span {
    color: var(--k-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.k-upd__loadmore button:hover {
    border-color: var(--k-primary-strong);
    background: rgb(var(--k-primary-rgb) / 12%);
    transform: translateY(-1px);
}

/* H5 */
@media (max-width: 639.98px) {
    .k-upd__content {
        padding-top: 0.25rem;
        padding-bottom: calc(5rem + var(--k-safe-bottom, 0px));
    }

    .k-upd__title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .k-upd__days {
        display: grid;
        grid-template-columns: repeat(7, 4.25rem);
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .k-upd__days::-webkit-scrollbar {
        display: none;
    }

    .k-upd__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .k-upd__loadmore button {
        width: 100%;
        min-height: 2.75rem;
    }

    .k-upd__kinds > a + a {
        margin-left: 0.25rem;
    }
    .k-upd__kinds > a {
        font-size: 0.75rem;
        margin-left: 0 !important;
    }
    .k-upd__kinds > a + a {
        margin-left: 0.25rem !important;
    }
}

/* 平板 */
@media (min-width: 640px) and (max-width: 1199.98px) {
    .k-upd__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 隐藏旧类名残留（若缓存片段） */
.k-upd > .k-upd__head,
.k-upd > .k-upd__cal,
.k-upd > .k-upd__daybar,
.k-upd > .k-upd__tabs,
.k-upd > .k-upd__week {
    /* no-op placeholders kept for safety */
}
