/* ============================================================
   浮层层：抽屉 / 弹窗 / 提示条
   白色实底 + 细边框 + 柔和投影，轻微悬浮感，不使用玻璃与光效
   ============================================================ */

/* ---------------- 遮罩 ---------------- */
.drawer-mask{background:rgba(36,45,40,.24)}
.modal-mask{background:rgba(36,45,40,.28)}

/* ---------------- 抽屉 → 悬浮面板 ---------------- */
.drawer{
  top:16px;right:16px;bottom:16px;
  width:560px;max-width:calc(100vw - 32px);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  background:var(--panel);
  box-shadow:0 18px 48px rgba(35,55,45,.12);
  transform:translateX(calc(100% + 32px));
  transition:transform 220ms var(--ease),box-shadow 200ms var(--ease);
  overflow:hidden;
}
.drawer.on{transform:none}

.drawer-hd{
  border-bottom:1px solid var(--line);
  padding:16px 20px;
  background:var(--panel);
  border-radius:var(--r-lg) var(--r-lg) 0 0;
}
.drawer-hd h3{font-size:14px;font-weight:600;letter-spacing:.01em;color:var(--txt)}
.drawer-bd{padding:18px 20px 22px}

/* 抽屉脚部：常驻操作条 */
.drawer-ft{
  flex:0 0 auto;
  display:flex;align-items:center;gap:12px;
  padding:12px 20px;
  min-height:56px;
  border-top:1px solid var(--line);
  border-radius:0 0 var(--r-lg) var(--r-lg);
  background:var(--panel-3);
}
.drawer-ft:empty{display:none}
.df-who{display:flex;flex-direction:column;line-height:1.4;min-width:0;flex:0 0 auto}
.df-who span{font-size:12px;font-weight:500;color:var(--txt);white-space:nowrap}
.df-who em{font-style:normal;font-size:10.5px;color:var(--txt3);white-space:nowrap}
.df-btns{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.df-none{font-size:12px;color:var(--txt3)}

/* ---------------- 操作弹窗 ---------------- */
.modal{
  width:660px;
  border-radius:var(--r-lg);
  border:1px solid var(--line);
  background:var(--panel);
  box-shadow:0 24px 64px rgba(35,55,45,.16);
  animation:modalIn 190ms var(--ease) both;
}
@keyframes modalIn{
  from{opacity:0;transform:translateY(10px) scale(.99)}
  to{opacity:1;transform:none}
}
.modal-hd{
  background:var(--panel);
  border-bottom:1px solid var(--line);
  border-radius:var(--r-lg) var(--r-lg) 0 0;
  padding:16px 20px;
}
.modal-hd h3{font-size:14.5px;font-weight:600;color:var(--txt)}
.modal-bd{padding:20px}
.modal-ft{
  background:var(--panel-3);
  border-top:1px solid var(--line);
  padding:13px 20px;
}

/* ---------------- 岛内面板：统一浅底、细边，保持干净 ---------------- */
:is(.drawer,.modal) .gate{border-radius:var(--r-sm)}
:is(.drawer,.modal) .kcard,
:is(.drawer,.modal) .partner{border-color:var(--line)}
:is(.drawer,.modal) table.tbl th{background:var(--panel-3)}
:is(.drawer,.modal) table.tbl td{border-bottom-color:#F1F4F2}

/* 状态轨迹在抽屉宽度内换行，避免横向裁切 */
:is(.drawer,.modal) .rail{flex-wrap:wrap;row-gap:5px}

/* 抽屉内滚动条压细 */
:is(.drawer,.modal) ::-webkit-scrollbar{width:8px}
:is(.drawer,.modal) ::-webkit-scrollbar-thumb{background:#D2DCD6;border-radius:999px}

/* ---------------- 提示条 ---------------- */
.toast-wrap{top:auto;bottom:26px;left:50%;right:auto;transform:translateX(-50%)}

.toast{
  background:var(--panel);
  border:1px solid var(--line);
  border-left:3px solid var(--green);
  border-radius:var(--r);
  box-shadow:0 12px 32px rgba(35,55,45,.14);
  color:var(--txt2);
}

/* ---------------- 窄屏：浮层贴边但仍留缝 ---------------- */
@media (max-width:720px){
  .drawer{
    top:8px;right:8px;bottom:8px;
    width:calc(100vw - 16px);
    max-width:calc(100vw - 16px);
    border-radius:var(--r);
  }
  .drawer-hd{padding:14px 16px;border-radius:var(--r) var(--r) 0 0}
  .drawer-bd{padding:16px 14px 18px}
  .drawer-ft{padding:11px 14px;gap:8px;border-radius:0 0 var(--r) var(--r)}
  .df-who{display:none}
  .df-btns{margin-left:0;width:100%;justify-content:stretch}
  .df-btns .btn{flex:1 1 auto;justify-content:center}

  .modal{width:calc(100vw - 20px);max-width:calc(100vw - 20px);border-radius:var(--r);max-height:90vh}
  .modal-hd{border-radius:var(--r) var(--r) 0 0;padding:14px 16px}
  .modal-bd{padding:16px 14px}
  .modal-ft{padding:12px 14px}
  .modal-mask{padding:10px}

  .toast-wrap{top:auto;bottom:16px;left:12px;right:12px;transform:none;align-items:stretch}
  .toast{width:100%;min-width:0}
}
