:root {
    --douyin-bg: #090a0c;
    --douyin-panel: #18191c;
    --douyin-pink: #fe2c55;
    --douyin-cyan: #25f4ee;
    --douyin-text: #fff;
}

html,
body.bili-douyin-mode {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--douyin-bg) !important;
}

body.bili-douyin-mode * {
    box-sizing: border-box;
}

body.bili-douyin-mode #wpadminbar,
body.bili-douyin-mode .bili-mobile-tabbar,
body.bili-douyin-mode .bili-app-header,
body.bili-douyin-mode .float-right {
    display: none !important;
}

.douyin-app {
    position: fixed;
    inset: 0;
    z-index: 999999;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.douyin-topbar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    height: calc(58px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 8px 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .58), rgba(0, 0, 0, 0));
    pointer-events: none;
}

.douyin-topbar a,
.douyin-topbar button {
    pointer-events: auto;
}

.douyin-top-btn {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.douyin-menu {
    position: relative;
    overflow: visible;
}

.douyin-menu-exit-hint {
    position: absolute;
    top: 9px;
    right: -4px;
    display: inline-flex;
    height: 12px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 6px;
    background: rgba(251, 114, 153, .72);
    color: #fff;
    font-size: 8px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .02em;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(251, 114, 153, .18);
}

.douyin-top-btn svg {
    display: block;
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}

.douyin-mute .is-sound {
    display: none;
}

.douyin-mute[aria-pressed="true"] .is-muted {
    display: block;
}

.douyin-mute[aria-pressed="true"] .is-sound {
    display: none;
}

.douyin-mute[aria-pressed="false"] .is-muted {
    display: none;
}

.douyin-mute[aria-pressed="false"] .is-sound {
    display: block;
}

.douyin-tabs {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 48px;
    pointer-events: auto;
    scrollbar-width: none;
    scroll-behavior: auto;
    touch-action: pan-x;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    -webkit-user-select: none;
    user-select: none;
    cursor: grab;
}

.douyin-tabs::-webkit-scrollbar {
    display: none;
}

.douyin-tabs.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.douyin-tabs a {
    position: relative;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .72);
    font-size: 17px;
    font-weight: 600;
    touch-action: pan-x;
    text-decoration: none;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .5);
    user-select: none;
    -webkit-user-drag: none;
    white-space: nowrap;
}

.douyin-tabs a.active {
    color: #fff;
    font-size: 18px;
}

.douyin-tabs a.active::after {
    position: absolute;
    right: 5px;
    bottom: -9px;
    left: 5px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    content: "";
}

.douyin-playback-settings-wrap {
    position: absolute;
    top: calc(66px + env(safe-area-inset-top, 0px));
    right: 12px;
    z-index: 35;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 5px;
    pointer-events: auto;
}

.douyin-playback-settings-toggle {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    background: rgba(0, 0, 0, .38);
    color: rgba(255, 255, 255, .88);
    cursor: pointer;
    backdrop-filter: blur(9px);
}

.douyin-playback-settings-toggle svg {
    display: block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.douyin-playback-status {
    display: inline-flex;
    min-height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 9px;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.douyin-playback-status[hidden] {
    display: none !important;
}

.douyin-playback-sheet-layer {
    position: absolute;
    inset: 0;
    z-index: 90;
    visibility: hidden;
    pointer-events: none;
}

.douyin-playback-sheet-layer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.douyin-playback-sheet-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .48);
    opacity: 0;
    cursor: default;
    transition: opacity .22s ease;
}

.douyin-playback-sheet-layer.is-open .douyin-playback-sheet-backdrop {
    opacity: 1;
}

.douyin-playback-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: min(66%, 560px);
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #fff;
    color: #161823;
    transform: translateY(102%);
    transition: transform .26s cubic-bezier(.22, .75, .28, 1);
}

.douyin-playback-sheet-layer.is-open .douyin-playback-sheet {
    transform: translateY(0);
}

.douyin-playback-sheet-header {
    display: flex;
    height: 52px;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid rgba(22, 24, 35, .08);
}

.douyin-playback-sheet-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.douyin-playback-sheet-close {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f2f3;
    color: #555b66;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.douyin-playback-sheet-body {
    max-height: calc(min(66vh, 560px) - 52px);
    overflow-y: auto;
    padding: 14px 15px calc(18px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
}

.douyin-playback-group + .douyin-playback-group {
    margin-top: 18px;
}

.douyin-playback-group h3 {
    margin: 0 0 9px;
    color: #7a7e87;
    font-size: 13px;
    font-weight: 600;
}

.douyin-playback-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.douyin-playback-options button {
    display: inline-flex;
    min-width: 82px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid #e4e6e9;
    border-radius: 17px;
    background: #f6f7f8;
    color: #4f545d;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.douyin-playback-options button.is-active {
    border-color: #fe2c55;
    background: rgba(254, 44, 85, .1);
    color: #fe2c55;
}

@media (max-width: 380px) {
    .douyin-playback-options button {
        min-width: 72px;
        padding: 0 10px;
        font-size: 12px;
    }
}
.douyin-feed {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: min(100vw, 520px);
    height: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    overflow-y: auto;
    background: #000;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.douyin-feed::-webkit-scrollbar {
    display: none;
}

.douyin-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #000;
}

.douyin-video,
.douyin-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.douyin-video {
    z-index: 1;
    object-fit: contain;
    background: #000;
}

.douyin-slide:not(.is-portrait) .douyin-video {
    object-fit: contain;
    object-position: center 40%;
}

.douyin-slide.is-portrait .douyin-video {
    object-fit: contain;
    object-position: center center;
}

.douyin-cover {
    z-index: 1;
    background-color: #000;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: none;
    transform: none;
}

.douyin-slide.is-portrait .douyin-cover {
    background-size: cover;
    filter: blur(2px) brightness(.72);
    transform: scale(1.02);
}

