.dd-footer{background:#EDEBFB;margin-top:auto;color:#1A0F5E}
.dd-footer-main{
    max-width:1440px;margin:0 auto;padding:56px 32px 44px;
    display:grid;grid-template-columns:340px 1fr;gap:56px;align-items:start;
}

/* ---- 品牌区 ---- */
.dd-footer-brand{display:flex;flex-direction:column;gap:22px;max-width:340px}
.dd-footer-logo{display:inline-flex;align-items:center;gap:11px;text-decoration:none;color:#1A0F5E}
.dd-footer-logo img{height:40px;max-width:190px;object-fit:contain;display:block}
.dd-footer-logo-mark{display:flex;align-items:center;color:#1A0F5E}
.dd-footer-logo-text{font-size:24px;font-weight:800;letter-spacing:-.5px;line-height:1;white-space:nowrap}

.dd-footer-pills{display:flex;gap:14px;flex-wrap:wrap}
/* Each pill is a <details>, so it opens without a script, and the panel has
   to open upward - a footer has no room below it. */
.dd-footer-pill{position:relative}
.dd-footer-pill summary{
    display:inline-flex;align-items:center;gap:9px;height:32px;padding:0 15px;
    background:#DCD6F7;border-radius:100px;font-size:13.5px;font-weight:500;color:#1A0F5E;
    cursor:pointer;transition:background .16s;list-style:none;
}
.dd-footer-pill summary::-webkit-details-marker{display:none}
.dd-footer-pill summary:hover{background:#CFC7F2}
.dd-footer-pill[open] summary{background:#CFC7F2}
.dd-footer-pill-menu{
    position:absolute;bottom:calc(100% + 8px);left:0;min-width:180px;max-width:min(260px, calc(100vw - 32px));z-index:60;
    display:flex;flex-direction:column;gap:2px;padding:6px;
    background:#fff;border:1px solid #E4E0F5;border-radius:12px;
    box-shadow:0 12px 30px rgba(26,15,94,.16);
    box-sizing:border-box;
}
.dd-footer-pill-menu a{padding:8px 12px;border-radius:8px;font-size:13px;color:#1A0F5E;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

@media (max-width: 480px){
    .dd-footer-pill-menu{min-width:0;width:max-content;max-width:calc(100vw - 28px)}
    .dd-footer-pill-menu a{padding:7px 10px;font-size:12.5px}
}
.dd-footer-pill-menu a:hover{background:#F1EEFC}
.dd-footer-pill-menu a.is-active{font-weight:700;background:#EDE8FB}

.dd-footer-news{display:flex;flex-direction:column;gap:11px}
.dd-footer-news-head{font-size:17px;font-weight:600;line-height:1.5}
.dd-footer-news-hl{font-weight:800;margin:0 2px}
.dd-footer-news-sub{font-size:12.5px;line-height:1.6;color:#4A4A7A}
.dd-footer-news-form{
    display:flex;align-items:center;height:46px;background:#fff;border-radius:100px;
    padding:0 4px 0 18px;gap:8px;border:1px solid #DCD6F7;
}
.dd-footer-news-form input{
    flex:1;min-width:0;border:none;background:transparent;outline:none;
    font-size:14px;font-family:inherit;color:#1A0F5E;
}
.dd-footer-news-form input::placeholder{color:#9A93C7}
.dd-footer-news-form button{
    height:36px;padding:0 20px;border:none;border-radius:100px;background:#4D33DE;color:#fff;
    font-size:13.5px;font-weight:600;font-family:inherit;cursor:pointer;white-space:nowrap;transition:background .16s;
}
.dd-footer-news-form button:hover{background:#3D21DD}
.dd-footer-news-note{font-size:12.5px;color:#0f9d58;min-height:16px}

.dd-footer-social{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.dd-footer-social a{
    width:30px;height:30px;border-radius:50%;background:#DCD6F7;color:#1A0F5E;
    display:flex;align-items:center;justify-content:center;text-decoration:none;transition:background .16s,color .16s;
}
.dd-footer-social a:hover{background:#1A0F5E;color:#fff}

/* ---- 四列链接 ---- */
.dd-footer-cols{display:grid;grid-template-columns:repeat(4,1fr);gap:32px}
.dd-footer-col{display:flex;flex-direction:column;gap:11px}
.dd-footer-col-title{font-size:15px;font-weight:700;color:#1A0F5E;margin-bottom:5px}
.dd-footer-col a{
    font-size:14px;color:#4A4A7A;text-decoration:none;width:fit-content;
    opacity:.85;transition:color .15s,opacity .15s;line-height:1.35;
}
.dd-footer-col a:hover{color:#3D21DD;opacity:1}

/* ---- 版权栏 ---- */
.dd-footer-legal{
    border-top:1px solid #DCD6F7;background:#EDEBFB;
}
.dd-footer-legal{
    max-width:1440px;margin:0 auto;padding:20px 32px;
    display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;
    font-size:13px;color:#4A4A7A;
}
.dd-footer-copy{opacity:.85}
.dd-footer-legal-links{display:flex;gap:22px;flex-wrap:wrap}
.dd-footer-legal-links a{color:#4A4A7A;text-decoration:none;opacity:.85;transition:color .15s,opacity .15s}
.dd-footer-legal-links a:hover{color:#3D21DD;opacity:1}

/* ---- 响应式 ---- */
@media(max-width:1100px){
    .dd-footer-main{grid-template-columns:1fr;gap:40px}
    .dd-footer-brand{max-width:100%}
    .dd-footer-cols{grid-template-columns:repeat(2,1fr);gap:30px}
}
@media(max-width:560px){
    .dd-footer-main{padding:36px 18px 30px}
    .dd-footer-cols{grid-template-columns:1fr;gap:26px}
    .dd-footer-legal{padding:18px;flex-direction:column;align-items:flex-start;gap:12px}
    .dd-footer-legal-links{gap:16px}
    .dd-footer-news-form{height:auto;flex-direction:column;border-radius:16px;padding:14px;align-items:stretch}
    .dd-footer-news-form button{height:40px}
}

/* ---- 手机版页脚（2026-09-25，参考 dynadot.com/zh 的手机页脚） ----
   结构对齐 Dynadot：品牌居中 → 订阅做成渐变卡片、输入与按钮同一行 →
   链接组在手机上仍是多列（2 列，而不是单列堆到底）→ 底栏居中紧凑。 */
@media(max-width:720px){
    .dd-footer-main{padding:34px 18px 26px;gap:26px}
    .dd-footer-brand{max-width:none;align-items:center;text-align:center;gap:16px}
    .dd-footer-logo{justify-content:center}
    .dd-footer-pills{justify-content:center}

    .dd-footer-news{
        width:100%;align-items:center;text-align:center;gap:8px;
        padding:20px 16px 18px;border-radius:18px;
        background:linear-gradient(135deg,#E9E6FB 0%,#F3E7FB 55%,#FDEEF6 100%);
        border:1px solid #E4DFF8;
    }
    .dd-footer-news-head{font-size:16px;line-height:1.45;max-width:24ch}
    .dd-footer-news-sub{font-size:12.5px;max-width:32ch}
    .dd-footer-news-form{
        height:48px;flex-direction:row;align-items:center;border-radius:100px;
        padding:0 4px 0 16px;width:100%;background:#fff;border:1px solid #E3E0F5;
        box-shadow:0 8px 20px rgba(26,15,94,.07);
    }
    /* 输入框必须可收缩：<input type=email> 自带约 190px 默认宽度，会把窄屏 layout 撑宽导致"溢出" */
    .dd-footer-news-form input{height:100%;font-size:14px;text-align:left;width:100%;min-width:0;flex:1 1 auto;padding:0;border:0;background:transparent}
    .dd-footer-news-form{min-width:0}
    .dd-footer-news-form button{height:38px;padding:0 18px;font-size:13.5px;flex:none}

    .dd-footer-social{justify-content:center}

    .dd-footer-cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 16px}
    .dd-footer-col{gap:6px}
    .dd-footer-col-title{font-size:13.5px;margin-bottom:2px}
    .dd-footer-col a{font-size:12.5px;line-height:1.5}

    .dd-footer-legal{padding:16px 18px;flex-direction:column;align-items:center;gap:10px;text-align:center}
    .dd-footer-legal-links{gap:14px;justify-content:center;flex-wrap:wrap;font-size:12px}
}
/* 极窄屏（<=400px）：订阅表单允许换行，按钮整行，彻底消除宽度压力 */
@media(max-width:340px){
    .dd-footer-news-form{height:auto;flex-wrap:wrap;padding:10px;border-radius:16px;gap:10px}
    .dd-footer-news-form input{height:38px;flex:1 1 100%}
    .dd-footer-news-form button{flex:1 1 100%;height:42px;justify-content:center}
}

/* ---- 暗色 ---- */
:root[data-theme="dark"] .dd-footer,
:root[data-theme="dark"] .dd-footer-legal{background:#0F0A2E !important;color:#DCD6F7 !important}
:root[data-theme="dark"] .dd-footer-logo,
:root[data-theme="dark"] .dd-footer-logo-text,
:root[data-theme="dark"] .dd-footer-col-title,
:root[data-theme="dark"] .dd-footer-news-head{color:#F3F0FF !important}
:root[data-theme="dark"] .dd-footer-col a,
:root[data-theme="dark"] .dd-footer-legal-links a,
:root[data-theme="dark"] .dd-footer-copy,
:root[data-theme="dark"] .dd-footer-news-sub{color:#9A93C7 !important}
:root[data-theme="dark"] .dd-footer-pill summary{background:#2A2060 !important;color:#DCD6F7 !important}
:root[data-theme="dark"] .dd-footer-pill-menu{background:#1E1747 !important;border-color:#2A2060 !important}
:root[data-theme="dark"] .dd-footer-pill-menu a{color:#DCD6F7 !important}
:root[data-theme="dark"] .dd-footer-pill-menu a:hover{background:#2A2060 !important}
:root[data-theme="dark"] .dd-footer-social a{background:#2A2060 !important;color:#DCD6F7 !important}
:root[data-theme="dark"] .dd-footer-news-form{background:#171040 !important;border-color:#2A2060 !important}
:root[data-theme="dark"] .dd-footer-news-form input{color:#DCD6F7 !important}
:root[data-theme="dark"] .dd-footer-legal{border-top-color:#2A2060 !important}

/* ===== 回到顶部按钮（2026-09-26） ===== */
.dd-totop{
    position:fixed; right:22px; bottom:22px; z-index:1200;
    width:46px; height:46px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:#4D33DE; color:#fff; border:0; cursor:pointer;
    box-shadow:0 10px 26px rgba(26,15,94,.28);
    opacity:0; transform:translateY(8px); transition:opacity .2s ease, transform .2s ease, background .16s;
}
.dd-totop.is-on{ opacity:1; transform:none; }
.dd-totop:hover{ background:#3D21DD; }
.dd-totop:focus-visible{ outline:3px solid rgba(76,50,223,.35); outline-offset:2px; }
:root[data-theme="dark"] .dd-totop{ background:#4D33DE; color:#fff; box-shadow:0 10px 26px rgba(0,0,0,.5); }
@media (max-width:720px){
    .dd-totop{ right:14px; bottom:16px; width:42px; height:42px; }
}
@media (prefers-reduced-motion:reduce){
    .dd-totop{ transition:none; }
}

/* dsh-mobile-adapt-4：页脚订阅输入框字号 ≥16px（iOS 聚焦不放大） */
@media(max-width:720px){
    .dd-footer-news-form input{font-size:16px !important}
}
