@media (max-width: 768px) {
  #contents > .my-tab-con,
  #contents > .my-tab {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .my-tab1-con table,
  .my-tab1-con tbody {
    display: block;
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .my-tab1-con colgroup {
    display: none;
  }

  .my-tab1-con tr {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    width: 100%;
  }

  .my-tab1-con th,
  .my-tab1-con td {
    display: block;
    width: auto !important;
    min-width: 0;
    margin: 0;
    padding: 14px 0;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  .my-tab1-con th {
    padding-right: 10px;
  }

  .my-tab1-con td {
    padding-left: 8px;
  }

  .my-tab1-con .inputText {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  .my-tab1-con .inputText input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
  }

  .my-tab1-con .inputText a.a-btn {
    position: static !important;
    float: none !important;
    display: flex !important;
    width: 100% !important;
    max-width: 100%;
    margin: 8px 0 0 !important;
    box-sizing: border-box;
  }

  .my-tab1-con td .file {
    width: 100%;
    max-width: 240px;
    box-sizing: border-box;
  }

  .my-tab1-con .td-ul {
    width: 100%;
    min-width: 0;
  }

  .my-tab1-con .td-ul li {
    overflow-wrap: anywhere;
    word-break: keep-all;
  }

  #contents > .my-tab-con > table {
    display: table;
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  #contents > .my-tab-con > table th,
  #contents > .my-tab-con > table td {
    min-width: 0;
    padding: 10px 4px;
    font-size: 11px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  #contents > .my-tab-con > table th:nth-child(1),
  #contents > .my-tab-con > table td:nth-child(1) {
    width: 27%;
  }

  #contents > .my-tab-con > table th:nth-child(2),
  #contents > .my-tab-con > table td:nth-child(2) {
    width: 33%;
  }
}

@media (max-width: 360px) {
  .my-tab1-con tr {
    grid-template-columns: 78px minmax(0, 1fr);
  }
}

/* Keep the fee reminder visible below the withdrawal action on every screen. */
.export-sheet .export-fee-note {
  margin: 0;
  padding: 0 4px 4px;
  color: var(--titan-light-muted, #667085);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* Wallet page follows the compact mobile reference layout. */
body.replica-mobile #contents.wallet-page {
  background: #fff !important;
  color: #171a20 !important;
  padding-bottom: 40px;
}
body.replica-mobile #contents.wallet-page .wallet-reference {
  margin-top: 0;
  color: #171a20;
}
body.replica-mobile #contents.wallet-page .wallet-sub-tabs {
  display: flex;
  gap: 28px;
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid #eceef1;
}
body.replica-mobile #contents.wallet-page .wallet-sub-tabs li {
  position: relative;
  padding: 0 0 13px;
  color: #a2a5ab;
  font-size: 14px;
  font-weight: 500;
}
body.replica-mobile #contents.wallet-page .wallet-sub-tabs li.on { color: #ef3e67; }
body.replica-mobile #contents.wallet-page .wallet-sub-tabs li.on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #ef3e67;
}
body.replica-mobile #contents.wallet-page .wallet-sub-tabs a { color: inherit !important; }
body.replica-mobile #contents.wallet-page .wallet-available-copy {
  margin: 42px 0 36px;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
  word-break: keep-all;
}
body.replica-mobile #contents.wallet-page .wallet-available-copy strong {
  color: #ef3e67;
  font-size: 20px;
}
body.replica-mobile #contents.wallet-page .wallet-summary-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  border: 1px solid #d9dce1;
  margin: 0 -2px 26px;
}
body.replica-mobile #contents.wallet-page .wallet-summary-grid > div {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 5px;
  border-right: 1px solid #d9dce1;
  text-align: center;
}
body.replica-mobile #contents.wallet-page .wallet-summary-grid > div:last-child { border-right: 0; }
body.replica-mobile #contents.wallet-page .wallet-summary-grid strong { font-size: 13px; line-height: 1.35; word-break: keep-all; }
body.replica-mobile #contents.wallet-page .wallet-summary-grid b { color: #ef5b80; font-size: 18px; line-height: 1.2; white-space: nowrap; }
body.replica-mobile #contents.wallet-page .wallet-withdraw-outline {
  display: flex;
  width: 224px;
  height: 54px;
  margin: 0 auto 68px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7d9dd !important;
  border-radius: 9px;
  background: #fff !important;
  color: #30343a !important;
  font-size: 15px;
  font-weight: 500;
}
body.replica-mobile #contents.wallet-page .wallet-results-title {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
}
body.replica-mobile #contents.wallet-page .wallet-history-title { margin-top: 42px; }
body.replica-mobile #contents.wallet-page .wallet-ledger-table {
  display: table !important;
  width: 100% !important;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff !important;
}
/* The legacy mobile profile rules turn every `.my-tab1-con` row into a
   two-column CSS grid. Wallet history is a real four-column table, so reset
   the row-group and row display values here or each cell is laid out in the
   profile grid (COIN becomes C/O/I/N down a narrow column). */
