:root {
  color-scheme: dark;
  --bg: #06172c;
  --panel: rgba(8, 32, 61, 0.78);
  --panel-soft: rgba(15, 58, 101, 0.72);
  --text: #eef8ff;
  --muted: #9bb7d0;
  --line: rgba(151, 213, 255, 0.22);
  --line-strong: rgba(176, 228, 255, 0.4);
  --brand: #40d4ff;
  --brand-strong: #0d6479;
  --brand-accent: #8fe6ff;
  --best: #5ff0b7;
  --best-soft: rgba(25, 119, 105, 0.22);
  --rate: #ffffff;
  --converted: #b7efff;
  --warn: #ffd18a;
  --danger: #ff9b9b;
  --soft: rgba(61, 204, 255, 0.12);
  --shadow: 0 18px 48px rgba(0, 10, 30, 0.36);
  --glass-highlight: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(8, 32, 64, 0.95) 0%, rgba(3, 16, 35, 0.98) 100%),
    repeating-linear-gradient(90deg, rgba(90, 190, 255, 0.045) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(90, 190, 255, 0.035) 0 1px, transparent 1px 72px),
    var(--bg);
  color: var(--text);
  overscroll-behavior: none;
  font-family:
    "Noto Sans TC",
    "Microsoft JhengHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(120deg, rgba(17, 103, 166, 0.22), transparent 36%),
    linear-gradient(290deg, rgba(37, 202, 255, 0.14), transparent 42%);
  pointer-events: none;
}

@supports (-webkit-touch-callout: none) {
  @media (hover: none) and (pointer: coarse) {
    html,
    body {
      height: 100%;
      overflow: hidden;
    }

    body {
      position: fixed;
      inset: 0;
      width: 100%;
    }

    main {
      height: 100dvh;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }
  }
}

main {
  --controls-max-width: var(--table-max-width, 1360px);
  width: min(1360px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 42px;
}

main.show-twd-conversion.show-cny-conversion {
  --table-max-width: 1360px;
  --controls-max-width: 1360px;
}

main.show-twd-conversion:not(.show-cny-conversion) {
  --table-max-width: 1180px;
  --controls-max-width: 1180px;
}

main:not(.show-twd-conversion).show-cny-conversion {
  --table-max-width: 1040px;
  --controls-max-width: 1040px;
}

main:not(.show-twd-conversion):not(.show-cny-conversion) {
  --table-max-width: 680px;
  --controls-max-width: 680px;
}

.topbar {
  width: min(100%, var(--controls-max-width, var(--table-max-width, 1360px)));
  margin: 0 auto 12px;
}

.topbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar > div::before {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(196, 236, 255, 0.46);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(60, 199, 255, 0.08)),
    url("/icons/icon-64.png?v=20260707-perf-1") center / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 10px 24px rgba(0, 154, 255, 0.2);
  content: "";
}

h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: 0;
  color: #f4fbff;
  text-shadow: 0 0 18px rgba(70, 199, 255, 0.18);
}

.quick-controls {
  width: min(100%, var(--controls-max-width, var(--table-max-width, 1360px)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 16px;
}

main:not(.show-twd-conversion):not(.show-cny-conversion) .quick-controls {
  gap: 10px;
}

.input-row {
  display: grid;
  grid-template-columns: 96px repeat(2, 148px);
  align-items: center;
  gap: 8px;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(220px, auto) 104px;
  align-items: center;
  gap: 8px;
}

main:not(.show-twd-conversion):not(.show-cny-conversion) .input-row {
  grid-template-columns: 90px repeat(2, 112px);
}

main:not(.show-twd-conversion):not(.show-cny-conversion) .action-row {
  grid-template-columns: max-content 94px;
  justify-content: end;
}

main:not(.show-twd-conversion):not(.show-cny-conversion) .status {
  font-size: 12px;
  padding: 0 10px;
}

main:not(.show-twd-conversion):not(.show-cny-conversion) button {
  padding: 0 12px;
}

#status {
  order: 1;
}

#refresh {
  order: 2;
}

.manual-rate-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(7, 41, 76, 0.64)),
    var(--panel);
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  padding: 0 12px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 8px 18px rgba(0, 15, 38, 0.24);
  backdrop-filter: blur(16px);
}

.manual-rate-input:focus {
  border-color: rgba(103, 220, 255, 0.72);
  outline: 3px solid rgba(64, 212, 255, 0.2);
  outline-offset: 1px;
}

.manual-rate-input::-webkit-outer-spin-button,
.manual-rate-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.manual-rate-input[type="number"] {
  -moz-appearance: textfield;
}

