﻿/* Copyright (c) Microsoft Corporation.
Licensed under the MIT license.

主题色（明亮科技风）：
  深色文字   #000028
  深蓝强调   #04145E
  浅灰底     #ECECF0
  米色暖调   #F5DCBE
  青绿主色   #3CC8BE
*/

:root {
    --ink: #000028;
    --navy: #04145E;
    --mist: #ECECF0;
    --sand: #F5DCBE;
    --teal: #3CC8BE;
    --teal-soft: rgba(60, 200, 190, 0.18);
    --text-2: rgba(0, 0, 40, 0.55);
    --text-3: rgba(0, 0, 40, 0.35);
    --line: rgba(0, 0, 40, 0.08);
    /* Android/部分飞书 WebView 未暴露 env() 时，由 JS 以 visualViewport 补偿顶部状态栏。 */
    --runtime-safe-top: 0px;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--mist);
    color: var(--ink);
}

/* 全部 Power BI 容器共用同一安全区：动态创建的 desktop/fit/landscape 也必须覆盖。 */
#embed-container,
#embed-container-desktop,
#embed-container-fit,
#embed-container-landscape {
    box-sizing: border-box;
    /* 飞书顶部/底部导航栏隐藏后，webview 延伸到系统状态栏与 Home 指示条：
       给报表 iframe 留出安全区，避免报表内容与系统导航重叠 */
    padding-top: max(env(safe-area-inset-top, 0px), var(--runtime-safe-top, 0px));
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    background: var(--mist);
}

/* 报表主容器：100dvh 跟随移动端动态视口；100vh 作为旧 WebView 回退。 */
#embed-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    position: relative;
}

/* 去掉 Power BI iframe 的 UA 默认 2px 边框（会在报表四周形成细边） */
#embed-container iframe,
#embed-container-desktop iframe,
#embed-container-fit iframe,
#embed-container-landscape iframe {
    border: 0;
    outline: none;
}

/* 进入页面加载遮罩：流动渐变背景 + 悬浮玻璃卡片 + 双环图标 + 流光进度条 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
    padding-top: max(env(safe-area-inset-top, 0px), var(--runtime-safe-top, 0px));
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f2f6f8, #eefaf9, #fbf3e4, #f2f6f8);
    background-size: 300% 300%;
    animation: ps-bgshift 14s ease-in-out infinite;
    color: var(--text-2);
    font-size: 14px;
    text-align: center;
    transition: opacity 0.5s ease, visibility 0s 0.5s;
}

#loading.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes ps-bgshift {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 悬浮玻璃卡片 */
.ps-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 38px 52px 30px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    backdrop-filter: blur(24px) saturate(1.5);
    box-shadow: 0 24px 60px rgba(4, 20, 94, 0.12);
    animation: ps-cardfloat 3.2s ease-in-out infinite;
}

@keyframes ps-cardfloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

/* 双环旋转 + 盾牌图标 */
.ps-ring-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    animation: ps-glow 2.2s ease-in-out infinite;
}

.ps-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--lt-a, var(--teal)) 0deg,
        var(--lt-b, var(--navy)) 120deg,
        var(--lt-a, var(--teal)) 240deg,
        var(--lt-a, var(--teal)) 360deg
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 1px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 1px));
    animation: ps-ringspin 1.2s linear infinite;
}

@keyframes ps-ringspin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ps-glow {
    0%,
    100% {
        filter: drop-shadow(0 0 6px var(--glow-la, rgba(60, 200, 190, 0.35)));
    }
    50% {
        filter: drop-shadow(0 0 18px var(--glow-lb, rgba(4, 20, 94, 0.4)));
    }
}

.ps-shield {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-shield svg {
    width: 34px;
    height: 34px;
}

/* 渐变百分比数字 */
.ps-loading-pct {
    margin-top: 18px;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(90deg, var(--lt-b, var(--navy)), var(--lt-a, var(--teal)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* 流光进度条 */
.ps-loading-bar {
    position: relative;
    width: 240px;
    height: 6px;
    margin-top: 18px;
    border-radius: 3px;
    background: rgba(0, 0, 40, 0.08);
    overflow: hidden;
}

.ps-loading-bar i {
    position: relative;
    display: block;
    height: 100%;
    width: 100%;
    /* 进度用 transform: scaleX 驱动（合成器线程），Power BI iframe 渲染抢占主线程时不再卡死 */
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--lt-a, var(--teal)), var(--lt-b, var(--navy)));
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 光效独立于填充：整条轨道恒宽、动画恒定，不随 scaleX 进度压缩 */
.ps-loading-bar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 48px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    transform: translateX(-60px);
    animation: ps-shimmer 1.3s ease-in-out infinite;
}

@keyframes ps-shimmer {
    0% {
        transform: translateX(-60px);
    }
    100% {
        /* 终点由 JS 按轨道实际宽度注入（--shimmer-end），宽屏/自定义主题进度条也能跑满 */
        transform: translateX(var(--shimmer-end, 420px));
    }
}

.ps-loading-text {
    margin-top: 12px;
    color: var(--text-2);
    letter-spacing: 0.3px;
}

.ps-text-swap {
    animation: ps-textin 0.35s ease;
}

@keyframes ps-textin {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .ps-loading-card {
        padding: 26px 30px 22px;
    }
    .ps-loading-bar {
        width: 200px;
    }
}

#error-container {
    position: fixed;
    top: 24px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    color: #b02a37;
    background: #fdeeee;
    border: 1px solid #f5c2c2;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    z-index: 1000000;
}

#error-container .error-close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(176, 42, 55, 0.35);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    color: #b02a37;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* 目录视图：按工作区分组的报表卡片（明亮科技风） */
#directory-view {
    box-sizing: border-box;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    padding: 0 16px calc(48px + env(safe-area-inset-bottom));
    background: linear-gradient(160deg, #f2f6f8, #fbf6ec 45%, #eefaf9);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* 顶部固定区：保持原头部布局，滚动时吸顶 */
.dir-sticky {
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -16px;
    /* 飞书顶部导航栏隐藏后，内容区上探到系统状态栏：顶部留安全区（Android 为 0，无副作用） */
    padding: max(env(safe-area-inset-top, 0px), var(--runtime-safe-top, 0px)) 16px 4px;
    background: linear-gradient(160deg, #f2f6f8, #fbf6ec 45%, #eefaf9);
}

.dir-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
    max-width: 1080px;
    margin: 0 auto;
    padding: 22px 4px 10px;
}

.dir-header-left {
    min-width: 0;
}

.dir-greeting {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.dir-dept {
    margin: -2px 0 6px;
    color: var(--text-3);
    font-size: 12px;
    letter-spacing: 0.2px;
}

.dir-header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    backdrop-filter: blur(12px) saturate(1.3);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(4, 20, 94, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-toggle:active {
    transform: scale(0.94);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-icon-moon {
    display: none;
}

.dir-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, var(--navy), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

@media (max-width: 480px) {
    .dir-header {
        padding-top: 16px;
    }
    .dir-greeting {
        font-size: 12px;
    }
}

.dir-subtitle {
    margin-top: 6px;
    color: var(--text-2);
    font-size: 14px;
}

.dir-group {
    max-width: 1080px;
    margin: 26px auto 0;
}

/* 工作区分隔元素：渐变细线 + 菱形标识 */
.dir-ws-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 4px 16px;
}

.dir-ws-divider::before,
.dir-ws-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--teal-soft));
}

.dir-ws-divider::after {
    background: linear-gradient(90deg, var(--teal-soft), transparent);
}

.dir-ws-divider i {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    border: 1px solid var(--teal);
    border-radius: 1px;
    background: rgba(60, 200, 190, 0.25);
}

.dir-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.dir-card {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 8px 24px rgba(4, 20, 94, 0.08);
    color: var(--ink);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.dir-card:active {
    transform: scale(0.97);
}

.dir-card-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--teal), var(--navy));
    color: #ffffff;
}