.douyin-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, transparent 28%),
        linear-gradient(0deg, rgba(0, 0, 0, .72) 0%, transparent 42%);
    pointer-events: none;
}

.douyin-danmaku-layer {
    position: absolute;
    top: calc(68px + env(safe-area-inset-top, 0px));
    right: 0;
    bottom: calc(205px + env(safe-area-inset-bottom, 0px));
    left: 0;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
}

.douyin-danmaku-item {
    position: absolute;
    left: 100%;
    display: inline-flex;
    max-width: none;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    opacity: .86;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .78), 0 0 2px rgba(0, 0, 0, .55);
    white-space: nowrap;
    will-change: transform;
    animation: douyin-danmaku-scroll var(--douyin-danmaku-duration, 4s) linear forwards;
}

.douyin-danmaku-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    object-fit: contain;
    opacity: .82;
}

.douyin-danmaku-author {
    color: #fff;
    font-weight: 700;
}

.douyin-danmaku-text {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #fff;
}

.douyin-danmaku-emoji {
    display: inline-block;
    width: 1.35em;
    height: 1.35em;
    object-fit: contain;
    vertical-align: middle;
}

.douyin-danmaku-emoji.is-large {
    width: 2.05em;
    height: 2.05em;
    margin: -.24em .06em;
}

@keyframes douyin-danmaku-scroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-1 * var(--douyin-danmaku-distance, 120vw)), 0, 0); }
}

.douyin-greeting-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 12;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 7px 12px;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(20, 21, 24, .72);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 17px;
    text-align: center;
    text-decoration: none;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .58);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-50% + 8px));
    transition: opacity .2s ease, transform .2s ease;
    backdrop-filter: blur(8px);
}

.douyin-greeting-banner.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.douyin-greeting-banner a,
a.douyin-greeting-banner {
    pointer-events: auto;
    cursor: pointer;
}

.douyin-greeting-name-wrap {
    display: inline-block;
    line-height: inherit;
    vertical-align: baseline;
    white-space: nowrap;
}

.douyin-greeting-name-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 3px;
    object-fit: contain;
    vertical-align: -2px;
}

@media (max-width: 782px) {
    .douyin-danmaku-layer {
        top: calc(62px + env(safe-area-inset-top, 0px));
        bottom: calc(190px + env(safe-area-inset-bottom, 0px));
    }

    .douyin-danmaku-item {
        font-size: 13px;
    }

    .douyin-greeting-banner {
        max-width: calc(100% - 24px);
        padding: 6px 10px;
        font-size: 11px;
        line-height: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .douyin-danmaku-item {
        animation-duration: .01ms !important;
    }
}
.douyin-progress {
    position: absolute;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    left: 0;
    z-index: 14;
    display: block;
    width: 100%;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    touch-action: none;
}

.douyin-progress-track {
    position: absolute;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 2px);
    left: 0;
    display: block;
    height: 4px;
    overflow: hidden;
    border-radius: 2px 2px 0 0;
    background: rgba(255, 255, 255, .3);
    pointer-events: none;
}

.douyin-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 0 2px 2px 0;
    background: #fff;
    box-shadow: 0 0 5px rgba(255, 255, 255, .72);
    pointer-events: none;
    transition: width .08s linear;
}

.douyin-progress-time {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    z-index: 16;
    display: inline-flex;
    min-width: 96px;
    height: 25px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(12, 12, 14, .82);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .16s ease, transform .16s ease;
    backdrop-filter: blur(8px);
}

.douyin-progress-time.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.douyin-progress-time.align-left {
    transform: translate(-8px, 4px);
}

.douyin-progress-time.align-left.is-visible {
    transform: translate(-8px, 0);
}

.douyin-progress-time.align-right {
    transform: translate(calc(-100% + 8px), 4px);
}

.douyin-progress-time.align-right.is-visible {
    transform: translate(calc(-100% + 8px), 0);
}

.douyin-progress-current {
    color: #fff;
}

.douyin-progress-remaining {
    margin-left: 6px;
    color: rgba(255, 255, 255, .68);
}

.douyin-progress:hover .douyin-progress-track,
.douyin-progress:focus-visible .douyin-progress-track {
    background: rgba(255, 255, 255, .42);
}

.douyin-progress:focus-visible {
    outline: none;
}

.douyin-slide.is-locked .douyin-danmaku-layer {
    position: absolute;
    top: calc(68px + env(safe-area-inset-top, 0px));
    right: 0;
    bottom: calc(205px + env(safe-area-inset-bottom, 0px));
    left: 0;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
}

.douyin-danmaku-item {
    position: absolute;
    left: 100%;
    display: inline-flex;
    max-width: none;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    opacity: .86;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .78), 0 0 2px rgba(0, 0, 0, .55);
    white-space: nowrap;
    will-change: transform;
    animation: douyin-danmaku-scroll var(--douyin-danmaku-duration, 4s) linear forwards;
}

.douyin-danmaku-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    object-fit: contain;
    opacity: .82;
}

.douyin-danmaku-author {
    color: #fff;
    font-weight: 700;
}

.douyin-danmaku-text {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #fff;
}

.douyin-danmaku-emoji {
    display: inline-block;
    width: 1.35em;
    height: 1.35em;
    object-fit: contain;
    vertical-align: middle;
}

.douyin-danmaku-emoji.is-large {
    width: 2.05em;
    height: 2.05em;
    margin: -.24em .06em;
}

@keyframes douyin-danmaku-scroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-1 * var(--douyin-danmaku-distance, 120vw)), 0, 0); }
}

.douyin-greeting-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 12;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 7px 12px;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(20, 21, 24, .72);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 17px;
    text-align: center;
    text-decoration: none;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .58);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-50% + 8px));
    transition: opacity .2s ease, transform .2s ease;
    backdrop-filter: blur(8px);
}

