/* ===== 内容区自动撑满剩余高度，统一页脚与内容间距 ===== */
html,body{min-height:100%;margin:0;}
body[data-shell-page]{
  min-height:100vh;
  min-height:100svh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}
body[data-shell-page] > main,
body[data-shell-page] > .buy-shell{
  width:100%;
  flex:1 0 auto;
}

body[data-shell-page="login"],
body[data-shell-page="register"]{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
body[data-shell-page="login"] > .container,
body[data-shell-page="register"] > .container{
  width:100%;
  flex:1 0 auto;
  display:flex;
  flex-direction:column;
}
body[data-shell-page="login"] > .container > .auth-wrap,
body[data-shell-page="register"] > .container > .auth-wrap{
  flex:1 0 auto;
}


/* ===== 电脑端：短页面自动补足内容区高度，首屏不露出页脚 ===== */
:root{--shell-desktop-topbar-h:72px;--shell-safe-top:env(safe-area-inset-top,0px);--shell-topbar-bg:#ffffff;}
html{background:var(--shell-topbar-bg);}
@media (min-width: 981px){
  body[data-shell-page="buy"] > .buy-shell,
  body[data-shell-page="user"] > main.dashboard-shell,
  body[data-shell-page="user"] > main.page,
  body[data-shell-page="user-orders"] > main.page,
  body[data-shell-page="user-withdrawals"] > main.page,
  body[data-shell-page="user-withdrawals-manage"] > main.page,
  body[data-shell-page="user-amount-details"] > main.page,
  body[data-shell-page="login"] > .container,
  body[data-shell-page="register"] > .container{
    min-height:calc(100vh - var(--shell-desktop-topbar-h));
    min-height:calc(100dvh - var(--shell-desktop-topbar-h));
  }
}

/* ===== 顶部导航样板：电脑端撑满 / 手机端可折叠 ===== */
  .topbar.shell-topbar{
    position:sticky;
    top:0;
    z-index:1000;
    padding-top:var(--shell-safe-top);
    background:var(--shell-topbar-bg);
    backdrop-filter:saturate(180%) blur(16px);
    -webkit-backdrop-filter:saturate(180%) blur(16px);
    border-bottom:1px solid rgba(17,17,17,.06);
  }
  .topbar.shell-topbar::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:calc(var(--shell-safe-top) * -1);
    height:var(--shell-safe-top);
    background:var(--shell-topbar-bg);
    pointer-events:none;
  }
  .shell-topbar .topbar-inner{
    max-width:none !important;
    width:100%;
    min-height:72px;
    padding:16px 28px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
  }
  .shell-brand{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
  }
  .shell-brand-mark{
    width:38px;height:38px;border-radius:12px;
    background:linear-gradient(135deg,#111 0%,#2a2a2a 100%);
    color:#fff;display:flex;align-items:center;justify-content:center;
    font-weight:900;font-size:18px;letter-spacing:.04em;flex:0 0 auto;
    box-shadow:0 12px 26px rgba(17,17,17,.16);
  }
  .shell-brand-text{display:grid;gap:2px;line-height:1;}
  .shell-brand-title{font-size:19px;font-weight:900;color:#111;letter-spacing:.01em;}
  .shell-brand-sub{font-size:12px;color:#7b8190;font-weight:600;}

  .shell-menu-btn{
    display:none;
    width:44px;height:44px;border-radius:14px;border:1px solid #e5e7eb;
    background:#fff;color:#111;align-items:center;justify-content:center;cursor:pointer;
    box-shadow:0 10px 22px rgba(15,23,42,.06);
  }
  .shell-menu-btn svg{width:20px;height:20px;}

  .shell-nav-wrap{
    display:flex;
    align-items:center;
    gap:18px;
    min-width:0;
    flex:1;
    justify-content:flex-end;
  }
  .shell-nav{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  .shell-nav a{
    margin:0 !important;
    padding:10px 14px;
    border-radius:999px;
    color:#4b5563;
    font-size:14px;
    font-weight:700;
    transition:.18s ease;
  }
  .shell-nav a:hover{background:#fff;color:#111;box-shadow:0 8px 20px rgba(15,23,42,.06);}
  .shell-auth{display:flex;align-items:center;gap:10px;flex:0 0 auto;min-height:42px;}
  .shell-auth.auth-pending{visibility:hidden;}

  .shell-btn{
    display:inline-flex;align-items:center;justify-content:center;
    height:42px;padding:0 18px;border-radius:999px;text-decoration:none;
    font-size:14px;font-weight:800;border:1px solid #e5e7eb;transition:.18s ease;
    white-space:nowrap;
  }
  .shell-btn-light{background:#fff;color:#111;box-shadow:0 10px 22px rgba(15,23,42,.06);}
  .shell-btn-light:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(15,23,42,.08);}
  .shell-btn-primary{background:#111;color:#fff;border-color:#111;box-shadow:0 14px 28px rgba(17,17,17,.18);}
  .shell-btn-primary:hover{transform:translateY(-1px);background:#000;}
  .shell-btn-user{background:linear-gradient(135deg,#111 0%,#2b2b2b 100%);color:#fff;border-color:#111;padding:0 22px;box-shadow:0 16px 30px rgba(17,17,17,.18);}
  .shell-btn-mobile-only{display:none;}

  /* ===== 页脚样板：全宽、贴底、桌面/手机统一规则 ===== */
  .site-footer{
    flex-shrink:0;
    width:100%;
    margin-top:auto;
    background:#e8edf2;
    color:#4b5563;
    border-top:1px solid #d8dee7;
  }
  .site-footer__wrap{
    width:100%;
    max-width:none;
    padding:0 32px;
  }
  .site-footer__top{
    min-height:96px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
  }
  .site-footer__brand{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
  }
  .site-footer__brand-mark{
    width:38px;height:38px;border-radius:12px;
    border:1px solid #d2d9e3;
    background:#f7f9fc;
    display:flex;align-items:center;justify-content:center;
    font-size:18px;font-weight:800;color:#374151;
  }
  .site-footer__brand-title{
    font-size:18px;
    font-weight:700;
    color:#1f2937;
    letter-spacing:.01em;
  }
  .site-footer__locale-row{
    display:flex;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
  }
  .site-footer__chip{
    display:inline-flex;
    align-items:center;
    min-height:40px;
    padding:0 14px;
    border-radius:999px;
    border:1px solid #d2d9e3;
    background:#f7f9fc;
    color:#475569;
    text-decoration:none;
    font-size:14px;
    font-weight:600;
  }
  .site-footer__socials{display:flex;align-items:center;gap:14px;justify-content:center;flex-wrap:wrap;}
  .site-footer__socials a{width:44px;height:44px;border-radius:14px;border:1px solid #d2d9e3;background:#f7f9fc;color:#475569;display:flex;align-items:center;justify-content:center;opacity:1;transition:.18s ease;}
  .site-footer__socials a:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.08);background:#fff;}.site-footer__socials svg{width:22px;height:22px;display:block;}
  .site-footer__divider{border-top:1px solid #d8dee7;}
  .site-footer__bottom{
    display:grid;
    grid-template-columns:1fr auto;
    gap:28px;
    padding:24px 0 28px;
    align-items:start;
  }
  .site-footer__legal{
    font-size:14px;
    line-height:1.85;
    color:#667085;
    font-weight:500;
    max-width:1080px;
  }
  .site-footer__links{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:24px;
    flex-wrap:wrap;
  }
  .site-footer__links a,
  .site-footer__privacy-link{
    color:#475569;
    text-decoration:none;
    font-size:14px;
    line-height:1.8;
    font-weight:600;
  }
  .site-footer__privacy-link{display:inline-block;margin-top:12px;}
  .site-footer__note{
    margin-top:12px;
    font-size:14px;
    line-height:1.85;
    color:#667085;
    font-weight:500;
  }
  @media (max-width: 980px){
    .topbar.shell-topbar{
      background:var(--shell-topbar-bg);
      backdrop-filter:none;
      -webkit-backdrop-filter:none;
    }
    .shell-topbar .topbar-inner{padding:14px 16px;gap:14px;}
    .shell-brand-sub{display:none;}
    .shell-menu-btn{display:inline-flex;}
    .shell-nav-wrap{
      position:absolute;
      left:16px;right:16px;top:calc(100% + 10px);
      display:none;
      flex-direction:column;
      align-items:stretch;
      gap:12px;
      padding:14px;
      background:rgba(255,255,255,.96);
      border:1px solid #e5e7eb;
      border-radius:20px;
      box-shadow:0 24px 60px rgba(15,23,42,.14);
      backdrop-filter:blur(16px);
      -webkit-backdrop-filter:blur(16px);
    }
    .shell-nav-wrap.show{display:flex;}
    .shell-nav{justify-content:flex-start;flex-direction:column;align-items:stretch;gap:8px;}
    .shell-nav a{padding:12px 14px;background:#f8fafc;text-align:center;justify-content:center;display:flex;align-items:center;}
    .shell-auth{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;}
    .shell-btn{width:100%;}
    .shell-btn-mobile-only{display:flex;}
    .shell-auth.is-user{grid-template-columns:1fr 1fr;}

    .site-footer{
      margin-top:auto;
    }
    .site-footer__wrap{padding:0 20px;}
    .site-footer__top{
      min-height:auto;
      padding:22px 0 16px;
      display:grid;
      grid-template-columns:1fr auto;
      gap:14px 18px;
      align-items:center;
    }
    .site-footer__brand{display:none;}
    .site-footer__locale-row{justify-content:space-between;gap:12px;}
    .site-footer__chip{
      font-size:14px;
      font-weight:600;
      min-height:38px;
      padding:0 12px;
    }
    .site-footer__socials{display:flex;grid-column:1 / -1;}
    .site-footer__bottom{
      grid-template-columns:1fr;
      gap:16px;
      padding:18px 0 24px;
      text-align:center;
    }
    .site-footer__links{justify-content:center;gap:18px;}
    .site-footer__legal,.site-footer__note{
      font-size:13px;
      line-height:1.8;
      font-weight:500;
    }
    .site-footer__privacy-link{margin-top:8px;}
  }

.shell-nav a.is-active,
.shell-mobile-nav a.is-active{
  background:#fff;
  color:#111;
  box-shadow:0 8px 20px rgba(15,23,42,.06);
}
.shell-auth.is-user{grid-template-columns:1fr 1fr;}