.dir-card-icon svg {
    width: 18px;
    height: 18px;
}

.dir-card-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dir-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dir-card-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.dir-card-meta {
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(4, 20, 94, 0.14);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.dir-badge.top {
    background: linear-gradient(135deg, var(--teal), var(--navy));
    color: #ffffff;
}

.dir-badge.new {
    background: var(--teal-soft);
    color: #0b7f77;
}

/* 有角标时给标题留出右上角空间，减少遮挡；new 更窄，单独出现时占位更小 */
.dir-card-badge-top .dir-card-name {
    padding-right: 56px;
}

.dir-card-badge-new:not(.dir-card-badge-top) .dir-card-name {
    padding-right: 40px;
}

.dir-card-chevron {
    color: var(--text-3);
    font-size: 20px;
}

/* ---- 首页分页滑动（工作区名称栏 / 滑动区 / 翻页控制） ---- */

.dir-workspace-bar {
    max-width: 1080px;
    margin: 0 auto;
    text-align: left;
    padding: 2px 4px 8px;
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.dir-workspace-bar.ws-fade-out {
    opacity: 0;
}

.dir-workspace-bar.ws-fade-in {
    opacity: 1;
}


.dir-empty {
    max-width: 1080px;
    margin: 40px auto 0;
    padding: 32px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-2);
    font-size: 14px;
    text-align: center;
}

/* 目录页脚容器：统一底标（.brand-* 见 scenes.css，主页与 admin 同款） */
.dir-footer {
    position: relative;
    max-width: 1080px;
    margin: 34px auto 10px;
    padding: 18px 20px 20px;
    overflow: hidden;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(236, 236, 240, 0.42));
    box-shadow: 0 10px 30px rgba(4, 20, 94, 0.08);
}

.dir-footer .df-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--teal), var(--navy), var(--teal), transparent);
    background-size: 200% 100%;
    animation: dfLineFlow 3.2s linear infinite;
    opacity: 0.9;
}

@keyframes dfLineFlow {
    to { background-position: 200% 0; }
}

html[data-theme="dark"] .dir-footer {
    border-color: rgba(236, 236, 240, 0.12);
    background: linear-gradient(160deg, rgba(10, 15, 35, 0.82), rgba(7, 11, 34, 0.55));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

/* 报表页悬浮按钮组（首页键 / 导出 / 隐藏UI / 展开收起）：小圆形、半透明，尽量少遮挡报表。
   顺序：home(14) → 导出(60) → 隐藏UI(106) → 收起/展开(152)；移动端默认收起，只留 home+隐藏UI */
#report-back-btn,
#export-data-btn,
#capture-btn,
#bookmark-add-btn,
#bookmark-list-btn,
#reset-filters-btn,
#float-ui-toggle {
    position: fixed;
    top: calc(12px + max(env(safe-area-inset-top, 0px), var(--runtime-safe-top, 0px)));
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
    backdrop-filter: blur(14px) saturate(1.5);
    box-shadow: 0 6px 18px rgba(4, 20, 94, 0.14);
    color: var(--navy);
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    opacity: 0.65;
    transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#report-back-btn {
    left: 14px;
}

#export-data-btn {
    left: 60px;
}

#bookmark-add-btn {
    left: 106px;
}

#bookmark-list-btn {
    left: 152px;
}

#reset-filters-btn {
    left: 198px;
}

#capture-btn {
    left: 244px;
}

#float-ui-toggle {
    left: 290px;
}

/* 收起态：隐藏导出，home 与 隐藏UI 相邻，切换钮移到第三位 */
body.float-ui-collapsed #export-data-btn {
    display: none;
}

body.float-ui-collapsed #bookmark-add-btn,
body.float-ui-collapsed #bookmark-list-btn,
body.float-ui-collapsed #reset-filters-btn {
    display: none;
}

body.float-ui-collapsed #capture-btn {
    left: 60px;
}

body.float-ui-collapsed #float-ui-toggle {
    left: 106px;
}

/* 共享链接屏蔽全部功能类按钮：无展开/收起钮，隐藏UI键紧贴首页键 */
body.share-no-features #capture-btn {
    left: 60px;
}

#report-back-btn svg,
#export-data-btn svg,
#capture-btn svg,
#bookmark-add-btn svg,
#bookmark-list-btn svg,
#reset-filters-btn svg,
#float-ui-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

#report-back-btn:active,
#export-data-btn:active,
#capture-btn:active,
#bookmark-add-btn:active,
#bookmark-list-btn:active,
#reset-filters-btn:active,
#float-ui-toggle:active {
    transform: scale(0.95);
    opacity: 1;
}

#report-back-btn:hover,
#export-data-btn:hover,
#capture-btn:hover,
#bookmark-add-btn:hover,
#bookmark-list-btn:hover,
#reset-filters-btn:hover,
#float-ui-toggle:hover {
    opacity: 1;
}

/* 悬浮按钮名称提示：PC 悬停 / 移动端长按浮现 */
.float-tip {
    position: fixed;
    z-index: 500;
    display: none;
    max-width: min(280px, calc(100vw - 24px));
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(4, 20, 94, 0.92);
    box-shadow: 0 8px 24px rgba(0, 0, 40, 0.35);
    color: #ffffff;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* 导出数据视觉对象选择浮层 */
.export-sheet-mask {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 40, 0.45);
    animation: exportMaskFade 0.22s ease both;
}