.douyin-greeting-banner.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.douyin-greeting-banner a,
a.douyin-greeting-banner {
    pointer-events: auto;
    cursor: pointer;
}

.douyin-greeting-name-wrap {
    display: inline-block;
    line-height: inherit;
    vertical-align: baseline;
    white-space: nowrap;
}

.douyin-greeting-name-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 3px;
    object-fit: contain;
    vertical-align: -2px;
}

@media (max-width: 782px) {
    .douyin-danmaku-layer {
        top: calc(62px + env(safe-area-inset-top, 0px));
        bottom: calc(190px + env(safe-area-inset-bottom, 0px));
    }

    .douyin-danmaku-item {
        font-size: 13px;
    }

    .douyin-greeting-banner {
        max-width: calc(100% - 24px);
        padding: 6px 10px;
        font-size: 11px;
        line-height: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .douyin-danmaku-item {
        animation-duration: .01ms !important;
    }
}
.douyin-caption {
    position: absolute;
    right: 86px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    z-index: 8;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .65);
}

.douyin-author {
    display: inline-block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
}

.douyin-caption h1 {
    margin: 0 0 9px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
}

.douyin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.douyin-meta span {
    color: rgba(255, 255, 255, .9);
    font-size: 13px;
    line-height: 1.3;
}

.douyin-actions {
    position: absolute;
    right: 10px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    z-index: 10;
    display: flex;
    width: 64px;
    align-items: center;
    flex-direction: column;
    gap: 18px;
}

.douyin-action {
    display: flex;
    width: 56px;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.douyin-action-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 0;
    background: transparent;
}

.douyin-action-icon svg {
    display: block;
    width: 31px;
    height: 31px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .48));
}

.douyin-action-icon svg.douyin-icon-fill {
    fill: #fff;
    stroke: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .45));
}

.douyin-action.douyin-mute .douyin-action-icon svg {
    width: 30px;
    height: 30px;
}

.douyin-action em {
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .8);
}

.douyin-avatar {
    width: 50px;
    height: 50px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: #333;
}

.douyin-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.douyin-like.is-active .douyin-action-icon svg {
    fill: var(--douyin-pink);
    stroke: var(--douyin-pink);
}

.douyin-like.is-active em {
    color: var(--douyin-pink);
}

.douyin-favorite.is-saved .douyin-action-icon svg {
    fill: var(--douyin-pink);
    stroke: var(--douyin-pink);
}

.douyin-favorite.is-saved em {
    color: var(--douyin-pink);
}

.douyin-play-toggle {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.douyin-play-toggle svg {
    display: none;
    width: 78px;
    height: 78px;
    fill: rgba(0, 0, 0, .42);
    stroke: rgba(255, 255, 255, .9);
    stroke-width: 1.5;
    filter: drop-shadow(0 5px 18px rgba(0, 0, 0, .35));
}

.douyin-slide.is-paused .douyin-play-toggle svg {
    display: block;
}

.douyin-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 7;
    display: flex;
    min-width: 220px;
    align-items: center;
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(20, 20, 22, .82);
    flex-direction: column;
    gap: 8px;
    text-align: center;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(12px);
}

.douyin-lock span {
    color: #ffb6c6;
    font-size: 12px;
}

.douyin-lock strong {
    font-size: 17px;
}

.douyin-lock a,
.douyin-lock button {
    display: inline-flex;
    min-width: 90px;
    height: 36px;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    border: 0;
    border-radius: 18px;
    background: var(--douyin-pink);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.douyin-swipe-hint {
    position: absolute;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    z-index: 9;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    opacity: 1;
    pointer-events: none;
    transform: translateX(-50%);
    animation: douyinSwipeBounce 1.8s ease-in-out infinite;
}

.douyin-slide:not(:first-child) .douyin-swipe-hint {
    display: none;
}

@keyframes douyinSwipeBounce {
    0%, 100% { transform: translate(-50%, 0); opacity: .55; }
    50% { transform: translate(-50%, -7px); opacity: 1; }
}

.douyin-empty {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    padding: 30px;
    background: #111;
    text-align: center;
}

.douyin-empty h1 {
    margin: 0 0 10px;
    font-size: 22px;
}

.douyin-empty p {
    margin: 0 0 20px;
    color: #aaa;
}

.douyin-empty a {
    color: var(--douyin-pink);
}

/* 抖音式评论抽屉 */
.douyin-bottom-nav {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding: 5px 14px env(safe-area-inset-bottom, 0px);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .78) 42%, rgba(0, 0, 0, .94));
    pointer-events: auto;
}

.douyin-bottom-nav > a,
.douyin-bottom-nav > button.douyin-bottom-create {
    position: relative;
    display: flex;
    width: 100%;
    height: 46px;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .68);
    font-family: inherit;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
    cursor: pointer;
}

.douyin-bottom-create {
    position: relative;
    display: flex;
    width: 100%;
    height: 46px;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .68);
    font-family: inherit;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
    cursor: pointer;
}

.douyin-bottom-nav > a.active {
    color: #fff;
}

