.yzx-mode-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #d7dce2;
  border-radius: 7px;
  background: #f5f7f8;
  flex-shrink: 0;
}

.yzx-mode-switch button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  color: #59636e;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.yzx-mode-switch button.is-active {
  color: #fff;
  background: #177b68;
  box-shadow: 0 1px 2px rgb(0 0 0 / 14%);
}

#yzx-study-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0 auto 18px;
  overflow: hidden;
  border: 1px solid #e1e5e9;
  border-radius: 7px;
  background: #e1e5e9;
}

#yzx-study-dashboard > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 11px 14px;
  background: #fff;
}

.yzx-stat-label {
  color: #6b737c;
  font-size: 12px;
}

#yzx-study-dashboard strong {
  color: #20262d;
  font-size: 14px;
  white-space: nowrap;
}

.yzx-today-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.yzx-medals {
  display: inline-flex;
  min-width: 20px;
  color: #c17800;
  font-size: 19px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 18%));
  white-space: nowrap;
}

.yzx-medals[hidden] {
  display: none;
}

.yzx-plan-stat > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#yzx-daily-plan {
  width: 54px;
  height: 30px;
  padding: 0 5px;
  border: 1px solid #cfd5db;
  border-radius: 5px;
  color: #20262d;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.yzx-plan-stat small {
  color: #6b737c;
  font-size: 11px;
}

.yzx-bilingual {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.yzx-vi {
  order: 1;
}

.yzx-zh {
  order: 2;
}

.yzx-pinyin {
  order: 3;
  margin-top: 2px;
  color: #68737d;
  font-size: 12px;
  line-height: 1.45;
}

.yzx-mode-zh .yzx-zh {
  order: 1;
  margin-top: 0 !important;
  color: #20262d !important;
  font-size: 17px !important;
  font-weight: 600;
  line-height: 1.5;
}

.yzx-mode-zh .yzx-pinyin {
  order: 2;
  color: #50606b;
  font-size: 13px;
}

.yzx-mode-zh .yzx-vi {
  order: 3;
  margin-top: 4px;
  color: #727b84 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

.yzx-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: #c94d4d;
  box-shadow: 0 0 0 2px rgb(201 77 77 / 12%);
  vertical-align: middle;
}

.yzx-status-dot.is-complete {
  background: #248b60;
  box-shadow: 0 0 0 2px rgb(36 139 96 / 14%);
}

#yzx-lesson-progress {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: -7px 0 12px;
  color: #8a4b4b;
  font-size: 12px;
}

#yzx-lesson-progress.is-complete {
  color: #247654;
}

#yzx-lesson-progress .yzx-status-dot {
  margin-left: 0;
}

@media (max-width: 640px) {
  .yzx-mode-switch {
    width: 100%;
  }

  .yzx-mode-switch button {
    flex: 1;
  }

  #yzx-study-dashboard {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  #yzx-study-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
