.gem-cash-rate-panel {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 14px 16px;
  border: 1px solid #3b465b;
  border-radius: 12px;
  background: #0e141f;
}

.gem-cash-rate-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.gem-cash-rate-copy strong {
  color: var(--text);
  font-size: 13px;
}

.gem-cash-rate-copy span,
.gem-cash-rate-panel > small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.gem-rate-source-control {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding-top: 2px;
}

.gem-rate-source-choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #7f8ca1;
  white-space: nowrap;
}

.gem-rate-source-choice.active,
.gem-rate-source-choice.is-rate-source-active {
  color: var(--accent-2);
}

.gem-rate-choice-title {
  color: inherit;
  font-size: 11px;
  font-weight: 650;
}

.gem-cash-rate-ratio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  white-space: nowrap;
}

.gem-cash-rate-ratio b,
.gem-rate-shop strong {
  color: inherit;
  font-size: 12px;
  font-weight: 650;
}

.gem-cash-rate-ratio input {
  width: 54px;
  height: 26px;
  min-width: 0;
  padding: 2px 6px;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  text-align: center;
  background: #111722;
  border: 1px solid #303a4d;
  border-radius: 6px;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.gem-cash-rate-ratio input:focus {
  border-color: #66748c;
  box-shadow: 0 0 0 1px rgba(116,169,230,.14);
}

.gem-cash-rate-ratio em {
  color: inherit;
  font-style: normal;
}

.gem-rate-shop {
  flex: 1 1 auto;
}

.gem-rate-crystal {
  flex: 1 1 auto;
  flex-wrap: wrap;
  row-gap: 3px;
}
.gem-crystal-cash-equivalent {
  color: #9aa8bc;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.gem-rate-crystal-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  white-space: nowrap;
}

.gem-rate-crystal-input b {
  color: inherit;
  font-size: 11px;
  font-weight: 650;
}

.gem-rate-crystal-input input {
  width: 78px;
  height: 26px;
  min-width: 0;
  padding: 2px 7px;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  text-align: right;
  background: #111722;
  border: 1px solid #303a4d;
  border-radius: 6px;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.gem-rate-crystal-input input:focus {
  border-color: #66748c;
  box-shadow: 0 0 0 1px rgba(116,169,230,.14);
}

.gem-rate-crystal-input em {
  color: inherit;
  font-style: normal;
}

.gem-rate-shop small {
  color: #7f8ca1;
  font-size: 10px;
  white-space: nowrap;
}

.gem-rate-source-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 20px;
  padding: 0;
  border: 1px solid #4a556b;
  border-radius: 999px;
  background: #161e2b;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.gem-rate-source-toggle:hover {
  border-color: #66748c;
}

.gem-rate-source-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #dce4f1;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: transform .18s ease;
}

.gem-rate-source-toggle.crystal-active .gem-rate-source-knob {
  transform: translateX(18px);
}

.gem-price-table {
  width: 100%;
  min-width: 0 !important;
  margin: 10px 0 24px;
  border-collapse: collapse;
  table-layout: fixed;
}

.gem-price-table th,
.gem-price-table td,
.gem-price-table th:first-child,
.gem-price-table td:first-child {
  width: auto !important;
  padding: 10px 5px;
  border-bottom: 1px solid #283143;
  text-align: center !important;
  white-space: nowrap;
}

.gem-price-table .gem-level-col {
  width: 20% !important;
}

.gem-price-table thead th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.gem-price-table .gem-price-group-head th:not(.gem-level-col) {
  color: var(--text);
  font-size: 13px;
  background: #111823;
}

.gem-price-table .gem-price-group-head th:nth-child(2) {
  border-left: 1px solid #303a4d;
}

.gem-price-table .gem-price-subhead th:first-child {
  border-left: 1px solid #303a4d;
}

.gem-price-table .gem-price-group-head th:nth-child(3),
.gem-price-table .gem-price-subhead th:nth-child(3) {
  border-left: 1px solid #303a4d;
}

.gem-price-table tbody th {
  color: var(--text);
  font-size: 12px;
}

.gem-price-table td {
  font-size: 12px;
  font-weight: 650;
}

.gem-price-table .gem-gold-value {
  color: var(--accent-2);
}

.gem-price-table .gem-cash-value {
  color: var(--good);
}

.gem-price-table tbody td:nth-child(2),
.gem-price-table tbody td:nth-child(4) {
  border-left: 1px solid rgba(48, 58, 77, .7);
}

.gem-level-text {
  vertical-align: middle;
}

#gem-automatic-list h3 {
  margin: 22px 0 4px;
  font-size: 14px;
}

@media (max-width: 720px) {
  .gem-cash-rate-panel {
    gap: 10px;
    padding: 12px;
  }

  .gem-rate-source-control {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .gem-rate-shop {
    flex-basis: auto;
  }

  .gem-price-table th,
  .gem-price-table td,
  .gem-price-table th:first-child,
  .gem-price-table td:first-child {
    padding: 8px 2px;
    font-size: 10px;
  }

  .gem-price-table .gem-level-col {
    width: 20% !important;
    white-space: normal;
  }

  .gem-price-table .gem-price-group-head th:not(.gem-level-col) {
    font-size: 11px;
  }

  .gem-price-table .gem-gold-unit {
    display: none;
  }

  .gem-price-table .gem-grade {
    display: table;
    margin: 3px auto 0;
    padding: 1px 3px;
    font-size: 9px;
  }
}