.douyin-bottom-nav > a > svg {
    display: block;
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.douyin-bottom-nav > a > span:not(.douyin-create-button) {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.douyin-bottom-favorite-badge {
    position: absolute;
    top: -5px;
    right: 3px;
    z-index: 2;
    display: inline-flex;
    height: 15px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 8px;
    background: linear-gradient(90deg, #fe2c55, #ff6584);
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .28);
    pointer-events: none;
}

.douyin-bottom-message-badge {
    position: absolute;
    top: -5px;
    right: 3px;
    z-index: 2;
    display: inline-flex;
    min-width: 16px;
    height: 15px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 8px;
    background: linear-gradient(90deg, #fe2c55, #ff6584);
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .28);
    pointer-events: none;
}

.douyin-bottom-create {
    justify-content: flex-start !important;
}

.douyin-save-check {
    display: none !important;
}

.douyin-save-current.is-saved .douyin-save-plus {
    display: none !important;
}

.douyin-save-current.is-saved .douyin-save-check {
    display: block !important;
}

.douyin-save-current.is-saved .douyin-create-button {
    background: #fe2c55;
    color: #fff !important;
    box-shadow: 0 0 0 3px rgba(254, 44, 85, .18), 0 3px 10px rgba(0, 0, 0, .38);
}

.douyin-create-button {
    display: grid;
    width: 39px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: #fff;
    color: #111 !important;
    box-shadow: -3px 0 0 rgba(37, 244, 238, .9), 3px 0 0 rgba(254, 44, 85, .9), 0 3px 8px rgba(0, 0, 0, .38);
}

.douyin-create-button svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}
.douyin-comment-layer {
    position: absolute;
    inset: 0;
    z-index: 80;
    visibility: hidden;
    pointer-events: none;
}

.douyin-comment-layer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.douyin-comment-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .46);
    opacity: 0;
    cursor: default;
    transition: opacity .25s ease;
}

.douyin-comment-layer.is-open .douyin-comment-backdrop {
    opacity: 1;
}

.douyin-comment-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    height: min(72%, 650px);
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #fff;
    color: #161823;
    flex-direction: column;
    transform: translateY(102%);
    transition: transform .28s cubic-bezier(.22, .75, .28, 1);
}

.douyin-comment-layer.is-open .douyin-comment-sheet {
    transform: translateY(0);
}

.douyin-comment-header {
    position: relative;
    display: grid;
    height: 52px;
    flex: 0 0 52px;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    border-bottom: 1px solid rgba(22, 24, 35, .08);
    background: #fff;
}

.douyin-comment-header h2 {
    margin: 0;
    color: #161823;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.douyin-comment-close {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #161823;
    cursor: pointer;
}

.douyin-comment-close svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
}

.douyin-comment-list {
    min-height: 0;
    padding: 15px 16px 8px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
}

.douyin-comment-pinned-article {
    position: relative;
    margin: 0 0 18px;
    padding: 2px 0 18px;
    border: 0;
    border-bottom: 1px solid #eceff2;
    border-radius: 0;
    background: #fff;
}
.douyin-comment-pinned-pin {
    position: absolute;
    top: 0;
    right: 0;
    padding: 2px 7px;
    border-radius: 8px;
    background: #fb7299;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
}
.douyin-comment-pinned-author-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.douyin-comment-pinned-author-name.is-vip-user {
    color: #fb7299;
    font-weight: 700;
}
.douyin-comment-pinned-vip-icon,
.douyin-comment-pinned-level-icon {
    display: block;
    width: auto;
    height: 15px;
    max-width: 44px;
    flex: 0 0 auto;
    object-fit: contain;
}
.douyin-comment-pinned-up {
    display: inline-flex;
    height: 14px;
    align-items: center;
    padding: 0 4px;
    border-radius: 5px;
    background: #fb7299;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}
.douyin-comment-pinned-follow {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fb7299;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.douyin-comment-pinned-follow.is-followed {
    background: #d7d9dd;
    color: #fff;
}
.douyin-comment-pinned-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.douyin-comment-pinned-avatar-link {
    position: relative;
    display: block;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    overflow: visible;
}
.douyin-comment-pinned-avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #eef0f2;
    object-fit: cover;
}
.douyin-comment-pinned-avatar-vip {
    position: absolute;
    right: -3px;
    bottom: -3px;
    display: block;
    width: 17px;
    height: 17px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
.douyin-comment-pinned-author-meta {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}
.douyin-comment-pinned-author-name {
    overflow: hidden;
    color: #17181b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.douyin-comment-pinned-kicker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #9499a0;
    font-size: 11px;
    line-height: 1;
}
.douyin-comment-pinned-kicker em {
    padding: 2px 6px;
    border-radius: 7px;
    background: #fb7299;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
}
.douyin-comment-pinned-title {
    display: block;
    margin: 0 0 10px;
    color: #17181b;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}
.douyin-comment-pinned-body {
    position: relative;
    max-height: 180px;
    overflow: hidden;
    color: #25272b;
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.douyin-comment-pinned-article.is-expanded .douyin-comment-pinned-body {
    max-height: none;
}
.douyin-comment-pinned-body::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 42px;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 82%);
    content: "";
    pointer-events: none;
}
.douyin-comment-pinned-article.is-expanded .douyin-comment-pinned-body::after {
    display: none;
}
.douyin-comment-pinned-body p {
    margin: 0 0 10px;
}
.douyin-comment-pinned-body h2,
.douyin-comment-pinned-body h3,
.douyin-comment-pinned-body h4 {
    margin: 16px 0 8px;
    color: #17181b;
    font-weight: 700;
    line-height: 1.45;
}
.douyin-comment-pinned-body blockquote {
    margin: 12px 0;
    padding: 8px 12px;
    border-left: 3px solid #fb7299;
    background: #f7f8fa;
    color: #61666d;
}
.douyin-comment-pinned-body ul,
.douyin-comment-pinned-body ol {
    margin: 8px 0 12px;
    padding-left: 22px;
}
.douyin-comment-pinned-body figure {
    margin: 12px 0;
}
.douyin-comment-pinned-body img {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 8px auto;
    border-radius: 8px;
}
.douyin-comment-pinned-body p:last-child {
    margin-bottom: 0;
}
.douyin-comment-pinned-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f1f3;
}
.douyin-comment-pinned-expand {
    padding: 0;
    border: 0;
    background: transparent;
    color: #fb7299;
    font-size: 12px;
    cursor: pointer;
}
.douyin-comment-pinned-link {
    margin-left: auto;
    color: #00a1d6;
    font-size: 12px;
    text-decoration: none;
}
.douyin-comment-pinned-limited {
    color: #8a9098;
    font-size: 12px;
}
.douyin-comment-pinned-loading {
    color: #9499a0;
}

.douyin-comment-text .bili-emoji-small,
.douyin-comment-pinned-body .bili-emoji-small {
    width: 22px !important;
    height: auto !important;
    margin: 0 1px;
    vertical-align: -4px;
}

.douyin-comment-text .bili-emoji-large,
.douyin-comment-pinned-body .bili-emoji-large {
    width: 40px !important;
    height: auto !important;
    margin: 2px 3px;
    vertical-align: -7px;
}

.douyin-comment-text .bili-emoji-small,
.douyin-comment-pinned-body .bili-emoji-small {
    width: 22px !important;
    height: auto !important;
    margin: 0 1px;
    vertical-align: -4px;
}

.douyin-comment-text .bili-emoji-large,
.douyin-comment-pinned-body .bili-emoji-large {
    width: 40px !important;
    height: auto !important;
    margin: 2px 3px;
    vertical-align: -7px;
}

.douyin-comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.douyin-comment-item.is-reply {
    margin-bottom: 16px;
    margin-left: 46px;
    padding-left: 10px;
    border-left: 2px solid #f1f2f3;
}

.douyin-comment-replies {
    margin-top: 10px;
}

.douyin-comment-avatar-wrap {
    position: relative;
    display: block;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}

.douyin-comment-avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #f1f2f3;
    object-fit: cover;
}

