.myclass-group-toolbar {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 3998;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 2px solid var(--line, #efe7da);
  border-radius: 16px;
  background: var(--paper, #fff);
  box-shadow: 0 6px 0 var(--shadow, #efe4cf);
}

.myclass-group-toolbar[hidden] {
  display: none;
}

.myclass-group-toolbar button,
.myclass-group-modal button {
  border: 2px solid var(--line, #efe7da);
  border-radius: 10px;
  background: #fff8ee;
  color: var(--text, #3a3a3a);
  font-weight: 900;
  cursor: pointer;
}

.myclass-group-toolbar button {
  min-height: 34px;
  padding: 0 12px;
  background: #e9f8ed;
  color: #104d3d;
}

.myclass-group-modal {
  position: fixed;
  inset: 0;
  z-index: 4095;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(58, 58, 58, 0.18);
}

.myclass-group-modal.is-open {
  display: grid;
}

.myclass-group-dialog {
  width: min(980px, 96vw);
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  border: 2px solid var(--line, #efe7da);
  border-radius: 20px;
  background: var(--paper, #fff);
  box-shadow: 0 10px 0 var(--shadow, #efe4cf);
}

.myclass-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.myclass-group-head h2 {
  margin: 0;
  color: var(--text, #3a3a3a);
  font-size: 22px;
  font-weight: 900;
}

.myclass-group-close {
  width: 36px;
  height: 36px;
  background: #f8f3ed !important;
  font-size: 20px;
}

.myclass-group-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.myclass-group-summary div {
  min-height: 74px;
  padding: 12px;
  border: 2px solid var(--line, #efe7da);
  border-radius: 14px;
  background: #fffaf2;
}

.myclass-group-summary span {
  display: block;
  margin-bottom: 8px;
  color: var(--sub, #8e8c84);
  font-size: 12px;
  font-weight: 800;
}

.myclass-group-summary strong {
  display: block;
  color: var(--text, #3a3a3a);
  font-size: 22px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myclass-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.myclass-group-tabs button,
.myclass-group-mode button {
  min-height: 34px;
  padding: 0 12px;
}

.myclass-group-tabs .is-active,
.myclass-group-mode .is-active {
  border-color: #69a790;
  background: #e9f8ed;
  color: #104d3d;
}

.myclass-group-form {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) minmax(160px, 1.2fr) minmax(92px, 0.55fr) minmax(170px, 1.4fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 12px;
  border: 2px solid var(--line, #efe7da);
  border-radius: 16px;
  background: #fffdf8;
}

.myclass-group-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text, #3a3a3a);
  font-size: 12px;
  font-weight: 900;
}

.myclass-group-form input,
.myclass-group-form select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 2px solid var(--line, #efe7da);
  border-radius: 10px;
  background: #fffaf2;
  color: var(--text, #3a3a3a);
  font-weight: 800;
  box-sizing: border-box;
}

.myclass-group-mode {
  display: inline-flex;
  gap: 6px;
}

.myclass-group-primary {
  min-width: 76px;
  min-height: 38px;
  padding: 0 16px;
  background: #69a790 !important;
  color: #fff !important;
  box-shadow: 0 4px 0 #568a77;
}

.myclass-group-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.myclass-group-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.myclass-group-rank {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 58px 82px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  text-align: left;
  background: #fffaf2 !important;
}

.myclass-group-rank.is-selected {
  border-color: #69a790;
  background: #f0fff7 !important;
}

.myclass-group-rank-no {
  color: #69a790;
  font-size: 16px;
  font-weight: 900;
}

.myclass-group-rank-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text, #3a3a3a);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myclass-group-rank-meta {
  color: var(--sub, #8e8c84);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.myclass-group-rank strong {
  color: var(--text, #3a3a3a);
  font-size: 17px;
  text-align: right;
}

.myclass-group-rank strong.is-positive {
  color: #1d6b57;
}

.myclass-group-rank strong.is-negative {
  color: #a65346;
}

.myclass-group-empty {
  grid-column: 1 / -1;
  padding: 34px 16px;
  border: 2px dashed var(--line, #efe7da);
  border-radius: 16px;
  color: var(--sub, #8e8c84);
  font-weight: 900;
  text-align: center;
}

@media (max-width: 900px) {
  .myclass-group-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .myclass-group-reason {
    grid-column: 1 / -1;
  }

  .myclass-group-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .myclass-group-toolbar {
    right: 10px;
    bottom: 72px;
    max-width: calc(100vw - 20px);
  }

  .myclass-group-modal {
    padding: 10px;
  }

  .myclass-group-dialog {
    padding: 14px;
    border-radius: 16px;
  }

  .myclass-group-summary,
  .myclass-group-form {
    grid-template-columns: 1fr;
  }

  .myclass-group-rank {
    grid-template-columns: 38px minmax(0, 1fr) 48px 70px;
  }
}