body.replica-mobile #contents.wallet-page .wallet-ledger-table tbody {
  display: table-row-group !important;
}
body.replica-mobile #contents.wallet-page .wallet-ledger-table tr {
  display: table-row !important;
}
body.replica-mobile #contents.wallet-page .wallet-ledger-table th,
body.replica-mobile #contents.wallet-page .wallet-ledger-table td {
  display: table-cell !important;
  width: auto !important;
  min-width: 0;
  padding: 12px 5px !important;
  border-bottom: 1px solid #eceef1 !important;
  color: #23272e !important;
  font-size: 11px !important;
  line-height: 1.45;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
body.replica-mobile #contents.wallet-page .wallet-ledger-table th { font-weight: 700; background: #fafbfc !important; }
body.replica-mobile #contents.wallet-page .wallet-ledger-table th:nth-child(1), body.replica-mobile #contents.wallet-page .wallet-ledger-table td:nth-child(1) { width: 19% !important; }
body.replica-mobile #contents.wallet-page .wallet-ledger-table th:nth-child(2), body.replica-mobile #contents.wallet-page .wallet-ledger-table td:nth-child(2) { width: 31% !important; }
body.replica-mobile #contents.wallet-page .wallet-ledger-table th:nth-child(3), body.replica-mobile #contents.wallet-page .wallet-ledger-table td:nth-child(3) { width: 28% !important; }
body.replica-mobile #contents.wallet-page .wallet-ledger-table th:nth-child(4), body.replica-mobile #contents.wallet-page .wallet-ledger-table td:nth-child(4) { width: 22% !important; }
body.replica-mobile #contents.wallet-page .wallet-empty { color: #89919d !important; padding: 24px 8px !important; }
@media (max-width: 380px) {
  body.replica-mobile #contents.wallet-page .wallet-summary-grid > div { min-height: 104px; gap: 14px; }
  body.replica-mobile #contents.wallet-page .wallet-summary-grid strong { font-size: 12px; }
  body.replica-mobile #contents.wallet-page .wallet-summary-grid b { font-size: 16px; }
}

/* Keep the result column visible in the five-column withdrawal ledger. */
body.replica-mobile #contents.wallet-page .wallet-withdrawals-table th:nth-child(1), body.replica-mobile #contents.wallet-page .wallet-withdrawals-table td:nth-child(1) { width: 12% !important; }
body.replica-mobile #contents.wallet-page .wallet-withdrawals-table th:nth-child(2), body.replica-mobile #contents.wallet-page .wallet-withdrawals-table td:nth-child(2) { width: 27% !important; }
body.replica-mobile #contents.wallet-page .wallet-withdrawals-table th:nth-child(3), body.replica-mobile #contents.wallet-page .wallet-withdrawals-table td:nth-child(3) { width: 25% !important; }
body.replica-mobile #contents.wallet-page .wallet-withdrawals-table th:nth-child(4), body.replica-mobile #contents.wallet-page .wallet-withdrawals-table td:nth-child(4) { width: 21% !important; }
body.replica-mobile #contents.wallet-page .wallet-withdrawals-table th:nth-child(5), body.replica-mobile #contents.wallet-page .wallet-withdrawals-table td:nth-child(5) { width: 15% !important; }