.douyin-comment-vip-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    display: block;
    width: 17px;
    height: 17px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
}

.douyin-comment-main {
    min-width: 0;
    flex: 1 1 auto;
}

.douyin-comment-name {
    display: block;
    overflow: hidden;
    margin: 1px 0 5px;
    color: #7a7e87;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.douyin-comment-name.is-vip-user {
    color: #fb7299;
    font-weight: 700;
}

.douyin-comment-text {
    margin: 0;
    color: #161823;
    font-size: 15px;
    line-height: 1.48;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.douyin-comment-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.douyin-comment-time {
    display: block;
    color: #9da2ab;
    font-size: 12px;
    line-height: 1.2;
}

.douyin-comment-reply-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #7a7e87;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.douyin-comment-reply-button:hover {
    color: #fe2c55;
}

.douyin-comment-like {
    display: flex;
    width: 34px;
    flex: 0 0 34px;
    align-items: center;
    padding: 2px 0 0;
    border: 0;
    background: transparent;
    color: #8a8f99;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
}

.douyin-comment-like svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.douyin-comment-like.is-active {
    color: #fe2c55;
}

.douyin-comment-like.is-active svg {
    fill: currentColor;
}

.douyin-comment-like em {
    font-size: 11px;
    font-style: normal;
    line-height: 1;
}

.douyin-comment-empty {
    display: grid;
    min-height: 180px;
    place-items: center;
    color: #9da2ab;
    font-size: 14px;
    text-align: center;
}

.douyin-comment-form {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 38px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 9px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(22, 24, 35, .08);
    background: #fff;
}

.douyin-comment-self-avatar {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f2f3;
    object-fit: cover;
}

.douyin-comment-reply-target {
    display: flex;
    min-height: 28px;
    align-items: center;
    justify-content: space-between;
    grid-column: 1 / -1;
    margin: -2px 0 6px;
    padding: 5px 9px;
    border-radius: 8px;
    background: #f6f7f8;
    color: #7a7e87;
    font-size: 13px;
}

.douyin-comment-reply-target[hidden] {
    display: none !important;
}

.douyin-comment-reply-target em {
    color: #fe2c55;
    font-style: normal;
    font-weight: 600;
}

.douyin-comment-reply-cancel {
    padding: 0;
    border: 0;
    background: transparent;
    color: #7a7e87;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.douyin-comment-input-box {
    display: flex;
    height: 40px;
    min-width: 0;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0 12px;
    border-radius: 20px;
    background: #f1f2f3;
}

.douyin-comment-emoji-toggle {
    display: grid;
    width: 24px;
    height: 32px;
    flex: 0 0 24px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #5f6470;
    cursor: pointer;
}

.douyin-comment-input-box svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.douyin-comment-input-box input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #161823;
    font-family: inherit;
    font-size: 14px;
}

.douyin-comment-input-box input::placeholder {
    color: #8f949e;
}

.douyin-comment-text img {
    width: 24px;
    height: 24px;
    margin: 0 1px;
    vertical-align: -5px;
    object-fit: contain;
}

.douyin-comment-text img.bili-emoji-large {
    width: 34px;
    height: 34px;
    vertical-align: -8px;
}

.douyin-comment-emoji-picker {
    position: absolute;
    right: 12px;
    bottom: calc(100% + 7px);
    left: 12px;
    z-index: 7;
    display: none;
    height: 274px;
    overflow: hidden;
    border: 1px solid rgba(22, 24, 35, .08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .18);
    flex-direction: column;
}

.douyin-comment-emoji-picker.is-open {
    display: flex;
}

.douyin-comment-emoji-tabs {
    display: flex;
    flex: 0 0 43px;
    align-items: center;
    gap: 18px;
    padding: 0 14px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(22, 24, 35, .08);
    scrollbar-width: none;
}

.douyin-comment-emoji-tabs::-webkit-scrollbar,
.douyin-comment-emoji-panel::-webkit-scrollbar {
    display: none;
}

.douyin-comment-emoji-tab {
    flex: 0 0 auto;
    padding: 11px 0 10px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #7b8089;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.douyin-comment-emoji-tab.active {
    border-bottom-color: #fe2c55;
    color: #161823;
    font-weight: 600;
}

.douyin-comment-emoji-panel {
    display: none;
    min-height: 0;
    padding: 10px 10px 14px;
    overflow-y: auto;
    flex: 1 1 auto;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 4px;
}

.douyin-comment-emoji-panel.active {
    display: grid;
}

