/* 文档分享面板 doc-share.css */
.doc-share-trigger {
    color: #0e76a8;
    cursor: pointer;
    white-space: nowrap;
}
.doc-share-trigger:hover {
    color: #085a80;
}

.ds-mask {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.ds-mask.ds-open {
    opacity: 1;
    visibility: visible;
}

.ds-sheet {
    background: #fff;
    color: #333;
    width: 100%;
    max-width: 420px;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
    overflow: hidden;
    transform: translateY(16px);
    transition: transform .2s ease;
    font-family: inherit;
}
.ds-open .ds-sheet {
    transform: translateY(0);
}

.ds-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px 8px;
}
.ds-head-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.ds-close {
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 2px;
}
.ds-close:hover {
    color: #555;
}

/* 文章预览卡片：左侧标题，右侧网页缩略图 */
.ds-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 16px 6px;
    padding: 12px;
    border: 1px solid #e8ebf0;
    border-radius: 10px;
    background: #fafbfc;
}
.ds-preview-info {
    flex: 1;
    min-width: 0;
}
.ds-preview-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: #222;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
}
.ds-preview-site {
    margin-top: 6px;
    font-size: 12px;
    color: #888;
}
.ds-thumb {
    width: 62px;
    height: 52px;
    flex: none;
    border: 1px solid #e2e6eb;
    border-radius: 5px;
    background: #fff;
    padding: 7px 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.ds-thumb-bar {
    height: 4px;
    border-radius: 2px;
    background: #dfe4ea;
    margin-bottom: 5px;
}
.ds-thumb-bar.ds-thumb-main {
    width: 78%;
    background: #7ab4d2;
    height: 5px;
}
.ds-thumb-bar.ds-thumb-short {
    width: 52%;
}
.ds-thumb-block {
    height: 18px;
    margin-top: 6px;
    border-radius: 2px;
    background: linear-gradient(135deg, #eef2f6 25%, #f7f9fb 25%, #f7f9fb 50%, #eef2f6 50%, #eef2f6 75%, #f7f9fb 75%);
    background-size: 8px 8px;
}

/* 应用图标列表 */
.ds-apps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px 4px;
    padding: 14px 12px 18px;
}
.ds-app {
    border: 0;
    background: transparent;
    padding: 4px 0;
    cursor: pointer;
    text-align: center;
    color: #555;
    font-size: 12px;
    line-height: 1.4;
    font-family: inherit;
}
.ds-app:focus-visible {
    outline: 2px solid #0e76a8;
    outline-offset: 2px;
    border-radius: 8px;
}
.ds-app-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 7px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    transition: transform .12s ease;
}
.ds-app:hover .ds-app-icon {
    transform: translateY(-2px);
}
.ds-app-system .ds-app-icon {
    background: #0e76a8;
}
.ds-app-wechat .ds-app-icon {
    background: #07c160;
}
.ds-app-wecom .ds-app-icon {
    background: #2f7dde;
}
.ds-app-copy .ds-app-icon {
    background: #8a9099;
}
.ds-app-icon svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}
.ds-tip {
    margin: 0 16px 14px;
    padding: 9px 10px;
    border-radius: 8px;
    background: #f5f8fa;
    color: #888;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.ds-tip-warn {
    background: #fff8e6;
    color: #a06a00;
    text-align: left;
}

/* 内置浏览器（微信/企业微信）只有两个入口 */
.ds-apps.ds-apps-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 220px;
    margin: 0 auto;
}
.ds-tip-info {
    background: #eef6ff;
    color: #1a5fa8;
    text-align: left;
}
.ds-tip b {
    font-weight: 700;
    letter-spacing: 1px;
}
.ds-app-guide .ds-app-icon {
    background: #f0a020;
    font-size: 24px;
    font-weight: 700;
}

/* 右上角「···」手势引导 */
.ds-guide {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2200;
    background: rgba(20, 22, 26, .86);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.ds-guide.ds-guide-open {
    opacity: 1;
    visibility: visible;
}
.ds-guide-dots {
    position: absolute;
    top: 10px;
    right: 14px;
    display: flex;
    gap: 5px;
    padding: 8px 12px;
}
.ds-guide-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: ds-dot 1.1s ease-in-out infinite;
}
.ds-guide-dots i:nth-child(2) {
    animation-delay: .18s;
}
.ds-guide-dots i:nth-child(3) {
    animation-delay: .36s;
}
@keyframes ds-dot {
    0%, 100% { opacity: .45; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}
.ds-guide-arrow {
    position: absolute;
    top: 44px;
    right: 26px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 15px solid #fff;
    animation: ds-arrow 0.9s ease-in-out infinite alternate;
}
@keyframes ds-arrow {
    from { transform: translateY(0); }
    to { transform: translateY(7px); }
}
.ds-guide-bubble {
    position: absolute;
    top: 72px;
    right: 16px;
    max-width: 260px;
    padding: 13px 15px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 12px;
    text-align: left;
    font-size: 14px;
    line-height: 1.75;
}
.ds-guide-close {
    display: block;
    margin-top: 12px;
    padding: 6px 18px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 18px;
    background: transparent;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.ds-toast {
    position: fixed;
    left: 50%;
    bottom: 46px;
    transform: translateX(-50%) translateY(8px);
    z-index: 2100;
    max-width: calc(100vw - 40px);
    background: rgba(38, 42, 48, .92);
    color: #fff;
    padding: 9px 16px;
    border-radius: 20px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    white-space: nowrap;
}
.ds-toast.ds-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
    .ds-mask {
        align-items: flex-end;
    }
    .ds-sheet {
        max-width: none;
        border-radius: 16px 16px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .ds-apps {
        padding-bottom: 14px;
    }
}