.export-sheet {
    width: min(420px, 100%);
    max-height: 72vh;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 40, 0.3);
    overflow: hidden;
    animation: exportSheetIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.export-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 40, 0.08);
    color: #04145E;
    font-size: 15px;
    font-weight: 700;
}

.export-sheet-hint {
    padding: 8px 18px 0;
    color: rgba(0, 0, 40, 0.45);
    font-size: 12px;
}

.export-sheet-close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(236, 236, 240, 0.8);
    color: rgba(0, 0, 40, 0.55);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.export-sheet-body {
    padding: 8px;
    overflow-y: auto;
}

/* 报表书签浮窗（复用 export-sheet 结构） */
.bookmark-sheet-body {
    padding: 8px;
    overflow-y: auto;
}

.bookmark-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 40, 0.08);
    border-radius: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s ease;
}

.bookmark-item:hover {
    background: rgba(60, 200, 190, 0.1);
}

.bookmark-item-main {
    flex: 1;
    min-width: 0;
}

.bookmark-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #04145E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-item-meta {
    margin-top: 3px;
    font-size: 11px;
    color: rgba(0, 0, 40, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-item-ops {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
}

.bookmark-item-ops .bookmark-op {
    min-height: 28px;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 40, 0.12);
    background: rgba(255, 255, 255, 0.8);
    color: rgba(0, 0, 40, 0.6);
    cursor: pointer;
}

.bookmark-item-ops .bookmark-op:hover {
    border-color: #3CC8BE;
    color: #04145E;
}

.export-sheet-loading,
.export-sheet-empty {
    padding: 26px 12px;
    text-align: center;
    color: rgba(0, 0, 40, 0.45);
    font-size: 13px;
}

/* 书签/收藏轻提示 */
#float-toast {
    position: fixed;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom));
    transform: translate(-50%, 12px);
    z-index: 700;
    max-width: 82vw;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(4, 20, 94, 0.92);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#float-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.export-sheet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #000028;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    /* 长按定位时屏蔽 iOS/Android 文本选择菜单与触摸呼出（复制/更多选项） */
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    transition: background 0.15s ease;
}

.export-sheet-item-name,
.export-sheet-item-type {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.export-sheet-item:hover {
    background: rgba(60, 200, 190, 0.08);
}

.export-sheet-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
}

.export-sheet-item-type {
    flex: 0 0 auto;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(4, 20, 94, 0.06);
    color: rgba(0, 0, 40, 0.55);
    font-size: 11px;
}

/* 列表项导出状态：正在导出 / 导出成功 / 导出失败 */
.export-sheet-item-status {
    flex: 0 0 auto;
    min-width: 56px;
    text-align: right;
    font-size: 11px;
    color: rgba(0, 0, 40, 0.45);
    white-space: nowrap;
}

.export-sheet-item-status.exporting {
    color: #3CC8BE;
}

.export-sheet-item-status.ok {
    color: #0a9e63;
    font-weight: 700;
}

.export-sheet-item-status.err {
    color: #b02a37;
    font-weight: 700;
}

.export-sheet-item.exporting {
    cursor: progress;
    opacity: 0.75;
}

.export-sheet-empty {
    padding: 26px 16px;
    color: rgba(0, 0, 40, 0.45);
    font-size: 13px;
    text-align: center;
}

/* 共享链接专用提示 */
.export-sheet-notice .export-sheet-body {
    padding: 26px 22px 30px;
    text-align: center;
}

.export-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(60, 200, 190, 0.16), rgba(4, 20, 94, 0.1));
    color: #3CC8BE;
    font-size: 26px;
}

.export-notice-title {
    color: #04145E;
    font-size: 16px;
    font-weight: 700;
}

.export-notice-text {
    margin-top: 10px;
    color: rgba(0, 0, 40, 0.6);
    font-size: 13px;
    line-height: 1.7;
}

/* 导出预览面板：同一浮窗内以表格形式预览将导出的数据 */
.export-sheet-item.active {
    background: rgba(60, 200, 190, 0.14);
    box-shadow: inset 3px 0 0 #3CC8BE;
}

.export-preview {
    margin-top: 10px;
    border-top: 1px dashed rgba(0, 0, 40, 0.12);
    padding-top: 8px;
    max-height: 72vh;
    overflow: hidden;
    /* 收起过渡：淡出 + 高度折叠 */
    transition: opacity 0.18s ease, max-height 0.24s cubic-bezier(0.16, 1, 0.3, 1),
        padding-top 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.export-preview.collapsing {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    margin-top: 0;
    border-top-width: 0;
}

.export-preview-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px 8px;
}

.export-preview-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #04145E;
    font-size: 13px;
    font-weight: 700;
}

.export-preview-meta {
    flex: 0 0 auto;
    color: rgba(0, 0, 40, 0.45);
    font-size: 11px;
}

.export-preview-refresh,
.export-preview-close {
    flex: 0 0 auto;
    padding: 3px 10px;
    border: 1px solid rgba(0, 0, 40, 0.12);
    border-radius: 999px;
    background: transparent;
    color: rgba(0, 0, 40, 0.55);
    font-size: 11px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.export-preview-refresh:hover,
.export-preview-close:hover {
    background: rgba(60, 200, 190, 0.1);
    color: #0e8f87;
}

.export-preview-scroll {
    max-height: 42vh;
    overflow: auto;
    border: 1px solid rgba(0, 0, 40, 0.08);
    border-radius: 10px;
    background: #fcfcfe;
    -webkit-overflow-scrolling: touch;
}

.export-preview-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
}

.export-preview-table th,
.export-preview-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(0, 0, 40, 0.06);
    text-align: left;
    white-space: nowrap;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.export-preview-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(236, 236, 240, 0.92);
    color: rgba(0, 0, 40, 0.7);
    font-weight: 600;
}

.export-preview-table tbody tr:nth-child(even) {
    background: rgba(236, 236, 240, 0.25);
}

.export-preview-loading,
.export-preview-error,
.export-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 90px;
    padding: 18px;
    color: rgba(0, 0, 40, 0.5);
    font-size: 13px;
    text-align: center;
}

.export-preview-error {
    color: #c0392b;
}

.export-preview-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(60, 200, 190, 0.25);
    border-top-color: #3CC8BE;
    border-radius: 50%;
    animation: exportPreviewSpin 0.7s linear infinite;
}

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

