#tool-body {
  --cb-primary: #3a7bfd;
  --cb-text: #2a3344;
  --cb-muted: #6b7c99;
  --cb-line: #d9e4f5;
  --cb-card: #fff;
  --cb-soft: #eef4ff;
  --cb-ok: #23a55a;
  --cb-bad: #e5484d;
  color: var(--cb-text);
}
.theme-dark-mode #tool-body {
  --cb-text: #e6e6e6;
  --cb-muted: #9a9a9a;
  --cb-line: #444;
  --cb-card: #2b2b2b;
  --cb-soft: #333;
}
.theme-dark-mode #tool-body .cb-mode,
.theme-dark-mode #tool-body .cb-key,
.theme-dark-mode #tool-body .cb-action {
  background: #3a3a3a;
}
.theme-dark-mode #tool-body .cb-mode.is-on {
  border-color: var(--cb-primary);
  background: #30415c;
}
.theme-dark-mode #tool-body .cb-key:active {
  background: #4a4a4a;
}

#tool-body .cb-wrap {
  max-width: 640px;
  margin: 0 auto;
}
#tool-body .cb-card {
  background: var(--cb-card);
  border: 1px solid var(--cb-line);
  border-radius: 12px;
  padding: 20px;
}
#tool-body .cb-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
}
#tool-body .cb-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#tool-body .cb-mode[data-mode="by"] {
  grid-column: 1 / -1;
}
@media screen and (max-width: 480px) {
  #tool-body .cb-modes { grid-template-columns: 1fr; }
}
#tool-body .cb-mode {
  border: 2px solid var(--cb-line);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  background: var(--cb-card);
  transition: border-color .15s;
}
#tool-body .cb-mode.is-on {
  border-color: var(--cb-primary);
  background: var(--cb-soft);
}
#tool-body .cb-mode h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}
#tool-body .cb-mode p {
  margin: 0;
  font-size: 13px;
  color: var(--cb-muted);
  line-height: 1.5;
}
#tool-body .cb-tips {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--cb-soft);
  border-radius: 8px;
  font-size: 13px;
  color: var(--cb-muted);
  line-height: 1.8;
}
#tool-body .cb-start {
  display: block;
  width: 100%;
  margin: 18px 0 0;
  background: var(--cb-primary);
  border: none;
  height: 44px;
  font-size: 15px;
  letter-spacing: 2px;
}
#tool-body .cb-progress {
  text-align: center;
  font-size: 14px;
  color: var(--cb-muted);
  margin: 0 0 12px;
}
#tool-body .cb-progress b {
  color: var(--cb-text);
  font-size: 16px;
}
#tool-body .cb-plate {
  border: 1px solid var(--cb-line);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  justify-content: center;
}
#tool-body .cb-plate canvas {
  width: 100%;
  max-width: 300px;
  height: auto;
  display: block;
  border-radius: 50%;
}
#tool-body .cb-hint {
  text-align: center;
  font-size: 13px;
  color: var(--cb-muted);
  margin: 12px 0 5px;
}
#tool-body .cb-display {
  height: 52px;
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  background: var(--cb-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  min-height: 52px;
}
#tool-body .cb-display .cb-ph {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--cb-muted);
}
#tool-body .cb-keys {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 10px;
}
#tool-body .cb-key {
  height: 50px;
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  background: var(--cb-card);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  color: var(--cb-text);
  transition: background .1s;
}
#tool-body .cb-key:active {
  background: var(--cb-soft);
}
#tool-body .cb-key:disabled,
#tool-body .cb-action:disabled {
  opacity: 0.45;
  cursor: default;
}
#tool-body .cb-key.is-del {
  font-size: 16px;
}
#tool-body .cb-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
#tool-body .cb-action {
  height: 46px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  background: var(--cb-soft);
  color: var(--cb-primary);
}
#tool-body .cb-action.is-main {
  background: var(--cb-primary);
  color: #fff;
}
#tool-body .cb-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
}
#tool-body .cb-badge.is-good {
  background: rgba(35, 165, 90, .12);
  color: var(--cb-ok);
}
#tool-body .cb-badge.is-mid {
  background: rgba(240, 150, 30, .12);
  color: #d97a06;
}
#tool-body .cb-badge.is-bad {
  background: rgba(229, 72, 77, .12);
  color: var(--cb-bad);
}
.theme-dark-mode #tool-body .cb-badge.is-good {
  background: rgba(35, 165, 90, .25);
}
.theme-dark-mode #tool-body .cb-badge.is-mid {
  background: rgba(240, 150, 30, .25);
}
.theme-dark-mode #tool-body .cb-badge.is-bad {
  background: rgba(229, 72, 77, .25);
}
#tool-body .cb-result-tip {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--cb-text);
}
#tool-body .cb-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
@media screen and (max-width: 480px) {
  #tool-body .cb-stats { grid-template-columns: 1fr; }
}
#tool-body .cb-stat {
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  padding: 12px 14px;
}
#tool-body .cb-stat .cb-slabel {
  font-size: 13px;
  color: var(--cb-muted);
  margin-bottom: 4px;
}
#tool-body .cb-stat .cb-sval {
  font-size: 20px;
  font-weight: 700;
}
#tool-body .cb-list {
  margin-top: 14px;
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  overflow: hidden;
}
#tool-body .cb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--cb-line);
  font-size: 13px;
}
#tool-body .cb-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
#tool-body .cb-row:last-child {
  border-bottom: none;
}
#tool-body .cb-row .cb-idx {
  color: var(--cb-muted);
  width: 34px;
  flex: none;
}
#tool-body .cb-row .cb-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  cursor: pointer;
}
#tool-body .cb-row .cb-pair {
  white-space: nowrap;
}
#tool-body .cb-row .cb-mine {
  font-weight: 700;
}
#tool-body .cb-row .cb-ok {
  color: var(--cb-ok);
}
#tool-body .cb-row .cb-bad {
  color: var(--cb-bad);
}
#tool-body .cb-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
#tool-body .cb-disclaimer {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--cb-muted);
  line-height: 1.7;
}
#tool-body .hidden {
  display: none;
}