.douyin-comment-emoji-choice {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    padding: 2px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
}

.douyin-comment-emoji-choice:hover {
    background: #f2f3f5;
}

.douyin-comment-emoji-choice img {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}
.douyin-comment-send {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fe2c55;
    color: #fff;
    cursor: pointer;
}

.douyin-comment-send:disabled {
    opacity: .5;
    cursor: wait;
}

.douyin-comment-send svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.douyin-toast {
    position: absolute;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    z-index: 120;
    max-width: calc(100% - 48px);
    padding: 9px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity .2s ease, transform .2s ease;
}

.douyin-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
@media (min-width: 783px) {
    body.bili-douyin-mode {
        background: #0c0d0f !important;
    }

    .douyin-app {
        width: min(100vw, 520px);
        margin: 0 auto;
        box-shadow: 0 0 50px rgba(0, 0, 0, .65);
    }

    .douyin-topbar {
        right: auto;
        left: 50%;
        width: min(100vw, 520px);
        transform: translateX(-50%);
    }
}

@media (max-width: 380px) {
    .douyin-caption {
        right: 78px;
        left: 12px;
    }

    .douyin-actions {
        right: 4px;
        width: 60px;
    }

    .douyin-caption h1 {
        font-size: 14px;
    }
}

@media (max-height: 700px) {
    .douyin-actions {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        gap: 12px;
    }

    .douyin-action-icon {
        width: 42px;
        height: 42px;
    }

    .douyin-action-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* 复用父主题支付弹窗时，确保弹窗始终位于抖音全屏容器上方。 */
body.bili-douyin-mode .modal,
body.bili-douyin-mode.modal-open .modal.in {
    z-index: 1000100 !important;
}

body.bili-douyin-mode .modal-backdrop,
body.bili-douyin-mode.modal-open .modal-backdrop {
    z-index: 1000090 !important;
}
@media (max-width: 782px) {
    body.bili-douyin-mode.modal-open #modal_pay_uservip.in {
        z-index: 1000100 !important;
    }

    body.bili-douyin-mode.modal-open #modal_pay_uservip.in .modal-dialog {
        position: relative;
        z-index: 1000101;
    }
}

/* 一级会员抖音模式每日限额提示。 */
.douyin-vip1-limit {
    position: absolute;
    inset: 0;
    z-index: 180;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .74);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
    backdrop-filter: blur(6px);
}

.douyin-vip1-limit.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.douyin-vip1-limit-card {
    position: relative;
    width: min(100%, 360px);
    padding: 30px 22px 22px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 20px;
    background: #1b1c20;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
    text-align: center;
}

.douyin-vip1-limit-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .72);
    font-size: 20px;
    line-height: 28px;
    cursor: pointer;
}

.douyin-vip1-limit-kicker {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(254, 44, 85, .14);
    color: #ff6b88;
    font-size: 12px;
}

.douyin-vip1-limit-card h2 {
    margin: 14px 0 9px;
    color: #fff;
    font-size: 20px;
    line-height: 1.35;
}

.douyin-vip1-limit-card p {
    margin: 0;
    color: rgba(255, 255, 255, .68);
    font-size: 14px;
    line-height: 1.65;
}

.douyin-vip1-limit-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
}

.douyin-vip1-limit-progress strong {
    color: #fff;
    font-size: 15px;
}

.douyin-vip1-limit-progress em {
    color: #fe2c55;
    font-style: normal;
}

.douyin-vip1-upgrade {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, #ff4f75, #fe2c55);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 9px 24px rgba(254, 44, 85, .28);
}

/* 彻底隐藏 Chromium 内核注入的播放、退 15 秒、进 15 秒等原生控件。 */
.douyin-video::-webkit-media-controls-overlay-play-button,
.douyin-video::-webkit-media-controls-start-playback-button,
.douyin-video::-webkit-media-controls-play-button,
.douyin-video::-webkit-media-controls-timeline,
.douyin-video::-webkit-media-controls-current-time-display,
.douyin-video::-webkit-media-controls-time-remaining-display,
.douyin-video::-webkit-media-controls-mute-button,
.douyin-video::-webkit-media-controls-volume-slider,
.douyin-video::-webkit-media-controls-toggle-closed-captions-button,
.douyin-video::-webkit-media-controls-fullscreen-button,
.douyin-video::-webkit-media-controls-rewind-button,
.douyin-video::-webkit-media-controls-return-to-realtime-button {
    display: none !important;
    -webkit-appearance: none !important;
}
/* 禁用网页视频的原生播放控件，避免手机浏览器覆盖播放/快退快进按钮。 */
.douyin-video::-webkit-media-controls,
.douyin-video::-webkit-media-controls-enclosure,
.douyin-video::-webkit-media-controls-panel {
    display: none !important;
}

/* ===== 官方抖音风格 UI 覆盖 ===== */
.douyin-app {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.douyin-topbar {
    height: calc(62px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 10px 0;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .14) 72%, transparent);
    pointer-events: none;
}

.douyin-top-btn {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.douyin-top-btn svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .45));
}

.douyin-back svg,
.douyin-search svg {
    width: 29px;
    height: 29px;
}

.douyin-tabs {
    justify-content: flex-start;
    gap: 22px;
    padding-left: 6px;
    padding-right: 4px;
    pointer-events: auto;
    touch-action: pan-x;
    overscroll-behavior-inline: contain;
}

.douyin-tabs a {
    color: rgba(255, 255, 255, .72);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .6);
}

.douyin-tabs a.active {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.douyin-tabs a.active::after {
    right: 4px;
    bottom: -13px;
    left: 4px;
    height: 2px;
    background: #fff;
    box-shadow: 0 0 5px rgba(255, 255, 255, .55);
}

.douyin-playback-settings-wrap {
    top: auto;
    right: 11px;
    bottom: calc(91px + env(safe-area-inset-bottom, 0px));
    z-index: 35;
}

.douyin-playback-settings-toggle {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(16, 16, 18, .42);
    color: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .35);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.douyin-playback-settings-toggle svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45));
}