/* 导出结果轻提示 */
.export-toast {
    position: fixed;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom));
    z-index: 700;
    transform: translateX(-50%) translateY(8px);
    max-width: 86vw;
    padding: 11px 18px;
    border-radius: 999px;
    background: rgba(0, 0, 40, 0.86);
    color: #ffffff;
    font-size: 13px;
    text-align: center;
    box-shadow: 0 10px 26px rgba(0, 0, 40, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.export-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.export-toast.err {
    background: rgba(176, 42, 55, 0.92);
}

@keyframes exportMaskFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes exportSheetIn {
    from {
        transform: translateY(16px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* 手机端左下角页面切换卡片（移动布局下 Power BI 不支持内置页面导航栏）
   明亮科技风：青绿主色 + 深蓝强调 */
#page-switcher {
    position: fixed;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 300;
    font-family: inherit;
}

/* 收起态：毛玻璃胶囊 */
#page-switcher .ps-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 82vw;
    padding: 9px 10px 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(18px) saturate(1.8);
    backdrop-filter: blur(18px) saturate(1.8);
    box-shadow: 0 8px 24px rgba(4, 20, 94, 0.14),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.7);
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s ease;
}

#page-switcher .ps-trigger:active {
    transform: scale(0.96);
}

#page-switcher .ps-current {
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 提示标签：青绿→深蓝渐变胶囊 */
#page-switcher .ps-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 6px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--teal), var(--navy));
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(60, 200, 190, 0.4);
}

#page-switcher .ps-chevron {
    display: inline-block;
    font-style: normal;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#page-switcher.open .ps-chevron {
    transform: rotate(180deg);
}

/* 展开面板：迷你底部弹层 */
#page-switcher .ps-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 12px);
    width: 272px;
    max-height: 52vh;
    overflow-y: auto;
    padding: 10px 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
    box-shadow: 0 20px 50px rgba(4, 20, 94, 0.18),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(16px) scale(0.92);
    transform-origin: bottom left;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-overflow-scrolling: touch;
}

#page-switcher.open .ps-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 开合动画/切页窗口内暂停毛玻璃实时合成（动画结束/切换完成后恢复原外观） */
#page-switcher.ps-busy .ps-trigger,
#page-switcher.ps-busy .ps-panel {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: none;
}

/* 弹层顶部抓手与标题 */
#page-switcher .ps-grip {
    width: 36px;
    height: 4px;
    margin: 2px auto 8px;
    border-radius: 2px;
    background: rgba(0, 0, 40, 0.14);
}

#page-switcher .ps-title {
    padding: 2px 12px 8px;
    color: var(--text-2);
    font-size: 12px;
    letter-spacing: 0.5px;
}

#page-switcher .ps-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s ease;
}

#page-switcher .ps-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cfd8dc;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

#page-switcher .ps-item.active {
    background: linear-gradient(135deg, #e6faf8, #f1fbfa);
    color: var(--navy);
    font-weight: 600;
}

#page-switcher .ps-item.active .ps-dot {
    background: var(--teal);
    box-shadow: 0 0 0 3px rgba(60, 200, 190, 0.25);
}

/* 面板展开时页面标签的悬停响应（PC 鼠标经过） */
#page-switcher .ps-item:hover {
    background: rgba(0, 0, 40, 0.05);
}

#page-switcher .ps-item:hover .ps-dot {
    background: var(--teal);
}

#page-switcher .ps-item.active:hover {
    background: linear-gradient(135deg, #d9f7f4, #eafaf8);
}

#page-switcher .ps-item:active {
    background: rgba(0, 0, 40, 0.06);
}

/* 页面切换器深色自适应（报表/主题为深色时，data-tone="dark"） */
#page-switcher[data-tone="dark"] .ps-trigger {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(13, 18, 40, 0.78);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    color: #ECECF0;
}

#page-switcher[data-tone="dark"] .ps-panel {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(13, 18, 40, 0.9);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.06);
}

#page-switcher[data-tone="dark"] .ps-grip {
    background: rgba(236, 236, 240, 0.22);
}

#page-switcher[data-tone="dark"] .ps-title {
    color: rgba(236, 236, 240, 0.6);
}

#page-switcher[data-tone="dark"] .ps-item {
    color: #ECECF0;
}

#page-switcher[data-tone="dark"] .ps-item.active {
    background: linear-gradient(135deg, rgba(60, 200, 190, 0.22), rgba(4, 20, 94, 0.45));
    color: #9BE6E0;
}

#page-switcher[data-tone="dark"] .ps-item.active .ps-dot {
    background: var(--teal);
    box-shadow: 0 0 0 3px rgba(60, 200, 190, 0.28);
}

#page-switcher[data-tone="dark"] .ps-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

#page-switcher[data-tone="dark"] .ps-item:hover .ps-dot {
    background: var(--teal);
}

#page-switcher[data-tone="dark"] .ps-item.active:hover {
    background: linear-gradient(135deg, rgba(60, 200, 190, 0.28), rgba(4, 20, 94, 0.52));
}

#page-switcher[data-tone="dark"] .ps-item:active {
    background: rgba(255, 255, 255, 0.08);
}

#page-switcher[data-tone="dark"] .ps-dot {
    background: rgba(236, 236, 240, 0.25);
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
    #page-switcher .ps-panel,
    #page-switcher .ps-chevron,
    #page-switcher .ps-trigger,
    #loading,
    .ps-loading-card,
    .ps-ring-wrap,
    .ps-loading-bar i::after,
    .ps-text-swap {
        transition: none;
        animation: none;
    }
}

/* ---- 报表页统一输入/确认弹窗 ---- */
.report-dialog-mask {
    position: fixed;
    inset: 0;
    z-index: 660;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 40, 0.48);
    backdrop-filter: blur(5px);
    animation: exportMaskFade 0.2s ease both;
}

.report-dialog-mask.closing {
    animation: exportMaskOut 0.2s ease both;
}

.report-dialog-mask.closing .report-dialog {
    animation: reportDialogOut 0.2s ease both;
}

.report-dialog {
    position: relative;
    width: min(400px, 100%);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 40, 0.34);
    animation: reportDialogIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.report-dialog-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(236, 236, 240, 0.8);
    color: rgba(0, 0, 40, 0.52);
    font-size: 18px;
    cursor: pointer;
}

.report-dialog-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: rgba(60, 200, 190, 0.14);
    color: #0E8F87;
    font-size: 18px;
    font-weight: 800;
}

.report-dialog-mark.danger {
    background: rgba(200, 60, 81, 0.12);
    color: #B02A37;
}

.report-dialog h2 {
    margin: 0;
    padding-right: 28px;
    color: #04145E;
    font-size: 19px;
    line-height: 1.35;
}

