.dc {
  margin: 6px 0 20px;
}
.dc .hint {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0;
}
.dc-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(220px, 250px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.dc-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px 12px;
  min-width: 0;
}
.dc-panel h3,
.dc-rhead h3 {
  font: 700 16px var(--serif);
  margin: 2px 0 8px;
  text-wrap: balance;
}
.dc-red {
  color: #c0392b;
}
@media (prefers-color-scheme: dark) {
  .dc-red {
    color: #ff8a7a;
  }
}
.dc-tabs {
  display: flex;
  gap: 2px;
  margin: -10px -12px 10px;
  border-bottom: 3px solid var(--btn);
}
.dc-tab {
  font: 700 14px var(--sans);
  min-width: 40px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px 4px 0 0;
  background: var(--th);
  color: var(--text);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.dc-tab:hover {
  filter: brightness(1.08);
}
.dc-tab.on {
  background: var(--btn);
  color: var(--btn-text);
}
.dc-plus {
  font-size: 18px;
  background: transparent;
}
.dc-tab:focus-visible,
.dc-colbtn:focus-visible,
.dc-slot:focus-visible,
.dc-item:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}
.dc-lhead {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.dc-name {
  font: 700 15px var(--serif);
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 4px 6px;
  flex: 1 1 120px;
  min-width: 0;
}
.dc-name:hover,
.dc-name:focus {
  border-color: var(--border);
  background: var(--content);
  outline: none;
}
.dc-acts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dc-acts .pk-btn {
  white-space: nowrap;
  min-height: 32px;
}
.dc-sync {
  background: var(--content);
  border: 1px solid var(--soft);
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 8px;
}
.dc-sync-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dc-sync-row .dc-name {
  font: 14px var(--sans);
  border-color: var(--border);
  background: var(--panel);
  flex: 1 1 110px;
}
.dc-sync-msg {
  font-size: 13px;
  margin: 4px 0 6px;
  color: var(--muted);
  text-wrap: pretty;
}
.dc-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: start;
  margin: 6px 0;
}
.dc-lab {
  font: 600 13px/32px var(--sans);
  color: var(--muted);
  -webkit-user-select: none;
  user-select: none;
}
.dc-row .pk-chip {
  white-space: nowrap;
}
.dc-num,
.dc-select,
.dc-search {
  font: 14px var(--sans);
  color: var(--text);
  background: var(--content);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 5px 7px;
  min-height: 32px;
}
.dc-num {
  width: 84px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dc-select {
  max-width: 100%;
}
.dc-search {
  width: 100%;
}
.dc-num:focus-visible,
.dc-select:focus-visible,
.dc-search:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}
.dc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px 10px;
  margin: 8px 0 4px;
}
.dc-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.dc-sl {
  font: 600 13px var(--sans);
  color: var(--muted);
}
.dc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  color: var(--muted);
  margin: 4px 0 8px;
}
.dc-info span:first-child {
  font-weight: 700;
  color: var(--green);
}
.dc-info span.dc-red {
  color: #c0392b;
}
.dc-equip {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 4px 0 8px;
}
.dc-slots {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 6px;
}
.dc-slot {
  position: relative;
  width: 72px;
  height: 72px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(0, 0, 0, .82);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-user-select: none;
  user-select: none;
}
.dc-slot:hover:not(:disabled) {
  border-color: #d9b55a;
}
.dc-slot.k-wings img {
  filter: brightness(1.9) contrast(1.05) drop-shadow(0 2px 3px rgba(0, 0, 0, .7));
}
.dc-slot img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7));
}
.dc-slot.open {
  border-color: #f0b030;
  box-shadow: 0 0 0 2px rgba(240, 176, 48, .5);
}
.dc-slot.bad {
  border-color: #ff3b30;
  box-shadow: inset 0 0 12px rgba(255, 59, 48, .6);
}
.dc-slot.blocked {
  opacity: .35;
  cursor: default;
}
.dc-empty {
  font: 600 11px/1.2 var(--sans);
  color: #8c8578;
  text-align: center;
}
.dc-lv {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font: 700 11px var(--sans);
  color: #ffd27a;
  text-shadow: 0 0 3px #000, 0 0 3px #000;
}
.dc-pick {
  background: var(--content);
  border: 1px solid var(--soft);
  border-radius: 4px;
  padding: 8px;
  margin: 0 0 8px;
}
.dc-pick[hidden] {
  display: none;
}
.dc-phead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.dc-list {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--soft);
  border-radius: 3px;
  margin-top: 6px;
  background: var(--panel);
}
.dc-list[hidden] {
  display: none;
}
.dc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 8px;
  border: 0;
  border-bottom: 1px solid var(--soft);
  background: transparent;
  color: var(--text);
  font: 13.5px var(--sans);
  text-align: left;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.dc-item:last-child {
  border-bottom: 0;
}
.dc-item:hover {
  background: var(--th);
}
.dc-item.on {
  background: var(--btn);
  color: var(--btn-text);
}
.dc-item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: none;
}
.dc-item span {
  flex: 1;
  min-width: 0;
}
.dc-item small {
  color: var(--muted);
  white-space: nowrap;
}
.dc-item.on small {
  color: inherit;
}
.dc-ctl {
  margin-top: 8px;
}
.dc-iname {
  margin: 4px 0;
  font-size: 14px;
}
.dc-mcard {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.dc-mcard img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  flex: none;
}
.dc-mt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dc-mname {
  font: 700 16px var(--serif);
}
.dc-mmaps {
  font-size: 12.5px;
  color: var(--muted);
}
.dc-mstats {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 14px;
}
.dc-mstats th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 1px solid var(--soft);
}
.dc-mstats td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 4px 0;
  border-bottom: 1px solid var(--soft);
}
.dc-rhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.dc-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--table);
}
.dc-table th,
.dc-table td {
  border: 1px solid var(--soft);
  padding: 5px 8px;
}
.dc-table tr:first-child th {
  background: var(--th);
}
.dc-table th {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.dc-table td {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dc-table tr:first-child th.cur {
  background: var(--btn);
}
.dc-table th.cur .dc-colbtn {
  color: var(--btn-text);
}
.dc-colbtn {
  font: 700 13.5px/1.25 var(--sans);
  white-space: normal;
  text-align: center;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  padding: 2px 4px;
  -webkit-user-select: none;
  user-select: none;
}
.dc-colbtn:hover {
  text-decoration: underline;
}
.dc-table td.best {
  color: #1d6b12;
  font-weight: 700;
  background: rgba(86, 225, 86, .18);
}
@media (prefers-color-scheme: dark) {
  .dc-table td.best {
    color: #8fef7f;
    background: rgba(86, 225, 86, .12);
  }
}
.dc-sec td {
  text-align: left;
  font-style: italic;
  font-weight: 600;
  color: var(--muted);
  background: var(--content);
}
.dc-note {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
  text-wrap: pretty;
}
.dc-chart {
  margin-top: 14px;
}
.dc-svg {
  width: 100%;
  height: auto;
  display: block;
}
.dc-grid line,
.dc-svg .dc-grid {
  stroke: var(--soft);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.dc-svg .dc-base {
  stroke: var(--border);
  stroke-width: 1;
}
.dc-svg .dc-ax {
  fill: var(--muted);
  font: 11px var(--sans);
}
.dc-svg .dc-bar {
  fill: #a0672f;
}
.dc-svg .dc-bar.miss {
  fill: #9a9184;
}
.dc-svg .dc-bar.hov {
  fill: #c98a45;
}
@media (prefers-color-scheme: dark) {
  .dc-svg .dc-bar {
    fill: #d9a35f;
  }
  .dc-svg .dc-bar.hov {
    fill: #f0c080;
  }
  .dc-svg .dc-bar.miss {
    fill: #6c7896;
  }
}
.dc-tip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--text);
  color: var(--content);
  font: 12.5px var(--sans);
  padding: 4px 8px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 50;
  white-space: nowrap;
}
.dc-tip[hidden] {
  display: none;
}
@media (max-width: 1250px) {
  .dc-grid {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  }
  .dc-results {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .dc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dc-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .dc-lab {
    line-height: 1.4;
  }
  .dc-table {
    font-size: 13px;
  }
  .dc-table th,
  .dc-table td {
    padding: 4px 6px;
  }
}
.cmp-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}
.cmp-open,
.cmp-calc {
  font: 600 14px var(--sans);
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 6px 14px;
  cursor: pointer;
  text-decoration: none !important;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
}
.cmp-open:hover,
.cmp-calc:hover {
  background: var(--th);
  color: var(--text);
}
.cmp-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 12px 12px;
  overflow-y: auto;
}
.cmp-back[hidden] {
  display: none;
}
.cmp-box {
  background: var(--content);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 18px;
  width: min(1100px, 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.cmp-box h3 {
  font: 700 18px var(--serif);
  margin: 0 0 10px;
  text-wrap: balance;
}
.cmp-lab {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.cmp-row {
  display: flex;
  gap: 6px;
}
.cmp-row .pk-btn {
  min-height: 34px;
  font-weight: 700;
}
.cmp-list {
  max-height: 220px;
}
.cmp-out {
  margin-top: 12px;
}
.cmp-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  background: var(--table);
}
.cmp-table th,
.cmp-table td {
  border: 1px solid var(--soft);
  padding: 6px 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cmp-table tr:first-child th {
  background: var(--th);
  white-space: nowrap;
}
.cmp-name {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left !important;
  min-width: 220px;
}
.cmp-name img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.cmp-name a {
  flex: 1;
  font-weight: 700;
}
.cmp-diff td.up {
  background: #56e156;
  color: #000;
}
.cmp-diff td.down {
  background: #ff6262;
  color: #000;
}
.cmp-diff td.same {
  background: #ffed4c;
  color: #000;
}
.cmp-foot {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.cmp-foot .pk-btn {
  min-height: 34px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}
body.cmp-on {
  overflow: hidden;
}
@media (max-width: 720px) {
  .dc-table tr > th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--table);
    box-shadow: 1px 0 0 var(--soft);
  }
  .dc-table tr:first-child > th:first-child {
    background: var(--th);
  }
}
@media (max-width: 720px) {
  .cmp-box {
    padding: 12px;
  }
  .cmp-name {
    min-width: 0;
    flex-wrap: wrap;
    gap: 4px;
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--table);
    box-shadow: 1px 0 0 var(--soft);
  }
  .cmp-name img {
    display: none;
  }
  .cmp-name a {
    flex: 1 1 100%;
    font-size: 13px;
  }
  .cmp-diff th,
  .cmp-table tr:first-child th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--th);
  }
  .cmp-table th,
  .cmp-table td {
    padding: 5px 6px;
    font-size: 13px;
  }
}