.amount-field {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(7, 39, 73, 0.58)),
    var(--panel);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 18px rgba(0, 15, 38, 0.22);
  backdrop-filter: blur(16px);
}

.amount-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  padding: 0 14px;
  text-align: right;
}

.amount-input::placeholder,
.manual-rate-input::placeholder {
  color: rgba(224, 245, 255, 0.62);
}

.amount-input:placeholder-shown {
  text-align: center;
}

.amount-input:focus {
  outline: 3px solid rgba(64, 212, 255, 0.18);
  outline-offset: -2px;
}

.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.amount-input[type="number"] {
  -moz-appearance: textfield;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

button {
  min-height: 40px;
  border: 1px solid rgba(143, 230, 255, 0.42);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(88, 222, 255, 0.95), rgba(11, 111, 143, 0.98));
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  padding: 0 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 10px 22px rgba(0, 169, 220, 0.22);
}

button:hover {
  background:
    linear-gradient(180deg, rgba(125, 234, 255, 1), rgba(9, 129, 164, 0.98));
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.panel {
  width: min(100%, var(--table-max-width, 1360px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(5, 29, 55, 0.72)),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    var(--shadow);
  backdrop-filter: blur(18px);
}

.status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  border: 1px solid rgba(122, 220, 255, 0.34);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(12, 69, 95, 0.42)),
    rgba(10, 48, 78, 0.72);
  padding: 0 12px;
  color: #d9f8ff;
  font-size: 14px;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 18px rgba(0, 18, 45, 0.18);
  backdrop-filter: blur(16px);
}

.status.warning {
  border-color: rgba(255, 209, 138, 0.42);
  background: rgba(96, 62, 19, 0.62);
  color: var(--warn);
}

.status.error {
  border-color: rgba(255, 155, 155, 0.44);
  background: rgba(89, 26, 36, 0.66);
  color: var(--danger);
}

.status strong {
  font-weight: 700;
}

.status-message:empty {
  display: none;
}

.status:has(.status-message:empty) {
  justify-content: flex-end;
}

.table-wrap {
  overflow: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

.panel.show-twd-conversion.show-cny-conversion,
table.show-twd-conversion.show-cny-conversion {
  --table-max-width: 1360px;
}

.panel.show-twd-conversion:not(.show-cny-conversion),
table.show-twd-conversion:not(.show-cny-conversion) {
  --table-max-width: 1180px;
}

.panel:not(.show-twd-conversion).show-cny-conversion,
table:not(.show-twd-conversion).show-cny-conversion {
  --table-max-width: 1040px;
}

.panel:not(.show-twd-conversion):not(.show-cny-conversion),
table:not(.show-twd-conversion):not(.show-cny-conversion) {
  --table-max-width: 680px;
}

th:nth-child(1),
td:nth-child(1) {
  width: 10%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 22%;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4) {
  width: 10%;
}

th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6),
th:nth-child(7),
td:nth-child(7) {
  width: 16%;
}

table.show-twd-conversion:not(.show-cny-conversion) th:nth-child(1),
table.show-twd-conversion:not(.show-cny-conversion) td:nth-child(1) {
  width: 10%;
}

table.show-twd-conversion:not(.show-cny-conversion) th:nth-child(2),
table.show-twd-conversion:not(.show-cny-conversion) td:nth-child(2) {
  width: 24%;
}

table.show-twd-conversion:not(.show-cny-conversion) th:nth-child(3),
table.show-twd-conversion:not(.show-cny-conversion) td:nth-child(3),
table.show-twd-conversion:not(.show-cny-conversion) th:nth-child(4),
table.show-twd-conversion:not(.show-cny-conversion) td:nth-child(4) {
  width: 12%;
}

table.show-twd-conversion:not(.show-cny-conversion) th:nth-child(5),
table.show-twd-conversion:not(.show-cny-conversion) td:nth-child(5) {
  width: 20%;
}

table.show-twd-conversion:not(.show-cny-conversion) th:nth-child(6),
table.show-twd-conversion:not(.show-cny-conversion) td:nth-child(6) {
  width: 22%;
}

table:not(.show-twd-conversion).show-cny-conversion th:nth-child(1),
table:not(.show-twd-conversion).show-cny-conversion td:nth-child(1) {
  width: 10%;
}

table:not(.show-twd-conversion).show-cny-conversion th:nth-child(2),
table:not(.show-twd-conversion).show-cny-conversion td:nth-child(2) {
  width: 28%;
}

table:not(.show-twd-conversion).show-cny-conversion th:nth-child(3),
table:not(.show-twd-conversion).show-cny-conversion td:nth-child(3),
table:not(.show-twd-conversion).show-cny-conversion th:nth-child(4),
table:not(.show-twd-conversion).show-cny-conversion td:nth-child(4) {
  width: 14%;
}