.report-dialog-message {
    margin: 8px 0 18px;
    color: rgba(0, 0, 40, 0.58);
    font-size: 13px;
    line-height: 1.65;
}

.report-dialog-label {
    display: block;
    margin-bottom: 7px;
    color: rgba(0, 0, 40, 0.7);
    font-size: 12px;
    font-weight: 700;
}

.report-dialog-input {
    box-sizing: border-box;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid rgba(4, 20, 94, 0.16);
    border-radius: 11px;
    outline: 0;
    background: #fff;
    color: #000028;
    font: inherit;
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.report-dialog-input:focus {
    border-color: #3CC8BE;
    box-shadow: 0 0 0 3px rgba(60, 200, 190, 0.14);
}

.report-dialog-input.invalid {
    border-color: #C83C51;
    box-shadow: 0 0 0 3px rgba(200, 60, 81, 0.1);
}

.report-dialog-error {
    min-height: 18px;
    margin-top: 5px;
    color: #B02A37;
    font-size: 11px;
}

.report-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.report-dialog-cancel,
.report-dialog-confirm {
    min-width: 94px;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.report-dialog-cancel {
    border: 1px solid rgba(4, 20, 94, 0.14);
    background: #fff;
    color: #04145E;
}

.report-dialog-confirm {
    border: 0;
    background: linear-gradient(135deg, #04145E, #3CC8BE);
    box-shadow: 0 7px 18px rgba(4, 20, 94, 0.18);
    color: #fff;
}

.report-dialog-confirm.danger {
    background: linear-gradient(135deg, #8F1F34, #D85A6B);
}

@keyframes reportDialogIn {
    from { opacity: 0; transform: translateY(12px) scale(0.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes reportDialogOut {
    to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

@media (max-width: 520px) {
    .report-dialog-mask {
        align-items: flex-end;
        padding: 0;
    }

    .report-dialog {
        width: 100%;
        padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
        border-radius: 20px 20px 0 0;
    }

    .report-dialog-actions {
        display: grid;
        grid-template-columns: 1fr 1.25fr;
    }
}

html[data-theme="dark"] .report-dialog {
    border-color: rgba(255, 255, 255, 0.1);
    background: #11162B;
}

html[data-theme="dark"] .report-dialog h2,
html[data-theme="dark"] .report-dialog-label {
    color: #ECECF0;
}

html[data-theme="dark"] .report-dialog-message {
    color: rgba(236, 236, 240, 0.65);
}

html[data-theme="dark"] .report-dialog-input,
html[data-theme="dark"] .report-dialog-cancel {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ECECF0;
}

/* ---- 飞书访问门禁 ---- */
.fs-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(900px 460px at 88% -12%, rgba(60, 200, 190, 0.20), transparent 60%),
        radial-gradient(760px 420px at -12% 112%, rgba(245, 220, 190, 0.40), transparent 60%),
        linear-gradient(160deg, #ffffff 0%, #ECECF0 100%);
}

.fs-gate::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 40, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 40, 0.04) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.85), transparent 72%);
    mask-image: radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.85), transparent 72%);
    pointer-events: none;
}

.fs-gate-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 42px 32px 30px;
    text-align: center;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 40, 0.06);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 40, 0.12), 0 4px 16px rgba(4, 20, 94, 0.06);
    animation: fs-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fs-gate-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    border-radius: 22px;
    color: #3CC8BE;
    background: linear-gradient(135deg, #04145E, #0b2a8f);
    box-shadow: 0 14px 30px rgba(4, 20, 94, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}

.fs-gate-icon svg {
    width: 38px;
    height: 38px;
}

.fs-gate-title {
    margin: 0 0 12px;
    color: #000028;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.fs-gate-desc {
    margin: 0 0 24px;
    color: rgba(0, 0, 40, 0.72);
    font-size: 14px;
    line-height: 1.75;
}

.fs-gate-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 13px;
    text-align: left;
    color: rgba(0, 0, 40, 0.58);
    font-size: 12px;
    line-height: 1.55;
    background: #ECECF0;
    border-radius: 12px;
}

.fs-gate-hint svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    color: #3CC8BE;
}

@keyframes fs-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fs-gate-card {
        animation: none;
    }
}

/* ---- 飞书免登门禁（2026-08-22） ---- */
.fs-gate-spinner {
    display: none;
    width: 34px;
    height: 34px;
    margin: 4px auto 18px;
    border-radius: 50%;
    border: 3px solid rgba(60, 200, 190, 0.22);
    border-top-color: #3CC8BE;
    animation: fs-spin 0.85s linear infinite;
}

.fs-gate-btn {
    display: none;
    margin: 4px auto 18px;
    padding: 10px 28px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #04145E, #0b2a8f);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(4, 20, 94, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fs-gate-btn:active {
    transform: scale(0.97);
    box-shadow: 0 6px 14px rgba(4, 20, 94, 0.22);
}

.fs-gate-icon.fs-error {
    color: #F5DCBE;
    background: linear-gradient(135deg, #04145E, #0b2a8f);
}

@keyframes fs-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fs-gate-spinner {
        animation: none;
    }

    .dir-footer .df-line {
        animation: none;
    }
}

/* ============================================================
   深色模式（2026-08-22）：html[data-theme="dark"]
   主题色延续：深蓝 #04145E / 青绿 #3CC8BE / 米色 #F5DCBE
   ============================================================ */
html[data-theme="dark"] {
    --ink: #ECECF0;
    --navy: #3CC8BE;
    --mist: #060A1F;
    --sand: #F5DCBE;
    --teal: #3CC8BE;
    --teal-soft: rgba(60, 200, 190, 0.16);
    --text-2: rgba(236, 236, 240, 0.62);
    --text-3: rgba(236, 236, 240, 0.38);
    --line: rgba(236, 236, 240, 0.10);
    color-scheme: dark;
}

/* 目录页 */
html[data-theme="dark"] #directory-view {
    background:
        radial-gradient(900px 480px at 88% -12%, rgba(60, 200, 190, 0.12), transparent 60%),
        radial-gradient(760px 420px at -12% 112%, rgba(245, 220, 190, 0.08), transparent 60%),
        linear-gradient(160deg, #070B22 0%, #0A1230 48%, #071019 100%);
}

html[data-theme="dark"] .dir-greeting {
    color: var(--text-2);
}

html[data-theme="dark"] .dir-title {
    background: linear-gradient(90deg, #3CC8BE, #8FE3DC);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

html[data-theme="dark"] .dir-subtitle {
    color: var(--text-2);
}

html[data-theme="dark"] .dir-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.055);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    color: var(--ink);
}