.douyin-playback-settings-toggle[aria-expanded="true"] {
    background: rgba(254, 44, 85, .82);
}

.douyin-playback-status {
    position: absolute;
    right: 54px;
    bottom: 12px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .42);
    color: #fff;
    font-size: 10px;
    line-height: 24px;
    white-space: nowrap;
}

.douyin-caption {
    right: 80px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    left: 16px;
}

.douyin-author {
    margin-bottom: 7px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .1px;
}

.douyin-caption h1 {
    display: -webkit-box;
    max-width: 100%;
    margin-bottom: 7px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.douyin-meta {
    gap: 5px;
}

.douyin-meta span {
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .20);
    font-size: 11px;
}

.douyin-music {
    display: flex;
    max-width: 100%;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
    color: rgba(255, 255, 255, .92);
    font-size: 12px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .75);
}

.douyin-music svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.douyin-music span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.douyin-actions {
    right: 8px;
    bottom: calc(105px + env(safe-area-inset-bottom, 0px));
    width: 58px;
    gap: 13px;
}

.douyin-action {
    width: 56px;
    gap: 1px;
    color: #fff;
    font-family: inherit;
}

.douyin-action-icon {
    width: 48px;
    height: 48px;
}

.douyin-action-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .48));
}

.douyin-action.douyin-mute .douyin-action-icon svg {
    width: 29px;
    height: 29px;
}

.douyin-action em {
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .75);
}

.douyin-avatar {
    position: relative;
    width: 56px;
    height: 65px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.douyin-avatar-ring {
    display: block;
    width: 50px;
    height: 50px;
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #222;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}

.douyin-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.douyin-avatar-plus {
    position: absolute;
    bottom: 6px;
    left: 50%;
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border: 2px solid #17181b;
    border-radius: 50%;
    background: #fe2c55;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    transform: translateX(-50%);
}

.douyin-action.douyin-comment-open .douyin-action-icon svg {
    fill: #fff;
    stroke: #fff;
    stroke-width: 1.8;
}

.douyin-action.douyin-comment-open .douyin-icon-dot {
    fill: none;
    stroke: #17181b;
    stroke-width: 3.3;
    stroke-linecap: round;
}

.douyin-like.is-active .douyin-action-icon svg {
    fill: #fe2c55;
    stroke: #fe2c55;
}

.douyin-like.is-active em {
    color: #fff;
}

.douyin-favorite.is-saved .douyin-action-icon svg {
    fill: #ffc107;
    stroke: #ffc107;
}

.douyin-favorite.is-saved em {
    color: #fff;
}

.douyin-share .douyin-action-icon svg {
    fill: #fff;
    stroke: #fff;
    stroke-width: 1.7;
}

.douyin-bottom-nav {
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding: 4px 10px env(safe-area-inset-bottom, 0px);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72) 32%, #000 82%);
}

.douyin-bottom-nav > a,
.douyin-bottom-nav > button.douyin-bottom-create {
    position: relative;
    display: flex;
    width: 100%;
    height: 46px;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .68);
    font-family: inherit;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
    cursor: pointer;
}

.douyin-bottom-create {
    height: 48px;
    color: #8f9095;
    text-shadow: none;
}

.douyin-bottom-nav > a.active {
    color: #fff;
}

.douyin-bottom-nav > a > svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
    stroke: none;
}

.douyin-bottom-nav > a > span:not(.douyin-create-button) {
    font-size: 11px;
    font-weight: 600;
}

.douyin-bottom-favorite-badge {
    top: -1px;
    right: 0;
    height: 14px;
    border: 0;
    background: #fe2c55;
    font-size: 9px !important;
}

.douyin-create-button {
    width: 44px;
    height: 31px;
    border-radius: 9px;
    background: #fff;
    color: #111 !important;
    box-shadow: -3px 0 0 #25f4ee, 3px 0 0 #fe2c55, 0 2px 7px rgba(0, 0, 0, .45);
}

.douyin-create-button svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.7;
}

@media (max-height: 720px) {
    .douyin-actions {
        bottom: calc(91px + env(safe-area-inset-bottom, 0px));
        gap: 9px;
    }

    .douyin-action-icon {
        width: 42px;
        height: 42px;
    }

    .douyin-action-icon svg {
        width: 30px;
        height: 30px;
    }

    .douyin-caption {
        bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    }

    .douyin-playback-settings-wrap {
        bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .douyin-playback-settings-toggle svg {
        animation: none;
    }
}

/* 抖音模式内部搜索页 */
.douyin-search-layer {
    position: absolute;
    inset: 0;
    z-index: 170;
    display: flex;
    visibility: hidden;
    background: #0b0b0c;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.douyin-search-layer.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.douyin-search-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #111214;
}

.douyin-search-close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    padding: 0 0 2px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.douyin-search-form {
    display: flex;
    min-width: 0;
    align-items: center;
    flex: 1 1 auto;
    gap: 8px;
}

.douyin-search-input-wrap {
    display: flex;
    min-width: 0;
    height: 38px;
    align-items: center;
    border-radius: 19px;
    background: #242527;
    flex: 1 1 auto;
    gap: 7px;
    padding: 0 12px;
}

.douyin-search-input-wrap svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    fill: none;
    stroke: rgba(255, 255, 255, .62);
    stroke-width: 2;
    stroke-linecap: round;
}

.douyin-search-input-wrap input {
    min-width: 0;
    height: 38px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    flex: 1 1 auto;
    font-size: 14px;
}

.douyin-search-input-wrap input::placeholder {
    color: rgba(255, 255, 255, .38);
}