table:not(.show-twd-conversion).show-cny-conversion th:nth-child(7),
table:not(.show-twd-conversion).show-cny-conversion td:nth-child(7) {
  width: 34%;
}

table:not(.show-twd-conversion):not(.show-cny-conversion) th:nth-child(1),
table:not(.show-twd-conversion):not(.show-cny-conversion) td:nth-child(1) {
  width: 13%;
}

table:not(.show-twd-conversion):not(.show-cny-conversion) th:nth-child(2),
table:not(.show-twd-conversion):not(.show-cny-conversion) td:nth-child(2) {
  width: 31%;
}

table:not(.show-twd-conversion):not(.show-cny-conversion) th:nth-child(3),
table:not(.show-twd-conversion):not(.show-cny-conversion) td:nth-child(3),
table:not(.show-twd-conversion):not(.show-cny-conversion) th:nth-child(4),
table:not(.show-twd-conversion):not(.show-cny-conversion) td:nth-child(4) {
  width: 28%;
}

table:not(.show-twd-conversion):not(.show-cny-conversion) th,
table:not(.show-twd-conversion):not(.show-cny-conversion) td {
  padding-left: 10px;
  padding-right: 10px;
}

table:not(.show-twd-conversion):not(.show-cny-conversion) td.rate {
  font-size: 21px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(20, 75, 120, 0.48)),
    var(--panel-soft);
  color: #b9d8ec;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

th:nth-child(n + 3):nth-child(-n + 7),
td:nth-child(n + 3):nth-child(-n + 7) {
  text-align: right;
}

th:nth-child(2),
td:nth-child(2) {
  text-align: left;
}

th:nth-child(1),
td:nth-child(1) {
  text-align: center;
}

table:not(.show-twd-conversion) th:nth-child(5),
table:not(.show-twd-conversion) td:nth-child(5),
table:not(.show-twd-conversion) th:nth-child(6),
table:not(.show-twd-conversion) td:nth-child(6),
table:not(.show-cny-conversion) th:nth-child(7),
table:not(.show-cny-conversion) td:nth-child(7) {
  display: none;
}

tbody tr {
  background: rgba(8, 31, 59, 0.52);
  transition: background 0.15s ease;
}

tbody tr:nth-child(even) {
  background: rgba(8, 39, 73, 0.46);
}

tbody tr:hover {
  background: rgba(28, 99, 142, 0.32);
}

tbody tr.best-rate,
tbody tr.best-rate:nth-child(even),
tbody tr.best-rate:hover {
  background: var(--best-soft);
}

td.rate {
  color: var(--rate);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 750;
  text-shadow: 0 0 18px rgba(109, 223, 255, 0.16);
}

td.converted {
  color: var(--converted);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 750;
  white-space: nowrap;
}

td.converted.best-cell {
  color: var(--best);
}