html[data-theme="dark"] .dir-card:hover {
    border-color: rgba(60, 200, 190, 0.45);
    background: rgba(60, 200, 190, 0.10);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .dir-card-icon {
    background: rgba(60, 200, 190, 0.14);
    color: var(--teal);
    box-shadow: inset 0 0 0 1px rgba(60, 200, 190, 0.20);
}

html[data-theme="dark"] .dir-card-name {
    color: var(--ink);
}

html[data-theme="dark"] .dir-card-chevron {
    color: var(--text-3);
}

html[data-theme="dark"] .dir-workspace-bar {
    color: var(--teal);
}

html[data-theme="dark"] .dir-sticky {
    background:
        radial-gradient(900px 480px at 88% -12%, rgba(60, 200, 190, 0.12), transparent 60%),
        radial-gradient(760px 420px at -12% 112%, rgba(245, 220, 190, 0.08), transparent 60%),
        linear-gradient(160deg, #070B22 0%, #0A1230 48%, #071019 100%);
}

html[data-theme="dark"] .dir-empty {
    color: var(--text-2);
    border: 1px dashed var(--line);
    background: rgba(255, 255, 255, 0.03);
}

/* 主题切换按钮 */
html[data-theme="dark"] .theme-toggle {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
}

html[data-theme="dark"] .theme-toggle .theme-icon-sun {
    display: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-moon {
    display: block;
}

/* 报表页悬浮按钮组：深色模式统一 */
html[data-theme="dark"] #report-back-btn,
html[data-theme="dark"] #export-data-btn,
html[data-theme="dark"] #capture-btn,
html[data-theme="dark"] #bookmark-add-btn,
html[data-theme="dark"] #bookmark-list-btn,
html[data-theme="dark"] #reset-filters-btn,
html[data-theme="dark"] #float-ui-toggle {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(10, 15, 35, 0.85);
    color: var(--ink);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .export-sheet {
    background: #10172F;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .export-sheet-head {
    border-bottom-color: rgba(236, 236, 240, 0.1);
    color: var(--ink);
}

html[data-theme="dark"] .export-sheet-hint {
    color: var(--text-3);
}

html[data-theme="dark"] .export-sheet-close {
    background: rgba(236, 236, 240, 0.12);
    color: var(--text-2);
}

html[data-theme="dark"] .bookmark-item {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(236, 236, 240, 0.1);
}

html[data-theme="dark"] .bookmark-item-name {
    color: var(--ink);
}

html[data-theme="dark"] .bookmark-item-meta {
    color: var(--text-3);
}

html[data-theme="dark"] .bookmark-item-ops .bookmark-op {
    background: rgba(236, 236, 240, 0.1);
    border-color: rgba(236, 236, 240, 0.12);
    color: rgba(236, 236, 240, 0.7);
}

html[data-theme="dark"] .export-sheet-loading,
html[data-theme="dark"] .export-sheet-empty {
    color: var(--text-3);
}

html[data-theme="dark"] .export-sheet-item {
    color: var(--ink);
}

html[data-theme="dark"] .export-sheet-item:hover {
    background: rgba(60, 200, 190, 0.12);
}

html[data-theme="dark"] .export-sheet-item-type {
    background: rgba(236, 236, 240, 0.1);
    color: var(--text-2);
}

html[data-theme="dark"] .export-sheet-item-status {
    color: var(--text-3);
}

html[data-theme="dark"] .export-sheet-item-status.exporting {
    color: #5fd8cf;
}

html[data-theme="dark"] .export-sheet-item-status.ok {
    color: #3ddc97;
}

html[data-theme="dark"] .export-sheet-item-status.err {
    color: #ff7b88;
}

html[data-theme="dark"] .export-sheet-empty {
    color: var(--text-3);
}

html[data-theme="dark"] .export-notice-icon {
    background: rgba(60, 200, 190, 0.14);
}

html[data-theme="dark"] .export-notice-title {
    color: var(--ink);
}

html[data-theme="dark"] .export-notice-text {
    color: var(--text-2);
}

/* 深色模式导出预览面板：补齐可读性（此前刷新/收起文字融入背景） */
html[data-theme="dark"] .export-preview {
    border-top-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .export-preview-title {
    color: #ECECF0;
}

html[data-theme="dark"] .export-preview-meta {
    color: rgba(236, 236, 240, 0.55);
}

html[data-theme="dark"] .export-preview-refresh,
html[data-theme="dark"] .export-preview-close {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(236, 236, 240, 0.9);
}

html[data-theme="dark"] .export-preview-refresh:hover,
html[data-theme="dark"] .export-preview-close:hover {
    background: rgba(60, 200, 190, 0.2);
    border-color: rgba(60, 200, 190, 0.5);
    color: #8FE8E0;
}

html[data-theme="dark"] .export-preview-scroll {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .export-preview-table th {
    background: rgba(16, 22, 48, 0.95);
    color: rgba(236, 236, 240, 0.75);
}

html[data-theme="dark"] .export-preview-table th,
html[data-theme="dark"] .export-preview-table td {
    border-bottom-color: rgba(255, 255, 255, 0.07);
    color: #D9DCE6;
}

html[data-theme="dark"] .export-preview-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .export-preview-loading,
html[data-theme="dark"] .export-preview-error,
html[data-theme="dark"] .export-preview-empty {
    color: rgba(236, 236, 240, 0.6);
}

html[data-theme="dark"] .export-toast {
    background: rgba(236, 236, 240, 0.92);
    color: #071019;
}

html[data-theme="dark"] .export-toast.err {
    background: rgba(232, 90, 100, 0.92);
    color: #ffffff;
}

/* 加载遮罩 */
html[data-theme="dark"] #loading {
    background: linear-gradient(135deg, #070B22, #0A1230, #101A3A, #070B22);
    background-size: 300% 300%;
}

html[data-theme="dark"] .ps-loading-card {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(16, 22, 48, 0.72);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .ps-loading-text,
html[data-theme="dark"] .ps-loading-pct {
    color: var(--ink);
}

html[data-theme="dark"] .ps-loading-bar {
    background: rgba(236, 236, 240, 0.12);
}

/* 深色模式加载屏：与浅色模式同样的渐变处理（深色下 --navy 与 --teal 同色，需独立配色） */
html[data-theme="dark"] .ps-ring {
    background: conic-gradient(
        from 0deg,
        var(--dt-a, #3CC8BE) 0deg,
        var(--dt-b, #62D4FF) 120deg,
        var(--dt-a, #3CC8BE) 240deg,
        var(--dt-a, #3CC8BE) 360deg
    );
}

html[data-theme="dark"] .ps-loading-pct {
    background: linear-gradient(90deg, var(--dt-b, #7FE0FF), var(--dt-a, #3CC8BE));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

html[data-theme="dark"] .ps-loading-bar i {
    background: linear-gradient(90deg, var(--dt-a, #3CC8BE), var(--dt-b, #62D4FF));
}

html[data-theme="dark"] .ps-ring-wrap {
    animation: ps-glow-dark 2.2s ease-in-out infinite;
}

@keyframes ps-glow-dark {
    0%,
    100% {
        filter: drop-shadow(0 0 6px var(--glow-da, rgba(60, 200, 190, 0.5)));
    }
    50% {
        filter: drop-shadow(0 0 18px var(--glow-db, rgba(98, 212, 255, 0.55)));
    }
}

/* 首页列表元素滑入/滑出动画 */
@keyframes dirCardIn {
    from {
        transform: translateX(-28px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes dirCardOut {
    to {
        transform: translateX(-28px);
        opacity: 0;
    }
}

@keyframes dirLeave {
    to {
        transform: translateX(-36px);
        opacity: 0;
    }
}

#directory-view.dir-leave {
    animation: dirLeave 0.28s ease forwards;
}

/* 报表 iframe 上禁用父页面手势（原生捏合由页面级缩放接管；iframe 内部交互不受影响） */
#embed-container iframe,
#embed-container-desktop iframe {
    touch-action: none;
}

/* 滚动进出视口时反复滑入/滑出：进入触发滑入动画，离开触发滑出动画，结束后落定 */
#directory-view.animate-cards .dir-card,
#directory-view.animate-cards .dir-ws-divider,
#directory-view.animate-cards .dir-footer {
    transform: translateX(-28px);
    opacity: 0;
}

#directory-view.animate-cards .dir-card.in,
#directory-view.animate-cards .dir-ws-divider.in,
#directory-view.animate-cards .dir-footer.in {
    animation: dirCardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#directory-view.animate-cards .dir-card.out,
#directory-view.animate-cards .dir-ws-divider.out,
#directory-view.animate-cards .dir-footer.out {
    animation: dirCardOut 0.35s ease both;
}

#directory-view.animate-cards .dir-card.settled,
#directory-view.animate-cards .dir-ws-divider.settled,
#directory-view.animate-cards .dir-footer.settled {
    transform: none;
    opacity: 1;
}

html[data-theme="dark"] .dir-ws-divider i {
    border-color: var(--teal);
    background: rgba(60, 200, 190, 0.2);
}

html[data-theme="dark"] .dir-badge.new {
    color: var(--teal);
}

html[data-theme="dark"] .dir-card-meta {
    color: var(--text-2);
}

/* ---- 问候区天气图标与小动画 ---- */

.wx-icon {
    position: relative;
    display: inline-flex;
    width: 20px;
    height: 20px;
    margin-right: 2px;
    vertical-align: -4px;
    color: var(--teal);
}

.wx-icon svg {
    width: 100%;
    height: 100%;
}

.wx-sun {
    animation: wxPulse 3s ease-in-out infinite;
}

.wx-moon {
    animation: wxPulse 4s ease-in-out infinite;
}

.wx-cloud {
    animation: wxDrift 6s ease-in-out infinite;
}

.wx-rain svg,
.wx-thunder svg,
.wx-snow svg {
    animation: wxDrift 6s ease-in-out infinite;
}

.wx-drop,
.wx-flake {
    position: absolute;
    top: 14px;
    width: 2px;
    height: 5px;
    border-radius: 1px;
    background: currentColor;
    opacity: 0;
    animation: wxDrop 1.1s linear infinite;
}

.wx-drop:nth-of-type(2) {
    animation-delay: 0.35s;
}

.wx-drop:nth-of-type(3) {
    animation-delay: 0.7s;
}

.wx-flake {
    top: 13px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation-name: wxFall;
}

.wx-flake:nth-of-type(2) {
    animation-delay: 0.4s;
}

.wx-flake:nth-of-type(3) {
    animation-delay: 0.8s;
}

.wx-bolt {
    position: absolute;
    right: 0;
    top: 4px;
    width: 9px;
    height: 9px;
    animation: wxFlash 2s ease-in-out infinite;
}

@keyframes wxPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
    }
}

@keyframes wxDrift {
    0%, 100% {
        transform: translateX(-1px);
    }
    50% {
        transform: translateX(1px);
    }
}

@keyframes wxDrop {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    20% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(6px);
        opacity: 0;
    }
}

@keyframes wxFall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    25% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(7px);
        opacity: 0;
    }
}

@keyframes wxFlash {
    0%, 100% {
        opacity: 0;
    }
    45%, 55% {
        opacity: 1;
    }
}

/* ---- 节气专属加载场景 ---- */

.ps-loading-card.term {
    padding: 26px 30px 24px;
}

.term-scene svg {
    display: block;
    width: 240px;
    height: 180px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(4, 20, 94, 0.14);
}

.term-title {
    margin-top: 16px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 10px;
}

.ps-loading-card.term .ps-loading-pct {
    margin-top: 14px;
}

.ps-loading-card.term .ps-loading-bar {
    margin-top: 12px;
}

.ps-loading-card.term .ps-loading-text {
    margin-top: 10px;
}

.term-quote {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-2);
    letter-spacing: 1px;
    text-align: center;
    max-width: 280px;
}

/* 主题切换：圆形羽化扩散（以 --theme-x/--theme-y 为原点） */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-new(root) {
    z-index: 9999;
    clip-path: circle(0px at var(--theme-x, 50%) var(--theme-y, 40%));
    animation: theme-circle-reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes theme-circle-reveal {
    0% {
        clip-path: circle(0px at var(--theme-x, 50%) var(--theme-y, 40%));
    }
    50% {
        clip-path: circle(4vmax at var(--theme-x, 50%) var(--theme-y, 40%));
    }
    62% {
        clip-path: circle(5vmax at var(--theme-x, 50%) var(--theme-y, 40%));
    }
    100% {
        clip-path: circle(160vmax at var(--theme-x, 50%) var(--theme-y, 40%));
    }
}

/* ---- 导出工作台 v2：选择、命名、格式、预览与发送集中完成 ---- */
.export-sheet-mask.closing {
    animation: exportMaskOut 0.2s ease both;
}

.export-sheet-mask.closing .export-sheet {
    animation: exportSheetOut 0.2s ease both;
}

.export-sheet:not(.export-sheet-notice) {
    width: min(780px, 100%);
    max-height: min(82vh, 760px);
}

.export-sheet-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.82fr);
    min-height: 0;
    overflow: hidden;
}

.export-sheet-layout > .export-sheet-body {
    min-height: 260px;
    padding: 12px;
    border-right: 1px solid rgba(0, 0, 40, 0.08);
}

.export-sheet-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 7px;
}

.export-sheet-row .export-sheet-item {
    min-width: 0;
    border: 1px solid transparent;
}

.export-sheet-item-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(4, 20, 94, 0.18);
    border-radius: 50%;
    color: transparent;
    font-size: 11px;
}

.export-sheet-item.selected {
    border-color: rgba(60, 200, 190, 0.55);
    background: rgba(60, 200, 190, 0.1);
    box-shadow: 0 5px 16px rgba(4, 20, 94, 0.08);
}

.export-sheet-item.selected .export-sheet-item-check {
    border-color: #3CC8BE;
    background: #3CC8BE;
    color: #04145E;
}

.export-row-preview {
    flex: 0 0 auto;
    padding: 0 11px;
    border: 1px solid rgba(4, 20, 94, 0.12);
    border-radius: 11px;
    background: #fff;
    color: #04145E;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.export-row-preview:hover {
    border-color: #3CC8BE;
    background: rgba(60, 200, 190, 0.08);
}

.export-compose {
    min-width: 0;
    padding: 18px;
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(236, 236, 240, 0.45), rgba(60, 200, 190, 0.06));
}

.export-compose[hidden] {
    display: none;
}

.export-compose-kicker {
    color: #0E8F87;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.export-compose-title {
    margin: 4px 0 18px;
    color: #04145E;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.export-field-label,
.export-format legend {
    display: block;
    margin-bottom: 7px;
    color: rgba(0, 0, 40, 0.68);
    font-size: 12px;
    font-weight: 700;
}

.export-file-field {
    display: flex;
    align-items: center;
    border: 1px solid rgba(4, 20, 94, 0.16);
    border-radius: 11px;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.export-file-field:focus-within {
    border-color: #3CC8BE;
    box-shadow: 0 0 0 3px rgba(60, 200, 190, 0.14);
}

.export-file-field:has(.export-file-input.invalid) {
    border-color: #C83C51;
}

.export-file-input {
    min-width: 0;
    flex: 1;
    padding: 11px 4px 11px 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #000028;
    font: inherit;
    font-size: 13px;
}

.export-file-extension {
    flex: 0 0 auto;
    padding: 0 12px 0 5px;
    color: rgba(0, 0, 40, 0.48);
    font-size: 12px;
    font-weight: 700;
}

.export-field-help {
    margin: 6px 0 16px;
    color: rgba(0, 0, 40, 0.45);
    font-size: 11px;
    line-height: 1.5;
}

.export-format {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.export-format legend {
    grid-column: 1 / -1;
}

.export-format label {
    position: relative;
    cursor: pointer;
}

.export-format input {
    position: absolute;
    opacity: 0;
}

.export-format label > span {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid rgba(4, 20, 94, 0.12);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.8);
    color: #04145E;
    transition: all 0.18s ease;
}

.export-format input:checked + span {
    border-color: #3CC8BE;
    background: rgba(60, 200, 190, 0.12);
    box-shadow: inset 0 0 0 1px #3CC8BE;
}

.export-format small {
    color: rgba(0, 0, 40, 0.46);
    font-size: 10px;
}

.export-compose-note {
    display: flex;
    gap: 7px;
    margin-top: 15px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(4, 20, 94, 0.055);
    color: rgba(0, 0, 40, 0.56);
    font-size: 11px;
    line-height: 1.5;
}

.export-compose-actions {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 8px;
    margin-top: 16px;
}

.export-preview-action,
.export-submit-action {
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.export-preview-action {
    border: 1px solid rgba(4, 20, 94, 0.16);
    background: rgba(255, 255, 255, 0.82);
    color: #04145E;
}

.export-submit-action {
    border: 0;
    background: linear-gradient(135deg, #04145E, #3CC8BE);
    box-shadow: 0 8px 20px rgba(4, 20, 94, 0.18);
    color: #fff;
}

.export-submit-action:disabled {
    cursor: wait;
    opacity: 0.65;
}

.export-compose-status {
    min-height: 18px;
    margin-top: 9px;
    color: rgba(0, 0, 40, 0.52);
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.export-compose-status.working { color: #0E8F87; }
.export-compose-status.ok { color: #087A4D; }
.export-compose-status.err { color: #B02A37; }

.export-sheet-layout .export-preview {
    grid-column: 1 / -1;
}

@keyframes exportMaskOut {
    to { opacity: 0; }
}

@keyframes exportSheetOut {
    to { opacity: 0; transform: translateY(10px) scale(0.98); }
}

@media (max-width: 680px) {
    .export-sheet-mask {
        align-items: flex-end;
        padding: 0;
    }

    .export-sheet:not(.export-sheet-notice) {
        width: 100%;
        max-height: min(91dvh, 820px);
        border-radius: 20px 20px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .export-sheet-layout {
        display: block;
        overflow-y: auto;
    }

    .export-sheet-layout > .export-sheet-body {
        min-height: 0;
        max-height: 32vh;
        border-right: 0;
        border-bottom: 1px solid rgba(0, 0, 40, 0.08);
    }

    .export-compose {
        overflow: visible;
        padding: 15px 16px 18px;
    }

    .export-sheet-item-type {
        display: none;
    }
}

html[data-theme="dark"] .export-compose {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(60, 200, 190, 0.07));
}

html[data-theme="dark"] .export-sheet-layout > .export-sheet-body {
    border-color: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .export-row-preview,
html[data-theme="dark"] .export-file-field,
html[data-theme="dark"] .export-format label > span,
html[data-theme="dark"] .export-preview-action {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ECECF0;
}

html[data-theme="dark"] .export-compose-title,
html[data-theme="dark"] .export-file-input,
html[data-theme="dark"] .export-format label > span {
    color: #ECECF0;
}

html[data-theme="dark"] .export-field-label,
html[data-theme="dark"] .export-format legend,
html[data-theme="dark"] .export-field-help,
html[data-theme="dark"] .export-file-extension,
html[data-theme="dark"] .export-format small,
html[data-theme="dark"] .export-compose-note,
html[data-theme="dark"] .export-compose-status {
    color: rgba(236, 236, 240, 0.62);
}

@media (prefers-reduced-motion: reduce) {
    .export-sheet-mask,
    .export-sheet,
    .export-sheet-mask.closing,
    .export-sheet-mask.closing .export-sheet {
        animation-duration: 0.01ms !important;
    }
}