.douyin-search-form > button {
    height: 34px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: #fe2c55;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.douyin-search-results {
    min-height: 0;
    padding: 10px 12px calc(72px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
}

.douyin-search-empty {
    display: flex;
    min-height: 42vh;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .45);
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.douyin-search-empty strong {
    color: rgba(255, 255, 255, .78);
    font-size: 18px;
}

.douyin-search-empty span {
    font-size: 13px;
}

.douyin-search-empty.is-loading strong::before {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 7px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    content: "";
    vertical-align: -2px;
    animation: douyinSearchSpin .7s linear infinite;
}

@keyframes douyinSearchSpin {
    to { transform: rotate(360deg); }
}

.douyin-search-item {
    display: grid;
    align-items: center;
    padding: 9px 5px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    color: #fff;
    grid-template-columns: 64px minmax(0, 1fr) 22px;
    gap: 11px;
    text-decoration: none;
}

.douyin-search-item:active {
    background: rgba(255, 255, 255, .05);
}

.douyin-search-cover {
    position: relative;
    display: block;
    width: 64px;
    height: 82px;
    overflow: hidden;
    border-radius: 7px;
    background: #202124;
}

.douyin-search-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.douyin-search-cover em {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .56);
    color: #fff;
    font-size: 9px;
    font-style: normal;
}

.douyin-search-copy {
    min-width: 0;
}

.douyin-search-copy strong {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.douyin-search-copy small {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    color: rgba(255, 255, 255, .48);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.douyin-search-arrow {
    color: rgba(255, 255, 255, .42);
    font-size: 25px;
    text-align: right;
}

/* 避免播放设置遮挡静音按钮 */
.douyin-actions {
    bottom: calc(122px + env(safe-area-inset-bottom, 0px));
}

.douyin-playback-settings-wrap {
    bottom: calc(69px + env(safe-area-inset-bottom, 0px));
}

/* 抖音模式下复用首页个人信息菜单 */
body.bili-douyin-mode .bili-user-menu-modal {
    z-index: 1000300 !important;
}

body.bili-douyin-mode .bili-user-menu-backdrop {
    z-index: 1000299 !important;
}

body.bili-douyin-mode .bili-user-menu-panel {
    z-index: 1000300 !important;
}

@media (max-height: 720px) {
    .douyin-actions {
        bottom: calc(103px + env(safe-area-inset-bottom, 0px));
    }

    .douyin-playback-settings-wrap {
        bottom: calc(61px + env(safe-area-inset-bottom, 0px));
    }
}

/* 作者关注按钮与播放设置栏内嵌 */
.douyin-avatar-plus {
    border: 0 !important;
    background: #fe2c55 !important;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .35) !important;
    font-size: 16px;
}

.douyin-avatar-plus.is-followed {
    background: rgba(255, 255, 255, .22) !important;
    color: rgba(255, 255, 255, .88);
    font-size: 12px;
    box-shadow: none !important;
}

.douyin-actions .douyin-playback-settings-wrap.action-playback-settings {
    position: static;
    right: auto;
    bottom: auto;
    display: flex;
    width: 56px;
    align-items: center;
    gap: 1px;
}

.douyin-actions .action-playback-settings .douyin-playback-settings-toggle {
    width: 48px;
    height: 48px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.douyin-actions .action-playback-settings .douyin-playback-settings-toggle svg {
    width: 34px;
    height: 34px;
    stroke-width: 2.1;
}

.douyin-actions .action-playback-settings .douyin-playback-settings-toggle[aria-expanded="true"] {
    background: transparent;
    color: #fe2c55;
}

.douyin-actions .action-playback-settings .douyin-playback-status {
    position: static;
    display: inline-flex;
    max-width: 58px;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .75);
}

.douyin-actions .action-playback-settings .douyin-playback-status[hidden] {
    display: none !important;
}

/* 三条杠个人信息菜单中的退出抖阳 */
body.bili-douyin-mode .bili-user-menu-exit-douyin {
    margin-top: 10px;
    border: 1px solid rgba(254, 44, 85, .18);
    background: rgba(254, 44, 85, .04);
}

body.bili-douyin-mode .bili-user-menu-exit-douyin .bili-user-menu-icon {
    color: #fe2c55;
    background: rgba(254, 44, 85, .1);
}
/* 虚拟评论用户等级图标 */
.douyin-comment-name-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
}

.douyin-comment-level-icon {
    display: block;
    width: auto;
    height: 15px;
    max-width: 44px;
    flex: 0 0 auto;
    object-fit: contain;
}
/* 夜间模式下抖音模式的评论与播放设置弹层 */
body.bili-douyin-mode .douyin-playback-sheet,
body.bili-douyin-mode .douyin-comment-sheet,
body.bili-douyin-mode .douyin-comment-header,
body.bili-douyin-mode .douyin-comment-pinned-article,
body.bili-douyin-mode .douyin-comment-form,
body.bili-douyin-mode .douyin-comment-emoji-picker {
    border-color: rgba(255, 255, 255, .1) !important;
    background: #161823 !important;
    color: #f1f1f1 !important;
}

body.bili-douyin-mode .douyin-comment-sheet input,
body.bili-douyin-mode .douyin-comment-sheet textarea,
body.bili-douyin-mode .douyin-comment-form input,
body.bili-douyin-mode .douyin-comment-form textarea,
body.bili-douyin-mode .douyin-playback-sheet input,
body.bili-douyin-mode .douyin-playback-sheet textarea {
    border-color: rgba(255, 255, 255, .12) !important;
    background: #22242c !important;
    color: #f1f1f1 !important;
}

body.bili-douyin-mode .douyin-comment-sheet input::placeholder,
body.bili-douyin-mode .douyin-comment-sheet textarea::placeholder,
body.bili-douyin-mode .douyin-comment-form input::placeholder,
body.bili-douyin-mode .douyin-comment-form textarea::placeholder {
    color: #8f949c !important;
}