/* Mobile refinements shared by the Vant member pages and Element plugin pages. */
@media (max-width: 767px) {
  body .el-message {
    min-width: 0;
    width: max-content;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    padding: 12px 16px;
  }

  body .el-message__content {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.5;
  }

  body .el-dialog.ssl-contact-dialog {
    width: calc(100% - 24px) !important;
    max-width: 560px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: 12px auto !important;
    display: flex;
    flex-direction: column;
  }

  .ssl-contact-dialog .el-dialog__header,
  .ssl-contact-dialog .el-dialog__footer {
    flex-shrink: 0;
  }

  .ssl-contact-dialog .el-dialog__header {
    padding: 12px 16px;
  }

  .ssl-contact-dialog .el-dialog__headerbtn {
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    z-index: 1;
  }

  .ssl-contact-dialog .el-dialog__body {
    min-height: 0;
    padding: 0 16px 16px !important;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body .ssl-contact-dialog .ssl-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 20px;
  }

  .ssl-contact-dialog .ssl-form .el-form-item {
    min-width: 0;
    margin-bottom: 16px;
  }

  body .ssl-contact-dialog .ssl-form .el-form-item__label {
    height: auto;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 6px;
  }

  .ssl-contact-dialog .el-input__inner {
    height: 44px;
    font-size: 16px;
  }

  .ssl-contact-dialog .el-dialog__footer {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1px solid #e2e8f0;
  }

  .ssl-contact-dialog .dialog-footer {
    gap: 12px;
  }

  .ssl-contact-dialog .dialog-footer .el-button {
    flex: 1;
    min-height: 44px;
    margin: 0;
  }

  .firewall-flow-log .black-list-search .search-btn {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .firewall-flow-log .black-list-search .el-date-editor {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
  }

  .firewall-flow-log .black-list-top .el-select {
    max-width: 100%;
  }

  .firewall-flow-log .search-input {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .firewall-flow-log .search-input > .el-select,
  .firewall-flow-log .search-input > .el-input {
    flex: 1 1 140px;
    min-width: 0;
    max-width: 100%;
    margin: 0;
  }

  .xy-firewall-date-picker.el-date-range-picker {
    width: calc(100vw - 24px) !important;
    max-width: 420px;
  }

  .xy-firewall-date-picker .el-date-range-picker__body {
    max-height: 65vh;
    overflow-y: auto;
  }

  .xy-firewall-date-picker .el-date-range-picker__content {
    float: none;
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
  }

  .xy-firewall-date-picker .el-picker-panel__footer {
    white-space: normal;
  }

  .my-page .xy-finance-shortcuts,
  .my-page .xy-firewall-menu {
    margin: 12px 0;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
  }

  .my-page .xy-finance-shortcuts h2,
  .my-page .xy-firewall-menu h2 {
    margin: 0 0 12px;
    color: #17233d;
    font-size: 16px;
    font-weight: 600;
  }

  .xy-finance-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .xy-finance-shortcut-grid button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 76px;
    padding: 8px 4px;
    border: 0;
    border-radius: 8px;
    background: #f4f7fc;
    color: #334155;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
  }

  .xy-finance-shortcut-grid img { width: 24px; height: 24px; }

  .my-page .xy-finance-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 24px;
  }

  .my-page .xy-firewall-menu .menu-item {
    width: 100%;
    min-height: 48px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
    color: inherit;
    text-align: left;
    font: inherit;
  }

  .my-page .menu-item-title { min-width: 0; overflow-wrap: anywhere; }
  .my-page .name-text,
  .my-page .order-id,
  .my-page .info-name { overflow-wrap: anywhere; }

  body .template > .el-container > .el-container > .el-main.addAccount-content {
    width: auto;
    min-width: 0;
    max-width: 100%;
  }

  body .addAccount-content .addAccount-box {
    width: auto;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  body .addAccount-content .tree-box { display: block; }
  body .addAccount-content .tree { width: 100%; margin: 0 0 16px; }
  body .addAccount-content .el-tree-node__content { min-height: 44px; height: auto; padding-top: 6px; padding-bottom: 6px; }
  body .addAccount-content .el-tree-node__label { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }

  #template.home-page { min-height: calc(100dvh - var(--xy-promoter-strip-height, 0px)); }
  #template.home-page .product-num { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 8px; }
  #template.home-page .num-text { font-size: 22px; line-height: 28px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  #template.home-page .num-title { margin-top: 6px; font-size: 13px; line-height: 20px; color: #64748b; }
  #template.home-page .menu-box { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 8px; padding: 20px 12px; }
  #template.home-page .menu-item { min-width: 0; gap: 8px; }
  #template.home-page .menu-title { font-size: 14px; line-height: 20px; font-weight: 500; overflow-wrap: anywhere; }
  #template.home-page .overdue-status { font-size: 13px; line-height: 20px; }
  #template.home-page .overdue-time { font-size: 12px; line-height: 20px; }
  #template.home-page .product-name { font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
  #template.home-page .product-id { font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }

  #template.my-page .info-level,
  #template.my-page .card-top,
  #template.my-page .bottom-top-item-title { font-size: 13px; line-height: 20px; color: #64748b; }
  #template.my-page .card-bottom { gap: 12px; }
  #template.my-page .top-num { min-width: 0; font-size: 28px; line-height: 36px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  #template.my-page .top-btn { min-width: 72px; height: 44px; padding: 0 16px; font-size: 14px; }
  #template.my-page .bottom-card-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 16px; }
  #template.my-page .bottom-top-item { min-width: 0; }
  #template.my-page .bottom-top-item-value { font-size: 18px; line-height: 26px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  #template.my-page .bottom-item-title { font-size: 12px; line-height: 18px; }
  #template.my-page .my-menus {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
  }
  #template.my-page .my-menus h2 { grid-column: 1 / -1; margin-bottom: 4px; }
  #template.my-page .my-menus .menu-item {
    min-width: 0;
    min-height: 56px;
    margin: 0;
    padding: 10px;
    gap: 6px;
    border: 0;
    border-radius: 8px;
    background: #f4f7fc;
    box-sizing: border-box;
  }
  #template.my-page .my-menus .menu-item-title { min-width: 0; gap: 6px; font-size: 14px; line-height: 22px; }
  #template.my-page .my-menus .menu-item-title > span { min-width: 0; overflow-wrap: anywhere; }
  #template.my-page .my-menus .menu-item-title .iconfont,
  #template.my-page .my-menus .menu-item-icon,
  #template.my-page .my-menus .menu-item > .van-icon { flex-shrink: 0; }
  #template.my-page .menu-item-title .iconfont { font-size: 18px; }

  .tick-top-title .tick-top-title-left { font-size: 18px; line-height: 26px; }
  .tick-top-title .tick-top-title-right .van-button { width: 44px; height: 44px; padding: 0; font-size: 20px; }
  #template.create-box { min-height: 0; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  #template.create-box .van-nav-bar__title { font-size: 18px; }
  #template.create-box .van-field__control { font-size: 16px; line-height: 24px; }
  #template.create-box textarea.van-field__control { min-height: 120px; text-align: left; }
  #template.create-box .create-btn {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e7edf7;
    box-sizing: border-box;
  }
  #template.create-box .sub-btn { min-height: 44px; font-size: 16px; }
}

@media (max-width: 359px) {
  #template.home-page .menu-box { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #template.home-page .product-num { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.xy-resource-state {
  padding: 20px 12px;
  line-height: 1.6;
  text-align: center;
  color: #475569;
}

.xy-resource-state p {
  margin: 0 0 12px;
}
