/**
 * custom.css - 本地自定义样式（唯一允许写自己样式的地方）
 *
 * 规则：
 * 1. 不要修改 src/css/style.css，它随上游更新自动同步。
 * 2. 本文件在 index.html 中晚于 style.css 加载，同优先级规则后定义者生效。
 * 3. 覆盖上游变量只需重写 :root 中的 CSS 变量，例如：
 *      :root { --bg-color: #f5f0e6; --text-color: #3a3226; }
 * 4. 覆盖 JS 写入的内联样式（如 D3 设置的 fill/stroke）时需加 !important。
 * 5. 上游新增的元素若此处未覆盖，会自动回退到 style.css 的默认样式。
 */

/* 顶部「更多」链接：复用 .tree-btn 外观，仅放开固定宽度 */
#more-link {
    width: auto;
    min-width: 56px;
    padding: 0 14px;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-decoration: none;
}

/* 底部版权声明：默认隐藏，进入分类树视图后随 #container-viz 一同显示。
   两行文案（免责声明 / 插图与协议署名）独占底部条，时间轴整体上移避让。 */
#site-footer {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
    margin: 0;
    padding: 4px 16px;
    box-sizing: border-box;
    font-family: 'Noto Serif SC', serif;
    font-size: 11px;
    letter-spacing: 0.02em;
    color: rgba(38, 50, 47, 0.6);
    background: linear-gradient(to top, rgba(244, 241, 234, 0.98) 0%, rgba(244, 241, 234, 0.92) 100%);
    pointer-events: none;
    user-select: none;
}

#site-footer .footer-line {
    margin: 0;
    line-height: 1.6;
    text-align: center;
    white-space: nowrap;
}

#site-footer .footer-credit {
    margin-top: 1px;
}

body:has(#container-viz[style*="display: block"]) #site-footer {
    display: block;
}

/* 时间轴上移，为声明条让出固定高度 */
body:has(#container-viz[style*="display: block"]) #time-axis {
    bottom: 44px;
}

@media (max-width: 767px) {
    #site-footer {
        padding: 4px 10px;
        font-size: 10px;
    }

    #site-footer .footer-line {
        line-height: 1.5;
        white-space: normal;
        text-align: justify;
        text-align-last: center;
        overflow-wrap: break-word;
    }

    body:has(#container-viz[style*="display: block"]) #time-axis {
        bottom: 83px;
    }
}

/* 320px 等超窄屏：署名行多折一行，时间轴再下移 15px */
@media (max-width: 340px) {
    body:has(#container-viz[style*="display: block"]) #time-axis {
        bottom: 98px;
    }
}