.value-with-flag {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.best-marker {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border-radius: 999px;
  border: 1px solid rgba(95, 240, 183, 0.34);
  background: rgba(95, 240, 183, 0.16);
  color: #b7ffe4;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 0 7px;
}

.bank {
  display: grid;
  gap: 4px;
}

.bank strong,
.bank-link {
  color: #f6fbff;
  font-weight: 760;
}

.bank-link {
  text-decoration: none;
}

.bank-link:hover {
  color: var(--brand-accent);
  text-decoration: underline;
}

.bank span,
.meta {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(133, 235, 255, 0.24);
  background: rgba(47, 214, 255, 0.16);
  color: #bff6ff;
  font-size: 12px;
  font-weight: 700;
  padding: 0 9px;
}

tr.stale .badge {
  border-color: rgba(255, 209, 138, 0.26);
  background: rgba(160, 98, 24, 0.18);
  color: var(--warn);
}

.badge.pending {
  border-color: rgba(185, 216, 236, 0.22);
  background: rgba(185, 216, 236, 0.12);
  color: #c9d9e6;
}

.bank-status-mobile {
  display: none;
}

@media (max-width: 720px) {
  main {
    width: min(100% - 16px, 1440px);
    padding: 12px 0 28px;
  }

  .topbar {
    margin-bottom: 8px;
  }

  h1 {
    font-size: 18px;
  }

  button {
    width: 100%;
  }

  .quick-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    justify-content: stretch;
    margin-bottom: 10px;
  }

  .input-row {
    order: 2;
    width: min(100%, 326px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    justify-content: center;
    justify-self: center;
  }

  .action-row {
    order: 1;
    width: fit-content;
    max-width: 100%;
    grid-template-columns: minmax(0, max-content) 112px;
    gap: 8px;
    justify-content: end;
    justify-self: end;
  }

  main:not(.show-twd-conversion):not(.show-cny-conversion) .input-row {
    width: min(100%, 326px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  main:not(.show-twd-conversion):not(.show-cny-conversion) .action-row {
    width: fit-content;
    max-width: 100%;
    grid-template-columns: minmax(0, max-content) 94px;
    justify-content: end;
    justify-self: end;
  }

  .manual-rate-input {
    font-size: 16px;
  }

  .amount-field {
    grid-template-columns: 1fr;
    min-height: 38px;
    border-radius: 6px;
  }

  .amount-input {
    min-height: 36px;
    font-size: 16px;
    padding: 0 8px;
  }

  button {
    justify-content: center;
  }

  .status {
    min-width: 0;
    min-height: 38px;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    padding: 0 10px;
    overflow: hidden;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }

  .status:has(.status-message:empty) {
    justify-content: center;
  }

  #loaded-at {
    overflow: hidden;
    width: auto;
    text-overflow: ellipsis;
  }

}

@media (max-width: 900px) {
  .panel {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  td {
    display: block;
    width: 100% !important;
  }

  table {
    margin: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    background: rgba(3, 20, 39, 0.24);
  }

  tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(7, 35, 66, 0.72)),
      var(--panel);
    overflow: hidden;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 8px 18px rgba(0, 12, 34, 0.24);
  }

  tr:has(td[colspan]) {
    grid-column: 1 / -1;
  }

  tbody tr:nth-child(even),
  tbody tr:hover {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(7, 35, 66, 0.72)),
      var(--panel);
  }

  tbody tr,
  tbody tr:nth-child(even),
  tbody tr:hover {
    background-color: rgba(7, 35, 66, 0.72);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(7, 35, 66, 0.72));
  }

  td {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    justify-content: center;
    text-align: left !important;
    min-height: 0;
    border-bottom: 1px solid var(--line);
    padding: 7px 9px;
    overflow-wrap: normal;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
  }

  td:nth-child(1) {
    display: none;
  }

  td:nth-child(2) {
    order: 1;
    grid-column: 1 / -1;
    align-items: stretch;
    min-height: 38px;
    background: rgba(11, 54, 92, 0.56);
  }

  td:nth-child(2)::before {
    display: none;
  }

  td:nth-child(n + 3):nth-child(-n + 7) {
    flex-direction: row;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
  }

  td:nth-child(n + 3):nth-child(-n + 7)::before {
    flex: 0 0 auto;
  }

  td:nth-child(3) {
    order: 2;
    border-right: 1px solid var(--line);
  }

  td:nth-child(4) {
    order: 2;
  }

  td.rate:nth-child(3),
  td.rate:nth-child(4) {
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    text-align: center !important;
  }

  td:nth-child(n + 5):nth-child(-n + 7) {
    grid-column: 1 / -1;
  }

  td:nth-child(6) {
    order: 3;
  }

  td:nth-child(5) {
    order: 4;
  }

  td:nth-child(7) {
    order: 5;
  }

  td:nth-child(7) {
    border-bottom: 0;
  }

  td.rate {
    font-size: 17px;
    line-height: 1.1;
  }

  td.converted {
    font-size: 14px;
    line-height: 1.2;
    white-space: normal;
  }

  .value-with-flag {
    justify-content: flex-end;
    gap: 5px;
  }

  .best-marker {
    min-height: 18px;
    font-size: 10px;
    padding: 0 6px;
  }

  .bank {
    display: flex;
    width: 100%;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
  }

  .bank strong,
  .bank-link {
    min-width: 0;
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .bank span {
    font-size: 12px;
  }

  .bank-status-mobile {
    display: inline-flex;
    flex: 0 0 auto;
  }

  td[colspan] {
    display: block;
    grid-column: 1 / -1;
  }

  td[colspan]::before {
    content: "";
    display: none;
  }
}

@media (max-width: 340px) {
  .input-row {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .action-row {
    width: fit-content;
    max-width: 100%;
    grid-template-columns: minmax(0, max-content) 100px;
    gap: 6px;
    justify-content: end;
  }

  main:not(.show-twd-conversion):not(.show-cny-conversion) .input-row {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  main:not(.show-twd-conversion):not(.show-cny-conversion) .action-row {
    width: fit-content;
    max-width: 100%;
    grid-template-columns: minmax(0, max-content) 94px;
    justify-content: end;
  }

  tbody {
    grid-template-columns: 1fr;
  }

  tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  td:last-child {
    border-bottom: 0;
  }
}
